Repository navigation
fix(plugins): reduce bundled catalog lookup overhead - #140597
Conversation
Share the typed raw bundled inventory, short-circuit direct lookups, and keep hosted fetching and artifact download code behind their runtime owners. Preserve live row mutation, fresh list arrays, source-reference filtering, conservative raw repair targets, hosted trust/freshness and integrity behavior. Validated 138 focused tests, full check:changed, full build, and independent isolated P2 autoreview. In an isolated built probe, 95,000 lookups took 531.07 ms instead of 1001.76 ms, and cold import loaded 58 modules instead of 255; these are catalog measurements, not full-Gateway claims.
|
🦞👀 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. Reviewed September 6, 2026, 9:55 PM ET / September 7, 2026, 01:55 UTC. ClawSweeper reviewWhat this changesThe PR reduces repeated bundled plugin catalog work, loads hosted catalog services lazily, and separates integrity normalization from artifact downloads while preserving lookup behavior. Merge readiness✅ Ready for maintainer review This remains a useful, bounded performance improvement: current main retains the reported overhead, and the related merged optimization addresses different work. No blocking correctness defect was found. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw’s plugin catalog supplies package and manifest metadata to discovery, installation, and repair. Bundled lookups read generated metadata locally; hosted refreshes separately fetch and validate catalog feeds. flowchart TD
A[Bundled catalog metadata] --> B[Shared raw inventory]
B --> C[Source filtering and first-match lookup]
C --> D[Plugin discovery and installation]
B --> E[Conservative repair checks]
F[Hosted refresh request] --> G[Lazy feed validation and snapshots]
G --> D
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +68, Tests +239, Other -2. Total +305 across 18 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep one shared bundled inventory with live-row filtering and early-exit lookups, while preserving the existing hosted loader and installation contracts. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main rebuilds complete collections for direct package lookups and eagerly imports download dependencies; the supplied paired probe quantifies the overhead. Is this the best way to solve the issue? Yes. The implementation removes unnecessary work at its owner while retaining mutable row identity, selection order, repair hints, and hosted behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 785035327acb. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
…137098 * commit '8a540c252002878f3c3e9d8dfb837b83c8602a78': (2210 commits) perf(plugins): keep bundled catalog lookups lightweight (#140597) refactor: streamline skills JSON serialization (#140581) fix(feishu): expand quoted merged-forward messages (#136231) fix(talk): keep opaque realtime routes out of public config (#129144) fix(ci): avoid Linux packaging on pull requests (#140589) fix(usage): release completed request payloads (#140588) fix(tooling): omit Trae machine squash credit (#140562) fix(ui): stop catalog paging in hidden tabs (#140583) fix(portals): reach IPv6 loopback with IPv4-only localhost records (#140580) fix(transcripts): preserve fixed and legacy capture history (#140563) fix(ui): prevent Talk E2E audio capture stalls (#138803) fix(media): release completed document source buffers (#140561) fix(anthropic): preserve resumed CLI caches across Git changes (#140566) chore(ui): refresh control ui locales (#140586) fix(ui): keep usage exports bound to their session instance (#140573) refactor(exa): test response readers through tool execution (#140572) fix(macos): omit incompatible worker binaries from app bundles (#140557) fix: avoid retaining discarded tool output (#140570) refactor(gateway): share placement move matching (#140569) fix(gateway): preserve child turns during systemd drain (#140568) ... # Conflicts: # .agents/skills/release-openclaw-maintainer/SKILL.md # docs/reference/RELEASING.md
) Share the typed raw bundled inventory, short-circuit direct lookups, and keep hosted fetching and artifact download code behind their runtime owners. Preserve live row mutation, fresh list arrays, source-reference filtering, conservative raw repair targets, hosted trust/freshness and integrity behavior. Validated 138 focused tests, full check:changed, full build, and independent isolated P2 autoreview. In an isolated built probe, 95,000 lookups took 531.07 ms instead of 1001.76 ms, and cold import loaded 58 modules instead of 255; these are catalog measurements, not full-Gateway claims.
Closes #140595
Additional instructions
Maintainer edits are enabled on this repository-owned branch.
What Problem This Solves
Resolves avoidable work during bundled plugin package and manifest lookups: each direct query rebuilds complete catalog collections, and the static lookup import loads hosted fetching and artifact-download implementations.
Why This Change Was Made
Share one typed raw bundled source, validate and deduplicate live rows as queries iterate, and stop direct lookups at the matching row. Move hosted fetching behind the existing async public entrypoint and move pure ClawHub integrity helpers into a leaf module used by their real consumers. Remove the duplicate raw-target type mirror and its assertion.
Shared rows remain mutable and list APIs return fresh outer arrays. Conservative repair targets still inspect raw shadowed and source-rejected rows with current environment/configuration. Hosted validation, signed-feed monotonicity, snapshot/fallback behavior, freshness and helper/error identity retain their existing contracts.
User Impact
Static catalog users load a smaller module graph and do less repeated lookup work. In the paired built probe, the median 95,000-lookup run improved from 1001.76 ms to 531.07 ms; one sweep of 95 rows saves about 0.47 ms. Cold import loaded 58 module URLs instead of 255.
This is an import and representation repair, not a net source-deletion claim: production is +68 lines, tests are +239, and two obsolete ratchet entries were mechanically removed. Related #138312 and active #135997 address distinct work; preserve the latter's type re-export removal during integration.
Evidence
The cold import and RSS values are single isolated observations, not full-Gateway gains. Source bytes are not heap bytes. Minor-GC events increased from 1425 to 1954; no reduction in collection count or exact allocated-byte total is claimed.