Repository navigation
improve(agents): reuse provider policy manifest registry - #119305
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 4, 2026, 2:14 PM ET / 18:14 UTC. ClawSweeper reviewWhat this changesThe PR reuses a complete plugin metadata snapshot’s provider manifest registry during models configuration normalization, avoiding a duplicate bundled-provider policy registry load for alias-owned providers. Merge readinessNo blocking code findings. This focused optimization carries the complete lifecycle-owned metadata registry through the existing provider-policy seam, preserves cold discovery for scoped snapshots, and adds cache-scope coverage; keep the maintainer-authored PR open through exact-head CI. Priority: P3 Review scores
Verification
How this fits togetherAgent startup prepares plugin metadata and normalizes provider configuration into an agent models file. Provider-policy hooks use that metadata to resolve aliases, configuration rules, and API-key rules before the agent runtime consumes the result. flowchart LR
A[Agent startup] --> B[Complete plugin metadata snapshot]
B --> C[Models configuration planner]
C --> D[Provider policy lookup]
D --> E[Normalized models file]
E --> F[Agent runtime]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +37, Tests +297. Total +334 across 11 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Retain the single canonical provider-policy path and merge once the required checks complete on the reviewed head. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR optimizes internal metadata reuse rather than fixing a separately reproducible user-facing failure. Is this the best way to solve the issue? Yes. Passing the already prepared complete registry through the existing generic policy seam is preferable to another cache or provider-specific alias workaround, while scoped snapshots correctly keep discovery. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 7a0a4c5f2a3b. 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.
|
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: improve(agents): reuse provider policy manifest registry This is item 2/3 in the current shard. Shard 0/38. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
Punchcard-Session: crisp-lantern-orchard-nv * origin/main: (46 commits) perf(agents): reuse provider policy manifest registry (#119305) fix(media): roll back partial generated batches (#119292) fix(gateway): steer matching embedded turns (#119287) fix(telegram): correlate deliveries to explicit topics fix(plugins): preserve install index state across failures (#119228) test: trim redundant control ui coverage (#119286) test: cover missing config method in memory settings fix: gate curated config controls by method test: cover read-only admin method gates fix: keep config drafts on their gateway fix: reset agent skill filters with config patch refactor: reuse chat error state helper test: avoid unbound identity request assertion refactor: isolate clawhub skill search fix: guard delayed config actions across reconnects fix: preserve workshop revisions across session navigation refactor: isolate workshop revision handoff test: advertise skill action methods in ui e2e fix: fail stale workshop revision sends fix: bind revision handoffs to gateway snapshots ...
…time * origin/main: (75 commits) fix(commands): restore tool inventory for dynamic models (#119306) fix(media): release rejected BytePlus and Runway video downloads under debug capture (#119257) docs: add ChromeOS (Crostini) platform install guide (#107663) test(msteams): serve JWKS from in-process server in auth coverage (#119354) fix(qa): enable OpenAI for stored audio scenario (#119349) test(agents): realpath apply-patch temp dir fixture (#119353) test(slack): drop redundant .js-suffixed system-event mock (#119352) fix(exec): leave safe builtins unrewritten in enforced mode (#119351) fix(sessions): keep gateway responsive while large transcript archives are built (#112424) fix(tui): restore provider auth in installed local mode (#119283) fix(release): accept legacy empty core artifacts (#119337) fix(qa): carry selected runtime into flow scenarios (#119324) fix(ci): retry interrupted Windows dashboard release checks (#119095) fix(release): filter validation ancestry fetch (#119334) fix(release): accept trusted extended-stable validation evidence (#119264) fix(sessions): preserve recorder-owned user turns (#119307) perf(cli): split plugin registry startup timing (#119318) fix(qa): align release scenario setup and compaction proof (#119188) fix(ci): avoid duplicate Matrix release QA runs (#119171) perf(agents): reuse provider policy manifest registry (#119305) ...
…fecycle-20260804 * origin/main: perf(agents): reuse provider policy manifest registry (openclaw#119305) fix(media): roll back partial generated batches (openclaw#119292)
What Problem This Solves
OpenClaw's
models.jsonnormalization could rebuild the bundled-provider manifest registry while resolving provider aliases, even when the caller already held the process-lifecycle plugin metadata snapshot.That duplicated provider-policy discovery on the agent startup path. Direct canonical-provider lookups were unaffected.
Why This Change Was Made
Thread the prepared manifest registry through the existing generic provider runtime seam when the metadata snapshot is complete. Scoped snapshots intentionally retain cold discovery because their owner metadata can be incomplete, and the models-config fingerprint now records snapshot scope so full and scoped entries cannot share cache state.
This keeps one provider-policy flow: the runtime accepts an optional prepared registry, while callers without a complete snapshot continue using the existing discovery path.
User Impact
No config, API, model-routing, or output behavior changes. Agent startup avoids one redundant bundled-provider policy registry construction when resolving alias-owned provider config from a full plugin metadata snapshot.
Evidence
origin/main7a0a4c5f2a3b778deec2eacafbeffc45f24579cf.tsgo, core test typecheck, current-headoxlint, formatting, andgit diff --checkpassed.Kova exact-main A/B,
agent-cold-warm-messagewith an alias-owned mock provider, 5 samples each:Comparison result:
OK, zero regressions and zero inconclusive metrics. These end-to-end timings are host-sensitive, so the performance claim is deliberately limited to removing the proven duplicate registry construction; the table is regression evidence, not a guaranteed latency reduction.One earlier candidate run had a single cold-start threshold failure. Its time was dominated by config-preflight legacy migrations and plugin-registry startup outside this changed provider-policy seam. An unchanged exact-head rerun then passed 5/5; that separate startup owner remains follow-up work rather than scope growth here.
AI-assisted implementation and review; the maintainer verified the final diff, tests, build proof, and Kova artifacts.