Repository navigation
perf(plugins): list from installed metadata on all forms - #117900
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 2, 2026, 4:11 AM ET / 08:11 UTC. ClawSweeper reviewWhat this changesRoutes default, enabled-only, verbose, and JSON Merge readiness⛔ Blocked until stronger real behavior proof is added - 5 items remain This PR addresses a real current-main performance gap: only JSON plugin listing currently takes the metadata-only route, while the documented default listing remains cold inventory. The patch is mechanically coherent, but the Priority: P2 Review scores
Verification
How this fits togetherThe CLI receives a plugin-list command, applies route-first startup policy, then builds an installed-plugin inventory from configuration, manifests, and the persisted registry. The resulting records feed JSON or terminal formatting, while runtime module inspection remains an explicit flowchart LR
A[CLI invocation] --> B[Route-first command matching]
B --> C[Cold startup policy]
C --> D[Runtime configuration read]
D --> E[Installed plugin metadata snapshot]
E --> F[Plugin inventory report]
F --> G[JSON or terminal output]
H[Explicit runtime inspection] --> I[Plugin module execution]
Decision needed
Why: The patch deliberately changes an existing configuration-validation boundary, and the repository policy treats config and fallback behavior as compatibility-sensitive; the protected Before merge
Agent review detailsSecurityNone. PR surfaceSource -2, Tests +110. Total +108 across 4 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep every supported list form on the metadata-only path, explicitly confirm that inventory should remain available when only plugin-owned schema validation fails, add focused coverage for that boundary, and attach redacted real-host command timing/output proof. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main only parses the route when Is this the best way to solve the issue? Yes, conditionally: routing all existing list forms through the established metadata projector matches the documented cold-inventory contract. The plugin-validation skip needs explicit compatibility confirmation and focused coverage before it is the best complete fix. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 86a95b459c94. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Maintainer landing decision: approve the cold-inventory behavior. Plugin listing is intentionally allowed to bypass plugin-owned schema validation so the installed metadata inventory remains available without executing plugin modules. The optional terminal-transcript and additional invalid-plugin-config test rank-up moves are intentionally skipped for this already-reviewed landing. The accepted proof is the focused cold-route regression coverage, the real-inventory timing evidence already recorded in the PR body, and exact-head hosted CI on 5c7a38e. This landing task is explicitly scoped to Git/GitHub mechanics with no code changes or PR-body polish. |
|
Merged via squash.
|
…r-117788-empty-startup-race * commit '9517b10778ba69b94471cb1f122a5f1e19aa22a4': fix(hooks): show eventless status consistently (openclaw#116127) refactor(cli): consolidate security-sensitive regression fixtures (openclaw#114411) perf(plugins): list from installed metadata (openclaw#117900) fix(memory): remove interrupted Dreaming sessions after Gateway restart (openclaw#117885) test(gateway): reuse startup plugin metadata snapshot (openclaw#117897)
What Problem This Solves
openclaw plugins listtook ~9.7 s in production (48 cores, ~150 plugins) — it executed ~150 plugin modules to render an inventory whose facts are already persisted in the installed-plugin index. Real-inventory measurement on this branch: 4.7–5.8 s before → 1.21–1.29 s after on a 151-plugin host.Why This Change Was Made
The listing projector was already metadata-only, but only
plugins list --jsondispatched route-first (the cold path). The default,--enabled, and--verboseforms fell through to generic CLI/config startup, which triggered the plugin-module load storm. Two changes:parsePluginsListRouteArgsno longer gates on--json, so every listing form dispatches route-first through the single exact["plugins","list"]catalog entry — which carriesconfigGuard: "skip"from the config-guard unification (refactor(cli): unify config-guard policy across dispatch paths #117880), so no form pays the doctor/plugin preflight.skipPluginValidation: trueoption, letting the installed-index projector own plugin metadata validation instead of re-validating plugin schemas up front.Fact-source audit (all listing facts come from the installed index or manifest snapshot — none require module execution): name/id/description/version/format/kind, enabled status, source/root/origin, declared providers/channels/aliases/tools, dependency status, and registry diagnostics all read prepared metadata. Facts that genuinely need module execution (runtime imports, hooks, services, live failures, harness registrations) were already excluded from the listing and remain available via
plugins inspect --runtime. The Control UI does not consume this CLI output (it uses the Gatewayplugins.listprotocol), and docs already describe this command as cold inventory.User Impact
All
openclaw plugins listforms — not just--json— return in ~1.2 s instead of ~5–10 s, rendering the same fields, with runtime inspection still reserved for the explicitplugins inspect --runtimepath.Evidence
plugins-list-route-cold-imports.test.ts) asserting zero plugin-module loads on the default listing path; final-head rerun 2 files / 47 tests.pnpm tsgo:core,pnpm build(no[INEFFECTIVE_DYNAMIC_IMPORT]): passed.gpt-5.6-sol, high): clean, "patch is correct" (0.98).configGuardfield (no stalerouteConfigGuard/bypassConfigGuardanywhere).