Skip to content

fix(update): report unresolved repair ownership accurately - #156472

Merged
Patrick-Erichsen merged 1 commit into
mainfrom
codex/fix-update-hostname-drift
Sep 24, 2026
Merged

Patrick-Erichsen merged 1 commit into
mainfrom
codex/fix-update-hostname-drift

Conversation

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor

Related: #141562
Related: #150959

What Problem This Solves

Fixes: update repair says “An update resumed” when reconciliation merely leaves an ownership record unresolved, including after a same-machine hostname change.

User Impact

User impact: operators see the recorded run, phase, PID, hostname, and observed liveness; the message no longer claims a resume that was never observed and gives safe next steps for a foreign host or machine rename.

Why This Change Was Made

The finalizer inferred “resumed” only because a captured ledger row was still running after reconciliation. It now reuses the canonical ownership formatter for that unresolved row. The conservative hostname guard and all reconciliation/persistence semantics remain unchanged, preserving cross-machine safety.

Automatic recovery after hostname drift would require an approved durable machine-identity design, so this PR intentionally does not add one.

Production LOC: +8/-6 (net +2) | Tests: +59/-17

The two-line production growth exports and reuses the existing canonical owner formatter instead of duplicating ownership language.

Evidence

  • Real commissioning output: An update resumed while repair was running; wait for that update before retrying repair. No updater had resumed; the locally cancelled driver was recorded under the Mac’s prior hostname.
  • Before: deterministic public-finalizer regression reproduced that exact false sentence.
  • After: the same seam reports unresolved recorded ownership, names the driver host/PID/liveness, explicitly says no resumption was assumed, and tells a same-machine rename operator to restore the recorded hostname before retrying or contact support.
  • Focused/sibling tests: finalizer 1/1; repair admission 2/2; history/race 3/3; Doctor admission/revalidation 13/13; Doctor installation race 1/1.
  • Full node scripts/check-changed.mjs: pass, including production/test types, format, lint, dead exports, DB/schema/storage guards, boundaries, and import cycles.
  • Fresh local autoreview against current origin/main: scoped-clean, no actionable findings.

@clawsweeper

clawsweeper Bot commented Sep 23, 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 cli CLI command changes commands Command implementations size: S labels Sep 23, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 23, 2026
@clawsweeper

clawsweeper Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed September 23, 2026, 7:41 AM ET / 11:41 UTC.

ClawSweeper review

What this changes

The PR makes update repair report unresolved recorded ownership, including driver details and hostname-recovery guidance, instead of claiming an update resumed.

Merge readiness

⛔ Blocked before merge - 3 items remain

The diagnostic fix remains necessary on current main and has no identified blocking code defect. After-fix evidence currently covers a mocked finalizer scenario, so real behavior proof remains a merge gate.

Priority: P2
Reviewed head: 48515f6a4eeedb902cc8e10c3fccffde902f123d

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The focused patch is sound, but after-fix real CLI evidence is still missing.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: Needs real behavior proof before merge: the finalizer's changed diagnostic is exercised through mocked orchestration, while real commissioning output shows only the original failure. Add redacted after-fix CLI output from an isolated installation, including the repository-required published-driver-to-candidate update evidence. Terminal screenshots or recordings are welcome; logs and copied output count. Redact hostnames, IPs, credentials, and private details. Updating the PR body should trigger review; otherwise ask a maintainer for @clawsweeper re-review. No stored-data contract changes are introduced. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: Needs real behavior proof before merge: the finalizer's changed diagnostic is exercised through mocked orchestration, while real commissioning output shows only the original failure. Add redacted after-fix CLI output from an isolated installation, including the repository-required published-driver-to-candidate update evidence. Terminal screenshots or recordings are welcome; logs and copied output count. Redact hostnames, IPs, credentials, and private details. Updating the PR body should trigger review; otherwise ask a maintainer for @clawsweeper re-review. No stored-data contract changes are introduced. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 7 items Introduced change: The pinned delta replaces the finalizer's unsupported resumption claim with the existing ownership formatter and updates diagnostic assertions. Reconciliation, hostname checks, permissions, and persisted formats are unchanged.
Current main still needs the fix: Current main still throws the resumption message whenever a selected run remains running after reconciliation; this condition does not establish that any updater resumed.
Latest release retains the diagnostic: The GitHub contents API confirms that v2026.9.5 contains the same resumption message. Local release-blob inspection was unavailable; the API read supplied the relevant source.
Findings None None.
Security None None.

