Repository navigation
fix(android): show chat model refresh failures - #140899
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 7, 2026, 2:09 AM ET / 06:09 UTC. ClawSweeper reviewWhat this changesAndroid chat reports failed model refreshes while retaining previous choices, and the existing Refresh action retries the model read. Merge readiness✅ Ready for maintainer review This remains a useful, focused fix: current main still silently ignores model refresh failures. No concrete introduced defect was found, and the protected maintainer label rules out automated closure. Priority: P2 Review scores
Verification
How this fits togetherAndroid chat reads model choices and commands from the Gateway. Its controller feeds the model picker and chat notice, while session and connection guards prevent stale responses from updating the current chat. flowchart TD
A[Refresh action or catalog event] --> B[Android chat controller]
B --> C[Gateway metadata read]
C --> D{Current request and chat?}
D -->|No| E[Ignore stale notice update]
D -->|Success| F[Update choices and clear refresh notice]
D -->|Failure| G[Retain choices and show notice]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +304, Other +23. Total +327 across 3 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep recovery in the existing chat controller and Refresh action, preserving accepted choices and unrelated errors until the current metadata read succeeds. Do we have a high-confidence way to reproduce the issue? Yes, from source: fail a metadata refresh after loading choices; current main preserves the catalog but suppresses the failure, and Refresh does not explicitly retry that read. No runtime reproduction was executed during this review. Is this the best way to solve the issue? Yes. Reusing the existing reader, notice, and selection guards is a narrow repair that avoids a competing model-loading path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a17f8c2b5d19. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged as
The landed patch matches the reviewed change. Before/after captures are in the PR body. Native proof used synthetic data and injected read failures, not provider inference. |
Report failed Android chat model refreshes through the existing notice while retaining accepted choices. Keep warning writes and clears with the current read and visible session. Retry metadata through Refresh chat, preserve unrelated errors, and keep caller cancellation quiet. Verified with regression tests and independent Android UI checks for visible failure, pending refresh, stale-session rejection, and publication recovery. Co-authored-by: Ayaan Zaidi <[email protected]>
Related: #136257.
What Problem This Solves
Android chat kept previous model choices after a failed refresh without showing a warning. Refresh chat updated history but did not retry model metadata.
Why This Change Was Made
The existing notice and model reader publish failures only for the current request, catalog, connection, and visible session. Refresh chat retries metadata and keeps the warning until an accepted success. Cancellation stays quiet and unrelated errors retain their owners.
User Impact
Users keep choices and unsent drafts during failure, see recovery guidance, and retry with the existing refresh action. Late failures from a previous chat do not appear in the current chat. No new API or storage is added.
Consumers: Android chat notices and Refresh chat now follow model-read outcomes.
Evidence
Six unit regressions and real emulator interaction reproduced silent failure. Candidate unit, build, lint, and formatting checks passed. Native checks verified retained choices/drafts, warning persistence during held refresh, clearing after success, rejection of old-session failure, and publication recovery with the picker open. An external relay injected failures after recording real Gateway replies; inference was not sent. Race and legacy cases use controller tests. Native checks used English; pending translations remain with the normal locale process.