Repository navigation
fix(e2e): run update repair before the next update in the installed-recovery lane - #200776
Conversation
|
🦞👀 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. |
…ecovery lane The package-activation helper settles the killed publication but not the killed update run's recovery. Since openclaw#200680 a plain `openclaw update` refuses that state and names `openclaw update repair`, so every installed-recovery cut failed at next-update. The lane now runs the documented repair, asserts it reconciled one killed run per cut, then runs the next update as before. The host diagnostics receipt accepts the added command.
Run update repair at the end of each cut so every killed update is settled before the next update, assert exactly one reconciled run and an unchanged installed version and launcher, and require the repair in the host receipt.
0dd7185 to
d2d1ee3
Compare
|
Codex review: needs maintainer review before merge. What this changesThe installed-recovery driver runs update repair after each interrupted publication and requires that step in its diagnostics receipt. Example: The anchor-before recovery cut restores the installed package after killing its updater.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR repairs a concrete recovery-lane failure, and no actionable defect was identified in the introduced diff. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Docker recovery lane interrupts installed-package updates, exercises the independent recovery helper, and publishes validated diagnostics after a subsequent update. flowchart TD
A[Installed package fixture] --> B[Interrupt update]
B --> C[Recover package publication]
C --> D[Run update repair]
D --> E[Run subsequent update]
E --> F[Validate and publish diagnostics]
Technical reviewBest possible solution: Keep the existing recovery owners and finalize each killed update before testing the next update. Do we have a high-confidence way to reproduce the issue? The existing driver reaches another update after helper recovery, while current admission explicitly refuses recovery whose original lease was retired; the author reports that exact refusal in Docker. Is this the best way to solve the issue? The patch uses the documented repair command at the existing driver boundary and updates its receipt consumer without weakening the subsequent-update assertions or adding another recovery implementation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ea94eb3bd38e. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +2, Other +22. Total +24 across 3 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 17, 2026, 3:18 PM ET / 20:18 UTC. |
|
Merged via squash.
|
…ecovery lane (openclaw#200776) * fix(e2e): run update repair before the next update in the installed-recovery lane The package-activation helper settles the killed publication but not the killed update run's recovery. Since openclaw#200680 a plain `openclaw update` refuses that state and names `openclaw update repair`, so every installed-recovery cut failed at next-update. The lane now runs the documented repair, asserts it reconciled one killed run per cut, then runs the next update as before. The host diagnostics receipt accepts the added command. * fix(e2e): repair each killed update inside its installed-recovery cut Run update repair at the end of each cut so every killed update is settled before the next update, assert exactly one reconciled run and an unchanged installed version and launcher, and require the repair in the host receipt.
Related: #200680
What Problem This Solves
The Docker lane
pnpm test:docker:package-installed-recoveryis red onmainin all 7 cuts. Each cut kills an update during package publication, recovers it with the printed package-activation helper, and then expects a plainopenclaw updateto succeed. That update now refuses:The refusal is intended. #200680 made a plain update settle a killed run's recovery only when it can show the run's processes are gone. In this lane the helper's own claim retired the dead updater's lease, and the candidate replaced the original version without being verified, so the update names
openclaw update repair. The lane's expectation predates that gate.User Impact
No user-visible change. The installed-recovery lane now follows the operator flow the docs describe (
docs/cli/update/how-updates-run.md, "Replacing the package directory"): after the helper, runopenclaw update repaironce, thenopenclaw update.Why This Change Was Made
At the end of each cut, after the helper archives the completed custody, the driver runs
openclaw update repair --yes --no-restart --json. It asserts:mode: "finalize",coreUpdate: "completed", and statusokorwarning;The next update then runs with all of its existing assertions. Repairing inside each cut also keeps the driver's all-cuts mode coherent: every killed update is settled before the next cut starts another update.
The host diagnostics receipt validates the exact command sequence, so
update-repairis now a per-cut command and a required step in a passing receipt. The command cap goes from 10 to 11 to fit it in the non-helper cuts.The diagnostics test checks three receipts: a complete receipt is accepted; a receipt without the next update is rejected; a receipt without
update-repairis rejected. Against the olddiagnostics.mjs, the complete and missing-repair cases fail; with this change all three pass.No product code changes. No assertion, cut, or test was removed.
Evidence
main(f2f1edd7e9f, local Docker, all 7 cuts, fail-fast off): every cut passeddisplacementthrougharchive-completed, thennext-updateexited 1 with the refusal quoted above.openclaw update repairexited 0 withmode: finalize,coreUpdate: completed, and exactly one ID inreconciledRuns. That ID was the killed run that Doctor had reported as abandoned moments earlier.next-updateandnext-update-statusthen passed in every cut.statusiswarningonly because Doctor reports fixture advisories: the Codex plugin is disabled, Skill Workshop is off, and agent database path repair was skipped.c7a.8xlarge, leasecbx_813d5b75f537, run):OPENCLAW_DOCKER_ALL_FAIL_FAST=0 pnpm test:docker:package-installed-recoverywith a fresh package build from sourceb6439a96d4e(this diff; the head was later rebased onto unrelatedmaincommits). All 7 cuts pass, and the command exits 0. The command took 78m53s, of which the lane pool took 62m30s.partial-previouspasses every driver step, repair and next update included, then fails at the access-reader container check. That check expectsreaddir("/private")to throwEACCESfor an unrelated uid, and Docker Desktop bind mounts do not enforce host permissions. The same check passes on Linux above.Checks and notes
node scripts/run-vitest.mjs test/scripts/upgrade-survivor-installed-recovery.test.ts test/scripts/upgrade-survivor-installed-recovery-diagnostics.test.ts: 46 passed, 5 skipped, 1 failed. The failure iskeeps shared evidence readable through restrictive umask, which fails identically onmainon this macOS host.OPENCLAW_CHECK_CHANGED_SKIP_DEADCODE=1 node scripts/check-changed.mjs,pnpm tsgo:all,pnpm check:test-lines-ratchet --base origin/main --no-merge-base: pass. These ran on the first revision. The second revision changed the same three files the same way and passed CI.mainmovement since the red run was checked. The update-CLI changes in it are an include-config refusal message and anextended-stableexplicit-tag path, and neither reaches this lane's single-filestablefixture. The rest is UI, iOS, agent-tool, and autoreview files. The Linux run built the package from a post-movement base (a7f5a0e295e).Not proven here:
older-runtimeinstalled-recovery lane is outside this family and was not run.