Repository navigation
Conversation
…ossed #41685 added Stop handling to checkpoint capture that read `stoppedNow`. #41362 merged after it and renamed that variable, so main referenced an undefined name and every checkpoint capture threw. Capture now finds a Stop that lost the race to the turn end on a `completed` run, as it did for `waiting` before #41362. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Other scenariosAll 64 scenario measurements match All 64 scenario measurements
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
|
Superseded by #41709, which landed the same fix first: capture checks a |
Problem
Main CI fails on every push since
e3ac310: typecheck fails, and 8 server test shards fail withReferenceError: stoppedNow is not definedinCheckpointCaptureService.ts.#41685 added a check in checkpoint capture for a Stop that the provider's turn end beat. That check read
stoppedNow. #41362 merged 12 minutes later. It renamed that variable tolegacyWaiting, which has the opposite meaning, and it changed the turn end to writecompletedwhere it wrotewaitingbefore. Git merged the two PRs with no conflict, so every checkpoint capture threw.Change
stopped(interruptedorcancelled) again. Before perf(server): runs finish when the provider turn ends, not after checkpoint capture #41362 it looked up a stored Stop request on awaitingrun. Now it does the same for acompletedrun too. If it finds a request with no result, it sets the run and root node tointerruptedand writes the interrupt result. This is fix(server): an accepted Stop no longer ends the run as completed #41685's behavior on perf(server): runs finish when the provider turn ends, not after checkpoint capture #41362's new status.completedAt. Only legacywaitingrows take the capture time.waiting. It now waits forcompleted, then checks that the run endsinterrupted.I also tried writing
interruptedat the turn end. That broke thestop-before-endsteer case: a steer that missed the turn was not requeued. So the decision stays in capture. #41362's docs say commands treat the run aswaitinguntil capture commits, so no queued turn starts between the two writes.Scope and approval
Main is red. This fixes the bad merge between two maintainer PRs. It changes one file plus one test wait.
Verification
CheckpointCaptureService,ThreadStop,BackgroundWorkStop,runtimeLayer,RunExecutionService,SteeringCompletion,MuseReplayFixtures,ClaudeAdapterV2, andLegacyV1Cutover(949 tests).vp run check:changedpasses, including the typecheck.Follow-up, not in this PR:
t3_thread_waitcan returncompletedbefore capture turns an accepted-Stop runinterrupted, because since #41362 the waiter returns at turn end.Reviewed with sol-loop: 2 passes with GPT-6.2 Sol. Sol verdict: approved
Made by Claude Opus 5.5 in Claude Code (T3 Code).
🤖 Generated with Claude Code