Skip to content

fix(update): preserve unsafe Doctor recovery guidance - #170207

Merged
steipete merged 1 commit into
mainfrom
codex/qa1094-update-report
Oct 12, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/qa1094-update-report

Conversation

@steipete

@steipete steipete commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

A responding Gateway with the target version can make an update report clear its prioritized recovery guidance even when Doctor writers remain unsettled or their settlement receipt belongs to another installation. The detailed failure still retains its warnings, but the report incorrectly says the saved runtime verification failure no longer applies.

User Impact

Update reports keep the existing Doctor recovery instructions until the recovery owner verifies settlement. Ordinary runtime health recovery still clears stale restart warnings. No stored state, schema, service lifecycle, or update-driver changes are required.

Why This Change Was Made

The report projection omits the command and installation identity needed to authenticate a Doctor settlement receipt. Health alone therefore cannot overrule an unsafe recovery verdict when that receipt is present. Preserve the recovery owner's decision instead of independently granting safety from a matching version.

Evidence

The regression exercises the real custody refusal, next-action selection, report adapter, and renderer. Against the original code, unsettled and foreign-installation cases fail while accepted settlement passes. The repaired owner and sibling suites pass 82/82 tests, including ordinary stale-runtime recovery controls, warning preservation, and input immutability.

The focused single-worker invocation took 51.38s wall including shared worker compilation and transforms; the three new cases took 29/5/3ms (37ms total). Core and scoped test types, typed lint, formatting, test assertion and size checks, one-page documentation validation, and diff checks pass. Fresh isolated P2 review found no actionable issues. Current-head CI run 38302778398 passed. The three added cases took 28/5/3ms in CI; the containing 18-case file took 49.21s including transforms.

This is report-boundary proof using existing driver-shaped receipts; it does not claim a live update, service restart, or published-driver migration run.

@clawsweeper

clawsweeper Bot commented Oct 12, 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.

@steipete
steipete marked this pull request as ready for review October 12, 2026 20:13
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation cli CLI command changes size: S labels Oct 12, 2026
@steipete
steipete enabled auto-merge (squash) October 12, 2026 20:15
@clawsweeper clawsweeper Bot added 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. labels Oct 12, 2026
@clawsweeper

clawsweeper Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR preserves Doctor recovery guidance when matching Gateway health cannot establish safe process settlement.

Example: An update targets 2026.9.2, Doctor process group 41001 remains unsettled, and the Gateway answers as 2026.9.2.

  • Before: The report discards the prioritized recovery action and says the saved runtime verification failure no longer applies.
  • After: The report retains the instruction to keep the Gateway stopped while Doctor writers may remain active and preserves the recovery snapshots.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and source-supported, with meaningful composed regression coverage; supplied validation remains harness-level and CI was still running.
Proof confidence 🦐 gold shrimp (3/6) The maintainer-authored PR is outside the ordinary contributor proof gate; its supplied evidence describes an in-process recovery-owner-to-renderer regression, explicitly without a live update or published-driver run.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A failed-update report can discard prioritized Doctor recovery guidance despite unresolved or foreign process settlement.
Reason: The maintainer-authored change restores consistent recovery advice with a narrow predicate adjustment and preserves the existing owner boundary.

Regression provenance

Regression provenance — verified: source commit d128f0d5b41f by Peter Steinberger; canonical PR #170130 (blame-to-merge-commit).

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it fixes a current-main reporting defect without changing recovery authority, and no actionable patch defect was found.

Priority: P2
Reviewed head: f98cf0c31a4340c574583db8e84e8c9b7060b504

Before merge

None.

Findings

None.

Agent review details

How this fits together

The shared update-report renderer consumes recorded update outcomes, projected steps, recovery verdicts, and current health to produce text and Markdown reports.

flowchart TD
  A[Doctor process settlement] --> B[Recovery owner verdict]
  B --> C[Recorded update outcome]
  C --> D[Shared report renderer]
  E[Current Gateway health] --> D
  D --> F[Text and Markdown recovery guidance]
Loading

Technical review

Best possible solution:

Keep settlement authority with the recovery owner and prevent the report projection from clearing its unsafe verdict based on health alone.

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

Source establishes the failure: an unsettled or foreign Doctor receipt produces an unsafe runtime-verification verdict, but current main suppresses its saved action when target-version health responds; no target code was executed during this review.

Is this the best way to solve the issue?

The focused renderer guard is appropriate because report steps lack the identity needed to revalidate settlement; it preserves ordinary health reconciliation and leaves installed older updaters with their existing renderer behavior.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Health-based recovery-advice reconciliation changes intended behavior with a stated reason (d128f0d: Clear stale runtime-verification warnings when the target Gateway is serving while retaining migration and other unsafe constraints.)
  • Shared report and recovery guidance keeps the original intent (2bf30ba: Use one report renderer across update surfaces and retain recorded recovery outcomes.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

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

PR surface

Source +2, Tests +70, Docs +2. Total +74 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 3 1 +2
Tests 1 71 1 +70
Docs 1 3 1 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 77 3 +74

Labels

Label changes:

  • add P2: Incorrect recovery guidance can mislead operators after a failed update, while the detailed warnings and actual service-control safeguards remain intact.
  • 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: Incorrect recovery guidance can mislead operators after a failed update, while the detailed warnings and actual service-control safeguards remain intact.
  • 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 October 12, 2026, 4:24 PM ET / 20:24 UTC.

@steipete
steipete merged commit a590510 into main Oct 12, 2026
195 of 197 checks passed
@steipete
steipete deleted the codex/qa1094-update-report branch October 12, 2026 20:27
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash auto-merge.

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

Labels

cli CLI command changes docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S 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