fix(plugins): scope install slot selection#75640
Conversation
|
Codex review: needs maintainer review before merge. What this changes: The PR scopes plugin install and enable slot selection to selected-plugin manifest metadata with a selected-plugin runtime fallback, updates CLI test helpers and install-persistence coverage, and adds a changelog entry. Maintainer follow-up before merge: This is an open maintainer-labeled implementation PR with no discrete automated repair blocker from the review; the next action is maintainer review plus mergeability/check handling, not a ClawSweeper fix PR. Security review: Security review cleared: The diff changes CLI/plugin slot lookup scope plus tests and changelog only; it does not add dependency sources, workflow permissions, package resolution changes, secret handling, or new install-time code execution paths. Review detailsBest possible solution: Finish maintainer review, resolve mergeability/check gating, and land the scoped manifest-first/runtime-fallback implementation with its install-persistence coverage and changelog entry if the branch remains green. Do we have a high-confidence way to reproduce the issue? Yes. Current main inspection provides a high-confidence reproduction path: enabled plugin installs and Is this the best way to solve the issue? Yes, with maintainer sign-off. The PR uses existing scoped manifest What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 3a24a25f4b97. |
cb217a7 to
70095f0
Compare
Summary
kindBug / behavior
Realistic plugin install and enable paths were loading broad plugin status/runtime state just to update exclusive slots. In the stress probe, a single synthetic local plugin install spent most of its time in slot selection because the CLI imported every plugin runtime.
Live evidence
Before this patch,
node .artifacts/qa-plugin-install-probe.mjs 1took 112.875s with max RSS about 751MB, with lifecycle trace showingslot selectionat 108.0s andruntime plugin registry loadat 106.6s.After this patch, configured
memory-lancedbinstall completed in 7.22s with max RSS about 319MB,slot selectionat 140.49ms, and no all-plugin runtime load. Synthetic local 3-install stress completed in 26.487s total, avg 8.829s, max RSS about 421MB.Validation
cbx_3d17082efb24/coral-hermitrun_be45800925ef: remote changed lanes verified onlyCHANGELOG.md,src/cli/plugins-cli-test-helpers.ts,src/cli/plugins-command-helpers.ts, andsrc/cli/plugins-install-persist.test.tsrun_f6bc41c854f4:pnpm test:serial src/cli/plugins-install-persist.test.ts src/plugins/slots.test.tspassed, 30 testsrun_681df459a0f0:pnpm check:changedpassed