Repository navigation
fix: retain catalog generation scope during full assembly - #147323
Conversation
|
🦞👀 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 13, 2026, 4:56 PM ET / 20:56 UTC (Revision 2). ClawSweeper reviewWhat this changesKeeps model-catalog assembly within its prepared plugin generation, preserves the requested provider filter, and adds coverage for built and source descriptors. Merge readiness✅ Ready for maintainer review The repair remains useful: current main still loses the generation context during static catalog assembly. No actionable patch defects were found, and the updated build evidence resolves the prior review blocker. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw assembles its model catalog from configured models and provider plugin descriptors. The prepared generation determines which plugin artifacts supply those descriptors, and catalog results feed model discovery and selection. flowchart TD
A[Catalog refresh request] --> B[Requested providers]
C[Prepared plugin generation] --> D[Full catalog assembly]
B --> D
D --> E[Scoped descriptor discovery]
E --> F[Built or source artifact]
F --> G[Model catalog]
G --> H[Model selection]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +12, Tests +138. Total +150 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Use the existing generation owner throughout catalog assembly while retaining unfiltered discovery, source-only callers, and configured model precedence. Do we have a high-confidence way to reproduce the issue? Yes, from source: a provider-scoped refresh reaches static descriptor discovery without its generation scope or provider filter on current main. The added regression cases target this path; this review did not execute them. Is this the best way to solve the issue? Yes. The patch carries existing generation facts and the existing filter through the owning assembly function without introducing another discovery mechanism or public API. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against dad7c9d9e2b9. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
What Problem This Solves
Full model-catalog assembly can lose the requested provider filter and load source descriptors even when the catalog belongs to a built plugin generation.
User Impact
Selected-provider catalog reads stay filtered and use their own generation's artifact choice. Callers without a plugin registry retain source-based behavior.
Why This Change Was Made
Run full assembly inside the existing generation scope when a registry is supplied, and forward the existing provider filter to static-context discovery. Unfiltered reads continue to include all providers; the no-registry path still runs directly.
Evidence
Three regression cases failed on the original implementation. The fixed metadata integration file passes all four cases, and 46 sibling tests across five files pass. The tests observe descriptor imports and returned model rows for selected/all-provider assembly, built generations, and the source-only path. The full selected core/coreTests changed gate and managed review passed with no actionable findings.
The full build passed with source and dependency inputs unchanged. Exact-head CI passed with 116 successful jobs and 17 skipped.
Fresh Package Acceptance tested the same candidate head. Package build, integrity and npm 12 installation passed, along with both published
[email protected]upgrade scenarios: custom plugin siblings and legacy operator state. The survivor scenarios used manual restart; generation scope, descriptor selection and provider filtering are covered separately by the integration and Gateway evidence below.One matched baseline-then-candidate Gateway diagnostic, after an explicit provider-scoped catalog refresh and 65-second idle, observed catalog-worker heap after GC fall from 129.682 to 95.801 MiB (-26.126%) and process idle RSS from 662.891 to 580.547 MiB (-82.344 MiB). The selected worker's installed TypeScript compiler/Jiti-Babel script counts went from 1/3 to 0/0. Both arms returned 11 models and one ready provider outcome, with matching checked install/runtime inputs and 26 serving native images; main heap was essentially unchanged.
This is one diagnostic pair, with intrusive GC endpoints and overlapping memory categories, not per-turn allocation, timing, or statistical proof. Script absence applies to that catalog worker; the catalog checks do not establish byte-identical full rows.
Separate real-OpenAI functional validation completed all 12 turns through the normal
pnpm openclawGateway entry: 10 Code Mode and Tool Search turns with same-session tool-call/result, session-list and chat-history checks, plus two managed web-search and text-fetch turns. Both runs completed without failure or interruption, with stable checked identities and no tracked runtimes remaining after isolated cleanup. These legs establish functional completion and cleanup only; no timing, RSS, per-turn allocation or statistical claim is drawn from them.