How this fits together

Update repair reads recorded update runs and checks driver liveness before reconciling abandoned work. Its finalizer reports unresolved ownership without acknowledging those runs as successfully recovered.

flowchart TD
  A[Update repair request] --> B[Recorded update runs]
  B --> C[Driver liveness checks]
  C --> D[Repair and reconciliation]
  D --> E{Ownership resolved?}
  E -->|Yes| F[Report recovery result]
  E -->|No| G[Report recorded owner and guidance]
Loading

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: Needs real behavior proof before merge: the finalizer's changed diagnostic is exercised through mocked orchestration, while real commissioning output shows only the original failure. Add redacted after-fix CLI output from an isolated installation, including the repository-required published-driver-to-candidate update evidence. Terminal screenshots or recordings are welcome; logs and copied output count. Redact hostnames, IPs, credentials, and private details. Updating the PR body should trigger review; otherwise ask a maintainer for @clawsweeper re-review. No stored-data contract changes are introduced. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Complete next step (P2) - Add real after-fix CLI proof and the required update compatibility evidence, then record changed-test timings in the PR body.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source +2, Tests +42. Total +44 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 2 8 6 +2
Tests 5 59 17 +42
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 67 23 +44

Review metrics

None.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/cli/update-cli/update-command-finalize.ts, migration/backfill/repair: src/infra/update-run-activity.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep one shared, factual ownership diagnostic while preserving the existing conservative recovery checks.

Do we have a high-confidence way to reproduce the issue?

Yes, source establishes the failure mechanism: an unresolved running row triggers a resumption claim even when hostname mismatch makes driver liveness unknown. No runtime reproduction was executed in this read-only review.

Is this the best way to solve the issue?

Yes. Reusing the existing ownership formatter is a narrow correction that avoids introducing a second recovery policy or changing cross-host safety.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against c357d827bab5.

Labels

Label changes:

  • add P2: This corrects misleading recovery guidance without changing update admission or recovery behavior.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: Needs real behavior proof before merge: the finalizer's changed diagnostic is exercised through mocked orchestration, while real commissioning output shows only the original failure. Add redacted after-fix CLI output from an isolated installation, including the repository-required published-driver-to-candidate update evidence. Terminal screenshots or recordings are welcome; logs and copied output count. Redact hostnames, IPs, credentials, and private details. Updating the PR body should trigger review; otherwise ask a maintainer for @clawsweeper re-review. No stored-data contract changes are introduced. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Label justifications:

  • P2: This corrects misleading recovery guidance without changing update admission or recovery behavior.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: Needs real behavior proof before merge: the finalizer's changed diagnostic is exercised through mocked orchestration, while real commissioning output shows only the original failure. Add redacted after-fix CLI output from an isolated installation, including the repository-required published-driver-to-candidate update evidence. Terminal screenshots or recordings are welcome; logs and copied output count. Redact hostnames, IPs, credentials, and private details. Updating the PR body should trigger review; otherwise ask a maintainer for @clawsweeper re-review. No stored-data contract changes are introduced. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 7f9bf1d adds src/infra/update-run-driver.ts:33 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 7f9bf1d79aef; files: src/infra/update-run-driver.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Provide real after-fix repair output showing unresolved ownership and retained recovery state, with the required published-driver-to-candidate evidence.
  • Record changed-test wall times and available CI durations as required by repository policy.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes commands Command implementations P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant