Repository navigation
fix: stop bundled plugin config churn during updates - #168226
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. What this changesPlugin synchronization avoids adding packaged bundled-plugin load paths that Doctor subsequently removes. Example: An unchanged brave install points to /opt/openclaw/dist/extensions/brave.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a current plugin-update inconsistency at its producer; no introduced correctness or security defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherUpdate-channel synchronization consumes installed-plugin records and bundled discovery metadata, then returns configuration and change flags to plugin convergence. flowchart LR
A[OpenClaw update] --> B[Plugin convergence]
B --> C[Channel synchronization]
D[Bundled discovery] --> C
E[Installed plugin records] --> C
C --> F[Configuration and change flag]
F --> G[Doctor repair]
Technical reviewBest possible solution: Keep channel synchronization aligned with bundled discovery and Doctor through the existing alias classifier. Do we have a high-confidence way to reproduce the issue? Current main unconditionally adds the packaged path before recognizing an unchanged bundled install, while Doctor subsequently identifies that path as redundant; no target code was executed during this review. Is this the best way to solve the issue? The patch repairs the producer using Doctor's existing classification instead of suppressing change reporting or weakening repair behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d54483901779. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +8, Tests +51. Total +59 across 2 files. Added test files: 1. View PR surface stats
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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 HistoryReviewed October 10, 2026, 4:44 AM ET / 08:44 UTC (Revision 4). |
|
@clawsweeper re-review The body now includes retained production config-audit evidence and the completed native control versus combined replay: the control adds/removes all three bundled aliases; the combined tree does not. Published 2026.9.8 activation fails identically on exact plain-main merge base bc524d8, before either changed owner runs. No successful published cell or timing speedup is claimed. Please review exact head 6249a2e. |
|
🦞👀 Re-review progress:
|
|
Landed in 76aabd1. The fix prevents bundled-path aliases from being rewritten and then removed by Doctor. The native legacy-index control reproduced the three-alias write/revert; the combined candidate preserved configuration and installed records without that churn. Focused negative controls, exact-head CI and hosted review passed. The published 2026.9.8 activation blocker also reproduced on plain main and is documented in the body. Thanks for the report. |
## What Problem This Solves Fixes: `openclaw update` defers Doctor work for an available, explicitly linked plugin until package convergence, although package convergence deliberately skips path installs. ## User Impact Available operator-managed linked plugins can complete their Doctor work in the activation phase instead of needlessly deferring it. Missing or stale packages and unrecorded configuration paths remain deferred. Other reasons for the post-plugin Doctor, including deferred model retirement, are unchanged. ## Why This Change Was Made The existing availability decision now recognizes a present `source: "path"` install as independent of package convergence. It continues to require the existing payload and descriptor checks to pass. Update behavior: candidate-side only; it uses the existing update environment and needs no new marker. No new configuration option, schema, or persisted-state format. ## Evidence - Final focused run: both linked/unrecorded state-migration cases passed. The affected Doctor test typecheck graph passed. - The regression drives Doctor preflight in the update environment with a real installed-plugin index and a plugin state-migration contract. It checks that linked installs migrate retained binding data, while the same unrecorded path keeps its migration obligation and original bytes. - Negative control: the linked-install case fails with the original availability implementation, while the unrecorded-path control passes. - The earlier full preflight suite passed all 13 tests. A later full-file run hit timeouts, an abort, and a lost lease (9 passed, 4 failed); the final focused run is the direct regression proof. - Driver: **released v2026.9.8 (git-source install mode, same as the affected install)** → exact candidate `08189f5bbe8cb82567587a3ed8edbba4e2cee65e`. The real managed-Gateway update succeeded, with the linked plugin's state migration executed exactly once during activation and its data/settings preserved (inline evidence below). - npm-package mode is not exercised by that native run because the local Docker npm cell is blocked by **OrbStack virtiofs**: both this candidate and the exact merge base `bc524d8903002ca70d07f9770b2f993e5e7aec59` fail the installed driver's retained-runtime inode check before candidate post-core work. The [Linux release-check published-upgrade-survivor-2026.9.8 job](https://github.com/openclaw/openclaw/actions/runs/38032945484/job/114159364272) passed on Ubuntu 24.04 and supplies the npm-mode evidence; this is a successful job, not a claim that its entire workflow passed. - Native managed-Gateway replay: control `bbb82fd1e8a` (tree identical to `bc524d89030`) versus combined `47c4c3641b6e` (tree identical to `f14888c058d`, containing this change and #168226). Both use an actual linked plugin and legacy bundled-path install records. Only commit metadata was advanced to avoid the already-current fast path. Both updates finished successfully and returned `/readyz` 200. - Control's activation Doctor deferred the linked plugin with “Package convergence must wait”. Combined's activation Doctor did not defer it; the linked-plugin path and records survived. The focused migration regression above separately verifies retained data bytes. Combined also eliminated bundled-alias write/revert churn; control retained it. - Readiness downtime, summing every last-200 → next-200 interval: control **420.642 s** (one outage); combined **498.144 s** (494.934 s + 3.210 s). The stopped-window activation Doctor step took **75.030 s** versus **90.987 s**. These loaded-host samples do not establish a speedup. Both still ran the post-plugin Doctor for deferred model retirement; that independent trigger is unchanged. - Native artifacts: `runs/do-{ctl,f12}/evidence/legacy-index/{summary.json,update-result.json,readiness.jsonl,downtime-all-intervals.json}`, plus `native-legacy-evidence.json` with config-audit and retirement records. - [Maintainer decision](#168190 (comment)): approve the healthy recorded-path exception while retaining the missing/stale/unrecorded/package-managed deferral. ### Released-driver stateful upgrade The fixture was installed through `plugins install --link` and declared a real Doctor state-migration contract. Its migration renames `legacy-binding.json` to `migrated-binding.json` without changing bytes and appends `1` followed by a newline to a counter. Backup resources use Doctor's supplied state directory, so candidate validation runs on the cloned state, not live state. Sanitized `update-result.json` / persisted update-ledger excerpts: ```json { "status": "ok", "mode": "git", "before": {"sha": "fc23bc864e4553c2d215e479eeec47b67a0bf943", "version": "2026.9.8"}, "after": {"sha": "08189f5bbe8cb82567587a3ed8edbba4e2cee65e", "version": "2026.9.9"}, "activationDoctor": { "step": "openclaw doctor", "status": "completed", "startedAtMs": 1791628709879, "endedAtMs": 1791628789375, "exitCode": 0 }, "postUpdate.plugins.npm.outcomes": [ {"pluginId": "harness-probe", "status": "skipped", "message": "Skipping \"harness-probe\" (source: path)."} ], "readyzAfter": 200 } ``` Live-state observations after the update: ```text migration-count.txt bytes: 31 0a # exactly "1" + newline migration-count.txt mtime: 2026-10-10T10:39:18.433789Z activation Doctor window: 2026-10-10T10:38:29.879Z–10:39:49.375Z legacy-binding.json exists: false migrated-binding.json: {"binding":"retained","data":"byte-preserved"} + trailing newline plugin settings: {"binding":"settings-retained"} package-convergence deferrals in update result + complete ledger: 0 ``` The counter was written **inside the activation Doctor window**, before post-plugin convergence. The final live counter remains exactly one, including after the later Doctor. Data SHA-256 is over the original/migrated file bytes; settings SHA-256 compares the before/after JSON subtree serialized with the same two-space indentation and trailing newline: | Bytes | Before SHA-256 | After SHA-256 | | --- | --- | --- | | Plugin data | `adbf0252af99cc5ed2cd81923331a1a3f9aa5e0138bf771c9e9ed8981e5049fb` | `adbf0252af99cc5ed2cd81923331a1a3f9aa5e0138bf771c9e9ed8981e5049fb` | | Plugin settings | `d3ba894374d916f631bf16386b64fc1e1b69cee66bf5ff227b039c5693c0c035` | `d3ba894374d916f631bf16386b64fc1e1b69cee66bf5ff227b039c5693c0c035` | Read-only SQLite `diagnostic_events` config-audit rows (timestamps UTC; local paths/process identity omitted): | Timestamp | Origin | Changed paths | | --- | --- | --- | | 09:09:42.462 | plugin-install | `plugins.installs` | | 09:09:57.820 | cli | `plugins.entries.harness-probe.config`, `plugins.installs` | | 10:39:23.947 | doctor | `meta.migrations.webhookListeners`, `plugins.installs`, `wizard` | | 10:40:11.428 | not recorded | `plugins.installs`, `plugins.load.paths[1]`, `[2]`, `[3]` | | 10:40:40.654 | doctor | `plugins.installs`, `plugins.load.paths[1]`, `[2]`, `[3]`, `wizard.lastRunAt`, `wizard.lastRunCommit` | No update-time row changed `plugins.entries.harness-probe.config`. The latter alias add/remove is expected here: this exact candidate contains fix 2 only, not the separate fix in #168226. Deferred model retirement still caused the later Doctor; it did not rerun the plugin migration. <details> <summary>Inspectable retained outputs and proof boundary</summary> Native update-result excerpts (paths omitted; no output values changed): ```json { "control": { "status": "ok", "postUpdate.plugins.sync.changed": true, "activationDoctor.durationMs": 75030, "activationDoctor.stderr": "Plugin \"harness-probe\" data/settings upgrade is unfinished: Package convergence must wait until the updating parent releases its install records.", "finalReadyz": 200 }, "combined": { "status": "ok", "postUpdate.plugins.sync.changed": false, "activationDoctor.durationMs": 90987, "activationDoctor.packageConvergenceDeferralCount": 0, "finalReadyz": 200 } } ``` Both persisted installed indexes retained `harness-probe` with `source: "path"` and unchanged source/install paths. Both also retained the three bundled path records, including their original `spec` and `installedAt` values. The native probe does not declare a data-migration contract; this run proves the real updater's availability/deferral branch and retained existing state, not execution of a stateful migration. Stateful migration coverage is the focused regression on this exact head: ```text node scripts/run-vitest.mjs run src/commands/doctor-config-preflight.plugin-deferral.test.ts -t 'package convergence skips it' Test Files 1 passed (1) Tests 2 passed | 11 skipped (13) ``` Its linked case invokes the real migration contract and verifies `{"binding":"retained"}` plus a trailing newline in the migrated file; its unrecorded-path control verifies the original bytes remain and no destination exists. Local Docker npm-mode output on both candidate and exact merge-base control (OrbStack virtiofs limitation, not the successful native git-source run above): ```text package-install: exitCode 0 package-update: exitCode 1 reason: unexpected-error Retained runtime entry does not reference its inventoried file: <installed-root>/dist/a2ui-D3SkzOIh.mjs postUpdate: null ``` </details> Maintainer-intent check: no overlapping changes from the maintainers named in the repository review guide were found in the affected files. Merge danger: two-way door; reverting restores the needless deferral. Blast radius is Doctor availability for explicitly recorded path plugins during updates. Co-authored-by: Ayaan Zaidi <[email protected]>
## What Problem This Solves Fixes: `openclaw update` repeatedly changes plugin configuration when the installed-plugin index records bundled plugins as linked `source: "path"` installs into `dist/extensions`, even though the installed plugins have not changed. Earlier development-channel updates could create this shape when switching an existing plugin to its bundled copy. ## User Impact Updates retain the canonical bundled-plugin configuration instead of adding a redundant load path that Doctor immediately removes. Real plugin switches still count as changes. Other reasons for the post-plugin Doctor, including deferred model retirement, are unchanged. ## Why This Change Was Made Plugin sync now uses the same packaged-path alias detection as Doctor before adding bundled load paths, for both development and release channels. Source-tree and external linked plugin paths keep their existing behavior. Update behavior: candidate-side only; the installed updater needs no new marker. No new configuration option, schema, or persisted-state format. ## Evidence - Three focused regressions cover unchanged development and stable bundled installs and a development npm-to-bundled switch. All pass on this change and all fail with the original sync implementation. - Each regression passes the resulting configuration through Doctor's bundled-load-path repair and confirms that it has nothing left to remove. - A retained real update confirms the trigger: the installed index contains bundled path records for `brave`, `codex`, and `diagnostics-otel`; post-update sync appends their `dist/extensions/<id>` paths, then Doctor removes the same three paths. The config-audit write hashes match the retained before/intermediate/after configurations. The operator's unrelated linked-plugin path remains throughout. - Final candidate: all 89 plugin-update and bundled-load-path tests passed. Core and all 27 test typecheck graphs passed. - Published-driver attempt (`[email protected]` → candidate, configured-plugin-installs): packaging and candidate package installation succeeded, but activation failed before candidate post-core work because the installed driver's retained-runtime inventory rejected an `a2ui-*.mjs` inode. The identical cell against this PR's exact merge base (`5ce8485a701`, without this change) failed at the same check. Rollback retained 2026.9.8; post-failure configuration validation passed. This is an independently reproduced baseline blocker, not a passing upgrade or plugin-sync proof. - Published artifacts: `published-fix1-serial/{summary.json,update.json}` and `published-base-serial/{summary.json,update.json}`. Both retain the failed activation and rollback result; this failure is not suppressed. - Native managed-Gateway replay with the real legacy index shape: control `bbb82fd1e8a` (tree identical to `5ce8485a701`) versus combined `47c4c3641b6e` (tree identical to `f14888c058d`, containing this change and openclaw#168190). Only commit metadata was advanced to avoid the already-current fast path. Both updates finished successfully and returned `/readyz` 200. - Control: plugin sync reported `changed:true`; config audit at 08:13:19Z appended all three bundled aliases, and Doctor at 08:14:14Z removed them. Combined: `changed:false`, no config-audit writes, and the unrelated linked-plugin load path and installed records remained intact. - Readiness downtime, summing every last-200 → next-200 interval: control **420.642 s** (one outage); combined **498.144 s** (494.934 s + 3.210 s). The stopped-window activation Doctor step took **75.030 s** versus **90.987 s**. These loaded-host samples do not establish a speedup. Both still ran the post-plugin Doctor for deferred model retirement; this PR does not remove that independent trigger. - Native artifacts: `runs/do-{ctl,f12}/evidence/legacy-index/{summary.json,update-result.json,readiness.jsonl,downtime-all-intervals.json}`, plus `native-legacy-evidence.json` with config-audit and retirement records. Maintainer-intent check: no overlapping changes from the maintainers named in the repository review guide were found in the affected files. Merge danger: two-way door; reverting restores the redundant load-path churn. Blast radius is plugin synchronization for explicitly installed packaged bundled plugins during updates. Co-authored-by: Ayaan Zaidi <[email protected]>
…w#168190) ## What Problem This Solves Fixes: `openclaw update` defers Doctor work for an available, explicitly linked plugin until package convergence, although package convergence deliberately skips path installs. ## User Impact Available operator-managed linked plugins can complete their Doctor work in the activation phase instead of needlessly deferring it. Missing or stale packages and unrecorded configuration paths remain deferred. Other reasons for the post-plugin Doctor, including deferred model retirement, are unchanged. ## Why This Change Was Made The existing availability decision now recognizes a present `source: "path"` install as independent of package convergence. It continues to require the existing payload and descriptor checks to pass. Update behavior: candidate-side only; it uses the existing update environment and needs no new marker. No new configuration option, schema, or persisted-state format. ## Evidence - Final focused run: both linked/unrecorded state-migration cases passed. The affected Doctor test typecheck graph passed. - The regression drives Doctor preflight in the update environment with a real installed-plugin index and a plugin state-migration contract. It checks that linked installs migrate retained binding data, while the same unrecorded path keeps its migration obligation and original bytes. - Negative control: the linked-install case fails with the original availability implementation, while the unrecorded-path control passes. - The earlier full preflight suite passed all 13 tests. A later full-file run hit timeouts, an abort, and a lost lease (9 passed, 4 failed); the final focused run is the direct regression proof. - Driver: **released v2026.9.8 (git-source install mode, same as the affected install)** → exact candidate `08189f5bbe8cb82567587a3ed8edbba4e2cee65e`. The real managed-Gateway update succeeded, with the linked plugin's state migration executed exactly once during activation and its data/settings preserved (inline evidence below). - npm-package mode is not exercised by that native run because the local Docker npm cell is blocked by **OrbStack virtiofs**: both this candidate and the exact merge base `5ce8485a7014e4be60dd3e50efc6fac3e3613cb2` fail the installed driver's retained-runtime inode check before candidate post-core work. The [Linux release-check published-upgrade-survivor-2026.9.8 job](https://github.com/openclaw/openclaw/actions/runs/38032945484/job/114159364272) passed on Ubuntu 24.04 and supplies the npm-mode evidence; this is a successful job, not a claim that its entire workflow passed. - Native managed-Gateway replay: control `bbb82fd1e8a` (tree identical to `5ce8485a701`) versus combined `47c4c3641b6e` (tree identical to `f14888c058d`, containing this change and openclaw#168226). Both use an actual linked plugin and legacy bundled-path install records. Only commit metadata was advanced to avoid the already-current fast path. Both updates finished successfully and returned `/readyz` 200. - Control's activation Doctor deferred the linked plugin with “Package convergence must wait”. Combined's activation Doctor did not defer it; the linked-plugin path and records survived. The focused migration regression above separately verifies retained data bytes. Combined also eliminated bundled-alias write/revert churn; control retained it. - Readiness downtime, summing every last-200 → next-200 interval: control **420.642 s** (one outage); combined **498.144 s** (494.934 s + 3.210 s). The stopped-window activation Doctor step took **75.030 s** versus **90.987 s**. These loaded-host samples do not establish a speedup. Both still ran the post-plugin Doctor for deferred model retirement; that independent trigger is unchanged. - Native artifacts: `runs/do-{ctl,f12}/evidence/legacy-index/{summary.json,update-result.json,readiness.jsonl,downtime-all-intervals.json}`, plus `native-legacy-evidence.json` with config-audit and retirement records. - [Maintainer decision](openclaw#168190 (comment)): approve the healthy recorded-path exception while retaining the missing/stale/unrecorded/package-managed deferral. ### Released-driver stateful upgrade The fixture was installed through `plugins install --link` and declared a real Doctor state-migration contract. Its migration renames `legacy-binding.json` to `migrated-binding.json` without changing bytes and appends `1` followed by a newline to a counter. Backup resources use Doctor's supplied state directory, so candidate validation runs on the cloned state, not live state. Sanitized `update-result.json` / persisted update-ledger excerpts: ```json { "status": "ok", "mode": "git", "before": {"sha": "fc23bc864e4553c2d215e479eeec47b67a0bf943", "version": "2026.9.8"}, "after": {"sha": "08189f5bbe8cb82567587a3ed8edbba4e2cee65e", "version": "2026.9.9"}, "activationDoctor": { "step": "openclaw doctor", "status": "completed", "startedAtMs": 1791628709879, "endedAtMs": 1791628789375, "exitCode": 0 }, "postUpdate.plugins.npm.outcomes": [ {"pluginId": "harness-probe", "status": "skipped", "message": "Skipping \"harness-probe\" (source: path)."} ], "readyzAfter": 200 } ``` Live-state observations after the update: ```text migration-count.txt bytes: 31 0a # exactly "1" + newline migration-count.txt mtime: 2026-10-10T10:39:18.433789Z activation Doctor window: 2026-10-10T10:38:29.879Z–10:39:49.375Z legacy-binding.json exists: false migrated-binding.json: {"binding":"retained","data":"byte-preserved"} + trailing newline plugin settings: {"binding":"settings-retained"} package-convergence deferrals in update result + complete ledger: 0 ``` The counter was written **inside the activation Doctor window**, before post-plugin convergence. The final live counter remains exactly one, including after the later Doctor. Data SHA-256 is over the original/migrated file bytes; settings SHA-256 compares the before/after JSON subtree serialized with the same two-space indentation and trailing newline: | Bytes | Before SHA-256 | After SHA-256 | | --- | --- | --- | | Plugin data | `adbf0252af99cc5ed2cd81923331a1a3f9aa5e0138bf771c9e9ed8981e5049fb` | `adbf0252af99cc5ed2cd81923331a1a3f9aa5e0138bf771c9e9ed8981e5049fb` | | Plugin settings | `d3ba894374d916f631bf16386b64fc1e1b69cee66bf5ff227b039c5693c0c035` | `d3ba894374d916f631bf16386b64fc1e1b69cee66bf5ff227b039c5693c0c035` | Read-only SQLite `diagnostic_events` config-audit rows (timestamps UTC; local paths/process identity omitted): | Timestamp | Origin | Changed paths | | --- | --- | --- | | 09:09:42.462 | plugin-install | `plugins.installs` | | 09:09:57.820 | cli | `plugins.entries.harness-probe.config`, `plugins.installs` | | 10:39:23.947 | doctor | `meta.migrations.webhookListeners`, `plugins.installs`, `wizard` | | 10:40:11.428 | not recorded | `plugins.installs`, `plugins.load.paths[1]`, `[2]`, `[3]` | | 10:40:40.654 | doctor | `plugins.installs`, `plugins.load.paths[1]`, `[2]`, `[3]`, `wizard.lastRunAt`, `wizard.lastRunCommit` | No update-time row changed `plugins.entries.harness-probe.config`. The latter alias add/remove is expected here: this exact candidate contains fix 2 only, not the separate fix in openclaw#168226. Deferred model retirement still caused the later Doctor; it did not rerun the plugin migration. <details> <summary>Inspectable retained outputs and proof boundary</summary> Native update-result excerpts (paths omitted; no output values changed): ```json { "control": { "status": "ok", "postUpdate.plugins.sync.changed": true, "activationDoctor.durationMs": 75030, "activationDoctor.stderr": "Plugin \"harness-probe\" data/settings upgrade is unfinished: Package convergence must wait until the updating parent releases its install records.", "finalReadyz": 200 }, "combined": { "status": "ok", "postUpdate.plugins.sync.changed": false, "activationDoctor.durationMs": 90987, "activationDoctor.packageConvergenceDeferralCount": 0, "finalReadyz": 200 } } ``` Both persisted installed indexes retained `harness-probe` with `source: "path"` and unchanged source/install paths. Both also retained the three bundled path records, including their original `spec` and `installedAt` values. The native probe does not declare a data-migration contract; this run proves the real updater's availability/deferral branch and retained existing state, not execution of a stateful migration. Stateful migration coverage is the focused regression on this exact head: ```text node scripts/run-vitest.mjs run src/commands/doctor-config-preflight.plugin-deferral.test.ts -t 'package convergence skips it' Test Files 1 passed (1) Tests 2 passed | 11 skipped (13) ``` Its linked case invokes the real migration contract and verifies `{"binding":"retained"}` plus a trailing newline in the migrated file; its unrecorded-path control verifies the original bytes remain and no destination exists. Local Docker npm-mode output on both candidate and exact merge-base control (OrbStack virtiofs limitation, not the successful native git-source run above): ```text package-install: exitCode 0 package-update: exitCode 1 reason: unexpected-error Retained runtime entry does not reference its inventoried file: <installed-root>/dist/a2ui-D3SkzOIh.mjs postUpdate: null ``` </details> Maintainer-intent check: no overlapping changes from the maintainers named in the repository review guide were found in the affected files. Merge danger: two-way door; reverting restores the needless deferral. Blast radius is Doctor availability for explicitly recorded path plugins during updates. Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
Fixes:
openclaw updaterepeatedly changes plugin configuration when the installed-plugin index records bundled plugins as linkedsource: "path"installs intodist/extensions, even though the installed plugins have not changed. Earlier development-channel updates could create this shape when switching an existing plugin to its bundled copy.User Impact
Updates retain the canonical bundled-plugin configuration instead of adding a redundant load path that Doctor immediately removes. Real plugin switches still count as changes. Other reasons for the post-plugin Doctor, including deferred model retirement, are unchanged.
Why This Change Was Made
Plugin sync now uses the same packaged-path alias detection as Doctor before adding bundled load paths, for both development and release channels. Source-tree and external linked plugin paths keep their existing behavior.
Update behavior: candidate-side only; the installed updater needs no new marker. No new configuration option, schema, or persisted-state format.
Evidence
Three focused regressions cover unchanged development and stable bundled installs and a development npm-to-bundled switch. All pass on this change and all fail with the original sync implementation.
Each regression passes the resulting configuration through Doctor's bundled-load-path repair and confirms that it has nothing left to remove.
A retained real update confirms the trigger: the installed index contains bundled path records for
brave,codex, anddiagnostics-otel; post-update sync appends theirdist/extensions/<id>paths, then Doctor removes the same three paths. The config-audit write hashes match the retained before/intermediate/after configurations. The operator's unrelated linked-plugin path remains throughout.Final candidate: all 89 plugin-update and bundled-load-path tests passed. Core and all 27 test typecheck graphs passed.
Published-driver attempt (
[email protected]→ candidate, configured-plugin-installs): packaging and candidate package installation succeeded, but activation failed before candidate post-core work because the installed driver's retained-runtime inventory rejected ana2ui-*.mjsinode. The identical cell against this PR's exact merge base (bc524d89030, without this change) failed at the same check. Rollback retained 2026.9.8; post-failure configuration validation passed. This is an independently reproduced baseline blocker, not a passing upgrade or plugin-sync proof.Published artifacts:
published-fix1-serial/{summary.json,update.json}andpublished-base-serial/{summary.json,update.json}. Both retain the failed activation and rollback result; this failure is not suppressed.Native managed-Gateway replay with the real legacy index shape: control
bbb82fd1e8a(tree identical tobc524d89030) versus combined47c4c3641b6e(tree identical tof14888c058d, containing this change and fix: avoid deferring available linked plugins during updates #168190). Only commit metadata was advanced to avoid the already-current fast path. Both updates finished successfully and returned/readyz200.Control: plugin sync reported
changed:true; config audit at 08:13:19Z appended all three bundled aliases, and Doctor at 08:14:14Z removed them. Combined:changed:false, no config-audit writes, and the unrelated linked-plugin load path and installed records remained intact.Readiness downtime, summing every last-200 → next-200 interval: control 420.642 s (one outage); combined 498.144 s (494.934 s + 3.210 s). The stopped-window activation Doctor step took 75.030 s versus 90.987 s. These loaded-host samples do not establish a speedup. Both still ran the post-plugin Doctor for deferred model retirement; this PR does not remove that independent trigger.
Native artifacts:
runs/do-{ctl,f12}/evidence/legacy-index/{summary.json,update-result.json,readiness.jsonl,downtime-all-intervals.json}, plusnative-legacy-evidence.jsonwith config-audit and retirement records.Maintainer-intent check: no overlapping changes from the maintainers named in the repository review guide were found in the affected files.
Merge danger: two-way door; reverting restores the redundant load-path churn. Blast radius is plugin synchronization for explicitly installed packaged bundled plugins during updates.