Repository navigation
fix: recover Session Observer models after catalog failure - #137171
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed September 3, 2026, 5:34 AM ET / 09:34 UTC. ClawSweeper reviewWhat this changesThe PR makes the Session Observer utility-model picker preserve an initial catalog failure as retryable and adds Control UI browser coverage for recovery on the next status poll. Regression provenancePossible regression — probable (reviewed change; reproduction). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review No blocking correctness finding. Current main still converts this caller’s failed initial catalog request into an empty successful result, while the PR makes that failure retryable at the Config-page boundary; the maintainer-authored, protected PR should remain open for normal maintainer handling. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI polls the Gateway for system status, then loads configured models for the Session Observer utility-model picker. The picker needs to distinguish an unavailable catalog from a valid empty catalog so a later poll can recover without changing page, client, or agent. flowchart LR
A[Gateway status poll] --> B[Config page]
B --> C[Configured model catalog]
C --> D{Catalog result}
D -->|Models available| E[Session Observer picker]
D -->|Temporary failure| F[Retryable unavailable state]
F --> A
E --> G[Utility-model configuration]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource 0, Tests +138. Total +138 across 3 files. 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. Technical reviewBest possible solution: Keep the shared fallback policy for consumers that intentionally tolerate it, while this retrying picker continues to request rejection and shows its existing unavailable state until the next successful poll. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: the shared loader’s empty fallback reaches the Config-page success path on current main, records the client and agent, and makes the next poll skip the request. The added browser scenario encodes that same failure-and-recovery sequence, though this read-only review did not execute it. Is this the best way to solve the issue? Yes. The page is the consumer that needs failure to remain distinct from a valid empty catalog; using its existing rejectOnFailure contract avoids changing fallback behavior for sibling consumers that already own their own error treatment. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d15d0fa6c253. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
f0b1595 to
4265ad4
Compare
|
Fixed: Session Observer model choices now recover automatically after a transient initial catalog failure. |
…137171) Restores automatic Session Observer model-catalog recovery after a transient initial failure while preserving successful empty-catalog behavior. Refs openclaw#137103.
Closes #137103
What Problem This Solves
Fixes an issue where the Session Observer model picker could remain empty after
its first catalog request failed temporarily. The picker appeared healthy and
hid available utility models until the selected agent, Gateway client, or page
changed.
Why This Change Was Made
The Session Observer caller now preserves catalog request failures instead of
accepting the shared store's fallback as a successful empty catalog. Its
existing unavailable state remains retryable on the next status poll, while
shared cache fallback behavior stays unchanged for callers that intentionally
use it.
The regression test exercises the real mocked Gateway request, shared catalog
store, Config page lifecycle, polling retry, recovered picker options, and
utility-model patch. It replaces the former unit test that mocked the catalog
store itself and could not catch this failure.
User Impact
After a temporary Gateway or catalog failure, users see that explicit models
are unavailable. When the Gateway recovers, the same page automatically
retries and restores available utility models without requiring an agent
switch or reload.
Evidence
7b67c28e2e9: the initial catalog request failed, theunavailable warning remained absent, and the browser regression failed on
that missing state.
f0b1595ba9d: the browser scenario passed, explicitly observedthe next
system.infopoll, issued a second preparedmodels.listrequestfor the same client and agent, removed the warning, rendered both recovered
models, and emitted the canonical utility-model patch.
4265ad427a2is a conflict-free rebase onto currentmain;git range-diffmaps all three commits as patch-equivalent.Session Observer runtime tests.
patch through canonical
config.patch, read it back throughconfig.getwith unrelated settings preserved, and completed one Session Observer model
call through production utility-model resolution.
exact prepared head
4265ad427a2with exit code 0.728cb12fe579confirmed that refreshfailure can preserve the current catalog while a genuinely empty
model/listis a valid successful response, so the repair remainscaller-local.
0c64b9ea962is confirmed as genuine upstream history; theprepared merge tree is conflict-free and current
origin/maincontains that base.contract, and aggregate gate lanes successfully.
exact prepared head
4265ad427a2.ClawSweeper Before-Merge Items
at
0c64b9ea962.4265ad427a2.Visual Evidence
Initial Failure And Automatic Recovery
pr-137171-session-observer-recovery.webm
Visual Verification
origin/main@7b67c28e2e96237b4eea9ce095a74d6936ce8c50f0b1595ba9d41d353d77aa872e52a582eed587794265ad427a29488c3754767b3a34b834dcbdee7fadvance the next 10-second status poll without replacing the client or
agent.
system.info;models.listadvances fromone to two.
Claude Recovered and GPT Recovered.
agents.defaults.utilityModel = openai/gpt-recovered.