Skip to content

fix(update): preserve recorded recovery after managed preflight refusal - #180777

Merged
steipete merged 1 commit into
mainfrom
fix/update-recovery-triage-180739
Oct 22, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/update-recovery-triage-180739

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

A Gateway-managed update can correctly reject an incompatible target Node runtime and verify the existing Gateway healthy, yet tell diagnostic triage that service recovery was not recorded.

Fixes #180739. Thanks @hannesrudolph for the report and source trace.

User Impact

Triage preserves the updater's recorded service recovery instead of giving misleading restart advice. An absent recovery outcome remains unknown. Runtime preflight, restart permission, and service recovery behavior are unchanged.

Why This Change Was Made

The handoff recorded recovery for triage only when its own restoration was armed. Copy the direct updater child's explicit service outcome when consuming its result, and remove that restoration-only annotation. Existing child identity checks still apply; diagnostics do not infer recovery from whether the service was parked or from restart eligibility.

Production: +1/-1 lines (net 0). Tests: +31/-0 lines. No new state, options, dependencies, or schema changes.

Evidence

  • Regression on base bf28212f2c4fc3ced082728f9712932854c406f6: explicit healthy and failed outcomes both incorrectly produced “Service recovery outcome was not recorded”; the absent-outcome control passed (2 failed, 1 passed).
  • The regression starts the real generated handoff helper with fixture external commands and inspects its actual diagnostic input. It verifies that the preflight refusal never parks, restores, or signals the serving parent. This is subprocess boundary proof; it does not claim a live OS-service deployment.
  • Scoped typecheck, oxlint, oxfmt, git diff --check, and import-cycle check pass (0 cycles). Independent Codex review: no actionable findings.
  • Full check:changed SQLite inventory was not run under the campaign's local gate budget; PR CI supplies broad proof.
  • Pinned Bun focused proof: 6 files, 188 tests passed, 567.99 s total. The new three-case regression took 1.186 s combined. The unchanged foreground fixture took 129.11 s across 21 scenarios (real child-process/IPC/owner/lock/port lifecycles); no timeout, retry, assertion, or skip changes were made.
  • Node 26.12.1: 505 tests passed, 5 existing platform-specific tests skipped, across all 17 direct/barrel consumer files plus four focused sibling files (21 selected files total); three shards completed in 1194.27 s. The skipped cases are two Windows-only checks and three Linux-only settlement checks. The new regression passed all three cases in 1.165 s combined.
  • Existing Node slow-file test time: foreground handoff 145.286 s, launchd recovery 156.358 s, systemd recovery 145.289 s. These unchanged subprocess suites were recorded under the campaign's pre-existing slow-suite rule; the regression adds about 1.2 s to its owning suite.

@clawsweeper

clawsweeper Bot commented Oct 22, 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 22, 2026 16:22
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T16:25:31.842790Z 781f6d6 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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. clawsweeper:intake:needs-repro 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. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

The managed update handoff preserves the updater child's recorded service recovery outcome when preparing diagnostic triage.

Example: An update rejects Node 26.7.0 before parking the Gateway and records recovery.service as healthy.

  • Before: Triage says the service recovery outcome was not recorded and suggests inspecting the handoff log before restarting.
  • After: Triage says service recovery succeeded, while the Gateway continues serving.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, correct repair with meaningful subprocess regression coverage; supplied evidence stops short of a live service reproduction.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; its reported subprocess regression exercises the production helper and actual triage input, while explicitly making no live service deployment claim.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A safely refused update produces diagnostic guidance implying unresolved service recovery even though the updater verified the existing Gateway healthy.
Reason: The maintainer-authored direction restores truthful diagnostics for an observed incident without changing runtime requirements or service behavior.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR fixes a confirmed diagnostic contradiction still present on current main, with no actionable correctness or security findings.

Priority: P2
Reviewed head: 781f6d6c5723cfed9675d93ee8f1d33e16f8ec73

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied evidence exercises the generated helper with fixture commands rather than an after-fix live OS-service update.
Agent review details

How this fits together

The managed handoff consumes the direct updater child's result, settles service recovery, and passes annotated failure context to diagnostic triage.

flowchart LR
  A[Managed Gateway] --> B[Handoff helper]
  B --> C[Updater child]
  C --> D[Recorded recovery result]
  D --> B
  B --> E[Diagnostic triage input]
  E --> F[Operator guidance]
Loading

Technical review

Best possible solution:

Preserve the verified child's explicit recovery fact at result consumption while retaining unknown outcomes and existing recovery authority.

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

The linked production report and current-main source establish the never-parked healthy-recovery path; the PR reports a matching red-on-base regression, which was inspected but not executed during this read-only review.

Is this the best way to solve the issue?

This is the smallest complete fix: copy the existing producer's recovery fact before restoration branching and remove the narrower annotation, without adding policy, state, or restart behavior.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Child-result consumption and restoration-gated triage annotation keeps the original intent (d1a69c0: Candidate validation moved before service parking so rejected candidates leave the Gateway serving; later child-result handling preserved refusal diagnostics.)
  • Recovery diagnostic wording keeps the original intent (80ae248: Failure triage follows recovery and cleanup decisions without allowing diagnostic artifacts to authorize activation or overwrite updater outcomes.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 80ae248 adds src/infra/update-managed-service-handoff.ts:1071 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 80ae248de1c0; files: src/infra/update-managed-service-handoff.ts)

PR surface

Source 0, Tests +31. Total +31 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 1 1 0
Tests 1 31 0 +31
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 32 1 +31

Review metrics

Metric Value Why it matters
Production versus regression coverage Production +1/-1; tests +31/-0 The production change reuses existing ownership and state; the regression covers successful, failed, and unknown recovery without adding fixture machinery.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #180739
Summary: This PR supplies the focused fix for the linked report's missing recovery annotation.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add P2: Misleading recovery guidance creates avoidable operator confusion, while runtime preflight and the serving Gateway remain functional.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Misleading recovery guidance creates avoidable operator confusion, while runtime preflight and the serving Gateway remain functional.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦞 diamond lobster.
  • 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 22, 2026, 12:39 PM ET / 16:39 UTC.

@steipete
steipete merged commit df387ce into main Oct 22, 2026
212 of 213 checks passed
@steipete
steipete deleted the fix/update-recovery-triage-180739 branch October 22, 2026 16:48
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 23, 2026
…al (openclaw#180777)

A managed update that safely refused (e.g. preflight-node-runtime-incompatible) and verified the existing Gateway healthy still got the triage annotation 'Service recovery outcome was not recorded', because the handoff tied recorded recovery to having armed restoration itself. The handoff now preserves the updater's explicit recovery.service outcome; restart authority is unchanged. Fixes openclaw#180739, reported by @hannesrudolph.
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. 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.

Managed update triage says recovery was not recorded after preflight verifies healthy Gateway

1 participant