Skip to content

fix(e2e): run update repair before the next update in the installed-recovery lane - #200776

Merged
fuller-stack-dev merged 2 commits into
openclaw:mainfrom
fuller-stack-dev:fix/installed-recovery-update-repair
Nov 17, 2026
Merged

fuller-stack-dev merged 2 commits into
openclaw:mainfrom
fuller-stack-dev:fix/installed-recovery-update-repair

Conversation

@fuller-stack-dev

@fuller-stack-dev fuller-stack-dev commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Related: #200680

What Problem This Solves

The Docker lane pnpm test:docker:package-installed-recovery is red on main in all 7 cuts. Each cut kills an update during package publication, recovers it with the printed package-activation helper, and then expects a plain openclaw update to succeed. That update now refuses:

Update has unfinished recovery; reconcile it before starting another update. The update lease store no longer holds that update's lease, so this update cannot show that its processes are gone. Run openclaw update repair, then retry openclaw update.

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, run openclaw update repair once, then openclaw 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:

    • exit 0, mode: "finalize", coreUpdate: "completed", and status ok or warning;
    • exactly one reconciled run ID (the cut's killed update);
    • the installed version and launchers are unchanged by the repair.

    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-repair is 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-repair is rejected. Against the old diagnostics.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

  • Red on main (f2f1edd7e9f, local Docker, all 7 cuts, fail-fast off): every cut passed displacement through archive-completed, then next-update exited 1 with the refusal quoted above.
  • Measurement (repair inserted, nothing else changed): in all 7 cuts openclaw update repair exited 0 with mode: finalize, coreUpdate: completed, and exactly one ID in reconciledRuns. That ID was the killed run that Doctor had reported as abandoned moments earlier. next-update and next-update-status then passed in every cut. status is warning only because Doctor reports fixture advisories: the Codex plugin is disabled, Skill Workshop is off, and agent database path repair was skipped.
  • Green on Linux (Crabbox, AWS c7a.8xlarge, lease cbx_813d5b75f537, run): OPENCLAW_DOCKER_ALL_FAIL_FAST=0 pnpm test:docker:package-installed-recovery with a fresh package build from source b6439a96d4e (this diff; the head was later rebased onto unrelated main commits). All 7 cuts pass, and the command exits 0. The command took 78m53s, of which the lane pool took 62m30s.
  • Green on macOS (local Docker Desktop, base package tarball reused): 6 of 7 cuts pass end to end in 41m23s. On macOS, partial-previous passes every driver step, repair and next update included, then fails at the access-reader container check. That check expects readdir("/private") to throw EACCES for 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 is keeps shared evidence readable through restrictive umask, which fails identically on main on 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.
  • The main movement since the red run was checked. The update-CLI changes in it are an include-config refusal message and an extended-stable explicit-tag path, and neither reaches this lane's single-file stable fixture. 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:

  • The autoreview helper does not run on this machine. A separate read-only reviewer reviewed the diff instead. Its should-fix findings were addressed: repair runs per cut, a negative receipt test was added, and the version and launcher are checked after repair.
  • The driver's all-cuts mode (no cut selected) is not run by any lane and was not run here. In that mode, if the repair's Doctor wrote config bookkeeping, the next cut's full-bytes config check would fail. Whether repair writes config was not observed.
  • The older-runtime installed-recovery lane is outside this family and was not run.

@clawsweeper

clawsweeper Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: XS labels Nov 17, 2026
…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.
@fuller-stack-dev
fuller-stack-dev force-pushed the fix/installed-recovery-update-repair branch from 0dd7185 to d2d1ee3 Compare November 17, 2026 20:03
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 17, 2026
@clawsweeper

clawsweeper Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

The 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.

  • Before: The subsequent update refuses because the killed update still has unfinished recovery.
  • After: Update repair finalizes recovery before the subsequent update runs.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, coherent harness repair with useful receipt coverage and author-reported Docker validation.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored harness repair changes no shipped behavior; Docker results are reported in the body, with no raw artifacts attached for independent inspection.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Release maintainers cannot complete the installed-recovery lane because its follow-up update skips required recovery finalization.
Reason: The maintainer-authored direction restores meaningful recovery validation while preserving the intended runtime admission contract.

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
Reviewed head: d2d1ee382c138058aa9c96f1b30440c2ed65e4f0

Before merge

None.

Findings

None.

Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

  • Installed recovery driver keeps the original intent (cdff9b0: Exercise interrupted installed-package publication, preserve package and operator settings through helper recovery, and prove a subsequent update.)
  • Diagnostics command receipt keeps the original intent (02b9396: Publish independent recovery-cut evidence only with complete command receipts and joined producer ownership.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit cdff9b0 adds scripts/e2e/lib/upgrade-survivor/installed-recovery.mjs:248 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: cdff9b02c81b; files: scripts/e2e/lib/upgrade-survivor/installed-recovery.mjs)

PR surface

Tests +2, Other +22. Total +24 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 6 4 +2
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 23 1 +22
Total 3 29 5 +24

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P2: This restores a failing release-validation lane without changing installed product behavior.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: This restores a failing release-validation lane without changing installed product behavior.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 17, 2026, 3:18 PM ET / 20:18 UTC.

@fuller-stack-dev
fuller-stack-dev merged commit ae6b903 into openclaw:main Nov 17, 2026
127 checks passed
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Merged via squash.

@fuller-stack-dev
fuller-stack-dev deleted the fix/installed-recovery-update-repair branch November 17, 2026 21:38
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 18, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant