Repository navigation
fix(models): release superseded catalogs after config reload - #158986
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. What this changesThis PR separates predecessor-inventory selection from retained callbacks so superseded model catalogs can be collected after configuration rebuilds. Example: Six catalog generations are published while logging alternates between info and debug.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it repairs a still-present catalog-retention defect, preserves existing selection behavior, and has relevant shipped-Gateway proof; no actionable introduced defect was found. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe prepared-model runtime rebuilds catalog generations from configuration, provider facts, and prior inventories, then publishes model rows and lifecycle-bound readers to Gateway consumers. flowchart TD
Config[Configuration publication] --> Refresh[Prepared runtime refresh]
Refresh --> Seed[Predecessor inventory selection]
Seed --> Access[Catalog access callbacks]
Worker[Provider catalog worker] --> Access
Access --> Published[Published model catalog]
Published --> Readers[Gateway model readers]
Refresh --> Retirement[Generation retirement]
Technical reviewBest possible solution: Land the focused retention repair after the normal current-head gates complete. Do we have a high-confidence way to reproduce the issue? Current-main source retains the implicated closure scopes, and the author supplies pinned-base failure, candidate collection results, and a shipped-Gateway run; this read-only review executed no target code. Is this the best way to solve the issue? The repair addresses retaining references at their existing owners while preserving account filtering, discovery reuse, publication, and retirement behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 936bcad990d7. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +21, Tests +67. Total +88 across 4 files. Added test files: 1. 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. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (4 earlier review cycles)
Reviewed October 14, 2026, 10:00 AM ET / 14:00 UTC (Revision 5). |
|
Added the requested real-setup proof to the PR body, including the complete disposable probe so it can be reproduced on both revisions. The production plugin loader, SQLite auth store, runtime publication, provider catalog hook, and native worker are all exercised without mocking discovery. Six logging-only reloads produce: Actual provider invocation and worker-thread markers confirm discovery ran on every reload. The current catalog is read again after GC. This is real source-runtime proof, not a full Gateway deployment or an RSS/OOM benchmark; the precise boundary and commands are in the body. The small permanent regression remains unchanged, so this adds evidence without adding another maintained test. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
db83fac to
deca218
Compare
|
Refreshed this PR to the current catalog-source owner at The body now includes the freshly executed October 11 real-worker paired proof and complete disposable probe: clean @clawsweeper re-review Maintainers: please review the refreshed exact head for merge after the normal current-head CI/security/review gates complete. The older October 2 review is not being reused as current approval. |
|
🦞👀 Re-review progress:
|
|
The requested actual shipped-Gateway catalog-rebuild/collection evidence is now recorded in the PR body at unchanged exact head One supported local Exact-head full Please review this author update and pursue normal maintainer landing once the outstanding current-head CI failures have been causally attributed/resolved and the remaining repository gates pass. No admin, security or inherited-failure bypass is requested. |
Integrate exact 44898a3 containing the upstream Solid tag and Activity fixture repairs. Keep the four-file inventory retention repair unchanged.
|
Merged via squash.
|
…w#158986) * fix(models): release superseded catalog generations after reload * fix(models): release inventories held by native retirement callbacks * fix(models): release retained catalog closure inventories
What Problem This Solves
Fixes: repeated prepared-model catalog refreshes retain superseded catalog inventories after their generations should be collectible.
User Impact
Old inventories can be released while the current model catalog remains usable. Provider identity, credential, native-account and eligibility filtering are unchanged. No configuration or stored-data migration is required.
Why This Change Was Made
Retained catalog callbacks must not close over the predecessor inventory or the refresh's inventory map. The repair separates seed selection from the retained callbacks and binds the existing generation-retirement callback directly.
The October 14 candidate
82a08ac0f7a37c8d918034b6c428c7b02b503413integrates exact upstream 44898a369528, preserving the published branch's history. The introduced repair is still four files, +98/-10 against that captured main; no collection budget, assertion or timeout was relaxed.Evidence
44898a369528collects none of the five superseded inventories and fails its expected[0, 1, 2, 3, 4]assertion. Restoring this fix makes the same test pass.agents-othertest type graph pass. Focused typed lint and formatting pass.The previous red run 38154192862 failed five test-type jobs on inherited Solid custom-element and Activity/Usage fixture errors. Their upstream repairs, b5a9b9b41c34 and ab6c07f595e9, are included in this captured base. This is source repair and local proof, not a rerun or a claim that the new PR head's CI has passed.
Local ratchet limitation: the combined max-lines/environment gate reports 455
OPENCLAW_*names against the upstream budget of 454. Exact captured main and this candidate have identical sets of 455 names, with no added or removed names; the budget remains unchanged. The per-file line-cap portion passes. Hosted final-head checks and maintainer review remain required.