fix(plugins): keep load-path plugins with installed index#99409
fix(plugins): keep load-path plugins with installed index#99409qingminglong wants to merge 3 commits into
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded: #99196 is an open, non-draft, mergeable, proof-positive canonical PR for the same installed-index plus Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Use #99196 as the canonical landing path for #99185 and close this duplicate branch. So I’m closing this here and keeping the remaining discussion on #99196 and #99185. Review detailsBest possible solution: Use #99196 as the canonical landing path for #99185 and close this duplicate branch. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main enters installed-index manifest reconstruction when the index has rows, and that caller supplies only index candidates to a callee that skips normal discovery when candidates are present. I did not run the full managed npm install plus gateway restart flow in this read-only review. Is this the best way to solve the issue? No for this PR as the landing path: the code shape is plausible, but #99196 is the better canonical solution because it covers the same issue with accepted real behavior proof. The best maintainer path is to review or land the canonical PR, not keep duplicate branches open. Security review: Security review cleared: No concrete security or supply-chain concern was found; the diff touches plugin discovery/registry TypeScript and colocated tests only. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 776b34a4e642. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
Closes #99185
What Problem This Solves
Fixes an issue where users with workspace plugins configured through
plugins.load.pathswould lose those plugins after a managed npm plugin populated the installed plugin index. The dropped workspace plugins then surfaced as staleplugin not foundconfig warnings even though their files were still present.Why This Change Was Made
The installed-index manifest registry reconstruction now merges configured
plugins.load.pathsdiscovery candidates with the persisted installed-index candidates instead of treating the index as the only candidate source. The configured load-path scanner is shared with normal discovery so the same load-path validation and bundled-path diagnostics apply without broadening the installed-index path to bundled/global auto-discovery.User Impact
Users can install or enable managed npm plugins without breaking existing workspace plugins loaded from
plugins.load.paths. Gateway startup and CLI config validation should continue to see both managed installed plugins and configured workspace plugins.Evidence
Current head:
a9a484b5dd20609fdd757842b759ba6ff8c014d3.plugins.load.pathsworkspace plugins alongside installed-index plugins, preserves scoped lookups, and keeps normal bundled-load-path filtering behavior.plugins.load.pathsworkspace plugins ("plugin not found: stale config entry ignored") #99185. This branch now includes the same critical behavior coverage points so maintainers can compare the implementations directly.node scripts/run-vitest.mjs src/plugins/manifest-registry-installed.test.tsgit diff --checkplugins.load.pathsworkspace plugin both appear in the reconstructed registry.plugins.load.pathsstays a no-op and returns only the installed-index plugin.pluginIds: ["workspace"]scoped lookup returns the configured workspace plugin without leaking unrelated load-path plugins or installed-index plugins.ignored plugins.load.paths entrywarning.node_modules\.bin\oxlint --tsconfig config/tsconfig/oxlint.core.json src/plugins/manifest-registry-installed.ts src/plugins/manifest-registry-installed.test.tspassed.node scripts/run-vitest.mjs src/plugins/manifest-registry-installed.test.tspreviously passed: 17 passed, 1 skipped.node scripts/run-vitest.mjs src/config/config.plugin-validation.test.tscompleted all assertions with 57 passed, 1 skipped, then failed during Windows temp SQLite cleanup withEBUSY; no test assertion failed after the code fix.plugins.load.pathsworkspace plugins ("plugin not found: stale config entry ignored") #99185.