Repository navigation
test(orchestration): multi-round Phase 3 output-channel regression - #40
Merged
Merged
Conversation
Adds TestPhase3FinalizationComposition::test_post_v1027_output_channel_regression_under_multi_round_phase3. Pins the post-v1.0.27 contract at the adaptive_reevaluate level specifically: under multi-round Phase 3 (max_rounds>=2), all rounds' Stage 2 previews and the Stage 3 finalization stage reach the wire via caps.send_response. The pre-v1.0.27 drain race stranded trailing yields produced after the last sub-query response of any round; the user-visible symptom was "8 rounds run on the proxy but only ~1 round's worth of deepening data shows up in the SPA and the query never reaps (no is_during_search=False packets per turn)". Discrimination confirmed end-to-end: the test PASSES on the v1.0.27 substrate and FAILS on the actual pre-v1.0.27 substrate (verified via git worktree restored to d918bf8's middleware/orchestration.py) with the assertion "Stage 3 stranding regression: expected one authoritative per analyzed turn ([0, 1, 2, 3, 4, 5]); got []." Three assertions capturing the multi-round-specific shape: (a) Exactly one is_during_search=False per analyzed turn (Stage 3 reaches the wire). (b) Total preview count >= N_TURNS + sum(per-round spawn counts) (every round's Stage 2 previews reach, not just round 1's). (c) Total emission count >= the multi-round lower bound, not the single-round-only lower bound. The framework-level regression at tests/test_orchestration_middleware.py::TestTrailingYieldAfterSpawnPrimitive ::test_trailing_yield_after_parallel_reaches already pins the substrate's abstract trailing-yield contract via ctx.parallel; this test pins the adaptive_reevaluate-specific manifestation. Suite: 486 pass, 0 fail. mypy --strict clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Adds a regression test that pins the post-v1.0.27 contract at the
adaptive_reevaluate multi-round Phase 3 path specifically.
Companion to the framework-level regression at
tests/test_orchestration_middleware.py::TestTrailingYieldAfterSpawnPrimitive::test_trailing_yield_after_parallel_reaches(which pins the abstract trailing-yield contract via
ctx.parallel).This new test pins the adaptive_reevaluate-specific manifestation:
multi-round dispatch with
max_rounds>=2must deliver every round'sStage 2 previews AND the Stage 3 finalization stage to the wire via
caps.send_response.Discrimination confirmed end-to-end
Test was verified to FAIL on the actual pre-v1.0.27 substrate by
restoring
middleware/orchestration.pyfrom commitd918bf8in agit worktree (keeping the v1.0.27 test file + harness in place), then
running the test. Failure message:
Passes on
main(the v1.0.27 substrate).Three assertions
is_during_search=Falseper analyzed turn — Stage 3finalization reaches the wire.
N_TURNS + sum(per-round spawn counts)—every round's Stage 2 previews reach, not just round 1's.
single-round-only stranding shape.
Test plan
(verified manually; failure message names the stranding
mechanism explicitly).
🤖 Generated with Claude Code