Repository navigation
refactor(update): specialize triage and retained recovery validation - #159358
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: needs maintainer review before merge. Reviewed September 27, 2026, 3:12 AM ET / 07:12 UTC (Revision 6). ClawSweeper reviewWhat this changesThis branch limits embedded update triage to one repair turn, removes duplicate failure identifiers, narrows retained recovery validation, and extends settlement and decoder tests. Merge readiness✅ Ready for maintainer review Current main does not contain this cleanup, and the branch retains distinct value. Review found no actionable introduced defect; source comparison supports the claimed worker and retained-record compatibility. Priority: P3 Review scores
Verification
How this fits togetherThe installed updater records update outcomes and recovery state. Operator triage reads that state, validates the installation with Doctor, and may run a bounded repair turn. flowchart TD
A[Installed updater] --> B[Update history]
B --> C[Recovery admission]
B --> D[Operator triage]
D --> E[Doctor validation]
E --> F{Repair needed}
F --> G[One repair turn]
G --> H[Recorded outcome]
C --> H
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -31, Tests +85. Total +54 across 13 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep the one-turn triage flow in the existing update owner while preserving the published worker schema, equivalent retained-record admission, and independent failure and rollback ledger writes. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR proposes an internal refactor rather than reporting a current bug; source and tests identify the affected contracts. Is this the best way to solve the issue? Yes: the branch specializes the documented one-turn caller without changing the published worker schema or the accepted retained-record states. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 53b95fd0bef8. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review Please review the updated published-driver evidence for head 26a5300:
All four leases are stopped. The PR body links the lane runs and includes all 254 focused tests, local wall times, and CI test-case times. Compatibility and complete changed-file checks passed; independent review is scoped-clean through P2. A4 remains dropped to preserve fault-isolated failure/rollback evidence. No stored schema, worker message contract, or effective retained-state admission rule changes. |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
What Problem This Solves
Removes unused local repair-loop behavior and redundant update-report/recovery code while preserving the updater's existing contracts.
User Impact
No user-visible change. Published updater behavior is unchanged: installed drivers still run first, candidate lazy-import exports and worker messages stay intact, and retained recovery records keep the same admission rules. No new environment variables, schemas, protocols, dependencies, or migration steps.
Why This Change Was Made
SKIPPED_UPDATE_OUTCOMESand an orphan recovery comment; accepted report identifiers stay the same.startpath returns unavailable, and the documented 2026.9.4 candidate-worker contract remains intact.A4 is dropped because the two best-effort ledger writes preserve fault isolation. If the first write fails once, the second can still save the missing rollback outcome. Terminal settlement records the original failure facts, but does not recreate a missing rollback receipt. Coalescing them would change that observable contract. The existing command-settlement test now covers the write fault and checks both evidence pieces and the original failed outcome/cause.
A1 and the pre-release checkpoint-row question are excluded. No delegated worker turn handling or Windows probe changes.
Evidence
Production LOC delta: −31 (109 added − 140 deleted, excluding tests/test support). Tests: +85 net lines.
Independent Codex review is scoped-clean through P2.
pnpm update:compat:checkpassed for pinned releases 2026.9.1–2026.9.6.git diff --checkpassed.node scripts/check-changed.mjs --dry-runselected core/coreTests, and the complete runnablenode scripts/check-changed.mjspassed (all typecheck graphs, scoped lint, ratchets, dead-export scans and guards).Each file below ran with
pnpm test <file> --maxWorkers=1:src/infra/update-repair-agent.test.tssrc/cli/update-cli/update-command-run.test.tssrc/infra/update-run-recovery.test.tssrc/infra/update-failure-public-identifiers.test.tssrc/commands/triage-run.test.tssrc/infra/update-triage-resolution.test.tssrc/infra/update-run-diagnostics.test.tssrc/infra/update-repair-protocol.test.tsLocal wall measurements are from a heavily loaded host. CI test seconds are the sum of Vitest-reported per-case milliseconds from run 36290575245; they exclude compilation, imports and setup. Existing worker compilation/cache validation, real storage fixtures and process/signal cases dominate the longer files. The added terminal fault case took 1.18 s and has no new process boot, timer or polling. The repair-agent timer tests use fake timers. The E2E fixture's local budget type was adapted while retaining the released-parent
maxTurns: 1; that release-only file/local-provider E2E was not run.CI passed for exact head
26a53007e93db680616ede28358ce5c6a199ebad: successful CI run. Independent review found no introduced code defect. Native review artifacts validated READY with zero findings;OPENCLAW_PR_GATES_REMOTE=github scripts/pr prepare-run 159358completed without changing the head or pushing. Itsgithub_pendingstamp remains distinct from CI proof; the subsequent bounded exact-head CI watcher returned GREEN. ClawSweeper re-review was requested with the lane/control evidence below.Published-driver × candidate proof
26a53007e93dtbx_01m3gj8aednkjgw9gtyc8fr3vm26a53007e93dtbx_01m3ghsqbqad3fvhrza2z9g2gkaad795bf312atbx_01m3gn914fc8pdacxeqhzjb13126a53007e93dtbx_01m3grxkmh390vzfp5cggtth5zThe 2026.9.4 recovery-cleanup failure is pre-existing on main and is tracked by a separate coordinator-owned fix: both the PR and clean-main control fail identically at
assert-recovery-migrationwithENOENTforagents/ops/agent/openclaw-agent.sqlite.The coordinator approved 2026.9.4/base as substitute published-driver proof for A5, alongside the passing focused retained-preparation decoder test; recovery-cleanup itself remains failed, not waived or described as passing. All four lane and control leases were stopped. Their delegated Actions runs are 2026.9.6 base, PR recovery-cleanup, clean-main control, and 2026.9.4 base substitute. The wrapper exit can be zero when the piped lane fails; the table uses the actual
LANE_EXIT.The earlier local disk and source-freezing blockers are resolved. No merge has been requested or attempted.
Release note: none (internal).