Repository navigation
fix(models): reuse prepared plugin metadata - #117131
vincentkoc merged 1 commit into
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 3:39 AM ET / 07:39 UTC. ClawSweeper reviewWhat this changesThis PR reuses prepared plugin metadata while OpenClaw builds and normalizes model catalogs, avoiding repeated manifest scans for every model. Merge readinessKeep this PR open for normal maintainer review. The patch directly removes the current-main per-call plugin metadata fallback, forwards the lifecycle-owned manifest/discovery and provider-owner facts, and adds focused generation/reset coverage; the exact-head CI matrix is still running, so it is not ready for a final merge verdict yet. Priority: P2 Review scores
Verification
How this fits togetherModel listing and gateway startup assemble configured and plugin-provided models, then resolve plugin activation and provider compatibility for each row. This patch carries metadata prepared by the plugin lifecycle into those steps so model normalization does not rediscover process-stable plugin manifests. flowchart LR
A[Configured and plugin models] --> B[Prepared plugin metadata snapshot]
B --> C[Model registry assembly]
C --> D[Provider activation]
D --> E[Provider compatibility normalization]
E --> F[Model listing and gateway startup]
B --> G[Lifecycle cache reset]
G --> B
Before merge
Agent review detailsSecurityNone. PR surfaceSource +65, Tests +158. Total +223 across 11 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the tested prepared-fact propagation after the exact-head checks are green and the merge result still preserves the lifecycle-reset behavior; keep the linked performance issue open until this PR merges. Do we have a high-confidence way to reproduce the issue? Yes. The linked report supplies a packaged Is this the best way to solve the issue? Yes. Passing lifecycle-owned manifest, discovery, and owner-map facts is a better fix than adding config-identity caching because it preserves the existing metadata lifecycle as the authoritative invalidation boundary. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against dccb1b90138a. LabelsLabel 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
HistoryReview history (4 earlier review cycles)
|
ad401a6 to
6ef1a73
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
c219cb1 to
64ef934
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
64ef934 to
c646869
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Carry lifecycle-owned manifest, discovery, and provider owner facts through model normalization instead of rescanning plugin metadata per model. Co-authored-by: Sasan Sotoodehfar <[email protected]>
c646869 to
f7de523
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
* origin/main: (41 commits) test(ci): update memory helper routing expectation (#117295) fix(canvas): emit successful control results in JSON mode (#117297) fix(imessage): settle native inbound reply delivery (#117282) fix(agents): reject invalid UTF-8 LSP responses (#117271) fix(line): centralize card and template message alt text (#117280) fix(release): validate candidates before Docker publication (#117252) fix(media): validate provider-owned generated media downloads (#117281) fix(feishu): restore custom HTTPS API domains (#117278) fix(models): reuse prepared plugin metadata (#117131) fix(agents): stop fallback after delivered-but-failed attempts (#114628) fix(memory): reuse targeted session corpus snapshot (#117247) fix(matrix): reconcile durable sends after response loss test(release): repair full validation regressions (#116931) fix(linux-canvas): report socket watcher fallback (#109502) fix(codex): preserve authoritative turn completion (#117185) fix(canvas): preserve widgets across derived-name collisions (#117132) fix(channels): config validation rejects documented channels.<id>.configWrites on 13 channels (#117206) fix(msteams): prevent duplicate final replies (#116398) fix(doctor): session SQLite restore installs an empty session index over the valid archive (#117221) fix(plugins): preserve workspace plugins across CLI and control UI (#117265) ...
Carry lifecycle-owned manifest, discovery, and provider owner facts through model normalization instead of rescanning plugin metadata per model. Co-authored-by: Vincent Koc <[email protected]>
* origin/main: (41 commits) test(ci): update memory helper routing expectation (openclaw#117295) fix(canvas): emit successful control results in JSON mode (openclaw#117297) fix(imessage): settle native inbound reply delivery (openclaw#117282) fix(agents): reject invalid UTF-8 LSP responses (openclaw#117271) fix(line): centralize card and template message alt text (openclaw#117280) fix(release): validate candidates before Docker publication (openclaw#117252) fix(media): validate provider-owned generated media downloads (openclaw#117281) fix(feishu): restore custom HTTPS API domains (openclaw#117278) fix(models): reuse prepared plugin metadata (openclaw#117131) fix(agents): stop fallback after delivered-but-failed attempts (openclaw#114628) fix(memory): reuse targeted session corpus snapshot (openclaw#117247) fix(matrix): reconcile durable sends after response loss test(release): repair full validation regressions (openclaw#116931) fix(linux-canvas): report socket watcher fallback (openclaw#109502) fix(codex): preserve authoritative turn completion (openclaw#117185) fix(canvas): preserve widgets across derived-name collisions (openclaw#117132) fix(channels): config validation rejects documented channels.<id>.configWrites on 13 channels (openclaw#117206) fix(msteams): prevent duplicate final replies (openclaw#116398) fix(doctor): session SQLite restore installs an empty session index over the valid archive (openclaw#117221) fix(plugins): preserve workspace plugins across CLI and control UI (openclaw#117265) ...
Closes #117130
What Problem This Solves
models listalready loads one plugin metadata snapshot, but provider resolution dropped its manifest registry and discovery before bundled-plugin activation. Model compatibility normalization also dropped the model registry's exact provider-owner generation. Those losses forced per-model metadata discovery. The remaining input-free attribution fallback had no prepared fact to consume and rescanned the same process-stable metadata.On a 3,000-model catalog the reported command performed 6,124 completed
plugins.metadata.scanspans and took 99.1 seconds in the contributor's isolated packaged benchmark.Why This Change Was Made
This keeps metadata ownership at the plugin lifecycle boundary and makes the hot path consume prepared facts instead of rediscovering them.
Evidence
Representative
models list --plainrun with 3,000 configured models:plugins.metadata.scanspansThat is 6,124 -> 23 scans, a 99.6% reduction (about 266x fewer scans).
The contributor's isolated packaged benchmark measured 99.1s -> 12.3s. I did not claim an independent Testbox wall-time comparison: the source checkout resolves official external plugins from workspace TypeScript trees, where each scan costs several seconds and dominates wall time. The diagnostic span count is the stable invariant for this regression.
Validation:
f7de523101af001370e06458d680bf90dbffc9d01d05e67b6d59e404e089c2423d3be18beef49f5402419ed1998feeaeaca21a92de7d23e805742f13git diff --check: cleangit fsck --no-danglingcleanTestbox run: https://github.com/openclaw/openclaw/actions/runs/30687803223
Focused run: https://github.com/openclaw/openclaw/actions/runs/30687373568
The final exact-head GitHub matrix is running. A prior exact-head
check-test-typesfailure exposed an under-typed test double; the mock now explicitly carriesPluginMetadataSnapshotOwnerMaps | undefined, and the focused contract suite is green.Scope
Production: +85/-20, net +65. Tests: +158. Total: +243/-20.
The production growth is the explicit prepared-fact plumbing plus the lifecycle-owned fallback memo. It replaces per-model rediscovery without adding a second config/env cache or fallback stack.
Co-authored-by: Sasan Sotoodehfar [email protected]