Repository navigation
refactor(bub-ag-ui): scope adapter to AG-UI protocol interactions - #102
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
No blocking findings; recommend allowing 921a6d8.
The last finding — the 50 ms turn budget in the deadline test thread — is resolved, and the fix keeps the timeout scenario rather than masking it. advance_time freezes loop.time(), so asyncio.timeout(self.max_run_seconds) in runtime.py gets a deadline that only moves when the test advances it, and each test waits for the observable phase (entered, save_started) before jumping past the deadline. The tests are not vacuous: with the turn timeout replaced by asyncio.timeout(None) the same three tests hang at those waits instead of passing, so they still exercise the real timeout and cancellation path. They are also no longer timing-sensitive: 10/10 passes of the four touched tests with eight CPU hogs on four cores, and the package suite is 67 passed at this head.
The reduction of the backpressure sleep to asyncio.sleep(0) keeps its guard: with asyncio.Queue(maxsize=16) made unbounded the test still fails at assert 10000 < 10000, so bounded delivery is still detected without the wall-clock wait.
The changed Markdown matches what this head does. The development block works in the order shown — in a fresh environment the uv sync --frozen --group test line installs the test group, and uv run --frozen pytest then resolves pytest (9.2.0); run on its own in an environment without that group it fails to spawn pytest, so the two lines need to stay together.
Nothing else in this test-only revision changes the behavior reviewed at fda86d6.
Summary
run_streamwith scoped EventBus observers for AG-UI output and external tool continuation.Compatibility
POST /agent; removes the separate history, replay, and cancellation endpoints.Tests