Skip to content

test(rpc): 7098 route-to-predecessor waits for agent_end before the follow-up prompt (#7388) - #7390

Open
code-yeongyu wants to merge 1 commit into
mainfrom
fix/7388-ci-test-races
Open

code-yeongyu wants to merge 1 commit into
mainfrom
fix/7388-ci-test-races

Conversation

@code-yeongyu

@code-yeongyu code-yeongyu commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

Refs #7388 (one of its two failing families; the other is still being traced and stays open on the issue).

Failure

CI run 45075332026, Test (coding-agent 5/10): test/suite/regressions/7098-route-to-predecessor.test.ts > "routes a detached turn, then keeps the handle after predecessor park" failed at line 140: the follow-up prompt ("running on successor") answered success: false.

Cause (test side)

In the park transition the test releases the held model, waits only for the client's message_end, and then sends the next prompt. message_end arrives while the turn is still settling; a prompt without streamingBehavior during a streaming turn is refused (docs/rpc.md, "During streaming"). The test raced the end of the turn, not the product.

Fix

Wait for the turn's end (agent_end for the session) before sending the next prompt. JsonlPeer.waitFor also matches records already received, so the signal cannot be missed. No retry, longer timeout or skip.

Evidence

  • The file passes locally (2/2) on a built tree.
  • Under CPU stress (30 busy loops), 10/10 runs pass with the change. The old version also passed 10/10 locally, so the race did not reproduce on this machine; the CI log above is the failing evidence, and the refusal contract is the documented streaming rule.

Summary by cubic

Fixes a test race in 7098-route-to-predecessor.test.ts where the follow-up prompt could be refused as streaming.

  • The test now waits for agent_end instead of message_end before sending the next prompt, since message_end arrives while the turn is still settling.
  • JsonlPeer.waitFor matches already-received records, so the turn-end signal cannot be missed.

Written for commit 5c35d4e. Summary will update on new commits.

View guided diff Turn on auto-fix

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant