Repository navigation
fix: keep restart recovery validation stable under load - #163606
Conversation
|
Codex review: needs maintainer review before merge. Reviewed October 2, 2026, 11:40 AM ET / 15:40 UTC. ClawSweeper reviewWhat this changesThe PR makes a restart-recovery test wait for persisted recovery admission instead of polling for a Gateway call for one second. Merge readiness✅ Ready for maintainer review Keep open: this is a sound, focused repair for the release branch, with no introduced correctness finding. Current main already uses admission-driven waiting, but that does not make this release-targeted PR unnecessary. Priority: P3 Review scores
Verification
How this fits togetherRestart recovery resumes agent sessions interrupted by a Gateway restart. This test feeds an interrupted session into the recovery scheduler and checks that its replacement run retains the correct session and provenance. flowchart TD
A[Interrupted session] --> B[Recovery scheduler]
B --> C[Gateway dispatch]
C --> D[Persisted recovery admission]
D --> E[Session change notification]
E --> F[Call and provenance assertions]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests 0. Total 0 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Use the release branch's existing admission fixture while retaining exact Gateway-call, session, and provenance checks. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the timing-sensitive path: waitForFast allows only one second for asynchronous recovery. The body records a loaded-shard failure; this review did not reproduce it by execution. Is this the best way to solve the issue? Yes. Waiting on the existing persisted-admission fixture removes the arbitrary polling window while preserving the exact call-count assertion and downstream recovery checks. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against eb50c3a61b81. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
What Problem This Solves
Fixes: restart-recovery validation can fail under a loaded CI shard even when recovery admission succeeds after the test's fixed one-second polling window.
User Impact
User impact: no user-visible behavior changes; release validation now waits on the recovery owner's persisted admission boundary instead of wall-clock timing.
Why This Change Was Made
The isolated recovery case passes, while the 59-file release shard failed after
waitForFastexhausted its fixed one-second window. The test now uses the existing session-change-driven recovery fixture already used by sibling startup-recovery cases, preserving the gateway call and provenance assertions.Evidence
checks-node-bundle-infra-small-runtime-12in run 37012702638, job 110856692678.node scripts/check-changed.mjs --base origin/release/2026.9.8 -- src/agents/main-session-recovery/main-session-restart-recovery.test.ts: passed.