Repository navigation
fix: restore failing worker recovery tests - #164029
roboclaw-bot wants to merge 1 commit into
Conversation
Inject verification failures at semantic phases rather than call counts, and assert the complete reclaim phase while preserving recovery expectations. Co-authored-by: galiniliev <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed October 3, 2026, 12:18 AM ET / 04:18 UTC. ClawSweeper reviewWhat this changesThe PR repairs worker-recovery tests by injecting verification failures at named phases and checking the complete reclaim sequence. Merge readiness✅ Ready for maintainer review This focused test repair remains necessary on current main. The revised fault injection matches the production recovery phases, preserves the substantive assertions, and introduces no identified correctness defect. Priority: P2 Review scores
Verification
How this fits togetherThe Gateway reconciles worker workspace changes before stopping a worker or deleting its session. These tests verify that failed final checks retain recovery state and that unchanged results can be retried safely. flowchart TD
A[Stop or delete request] --> B[Worker workspace reconciliation]
B --> C[Renew lease and verify workspaces]
C --> D[Apply changed result]
D --> E[Final verification]
E --> F[Accept result and stop worker]
E --> G[Retain recovery state on failure]
H[Test fault injection] --> C
H --> E
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +8. Total +8 across 4 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep recovery coverage aligned with the existing finalizer through phase-based faults, preserving result retention, retry behavior, and deletion safeguards. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main's two remote verification calls cannot trigger the fixtures configured to fail on call three. The PR also reports baseline failures; this read-only review did not execute tests. Is this the best way to solve the issue? Yes. Injecting faults at the existing remote, local, and post-commit boundaries repairs the fixture owner without undoing the intentional production optimization. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against cdfe6cf00705. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Related: #160108
What Problem This Solves
Fixes failing worker-recovery tests after main removed redundant pre-renewal workspace verification.
User Impact
No production behavior changes. Restores CI coverage for preserving worker results when verification fails after application, and for retrying unchanged results safely. No recovery assertions, timeouts, or exclusions are weakened.
Why This Change Was Made
The tests injected failure on the third remote-verification call, which no longer occurs. The shared harness now injects a one-shot failure at the intended remote, local, or post-application boundary. Post-application injection is armed only after the journal commit resolves. Reclaim ordering is asserted from the start of that phase rather than a fixed-length log tail.
This is a separate main-line CI repair. The required normal direct-main push was refused with GH013: “Changes must be made through a pull request”; no bypass or force push was attempted.
Evidence
Candidate:
ae0e07732858f5b9e5062341b3490f654833a27a, based on12d823be3f07e90e2b55bf76c9f9dbbeca285a0d. Four test/harness files, +24/−16; production files unchanged.4a0be71e57ab19d08518879dcab11c5e9c798cd6: lifecycle file reproduced both failures (29 passed / 2 failed), 87.06s wrapper wall. Unchanged-base sibling reproduction produced four related failures in 19.68s. The same failures appear in scheduled main CI.de2f83e2713ada8b7c693ebd920eb73f76898063. The patch remained byte-identical through the later main advance.node scripts/run-vitest.mjs src/gateway/server.sessions.worker-placement-lifecycle.test.ts src/gateway/worker-environments/placement-dispatch.test.ts src/gateway/worker-environments/placement-dispatch-reclaim.test.ts src/gateway/worker-environments/workspace-finalize.test.ts --maxWorkers=1. Wrapper timings above include preparation; new-PR CI seconds are not yet available.Contributor
Prepared during CI triage requested by @galiniliev; the commit retains the verified human co-author credit.
Work sessions