Repository navigation
fix(update): retain Doctor advisories and terminal reports - #153147
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 20, 2026, 7:36 AM ET / 11:36 UTC (Revision 11). ClawSweeper reviewWhat this changesThe updater retains optional Doctor advisories, preserves diagnostic findings, saves terminal reports before exit, and parks the owned Gateway during standalone finalization. Merge readiness⛔ Blocked before merge - 1 item remains The fix remains necessary. The published-driver evidence and frozen rollback-reader regressions address the previous compatibility concern; no actionable correctness or security finding remains. Priority: P0 Review scores
Verification
How this fits togetherOpenClaw’s updater runs candidate health checks before activation and coordinates Gateway recovery afterward. Doctor findings and process outcomes feed update history, terminal output, and saved diagnostic reports. flowchart TD
A[Installed updater] --> B[Candidate Doctor checks]
B --> C{Required failure or advisory}
C -->|Required failure| D[Recovery and executor settlement]
C -->|Advisory| E[Activation and Gateway verification]
E --> D
D --> F[Bounded update history]
D --> G[Terminal outcome and saved reports]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +431, Tests +1811, Docs +8. Total +2250 across 72 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Preserve intentional settings, block required readiness failures, and expose actionable outcomes and rollback-readable reports through the existing updater owners. Do we have a high-confidence way to reproduce the issue? Yes: current-main source preserves blocking severities for optional policy findings, and supplied published-driver baselines show the corresponding failure. No current-main execution was performed in this read-only review. Is this the best way to solve the issue? Yes: the patch reuses existing classification, reporting, and maintenance owners, and the released-reader comparison supports the bounded compatibility repair without a database migration. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against dc7d10ceaf5d. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (10 earlier review cycles; latest 8 shown)
|
Final-source macOS published-driver proof — PASSHead: Published npm-global 2026.9.4 → this candidate on macOS arm64 / Node 24.21.0, with an isolated profile, prefix, workspace, and owned LaunchAgent. Synthetic Discord settings remained The update exited 0 in 225.57 s, installed the candidate commit, and restored a healthy Gateway. Its canonical final report and the independent updater-scoped lint payload contain all four warnings. The ledger is 7,380 bytes and its lint receipt 130 bytes. No The initial harness expected only a legacy pending report. This managed flow delegated completion to the candidate and printed a canonical final report instead. The transcript, succeeded ledger, canonical report, and a separate read-only lint check were reconciled without rerunning the successful update or changing product bytes. Paths, the synthetic profile name, and unrelated service identity are redacted below. The update transcript is otherwise complete. Published 9.4 standalone lint before updating — exit 1Full update transcript — exit 0Canonical saved report and bounded lint receipt{
"exitCode": 0,
"termination": "exit",
"signal": null,
"killed": false,
"counts": {
"error": 0,
"warning": 4,
"info": 0
},
"errors": [],
"omitted": 0
} |
Final-source macOS standalone-finalizer maintenance proof — PASSHead: This independent candidate installation ran Observed service messages: The measured post-plugin lint exited 0 with four warning findings. Cleanup verified the owned LaunchAgent unloaded, plist absent, and port closed. This proves standalone maintenance custody; it is separate from the published-driver upgrade proof. An initial fixture attempt dispatched health when only TCP was listening and failed before finalizer invocation. The harness was corrected to observe Complete standalone-finalizer transcript — exit 0Paths, the synthetic profile, and unrelated service identity are redacted. |
Final-source Linux published-driver proof — PASSHead: Blacksmith Testbox, root npm-global, Node 24.19.0. The canonical package build passed tarball integrity checks; all 46,017 tracked source files were verified against the committed source manifest before and after packaging. Testbox carrier run. Published 2026.9.4 → this candidate exited 0 in 83.552 s with a succeeded ledger and the human terminal success line. The synthetic config retained The saved phase report and independent full lint payload contain the same four named warnings. The ledger is 6,005 bytes; its retained lint receipt is 130 bytes. The published parent stripped the original step's structured exit field, but the JSON receipt preserved the physical exit 0, normal termination, signal, and killed flag. The policy messages were printed in Doctor's Security panel; this frozen parent's presentation does not forward every lint stderr line. This cell intentionally used isolated noncanonical state, so native service management was skipped. It proves the package/policy/report path, not Linux native Gateway maintenance. The candidate saved a separately named, explicitly pending phase report; the published parent then printed the terminal success outcome. The native maintenance cell is reported separately. An initial harness assertion demanded the newer lint-prefix presentation from the frozen parent. The corrected fresh run verifies the actual visible policy message while independently requiring warning severity in both the receipt and report. Product bytes were unchanged. Paths are redacted in the complete transcript below. Published standalone lint baseline — exit 1{
"exitCode": 1,
"ok": false,
"checksRun": 33,
"intendedPolicy": {
"dmPolicy": "open",
"groupPolicy": "open"
},
"findings": [
{
"checkId": "core/doctor/security",
"severity": "error",
"message": "Discord DMs are open: channels.discord.dmPolicy=\"open\" allows anyone to DM the bot.",
"fixHint": "Use pairing/allowlist; if you really need open DMs, ensure channels.discord.allowFrom includes \"*\"."
},
{
"checkId": "core/doctor/security",
"severity": "error",
"message": "Discord security warning: Discord guilds: groupPolicy=\"open\" with no guild/channel allowlist; any channel can trigger (mention-gated). Set channels.discord.groupPolicy=\"allowlist\" and configure channels.discord.guilds.<id>.channels."
}
],
"openDmErrorReproduced": true
}Complete published-driver update transcript — exit 0Saved phase report and bounded lint receipt{
"exitCode": 0,
"termination": "exit",
"signal": null,
"killed": false,
"counts": {
"error": 0,
"warning": 4,
"info": 0
},
"errors": [],
"omitted": 0
}Additional candidate-updater check — truthful no-op publicationInvoking the final candidate against the same tarball exited 0 in 10.493 s and truthfully returned The success-only harness assertion was corrected by independently inspecting the existing row, physical exit, transcript, and saved report. No upgrade was manufactured or rerun to replace the intentional non-outcome. Complete no-op transcript and saved reportSaved report: |
Final-source Linux standalone-finalizer proof — PASSHead: Blacksmith Testbox, root npm-global, Node 24.19.0, real systemd user service with an isolated profile and port. This is the same immutable candidate as the published-driver upgrade cell. Testbox carrier run.
The initial fixture was blocked before finalization by an absent root user-session bus. With no foreign OpenClaw user units present, the bounded recovery started the existing OS user manager and D-Bus service; no packages or product bytes changed. Cleanup removed the owned Gateway unit, closed its port, and restored the manager, runtime, bus, and linger settings to their original inactive/absent state (all undo commands exited 0). Evidence archive SHA-256: Paths and the fixture profile identifier are redacted below. The JSON finalizer result is shown as captured; this cell does not claim a human upgrade headline or a repairing phase. Complete standalone-finalizer captured output — exit 0 |
…53302) Join accepted task-event publication in the shared persistence settlement helper before asserting zero roots. Pin the pending publication across same-turn reset with an ordering gate, covering settlement inside test bodies as well as teardown. Related: openclaw#153147, openclaw#145335. Co-authored-by: steipete <[email protected]>
…153147) Keep optional Doctor inspections and intentional channel-policy advisories visible as warnings during updates while preserving required configuration, state, and startup checks. Preserve complete bounded findings in named diagnostic artifacts and compact receipts in update history; retain the published rollback reader's 8 KiB file, 4 KiB prompt, and 768-byte error-field limits. Publish admitted-run terminal outcomes and report paths through the existing terminal owner after executor settlement. Standalone finalization uses the existing maintenance owner to park and restore its Gateway, while inherited finalizers retain the parent's ownership. Validation: reviewed source has passing focused regression, released-reader compatibility, changed-file, and import-cycle proof. Published 2026.9.4 upgrades and standalone finalizers passed on Linux and macOS at the earlier source documented in the PR; later diagnostic-envelope and exceptional-publication corrections have focused regression coverage. Exact-head CI is required by native preparation and merge. Thanks to @davidchyi-beep, @BodegaClaw, @CHE10X, @jammyclaw, and Discord reporter Patryk for the reports and diagnostic evidence. Fixes openclaw#152759. Fixes openclaw#152918.
* test(doctor): pin advisory security findings for released post-plugin readiness drivers 9.4/9.5 updaters run the candidate's post-plugin readiness lint with IN_PROGRESS + POST_CORE_CONVERGENCE and no advisory classification of their own. An installed @openclaw/whatsapp <=2026.9.4 still reports open groups as critical, which blocked those hosts from updating (#156394). The candidate-side downgrade from #151683/#153147 fixes this in 2026.9.6; cover that driver cell with the released 9.5 parser fixture. Refs #156394 * test(doctor): consolidate released updater warning coverage * style(doctor): format updater marker test --------- Co-authored-by: Vincent Koc <[email protected]>
* test(doctor): pin advisory security findings for released post-plugin readiness drivers 9.4/9.5 updaters run the candidate's post-plugin readiness lint with IN_PROGRESS + POST_CORE_CONVERGENCE and no advisory classification of their own. An installed @openclaw/whatsapp <=2026.9.4 still reports open groups as critical, which blocked those hosts from updating (openclaw#156394). The candidate-side downgrade from openclaw#151683/openclaw#153147 fixes this in 2026.9.6; cover that driver cell with the released 9.5 parser fixture. Refs openclaw#156394 * test(doctor): consolidate released updater warning coverage * style(doctor): format updater marker test --------- Co-authored-by: Vincent Koc <[email protected]>
What Problem This Solves
Fixes updates that stop on intentional channel policy settings, lose the deciding Doctor diagnostics, or exit after an unexpected failure without publishing the terminal report.
Fixes #152759, fixes #152918. Related: #152914, #152910, #153077, #153049, #152955.
User Impact
Optional inspections and policy advisories remain visible warnings during updates; required configuration, state, and startup checks remain blocking. Saved reports and a separately linked inventory retain every individually bounded Doctor finding. The rollback-facing JSON stays within 8 KiB; update history retains counts, deciding errors, an omission count, and physical child exit facts. Unexpected admitted-run failures publish their outcome and report path after executor settlement. Standalone finalization parks its owned service before fresh Doctor; inherited finalizers preserve the parent's ownership.
Why This Change Was Made
The health-check adapter now preserves the existing update-work classification. The diagnostic owners keep complete findings in named artifacts and a bounded projection in the existing run record. Terminal publication remains with the existing terminal owner, after cleanup and settlement. Older candidates that emit exit 1 for an intentional security policy retain that physical exit alongside the advisory. Legacy post-core children without completion authority emit a separately named pending phase report. A candidate that owns completion publishes the canonical terminal report after settlement.
This preserves the merged repair-turn separation and #152973's Doctor-deadline ownership; it does not supersede either change. The rebase also includes #153007. The referenced causeless-report class is already covered by #152331 and is not claimed fixed here.
Thanks to @davidchyi-beep, @BodegaClaw, @CHE10X, @jammyclaw, and Discord reporter Patryk for the reports and diagnostic evidence.
Evidence
Follow-up CI correction (
986402521c9)update-doctor-lint.tsandupdate-runner-types.tsis removed by extracting the unchanged finding schema/type to the leafupdate-doctor-lint-schema.ts; all consumers import that owner directly. Update classification, diagnostic bounds, and the zero-exit failure predicate are unchanged.isFailedUpdateStepowner. Its missing route previously threw before the expectedUpdateCommandFailure; all exception and backup-retention assertions remain intact. The verification-recorder routing hunk is absorbed from the merged fix(update): reconcile a managed service pinned to another install #150898; the only added route evaluates the shared failed-step owner.core-tooling-11-hosted-3passed 1,136 tests (2 skipped);core-tooling-1-hosted-3produced no test result across two 300-second stalls, then exited 143. Its eight unchanged files passed all 95 tests locally. The underlying hosted stall remains unconfirmed; no timeout, assertion, or unrelated production change was made for it.transformmode; the CI-matching Node 24 run passed.pnpm check:changed,pnpm check:import-cycles, and the hosted job'spnpm check:madge-import-cycles: passed. Fresh final P1 autoreview: scoped-clean on the complete rebased PR.199eb497fb2: production net +1 (+22/−20 for leaf-schema wiring, less one obsolete import during reconciliation); tests/support +7/−4 (net +3) after the sibling harness hunk is absorbed by the rebase. The rebase absorbs fix(update): avoid repeating candidate checks before repair #153188, fix(update): reconcile a managed service pinned to another install #150898, fix(doctor): avoid repeated state copies in full reports #153584, and fix(triage): stop reporting failed updates as resolved #153443. Its two conflicts are import-only: keep main's initialization owner, retain the unexpected-failure preparer in the admitted-run owner, and import both existing failed-step helpers from their shared owner. The zero-exit correction, advisory classification, released diagnostic bounds, and terminal-after-settlement behavior remain intact.The lead's P1 about released rollback diagnostic bounds is accepted and fixed. The 4 MiB candidate-only reader increase is removed: the rollback-facing file stays within the released 8 KiB limit and links the complete inventory written by the existing failure-artifact owner. The initiating cause, inventory link, and deciding lint receipt fit together in the released 768-byte error field; this avoids losing counts and physical facts to 9.4's 160-byte stderr truncation. The shared receipt formatter remains in its browser-safe owner. Inventory-write failure preserves the compact original failure with an unavailable warning.
node scripts/check-changed.mjs: passed after the test-only type/lint cleanup, including core/test types, dead-export scans, lint, schema v17, and zero runtime import cycles. The focused 20 compatibility cases were also rerun successfully after that cleanup.e2345cc9c459558be31d4875be3e542d381cbd04; attachment precheck only, without waiting for completion.8f67abd5e0f2eb9cc55d6f2313d01f2d6129069cef796f88dbc4b7bcec2ebfafbuilt from headef6932c1add2a7a3c338a7a17874ad0d54e06d6e.ef6932cℹ️ OpenClaw update skipped: already-current., distinct skipped run and canonical report; not upgrade proof.Both published-driver baselines returned exit 1 with named errors for the unchanged open DM and guild policies. Updates retained those settings and treated the findings as warnings. Neither successful policy update entered
repairing; no live repairing-phase terminal result is claimed. Exception/settlement publication is covered by the focused regressions. The live transcripts remain attributed to that earlier head. Rigs were not rerun for this correction: their successful-update and maintenance assertions cover unchanged Markdown findings, report paths, and warning-only ledger receipts; they never consumed a failed handoff JSON file. The frozen-reader regressions exercise the corrected failure-artifact path. The Linux user-session bus fixture blocker was resolved using existing OS services, with their original state restored afterward. All owned native Gateway units and listening ports were cleaned up.LOC
Correction against
ef6932c: production +136/−71 (net +65); tests/support +577/−88 (net +489); docs +1/−1. The test delta includes 337 lines freezing the released 9.4 reader rather than validating compatibility against a newer reader. Current full PR totals after CI correction and reconciliation: production +864/−433 (net +431); tests/support +2135/−324 (net +1811); docs +8/−0 (net +8).Previously accepted production scope: +681/−330 (net +351). Older-candidate advisory compatibility is retained; duplicate type inventories were removed, progress reads/cleanup were shared, and the wire/artifact schema now uses one factory. No dependency, configuration/CLI option, or SQLite schema changes.
Known gaps / follow-ups
Three preexisting output paths still bypass the terminal publisher: busy-admission refusal, the invalid-dev-target early return, and unrecognized pre-admission errors. Report-write failures remain warnings and do not invent a saved path. This PR does not claim universal terminal coverage for those paths.
PR-2 remains separate: bounded automatic repair only after terminal failure, preserving the original outcome and excluding verified rollback. Its plan builds on #147547's turn boundary and records #147584's owner-bound repair-turn overlap. It must resolve the latest-FAILED admission versus successful/rolled-back validation contradiction, prevent an old runtime from opening newer canary state, and record a missing inference route as a warning. No repair-path implementation is included here.
Maintainer disposition of ClawSweeper revision 10
The exact-head review at
986402521c936f273bd5d3c853d0d604b4da283freports no actionable correctness or security findings and contains no separate Rank-up moves. Its sole before-merge item, Add data-model compatibility proof, is addressed by the published 2026.9.4 → candidate Linux and macOS upgrade cells linked above and the frozen released-9.4 rollback-reader regressions. The corrected writer preserves the released 8 KiB file, 4 KiB prompt, and 768-byte error-field bounds while linking the complete inventory. There is no SQLite schema change or migration to add. The live cells remain attributed to their executed earlier head; the later rollback-envelope and exceptional-publication corrections rely on the documented focused regressions. No additional live rerun or code change is claimed for this landing.