Repository navigation
fix(plugins): preserve environment references when updates migrate settings - #193074
Conversation
Keep the selected candidate Doctor manifest through authored and resolved reference replay when a core migration changes plugin policy. Co-authored-by: steipete <[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: blocked before merge. What this changesCarries the replacement plugin’s selected migration registry through reference restoration so moved settings retain authored environment references. Example: A plugin update moves oldHost to listener.host while LISTENER_HOST=127.0.0.1 and a core migration changes plugins.allow.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep this PR open: it repairs a concrete reference-preservation defect, and the earlier compatibility-test finding is resolved; no new actionable code defect was found. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe plugin updater supplies candidate metadata and existing config to Doctor migrations, which restore authored references before the existing guarded config writer publishes the result. flowchart TD
A[Plugin update] --> B[Candidate metadata]
B --> C[Selected plugin migration]
C --> D[Authored and resolved replay]
B --> D
D --> E[Reference restoration]
E --> F[Guarded config publication]
Technical reviewBest possible solution: Keep the focused candidate-selection forwarding through the existing replay owners, preserving exact reference/value matching and guarded publication. Do we have a high-confidence way to reproduce the issue? Current-main source exposes the candidate-selection loss during replay, and the supplied report identifies the exact raw-file failure; no target code was executed during this review. Is this the best way to solve the issue? This is the smallest complete repair: carry the already-selected candidate contract into both replay views rather than weakening fingerprint checks or introducing another migration path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 94bea34ae991. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +30, Tests -1, Docs +14. Total +43 across 8 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel 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 November 5, 2026, 12:38 AM ET / 05:38 UTC (Revision 2). |
Only forward the manifest registry for an explicit candidate selection. Apply the pinned formatter to the corrected migration owner. Co-authored-by: steipete <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
…ttings (#193074) * fix(plugins): preserve env references during config migration Keep the selected candidate Doctor manifest through authored and resolved reference replay when a core migration changes plugin policy. Co-authored-by: steipete <[email protected]> * fix(doctor): preserve default migration arguments Only forward the manifest registry for an explicit candidate selection. Apply the pinned formatter to the corrected migration owner. Co-authored-by: steipete <[email protected]> * fix(plugins): preserve authored references through candidate replay --------- Co-authored-by: steipete <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> Backport-source: 5622e5f Backport-scope: Thread selected plugin IDs and replacement manifest through reference-restoration migration replay using existing doctor contracts. Four production files; no broad migration rewrite. Adapted production backport for release/2026.11.2. Upstream validation descriptions refer to source history; candidate regression coverage and remote qualification are tracked separately. Co-authored-by: RomneyDa <[email protected]>
…ttings (openclaw#193074) * fix(plugins): preserve env references during config migration Keep the selected candidate Doctor manifest through authored and resolved reference replay when a core migration changes plugin policy. Co-authored-by: steipete <[email protected]> * fix(doctor): preserve default migration arguments Only forward the manifest registry for an explicit candidate selection. Apply the pinned formatter to the corrected migration owner. Co-authored-by: steipete <[email protected]> * fix(plugins): preserve authored references through candidate replay --------- Co-authored-by: steipete <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
Backport #193074 (5622e5f). Co-authored-by: RomneyDa <[email protected]>
What Problem This Solves
Fixes
openclaw plugins updatereplacing an authored environment reference with its resolved value when a replacement plugin moves the setting and core migration changes the plugin allowlist.User Impact
Moved settings retain references such as
${LISTENER_HOST}in root config and single-owner$includefiles. Existing plugin config and installed-index records remain readable and updateable. Previously flattened literals stay literals because their original reference cannot safely be reconstructed.Why This Change Was Made
The replacement plugin's selected manifest registry and IDs now accompany both authored/resolved replay views. Replay therefore uses the same candidate migration that moved the setting, even while the old package generation is still the persisted owner. Existing fingerprint checks, deferred-owner selection, backups, guarded publication, completion, and rollback remain in force. There is no new config option, schema, or cache.
The compatibility assertion now checks exact invocation count and selected config/plugin IDs without depending on absent optional fields. The existing include scenario exercises the moved reference too. Current main was merged without rebasing; its #193097 repair also resolves the original unrelated
check-lint-core-2Promise-executor errors.Evidence
7075e19cff8e3b02264dce5f3c14dbcec3c61cafreproduces the exact raw-file${LISTENER_HOST}→127.0.0.1failure at the production update-command boundary on Node 26.12.1 and pinned Bun. Package acquisition and Gateway transport are fixtures in this regression; persistence and migration are real. The affected owners/test are unchanged between that main and merged base3816bcb3dea1879d055853fc070af78bc7737ab0.plugins-update-command.migrations.integration.test.ts,channel-legacy-config-migrate.test.ts, andconfig-flow-steps.references.test.ts, covering the original regression, include ownership, selected/non-channel owners, replacement installs, disabled/pending migrations, completion, and rollback. Node migration-file Vitest duration: 410.34s; two smaller files: 32.27s; total wrapper wall 575.64s. Bun: 226.80s and 29.50s; total wrapper wall 425.26s. The existing SQLite/publication matrix dominates runtime; no new cases were added.plugins install,config validate,plugins update, andconfig getcommands loaded oldoldPort/oldHostsettings, migrated them, and returned127.0.0.1while raw root/include files retained${LISTENER_HOST}. Both the ordinary update/retry control (75.16s) and unmarked nonempty allowlist cases (54.58s) passed, preserving the include pointer, unrelated label, and authored policy. Restoring the synthetic state copy emitted a conservative source-snapshot cleanup warning; update/validation succeeded and no deletion bypass was used.openclaw infer model run --local --model ollama/qwen2.5:7bcommand loaded the updated included config and returnedlistener-update-okvia the shared local Ollama server (18.80s). This is direct CLI/provider proof, not a Gateway/agent-turn claim.9fcb3e85c450c0984f26b4b8c2ea04a4de3df272.pnpm check:baseline-ratchets --base 3816bcb3dea1879d055853fc070af78bc7737ab0and separate line-cap pass. Scoped format/lint, core types, Doctor and CLI test types, andpnpm buildpass. The build took 931.31s on macOS, including full package declarations and UI assets; lint/type wall times include waiting for its artifact lock.9fcb3e85c450c0984f26b4b8c2ea04a4de3df272, includingopenclaw/ci-gate. No CI reruns or additional pushes were needed.Update behavior: the candidate plugin-update command needs the fix; older installed updaters need no new marker or protocol. Existing state is input to the same repair/publication owners; unresolved data migrations retain their inputs and existing Doctor guidance.
ClawSweeper reviewed
9fcb3e85c450c0984f26b4b8c2ea04a4de3df272with no code findings; its only hold is additional publishedv2026.10.10-to-candidate root/include upgrade proof. That cell is not run; macOS installed-plugin data/config proof is above.