Repository navigation
fix(update): use candidate snapshot worker and warn on plugin parse errors - #162298
Conversation
Keep snapshot workers in the staged candidate package and share named syntax-error warnings with candidate Doctor. Preserve source integrity checks and carry warnings into the update step. Validation is in progress on an isolated Linux Testbox for #162017.
Use candidate-local snapshot workers in Doctor producer fixtures and the shared UTF-8 command mocks in canary cleanup. Start virtual cleanup time after Gateway startup so real snapshot child settlement can finish. Cleanup: 22 tests pass three times in 1.14-1.43 seconds of test time, replacing deterministic 120-second hangs. The affected Doctor shard passes 63 tests three times. The changed-file gate and independent P1 review pass.
|
🦞👀 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 30, 2026, 10:27 PM ET / October 1, 2026, 02:27 UTC. ClawSweeper reviewWhat this changesThe PR runs update snapshot inspection from the staged candidate package and records optional plugin parse failures as named warnings while preserving plugin files. Merge readiness⛔ Blocked before merge - 1 item remains Keep open: the repair remains necessary on current main, and this Codex review found no blocking introduced defect. The published-driver recovery evidence supports the documented first-hop limitation. Priority: P0 Review scores
Verification
How this fits togetherUpdate rehearsal copies operator state and plugins into a private environment before checking the candidate Gateway. Snapshot inspection supplies the copied files, capacity estimates, and warnings consumed by Doctor and the update report. flowchart TD
A[Installed updater] --> B[Staged candidate]
C[Operator state and plugins] --> D[Candidate snapshot worker]
B --> D
D --> E[Private state copy]
D --> F[Named parse warnings]
E --> G[Doctor and Gateway checks]
F --> H[Update report]
G --> H
Before merge
Agent review detailsSecurityNone. PR surfaceSource +49, Tests +162, Docs +10. Total +221 across 23 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. Technical reviewBest possible solution: Keep candidate-owned snapshot inspection and shared named warnings while preserving private-copy and source-integrity failures. Do we have a high-confidence way to reproduce the issue? Yes from source: an unparseable configured plugin reaches current main's unguarded snapshot dependency inspector. The captured published-driver failure corroborates this path; this read-only review did not execute it. Is this the best way to solve the issue? Yes. Reusing the existing candidate worker resolver and sharing Doctor's syntax-error handling is a focused repair that retains integrity checks and documents the older-driver boundary. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 1b9d7e70ae30. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Landed via the admin exception (squash |
…rrors (openclaw#162298) The candidate state snapshot step launched its worker from the installed driver's own dist instead of the candidate root, so an old driver parsed plugin bundles with pre-openclaw#155394 options and failed the whole snapshot on an ESM plugin's import.meta ("Cannot use 'import.meta' outside a module"), ending the update as runtime-verification-failed. The snapshot worker now resolves under candidateRoot, and an unparseable plugin is recorded as a bounded named warning through the inspection helper Doctor already shares, instead of aborting the snapshot. Already-installed 2026.9.5/9.6 drivers keep their old worker for that first hop; the issue records the disable/update/enable recovery. Closes openclaw#162017
…rrors (openclaw#162298) The candidate state snapshot step launched its worker from the installed driver's own dist instead of the candidate root, so an old driver parsed plugin bundles with pre-openclaw#155394 options and failed the whole snapshot on an ESM plugin's import.meta ("Cannot use 'import.meta' outside a module"), ending the update as runtime-verification-failed. The snapshot worker now resolves under candidateRoot, and an unparseable plugin is recorded as a bounded named warning through the inspection helper Doctor already shares, instead of aborting the snapshot. Already-installed 2026.9.5/9.6 drivers keep their old worker for that first hop; the issue records the disable/update/enable recovery. Closes openclaw#162017 (cherry picked from commit f525f46)
Closes #162017
Prepared head:
dd7898b5244adaadebfa11583956a43063aae9d1.What Problem This Solves
Fixes update snapshot preparation aborting when an optional plugin entry cannot be parsed, and makes updated drivers run snapshot inspection from the staged candidate package.
User Impact
Snapshot inventory and candidate Doctor report named plugin parse warnings while preserving the plugin files and continuing other checks. Source-integrity and private-copy failures remain errors.
Already-installed 2026.9.5/2026.9.6 drivers require the documented one-time disable/update/enable recovery for an affected plugin. Their installed launcher runs its own snapshot worker before the candidate takes over, so a candidate cannot retrofit that first-hop launcher. Run
openclaw plugins disable <id>, thenopenclaw update, thenopenclaw plugins enable <id>. The unchanged 9.5 driver with an enabled ESM fixture reproduces the original failure; the recovery sequence was verified through that published 9.5 updater and leaves the unchanged plugin enabled and loaded on 2026.9.7. The 9.6 recovery was not live-tested. Once this fix is installed, later update hops select the candidate worker and record unsupported plugin entries as named warnings.Thanks @jamiezigelbaum for the detailed report.
Why This Change Was Made
Main already has one shared parser admitting retained
import.meta; selecting the installed driver's worker kept older parser behavior in the update path. Pass the candidate root to the existing worker resolver, share per-entry syntax-error handling between snapshot inventory and Doctor, and carry bounded warnings into the recorded snapshot step. Older candidate inventory responses remain readable when they omit warnings.Evidence
import.meta.dirand a deliberately invalid regex; the repaired snapshot preserves its bytes, records the plugin name, and continues the valid Doctor sibling. Test time: 0.768 seconds;pnpm test <file> --maxWorkers=1wall: 6.878 seconds.node scripts/check-changed.mjs --base fb2052a33fd612097bd37ae8f29730505f6be8eapassed in 1,361.775 seconds, including production types, all 27 test type graphs, formatting, lint, dead exports, and selected guards.252a9b4bb57d368e9a2e058f7675399cb217842d533afe9acb20a22da77be94a, built from production checkpoint0ff17dac142c255bb5240350d470cbf650384381; subsequent changes are test fixtures only.runtime-verification-failed, exact errorCannot use 'import.meta' outside a module (7:415663). Installed worker and plugin bytes remained unchanged.status: ok,run.status: succeeded, no failed steps; plugin re-enabled and reportedloaded, with unchanged bytes.Blacksmith Testbox evidence: focused checks, package and published-driver proof, final checks. Hosted PR CI timing is not yet available.
The package build also reported an ordinary Control UI chunk at 216.6 KiB gzip against its 215.0 KiB report threshold; the packer and tarball integrity checks returned success. This branch changes no UI source or budget.
Measured single-worker test costs
Each wall measurement uses
pnpm test <file> --maxWorkers=1on Linux. Test seconds exclude shared compiler/setup time.update-candidate-snapshot.plugin-inspection.test.tsupdate-candidate-canary.test.tsupdate-candidate-plugin-repair.test.tsupdate-candidate-plugin-sources.test.tsupdate-candidate-bundled-provenance.test.tsupdate-candidate-rehearsal.resources.test.tsupdate-candidate-rehearsal.test.tsupdate-candidate-state.budget.test.tsupdate-candidate-state.cleanup.test.tsupdate-candidate-state.test.tsupdate-candidate-workspace-rehearsal.test.tsupdate-candidate-state.inventory.test.tsupdate-candidate-canary.cleanup.test.tsdoctor-update-rehearsal-producer.test.tsThe existing four-case workspace suite uses real snapshot and Doctor boundaries to verify that older, identical, newer, and interrupted-claim operator files and SQLite history survive. Its fixture change supplies the candidate-local worker; no cases were added there.