Repository navigation
Tests: two runtime tests no longer race the daemon - #767
Merged
Merged
Conversation
turn_waiting commits as the turn parks, and its active slot is let go when its task ends just after, so a stats read right after the event can still count it active. The two tests that read active_turns there now wait for it, as test_delivery already does. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGE9yc1n2RvseSR8ahH
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
The first steer moves the running command to the background. When it finished before the third steer's turn reached the model, its finish joined that turn's input and the echo answered it instead of the steer. The command now runs past all three turns. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGE9yc1n2RvseSR8ahH
This was referenced Nov 14, 2026
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.
What
Two runtime tests depended on timing that CI sometimes loses. This PR changes only the tests.
A parked turn's slot
When a turn parks, the daemon commits
turn_waitingfirst and releases the turn's active slot a moment later, when the turn's task ends. Astatsread in between still counts the turn inactive_turns. That madetest_answered'stest_a_slow_answer_parks_the_turn_and_its_error_is_the_resultfail once in CI on #716 with(1, 1) != (0, 1).That test, and the approvals test that reads the same stats, now poll until
active_turnsdrops to 0, with a 5 s deadline.test_deliveryalready does this.Releasing the slot inside the park would change the daemon's admission order, so it would need its own discussion. The current order is safe: a parked turn holds no slot by the time its task returns.
A steered-away command's finish
In
test_steers_beyond_the_context_budget_stay_queued_and_run_as_their_own_turns, the first steer moves the runningsleep .4to the background. When the sleep finished before the third steer's turn reached the model, the finish notice joined that turn's input, and the echo model answered the notice instead of the steer. That happened on this PR's first CI run.The command is now
sleep 5, which outlasts all three turns. The test still finishes in about 2.6 s, because none of the turns waits for the command.Performance
None. This changes tests only.
Tests
tests.test_deliverypasses in full.🤖 Generated with Claude Code