Repository navigation
Conversation
A delayed event-loop turn can expire the entry watchdog before the body handler runs. Advance the test clock only while the loop waits for work. Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #2099
Changelog category
Changelog entry
None.
Why
The streaming retirement test waits half a second for the response body to start. A delayed event-loop turn can expire that watchdog before the body signals entry. Failed unit job
Scope and risk
Run the streaming test on the same private clock used by the retirement cancellation test. The clock advances when the event loop waits for work. The test still checks that retirement refuses while either the stream or its background cleanup is active, and the blocked-wait control checks the half-second deadline.
Compatibility, rollout and rollback
Tests
body_entered.wait()on the failed merge, its base and clean main. The same probe passed with this patch.LOOM_ENV_FILE= .venv/bin/python -m pytest -q tests/unit/test_cell_retirement.py -k 'stream_and_response or request_clock or production_child_task or websocket_lifetime'passed.make lint,make typecheckand Ruff formatting passed. The full format gate passed when tested with the dashboard assertion repair in Format the assistant source-link assertion #2107. Clean main still fails that Biome check.AI assistance in the code
AI-generated with Codex. Reproduced the failed wait and checked that the private clock kept the blocked-wait control bounded.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
Note
Low Risk
Test-only change; no production code or runtime behavior.
Overview
Stabilizes
test_stream_and_response_background_cleanup_remain_countedby scoping asyncio to the function loop and activating the shared_request_clockfixture—the same setup already used by the production child-task cancellation and request-clock bounded-wait tests.The test still asserts that retirement stays blocked while the stream body or
BackgroundTaskcleanup is active; only time progression is driven by the manual clock when the loop blocks inselect, so the 0.5swait_foronbody_enteredno longer flakes when CI delivers a slow event-loop turn.Reviewed by Cursor Bugbot for commit 083965a. Bugbot is set up for automated code reviews on this repo. Configure here.