Skip to content

Join a headless run's late accounting before it returns, and isolate the shared team fixtures - #2604

Merged
AbirAbbas merged 4 commits into
devfrom
fix/post-wave-test-isolation
Nov 12, 2026
Merged

AbirAbbas merged 4 commits into
devfrom
fix/post-wave-test-isolation

Conversation

@AbirAbbas

Copy link
Copy Markdown
Collaborator

dev's gate went red on six tests after #2597. This fixes five of them at the cause.

What was wrong

  • codeaf do could return while cancelled-call accounting was still writing. A run that timed out returned before the receipt settlement for its cancelled calls had created its usage writer, so a write could land under the run's home after the command had returned. TestARefusedRunThatWroteNothingNamesTheDirectory and TestATimeoutAfterWritingKeepsTheFileInTheJSONEnding caught it as a temp-folder cleanup failure. Recover usage rows after a crash without changing charges #2387 widened the window by routing that write through the durable journal and its retry.
  • Three internal/session team tests read a solo identity an earlier test had saved. TestMixedTeamRecipientsWriteOnceAndNameThoseNotReached, TestPacketDecideAndEscalateRefuseRemoteDestinationsBeforeMutation and TestRemoteTeamSendsStartsPostsAndRousesRefuseBeforeTraffic passed alone and failed in a full package run, on either tree, once the agentdid: add encrypted custody, purpose-bound signing and v1 identity documents #2090 custody save ran first.

What changed

  • The node engine joins admitted receipt settlement inside its existing five-second background stop wait, and every codeaf do closes the process usage writers after its workers stop, under the existing two-second usage close bound. Each leaf keeps the ledger path it was built with. No bound was raised.
  • The shared team fixtures create a paired identity in a home the test owns. No assertion changed.
  • The manual says what do and exec wait for at shutdown.

Validation contract

  • A codeaf do run that times out writes nothing under its home after it returns, when the provider and disk respond within the existing bounds.
  • A cancelled request still leaves its unbilled marker.
  • The team refusal tests pass in a full package run in any order.

Not fixed here

TestStopCutPairsToolsAndAcceptsNextTurn/between_calls=false failed once on CI and did not reproduce in 30 isolated runs or in five runs of its CI shard, so it is left unchanged.

Checked

  • make test-quick, plus Linux and Windows vet.
  • The two do tests 30 times beside their neighbours and with four copies at once; the session shards that held the three team tests, five times each.
  • By hand on the built binary: a real codeaf exec and codeaf do run, and a timed quit.

🤖 Generated with Claude Code

AbirAbbas and others added 4 commits November 11, 2026 19:04
Give sharing fixtures their own paired home before custody saves, preserving explicit solo delivery and device cursor assertions.
Track leaf receipt settlement in the existing background wait, retain its ledger path, and close usage writers after command producers stop. Preserve the existing stop bounds and cover the real timeout door.
The manual page for adaptive runs states the usage-writer close every run
gets and the bound it works within; the change entry records what was true
before and what is true now.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@AbirAbbas
AbirAbbas merged commit 8ea3c33 into dev Nov 12, 2026
1 check passed
@AbirAbbas
AbirAbbas deleted the fix/post-wave-test-isolation branch November 12, 2026 00:38
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