Repository navigation
fix(triage): report an update failure as repaired only with resolution evidence - #148968
Conversation
|
🦞👀 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: blocked before merge. Reviewed September 15, 2026, 11:18 AM ET / 15:18 UTC (Revision 12). ClawSweeper reviewWhat this changesTriage verifies recorded update targets and current installation health before reporting recovery, while Git updates record their selected commit and available version. Merge readiness⛔ Blocked before merge - 3 items remain Keep open as the maintainer-selected fix for the false repair verdict. Fetched main still has the defect; the earlier callback finding is fixed, and no additional blocking defect was identified. The documented compatibility limitations have an explicit maintainer disposition. Priority: P2 Review scores
Verification
How this fits togetherTriage turns installation diagnostics into a bounded repair attempt and a recovery verdict. This change connects that verdict to the updater’s existing history, runtime verification, Doctor checks, and managed Gateway readiness. flowchart TD
A[Saved update failure] --> B[Correlate recorded target]
B --> C{Doctor-only blocker?}
C -->|Yes| D[Check identity and Doctor]
C -->|No| E[Check updater completion]
E --> F[Verify runtime and Gateway]
D --> G[Report resolution or missing evidence]
F --> G
Before merge
Agent review detailsSecurityNone. PR surfaceSource +440, Tests +993, Docs +11. Total +1444 across 19 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep recovery certification with the existing updater and verification owners, preserving historical failures and the shipped worker protocol under the accepted legacy-evidence limits. Do we have a high-confidence way to reproduce the issue? Yes, from source: fetched main accepts clean Doctor validation before any repair even when a saved update failure remains unresolved. The linked report supplies a command/real-loop reproduction; this read-only review did not execute it. Is this the best way to solve the issue? Yes. The patch composes existing updater evidence and verification owners, preserves ordinary Doctor triage, and addresses the related review’s compatibility controls without introducing another recovery mechanism. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against dcd90156c055. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (11 earlier review cycles; latest 8 shown)
|
c7bc893 to
d3bf207
Compare
d3bf207 to
bc9cb5e
Compare
Use recorded target and updater completion facts with current runtime and Gateway verification. Preserve published worker statuses and label verified zero-attempt results as already resolved. Fixes false repair reports following 2026.9.3 and 2026.9.4 update failures.
Preserve only valid UUID run IDs verbatim so diagnostic redaction cannot sever the ledger reference. Move the existing Doctor subprocess validator into its owner module to satisfy the source line limit without changing its behavior.
Carry the selected commit and available manifest version from Git target inspection into the existing update run before candidate checks. Replace stale candidate identity fields, accept a recorded Git version or SHA independently, and verify every available identity against updater completion and the installed runtime. Preserve the shipped worker status protocol and executor verification ordering.
Keep inspected target recording and pre-mutation admission together, remove their old definitions, and move the native admission matrix into its own test file. Preserve the existing line limits and all behavioral assertions.
Keep uncorrelated implicit update notifications informational during plain triage. Resolve positively attributed Doctor/config failures through fresh Doctor checks and recorded installed identities, without rewriting historical outcomes or requiring a later update. Preserve package, plugin, writer and authority failure verification. Compatibility review by @PollyBot13 identified both controls.
Require current plugin-health verification when the saved failure carries concrete plugin errors, including post-update-failed wrappers. Remove three identical Copilot expectation keys duplicated by the paused rebase; the assertion now matches main without changing its values.
4f2e9de to
3dc008d
Compare
|
Merged via squash.
|
…n evidence (openclaw#148968) * fix(triage): require update resolution evidence before reporting repair Use recorded target and updater completion facts with current runtime and Gateway verification. Preserve published worker statuses and label verified zero-attempt results as already resolved. Fixes false repair reports following 2026.9.3 and 2026.9.4 update failures. * fix(triage): preserve run identity and isolate Doctor validation Preserve only valid UUID run IDs verbatim so diagnostic redaction cannot sever the ledger reference. Move the existing Doctor subprocess validator into its owner module to satisfy the source line limit without changing its behavior. * fix(triage): record and verify resolved Git update identities Carry the selected commit and available manifest version from Git target inspection into the existing update run before candidate checks. Replace stale candidate identity fields, accept a recorded Git version or SHA independently, and verify every available identity against updater completion and the installed runtime. Preserve the shipped worker status protocol and executor verification ordering. * refactor(update): group Git admission and its boundary tests Keep inspected target recording and pre-mutation admission together, remove their old definitions, and move the native admission matrix into its own test file. Preserve the existing line limits and all behavioral assertions. * fix(triage): preserve plain Doctor and attributed repair flows Keep uncorrelated implicit update notifications informational during plain triage. Resolve positively attributed Doctor/config failures through fresh Doctor checks and recorded installed identities, without rewriting historical outcomes or requiring a later update. Preserve package, plugin, writer and authority failure verification. Compatibility review by @PollyBot13 identified both controls. * fix(triage): verify plugin health for wrapped update failures Require current plugin-health verification when the saved failure carries concrete plugin errors, including post-update-failed wrappers. Remove three identical Copilot expectation keys duplicated by the paused rebase; the assertion now matches main without changing its values. * fix(triage): require recorded target identity for Doctor repair * chore(ci): refresh PR head after push lag * test(update): expect selected Git SHA in mutation callback
What Problem This Solves
Fixes:
openclaw triage --run --update-result <file>could report an unresolved update as repaired solely because Doctor lint passed, without attempting a repair. This affected triage after 2026.9.3/2026.9.4 update failures.Fixes #148896
User Impact
Package, runtime, schema, and service update failures require the updater's recorded target and completion evidence, plus current owner verification. A correlated Doctor/config failure can instead be resolved only when its recorded target version or Git SHA matches the installed identity and fresh Doctor checks are clean, while its historical failed row remains unchanged. Missing evidence produces
unrepairedwith a next step. Verified zero-attempt resolution printsalready resolved; successful post-attempt validation printsrepaired.Explicit artifacts without a usable run ID or recorded target identity remain unresolved, including Doctor/config failures. Plain
triage --runtreats an uncorrelated implicit update notification as informational, prints its timestamp and a status command, and preserves ordinary Doctor success/exit. Correlated package/service failures still require their owner verification; unknown or mixed failures and writer/authority refusals are not certified by clean lint.Reported by @PollyBot13 (#148896).
Compatibility review by @PollyBot13 (review of both controls) identified the historical-sentinel and
post-update-failedDoctor-repair cases. The command regressions now cover both, including a real correlated ledger row, one repair turn, unchanged historical state, and the conservative run-id-less artifact control.Why This Change Was Made
Git target inspection now carries the selected commit and available manifest version into the existing ledger row before candidate checks. Each inspected candidate replaces the prior optional identity fields, so fallback selection cannot retain a stale version or SHA. The predicate accepts a recorded Git version or SHA independently and verifies every identity that is present. Doctor-only resolution requires the same recorded-target safeguard as every other family, plus concrete attributed failed steps in the correlated ledger and compatible artifact evidence; the generic
post-update-failedwrapper alone is insufficient. For package/Git update completion, selector-only legacy records such asdev/latestremain unresolved.The surviving
after.versionin a failed result is not its requested target. Triage preserves a valid run ID, reads target facts from the existing ledger, and composes the updater's package/Git runtime and service verification owners. A later completed update or verified package rollback can supply resolution evidence; historical failed rows remain unchanged. Original plugin failures additionally require current plugin health.Compatibility: the closed 2026.9.3/2026.9.4 worker status protocol is unchanged. Evidence-backed zero-attempt results still use
repairedon the wire, which existing parents and the Mac app'supdate repairroute understand. Only the human triage wording distinguishesalready resolved. No SQLite, configuration, dependency, or service-lifecycle changes are introduced.ClawSweeper review
The completed review at exact head
3dc008d9e84a2657afa91e88d0bd5d9909551459found no actionable code defect and confirms the selected-SHA callback assertion is corrected. The earlier Git target-recording finding is also addressed. Missing-identity and missing-owner-evidence verdicts remain intentionally conservative; the maintainer accepts this documented limitation and the unexecuted full published-updater handoff with successful resolution. The data-model flag does not apply: the existing SQLite schema, historical terminal rows, and worker status enum are unchanged. This landing pass made only a patch-identical rebase, so no additional re-review request was posted.Evidence
Landing refresh: rebased the approved
4f2e9de7047cf5d76120a3b56433838008483938stack onto main1f8e15282c747723beef9939d0f3b7a8a07ea799, producing3dc008d9e84a2657afa91e88d0bd5d9909551459. All nine commits are range-diff identical, including the callback assertion fix and existing empty CI refresh. Exact-head CI is green in run 34978355269, with 145 passing checks and no pending or failed checks. The bounded watcher reached its deadline during runner queueing; the fourth authorized fallback poll confirmed green. Local validation on this rebased head passed all 153 tests withnode scripts/run-vitest.mjs src/infra/update-runner.test.ts src/infra/update-runner-git-admission.test.ts src/cli/update-cli/update-command-admission.test.ts.git diff --checkalso passed. The unrelated Labeler workflow was canceled by the PR-body-edit concurrency group after all executed steps passed; one rerun cleared it. The prior callback mismatch is fixed, retaining a precise assertion for the selected SHA and unreadable metadata. The prior rebased-head focused validation passed 258 tests across triage commands, update-resolution/repair/protocol suites, and CLI admission controls.At r4 head
a8302234e78abe4e50e32d0200415bf823f53ea8, the fix moves the existing missing-target guard ahead of the Doctor/config branch. A correlated run withtarget: {}now reportsunrepairedwith the missing-target reason and the next steps to inspectopenclaw update status --jsonand retryopenclaw update. Clean Doctor findings alone cannot certify any saved update failure. The recorded-target control still repairs after exactly one turn, and the implicit historical-sentinel behavior is unchanged.ok: true/Doctor/config blocker resolved.; the CLI regression resolved successfully instead of exiting 1. Both now pass, alongside the existing missing-run and matching-target controls.src/commands/triage*.test.tsset and focused update-resolution/repair/protocol suites.node scripts/check-changed.mjs: passed, including both typecheck lanes, lint, formatting, unused-export scans, import cycles, and repository guards.autoreview --mode branch --base origin/main --max-priority P1: scoped-clean at P1 on the r4 head.The preceding r3 controls also remain covered: historical sentinels preserve ordinary Doctor success; wrapped plugin errors require current plugin health; mixed failures, writer refusals, unknown facts, identity mismatches, and ownership changes cannot be certified by clean lint. Three duplicate Copilot expectation keys from the paused rebase were removed in r3; the assertion matches green main and its focused control passed.
The original command/real-repair-loop regression failed before the fix: exit 0 and
Embedded repair repaired: Doctor lint reports no errors.with the saved failure unchanged. It now exits 1 withunrepairedand a next step. Earlier producer and Git admission/candidate suites also passed; their target-recording regressions are described below.Testbox command proof passed at
964e788582d, using the published 2026.9.3 package tree and an isolated SQLite ledger with a recorded 2026.9.4 target. It exited 1 withunrepaired: Expected installed version 2026.9.4; found 2026.9.3and the next step. The saved failure and terminal failed row stayed unchanged. The proof wrapper exited 0 and cleaned up its lease; the backing Actions run can show cancellation from that cleanup.Known proof gap: the full published-updater-to-candidate handoff with a successful resolution control has not been executed. Published-tree negative command proof, focused positive/negative controls, and exact parent-schema parsing are available; parser compatibility is not full updater execution. All fixtures are synthetic; this does not reproduce the original Ubuntu package-swap failure or restart an operator Gateway. The explicit maintainer landing decision accepts this bounded reporting proof; it does not claim full updater handoff qualification.
Historical CI evidence from earlier heads
These results describe earlier heads, not r4:
d3bf207b05f2a4f1f5e207bf8d6979be7af50949, run 34958237285 failed small-2 with eight image-tool policy/size assertions and large-10 with 28 missingloadAuthProfileStoreForRuntimemock-export failures. Those trees matched that head's main base2b8c9f1ad64afea117518b008b23ae5fcc20d9be. The lander subsequently rebased to the green main and paused atbc9cb5ef683for this follow-up.964e788582d, additional boundaries failed before checks on an unchanged dependency's HTTP 500/postinstall error. The plugin shard had a stale Copilot metadata expectation; the current assertion matches main and passes its focused control.security-fastand OpenGrep reported zero-step failures on that older run.Git producer audit and published-parent parsing proof
The producer audit covered both shipped drivers and main at
140ae96507aed5c58ae6c51e13cfc623c85d157a:Finalization copied Git observations into
before/after, nottarget. The fix preserves identity through the existing Git metadata path and records it through the CLI Git admission owner. No schema changes or inference from a failed result'safterfields are involved.The producer regression failed before the fix because the row lacked the selected SHA/version. It now verifies their persistence before a native-admission failure, and verifies that another inspected candidate clears a now-unknown version. Git version-only and SHA-only predicate regressions also failed before and now pass.
For compatibility, the exact tagged worker-message schemas were evaluated with registry SHA-512-verified Zod 4.4.3, the version used by both releases. These four concrete messages round-trip byte-for-byte through each released parser and the current schema. The summaries/evidence change; the serialized status fields remain exactly
"status":"repaired"and"status":"unrepaired".before-repaired:
{"type":"result","result":{"status":"repaired","attempts":[],"finalValidation":{"ok":true,"score":0,"summary":"Doctor lint reports no errors."}}}after-repaired:
{"type":"result","result":{"status":"repaired","attempts":[],"finalValidation":{"ok":true,"score":0,"summary":"Update to 2026.9.4 recorded by the updater; installed runtime and managed Gateway readiness verified."}}}before-unrepaired:
{"type":"result","result":{"status":"unrepaired","attempts":[],"finalValidation":{"ok":false,"score":-1,"summary":"Doctor lint found an error"},"reason":"turn-budget"}}after-unrepaired:
{"type":"result","result":{"status":"unrepaired","attempts":[],"finalValidation":{"ok":false,"score":-1,"summary":"Cannot establish the update target. Next step: run `openclaw update status --json`, then retry `openclaw update`.","stopReason":"Cannot establish the update target. Next step: run `openclaw update status --json`, then retry `openclaw update`."},"reason":"Cannot establish the update target. Next step: run `openclaw update status --json`, then retry `openclaw update`."}}The parent invokes this parser at 2026.9.3 update-repair-worker.ts:165 and 2026.9.4 line 165. Both permit zero attempts. The downstream success check remains 2026.9.3 update-command-execution.ts:427, followed by fresh candidate validation; the 2026.9.4 equivalent is line 401.
All three schemas reject
already-resolvedandnot-repaired; those are not new wire statuses. This is exact parent-schema parsing proof, not a live worker-process or updater execution.