Conversation
The previous patch fixed two AcpAdapterV2 tests but missed the it.live "Stop after settled soft steer" test with the same race, which failed the Test gate on the last two runs. The replacement commit covers all three and is proposed upstream as pingdotgg#13201. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a focused test-harness synchronization change: three ACP tests now await an explicit prompt-settlement signal instead of relying on scheduler yields. The optional adapter hook defaults to a no-op and is not provided on production paths, so no user-facing behavior or product defaults change. No code changes detected at You can add or adjust custom eligibility rules. Learn more. |
|
@juliusmarminge could you merge this when you get a chance? It's test-only: three All server test shards pass. The one red check, |
1bd44f2 to
3b9c885
Compare
b0ad145 to
25e8a82
Compare
fe4f6ad to
87c67bd
Compare
70246f5 to
ccab19d
Compare
Three AcpAdapterV2 tests waited for the raw `stopReason` frame from the mock agent and then yielded twice, assuming the adapter had already recorded the settled prompt. On slower runners the interrupt can win, the adapter still sees a running prompt and sends `session/cancel`, and "Stop after settled soft steer contains the orphan runtime" fails with "settled soft steer must not send session/cancel before the later Stop". Add an `afterPromptSettledWithBackgroundWork` test hook that fires once the adapter records the settle, and have the tests await it instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ccab19d to
4f3c204
Compare
What Changed
Added an
afterPromptSettledWithBackgroundWorktest hook toAcpAdapterV2. It fires once the adapter records a settled prompt while background work is still running. ThreeAcpAdapterV2tests now wait on that hook before they send the soft-steer interrupt. Before, they waited for the rawstopReasonframe and then did twoEffect.yieldNowcalls. Test-only change: the hook defaults toEffect.void.Why
Stop after settled soft steer contains the orphan runtime and respawns without subagent carryoveris anit.livetest against the mock ACP agent subprocess. The rawstopReasonframe is logged before the adapter records the settle. Two yields do not guarantee the adapter has caught up. When the interrupt arrives first, the adapter still treats the prompt as running and sendssession/cancel, and the test fails:This happened on 2 of 2 recent Linux CI runs of our fork's nightly build of this branch. On macOS it passed 14 of 14 runs, including 8 runs under CPU load. Two
it.effecttests use the same wait pattern, so they get the same fix.Verification
vp test run src/orchestration-v2/Adapters/AcpAdapterV2.test.tspasses 113/113 after restacking onto9fcc9a4bdb(head4f3c2042ed).apps/servertypecheck andvp fmt --checkpass.vp lintreports no new warnings.Verification caveat: the first new-tip run had two cancellation-acknowledgement failures in unchanged tests. Those two cases passed on the unmodified base, and the full candidate file passed 113/113 on retry without code changes.
Checklist
Fixed by Claude Opus 5.5 in Claude Code, running in T3 Code.
🤖 Generated with Claude Code