Repository navigation
perf(plugins): resolve requested capability owners in one pass - #138111
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed September 5, 2026, 1:51 AM ET / 05:51 UTC. ClawSweeper reviewWhat this changesThe PR batches configured provider-owner lookup into one manifest scan while preserving alias fallback, plugin policy, and catalog loading. Merge readiness✅ Ready for maintainer review Keep open: current main does not contain this optimization, and the refreshed patch has no blocking findings. The failed numerical performance gate and slower controls remain disclosed, with explicit engineering acceptance. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw’s capability loader combines configured provider requests with plugin metadata and policy. It returns provider descriptors used by speech, realtime voice, and media services. flowchart TD
A[Configured provider requests] --> C[Manifest ownership and plugin policy]
B[Plugin metadata snapshot] --> C
C --> D{Requested IDs covered}
D -->|Complete| E[Matching eligible owners]
D -->|Partial or none| F[All eligible owners]
E --> G[Active registry or scoped catalogs]
F --> G
G --> H[Provider descriptors]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -17, Tests +71. Total +54 across 3 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep batching inside the existing owner resolver, preserving policy-aware alias fallback and generation-owned catalog loading without adding another cache. Do we have a high-confidence way to reproduce the issue? Not applicable as a functional bug reproduction: main source directly shows repeated per-provider scans, and the body reports comparative measurements; this review did not execute them. Is this the best way to solve the issue? Yes. The existing resolver can absorb batching while retaining its policy and fallback decisions; another cache or parallel lookup API would add unnecessary lifecycle ownership. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 7b1217e2e79e. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
sylvesterkaczmarek
left a comment
There was a problem hiding this comment.
The preservation logic is the important part here: complete canonical coverage stays scoped, partial coverage falls back for runtime aliases, and zero coverage avoids incorrectly filtering cold catalogs. Keep the performance claim scoped given the retained RSS rejection.
f4bd9a7 to
c16707c
Compare
|
@clawsweeper re-review Refreshed onto current capability-catalog ownership at c16707c, with source/built catalog preservation coverage, 213 passing cases, normal gates, mapped build, two authenticated built-Gateway provider-list reads, and a new fixed comparative cohort. The body preserves both the historical RSS failure and the current 2.979% versus 3% failed numerical gate, with explicit engineering acceptance and all adverse observations. Exact-head CI is required; no check is bypassed. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Ready to land The existing owner resolver now batches requested provider IDs, removing the separate per-provider traversal and 17 production lines. Partial alias coverage, zero coverage, denied owners, source/built catalogs, and generation replacement retain their existing policy and lifetime. The refreshed 213-case six-file before/after corpus, normal changed checks, mapped build, and authenticated built-Gateway provider-listing reads are recorded in the body. The numerical verdict remains |
|
Merged via squash.
|
Related: #138003
Additional instructions
Allow edits from maintainers remains enabled.
What Problem This Solves
Resolving several configured capability providers repeats manifest selection and policy work for each requested provider. This becomes more expensive as the number of requested providers and eligible owners grows.
Why This Change Was Made
The existing owner resolver now consumes the requested-provider Set in one manifest pass, replacing the separate per-provider resolution loop. Complete canonical coverage selects matching owners together. Partial coverage still searches all eligible owners for runtime-only aliases; zero coverage keeps cold catalogs unfiltered. Denied owners do not count toward coverage. Active/private generations, declared source and built catalogs, sorted owner IDs, provider precedence, and single-provider/media behavior retain their existing owners.
No cache, public configuration, schema, dependency, or alternate runtime path is added. Production changes are +44/−61, net −17 lines. Preservation tests add 71 lines, including current source/built catalog coverage. This refresh uses current capability-catalog ownership rather than carrying the older runtime-register-only assumption forward.
User Impact
Configured multi-provider resolution does less repeated bookkeeping and returns the same providers. The measurement below covers the complete public resolver after an explicit private-load priming call. It does not establish faster cold startup, provider execution, whole model turns, or lower memory use.
Evidence
Current refresh at base
c26e46b2f87ad50d2f655e44975eafc8d394527f: 213 cases in six complete owner/generation/manifest-policy/config/provider suites passed before and after; all 29 ordinary changed checks passed. Managed Codex review returned no P0–P2 findings, confidence 0.88. The subsequent normal source-mapped build passed, and two authenticated built-Gatewaytts.providerscalls returned identical complete provider DTOs. These read-only calls did not synthesize audio or invoke provider callbacks; source and built catalog activation, alias fallback, denied owners, stale generations, and unrelated-owner exclusion are covered separately by the whole-file suites.The fixed proof-before/proof-candidate/B0/C0/C1/B1 cohort ran once: 8,164 checked outputs plus 40 priming calls, 896 measured batch means, and 144 comparisons. A separate root audit recomputed all comparisons from raw observations and verified all outputs against the previously audited proof oracles. Both-order medians:
The unchanged numerical verdict remains
accepted=false: the first case's reverse improvement is 2.9792%, below the preset 3% primary requirement. The reducer exited 1 for that exact failure. There was no measurement retry, threshold change, or sample selection.All 65 adverse comparisons remain retained. The results are not uniformly faster: an active-provider control's reverse median increased 994.94 ns/19.24%, and another protected reverse median increased 2.406 µs/2.987%. These fall below one arm of the original conjunctive >3% and >1 µs regression gate, but are still regressions. The first case's reverse p95 increased 26.683 µs/13.29%; a protected active control's reverse p95 increased 3.604 µs/571.86%. Here p95 is nearest-rank over 16 batch means, not individual-call p95.
Sampled tree peak RSS changed +6.55%/−7.69%; kernel child peaks +5.94%/−6.69%. Both sampled-RSS gates passed, but this does not establish a memory improvement. All six hosts and their adapters closed; all 20 recorded process identities and 14 groups were absent on final verification. Native host time totaled 19.425 s and actual dispatch-through-join envelopes totaled 38.792 s; preparation, observation gaps, build, review, and publication are separate costs.
The source-host study retains actual source hashes, Debugger URLs, and complete compiled text. TSX maps contain
sourcesContent: [null], so no full embedded-TypeScript equality is claimed. Per-phase setup metrics and isolated state-root fingerprints are retained and explicitly normalized only by the predeclared logical-input comparison. The benchmark does not measure declared-catalog loading; the separate built-Gateway and source/built catalog tests cover that behavior. Three metadata-reader/orchestration errors were corrected without repeating target execution and remain recorded.Maintainer performance decision and previous review
I accept the scoped owner-selection gains and the smaller canonical implementation as an engineering tradeoff, including the near-threshold result and disclosed slower controls/tails. Numerical acceptance remains false. Correctness, exact-head CI, and native landing gates are not waived.
The earlier experiment on the old source remains a separate failed study: its reverse sampled-tree RSS increase was 16.48%, with 69 adverse comparisons. That unresolved historical failure has not been reclassified or transferred to the current source. The earlier ClawSweeper review requested retaining that tradeoff and resolving exact-head CI. Its old failing
security-fastrun exhausted four npm advisory-service timeout attempts, with no reported security finding; no security check or registry control was bypassed. This refreshed head must pass the normal required CI before landing.