Repository navigation
fix(models): model picker retries callbacks during catalog replacement - #169478
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 changesThe PR makes model-catalog readers follow successor publication gates before selecting a published runtime. Example: A model-picker reader starts before a pending catalog replacement is superseded.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR repairs a current publication-wait failure in the shared owner. No introduced correctness or security defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe prepared-model runtime owns published catalog generations between configuration reloads and catalog consumers; it accepts reader identity and configuration, waits for publication, and returns the selected snapshot or lease. flowchart TD
A[Catalog consumer] --> B[Prepared catalog loader]
B --> C[Published runtime owner]
D[Configuration reload] --> E[Replacement publication gates]
C --> E
E --> F[Committed catalog snapshot]
F --> A
Technical reviewBest possible solution: Follow successor gates in the existing publication owner while preserving exact-config rejection and lifecycle checks. Do we have a high-confidence way to reproduce the issue? Current-main source exposes the failure directly: superseding a gate wakes its reader before the replacement commits, and the reader does not recheck the gate; the PR reports matching before/after failures, but no code was executed during this review. Is this the best way to solve the issue? The small shared-owner repair addresses premature owner selection without adding retries or changing catalog selection policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 521393ecd7d1. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +2, Tests +42, Docs +4. Total +48 across 4 files. Added test files: 1. View PR surface stats
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 Reviewed October 11, 2026, 8:30 PM ET / October 12, 2026, 00:30 UTC. |
openclaw#169478) ## What Problem This Solves Fixes a Telegram model-picker callback being retried when a pending model catalog is replaced, even though it should wait for the new catalog and complete on its first attempt. ## User Impact Model browsing waits for the committed replacement catalog instead of briefly failing against a retired publication. No authentication, permissions, or stored-data changes. ## Why This Change Was Made Refreshing the catalog supersedes the earlier publication gate. Superseding a gate wakes its readers before the replacement has committed. A one-shot wait then selects an unavailable owner and forces ingress recovery. Follow successor publication gates before resolving the owner. Preserve exact-config acquisition semantics and the existing zero-retry end-to-end assertion. The native-Claude fixture failure in the same e2e file has an independent test-only repair. ## Evidence Baseline: `11f576b23cf70615ca4504eb12fdba93591b9c8f`. - Before: `recovers a replaced model catalog and drains the following Telegram callback` completed with ingress attempts `1`, not the required `0`. - A focused owner-boundary regression covers a reader admitted before replacement and exact-config rejection across that replacement. - The existing 24-case owner-selection suite passed during focused diagnosis. - The new regression failed on the unchanged owner with `prepared model runtime owner is stale after config publication`; both exact and published cases pass after the repair. - Rebuilt `qaRuntime`, then the real Gateway/Telegram-mock replacement scenario passed with its original `attempts: 0`, empty claim/pending/failed queues, and both completed callbacks assertions unchanged. - Independent autoreview: scoped-clean at P2. - `tsgo:core`, the consuming agents-other test graph, and all four root test graphs passed. - Changed-file Oxlint/Oxfmt and the line-cap ratchet passed. Documentation retains the exact-acquisition contract. Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
Fixes a Telegram model-picker callback being retried when a pending model catalog is replaced, even though it should wait for the new catalog and complete on its first attempt.
User Impact
Model browsing waits for the committed replacement catalog instead of briefly failing against a retired publication. No authentication, permissions, or stored-data changes.
Why This Change Was Made
Refreshing the catalog supersedes the earlier publication gate. Superseding a gate wakes its readers before the replacement has committed. A one-shot wait then selects an unavailable owner and forces ingress recovery. Follow successor publication gates before resolving the owner. Preserve exact-config acquisition semantics and the existing zero-retry end-to-end assertion.
The native-Claude fixture failure in the same e2e file has an independent test-only repair.
Evidence
Baseline:
5889e62f4902b8f3fa4b6eb2cecbbd26f5b8ceb0.recovers a replaced model catalog and drains the following Telegram callbackcompleted with ingress attempts1, not the required0.prepared model runtime owner is stale after config publication; both exact and published cases pass after the repair.qaRuntime, then the real Gateway/Telegram-mock replacement scenario passed with its originalattempts: 0, empty claim/pending/failed queues, and both completed callbacks assertions unchanged.tsgo:core, the consuming agents-other test graph, and all four root test graphs passed.