Repository navigation
fix(update): preserve successful outcomes and warn about stopped channels - #169037
Conversation
Keep a durably succeeded update successful when terminal publication throws: report a warning and exit 0 instead of offering pending recovery. Cover the exit status and absence of recovery triage at the terminal owner boundary. Supersedes #162503. Co-authored-by: Kevin Rajan <[email protected]>
Report configured stopped or suppressed channel accounts through update verification warnings, without broadening channel probe failures. Preserve successful Gateway recovery and exclude disabled or unconfigured accounts. Consolidate duplicate restart snapshot construction to keep the combined production diff at zero net lines. Document both update reporting fixes. Supersedes #162262. Co-authored-by: Dallin Romney <[email protected]>
|
🦞👀 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. |
|
Codex review: needs changes before merge. What this changesThis PR preserves durably successful updates after publication errors and warns about configured channel accounts that remain stopped. Example: Update history records succeeded, then terminal result publication throws.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep this PR open: both reporting fixes remain useful on current main, but the previously reported lookup-error escape still blocks merge. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe update CLI consumes durable update history and Gateway health to produce verification results, reports, warnings, and an exit status. flowchart TD
A[Update executor] --> B[Durable update history]
A --> C[Terminal result owner]
B --> C
D[Gateway channel health] --> E[Restart health inspector]
E --> F[Update verification]
F --> C
C --> G[Reports and exit status]
Technical reviewBest possible solution: Keep durable success authoritative and stopped channels advisory while containing failed history inspection within the terminal-result owner. Do we have a high-confidence way to reproduce the issue? Current-main source establishes the original reporting problems, and the introduced catch establishes the lookup-error escape; no target code or tests were executed during this review. Is this the best way to solve the issue? The existing terminal and restart-health owners are appropriate, and advisory channel reporting preserves operator intent, but the success lookup needs exception containment. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e7e3b949ae13. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource 0, Tests +120, Docs +7. Total +127 across 8 files. Added test files: 1. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label 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 HistoryReview history (1 earlier review cycle)
Reviewed October 11, 2026, 5:39 AM ET / 09:39 UTC (Revision 2). |
…rnings (#169037) Backport of 48a3480 (#169037) adapted for 2026.10.2. A run the ledger finalized as succeeded now reports success with a warning (exit 0) when a later publication step fails, instead of claiming recovery is pending. Update repair warns about configured channel accounts still stopped or suppressed after repair without failing the update. Adaptations for the release line: - The release line lacks #165852's channel health-collection timeout plumbing (channelProbeTimeouts). Only channelRuntimeWarnings is added; readChannelProbeErrors becomes readChannelProbeFailures returning { errors, warnings } and keeps this line's probe-error semantics, and verification derives its channel warnings from channelRuntimeWarnings. - restart-health-inspect keeps this line's unmanaged-reachable early return instead of main's merged snapshot path (main's healthy-gating differs here); both snapshot constructions carry the warnings. - On this line exitCliAfterOutput(defaultRuntime, 0) throws ExitError, so the update failure triage handler now rethrows ExitError (the matching hunk of #168587 on main). Without it the success warning's exit would be triaged as an update failure; the ported completed-publication test fails without this hunk. (cherry picked from commit 48a3480)
…rnings (#169037) A run the ledger finalized as succeeded now reports success with a warning (exit 0) when a later publication step fails, instead of claiming recovery is pending. update repair warns about channels still stopped or suppressed after repair without failing updates for unrelated channel problems. Production net 0 LOC. Supersedes #162503 (thanks @kvnloo) and #162262 (thanks @RomneyDa). (cherry picked from commit 48a3480)
…rnings (openclaw#169037) A run the ledger finalized as succeeded now reports success with a warning (exit 0) when a later publication step fails, instead of claiming recovery is pending. update repair warns about channels still stopped or suppressed after repair without failing updates for unrelated channel problems. Production net 0 LOC. Supersedes openclaw#162503 (thanks @kvnloo) and openclaw#162262 (thanks @RomneyDa).
…otfix) The #169037 backport reports finalized successes as warnings and exits 0, but release/2026.10.5 still routed that deliberate ExitError through failure triage, so a completed publication whose result reporting failed launched interactive triage. Rethrow ExitError before triage and terminal failure reporting, as main does. Extracted from #168587 (98813c2): only the ExitError guards in update-command-triage.ts and update-command-terminal.ts; the shutdown redesign is not taken. Extracted-from: 98813c2
…168587) Extracted from 98813c2 (#168587) for 2026.10.3. 10.3 already carries #169037, whose succeeded-run publication path and the existing finalize/admission paths end through exitCliAfterOutput (ExitError). 10.3 had only the triage guard; without the terminal-settlement and recovery-unwind guards a reported exit is re-recorded as an unexpected update failure. Took only the update-cli ExitError guard hunks (terminal, unwind, cleanup) plus a terminal+unwind regression that fails without them. Extracted-from: 98813c2
First-parent upstream facdd3c..fd0fc62 (7 commits: openclaw#168789 subagent and runner bookkeeping, e65bd3b cold actor append retry, openclaw#168747 worker environment lifecycle, openclaw#169037, 7fb80f6, openclaw#168949, fd0fc62). openclaw#168789 removes retrySubagentCleanup: accepted-run termination is now a single attempt that resolves when the stop is confirmed (or the session provably belongs to a successor) and rejects when it is not. Conflicts: - subagent-spawn-cleanup.ts: took upstream's single-attempt form. Kept our hasFrozenSessionIdentity arms on both deletion paths: the abort-miss fallback rejects instead of deleting by key alone, and the waited provisional delete is skipped without a frozen identity. Dropped our retry option and isSettledAbortResponse (upstream's isDefinitiveAbortMiss already covers it in preserve mode); the continuation guard call-site contract still pins the identity guard. - Our boolean consumers adapted to the rejecting contract, keeping their pre-merge outcomes: the accepted-spawn sweep and spawn rollback map a rejection to "not terminated"; the collector's launch-failure path keeps rollback custody for the sweeper and settles once (pinned by subagent-registry.rollback-custody-restart.test.ts); its registration-changed path releases the acceptance hold in a finally. - subagent-spawn.test.ts: upstream's new "holds an unconfirmed collector slot for shutdown" expects no settlement; ported to the fork's custody contract (one abort, no second dispatch, settled once). - subagent-spawn-cleanup.test.ts: our cases ported to the new contract, plus two pins for the identity arms (RED with the arms removed). - subagent-registry-restore.ts: kept our armed-row skip next to upstream's restart-recovery/kill skip. - subagent-registry.test.ts: our extracted restore test kept; upstream's "reconcile on the next explicit restore" change ported into subagent-registry.restore-retry.test-support.ts. - worker-access inventory regenerated. Refs #1475 Co-Authored-By: Claude Opus 5.5 <[email protected]>
What Problem This Solves
A result-publication error can make an already successful update report pending recovery and exit unsuccessfully. Separately, successful repair verification can hide channel accounts that remain stopped or suppressed.
User Impact
Updates already recorded as successful now emit a publication warning and exit 0. Repair reports identify stopped channel accounts without turning an otherwise working update into a failure. Disabled and unconfigured accounts are excluded.
Why This Change Was Made
The terminal publication owner trusts the durable success outcome before entering failure triage. The existing restart-health reader carries channel runtime warnings separately from channel probe errors, and verification uses the existing warning/report path. A shared snapshot path replaces duplicated managed/unmanaged result construction; production LOC is +53/-53, net zero. No configuration, schema, dependency, or timeout changes.
Supersedes #162503, thanks @kvnloo. Supersedes #162262, thanks @RomneyDa. Each contributor is credited in the corresponding commit.
Evidence
node scripts/run-vitest.mjs <files> --maxWorkers=1, including terminal publication, relocated channel-warning coverage, and restart-health siblings. The changed terminal test file used 14.859 s of test time. After the lint fixes, the relocated channel-warning file passed both cases again in 0.042 s of test time (37.15 s command wall time, dominated by compilation).node scripts/check-changed.mjs --base cf534960545d3fa8c020450da474d67c269ceb00: passed, all checks, 932.01 s wall time.pnpm check:madge-import-cycles: 0 cycles.git diff --check: passed.update-finalization-output.process.test.ts/doctor-progress: its 1 s deadline expired before Doctor established custody or emitted output. The exact unchanged base,cf534960545d3fa8c020450da474d67c269ceb00, reproduced the same empty-output/unsettled-custody failure under host load (22.625 s test time, 165.97 s command wall time). A lighter-load base run passed. This is retained as an inherited host-load failure; its deadline and assertions are unchanged. Existing slow rollback/process tests and shared compilation account for the broad run's 3185.71 s wall time. CI decides the remaining coverage.