Repository navigation
fix(ios): disclose model targets and enforce availability - #135044
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
ffe54c5 to
20b1a97
Compare
|
Codex review: needs maintainer review before merge. Reviewed September 1, 2026, 1:51 PM ET / 17:51 UTC. ClawSweeper reviewWhat this changesThe PR makes iOS model pickers disclose the Gateway-resolved write target, disables unavailable model choices, and prevents online sends only for selected models with permanent authentication failures. Merge readinessKeep this PR open: current main does not contain its iOS model-catalog changes, and the previously reported refresh race is addressed at the current head. It is MEMBER-authored and carries the protected Priority: P1 Review scores
Verification
How this fits togetherThe iOS chat client obtains model and session facts from the Gateway, renders them in the inline and Chat Actions pickers, then uses the selected model when sending a chat turn. This change propagates session-scoped availability and write-target facts through that client path. flowchart LR
A[Gateway session metadata] --> B[iOS chat transport]
B --> C[Session model catalog]
C --> D[Inline model picker]
C --> E[Chat Actions picker]
C --> F[Composer send gate]
D --> G[Gateway model update]
F --> H[Live chat send]
Before merge
Agent review detailsSecurityNone. PR surfaceOther +1002. Total +1002 across 22 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the negotiated session-scoped catalog path, then land only after exact-head checks confirm the guarded iOS behavior and maintainers accept the shared-client scope. Do we have a high-confidence way to reproduce the issue? Yes, from source: the merge-base did not preserve model availability into the iOS picker or test it before live send; the current branch adds both gates and targeted regressions. This read-only review did not execute the simulator suites. Is this the best way to solve the issue? Yes. The change consumes the existing Gateway-owned session metadata capability instead of recreating model-scope policy in Swift, with request and session fencing around refreshes. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a040b0363656. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
20b1a97 to
d68c2cb
Compare
|
Reviewed exact head @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Final reviewed head: The prior P1 is resolved at the shared refresh owner: every @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
…35044) * fix(ios): disclose model selection target * fix(ios): respect model availability in chat * test(ios): prove model picker target variants * chore(ios): refresh native localization inventory * fix(ios): refresh model availability after session mutations * fix(ios): refresh model availability during resync
Fixes #134306
Related: #127813, #131697, #132179
What Problem This Solves
Fixes an issue where iOS users choosing a model could not tell whether the selection would change only the current session, the agent default, or the global default. It also fixes the native availability gap: models the Gateway marked unavailable still appeared selectable in both iOS pickers, and a selected model with a permanent authentication failure did not block a live send.
Why This Change Was Made
PR #127813 deliberately made an omitted selection scope resolve through Gateway policy. This change keeps that behavior and presents the Gateway-resolved target before selection instead of duplicating the policy in Swift.
The same shared iOS model projection now preserves Gateway availability for both picker surfaces and composer admission. New Gateways provide session-scoped
chat.metadata; capability negotiation keeps availability non-authoritative on older Gateways. Metadata events, current-session mutations, reconnects, route changes, and sequence gaps refresh the accepted catalog with current-session and latest-request fencing.This brings iOS in line with the contract established by #131697. The omission recorded in #132179 was safe while iOS did not enforce availability; it is no longer safe once native sends are gated. Only
missing-authandauth-failedblock an online live send. Cooldown, unknown or absent availability, a usable provider alias, and offline durable queueing remain admitted.Android is unchanged and is not claimed as fixed here.
User Impact
iOS users see the model write target before choosing a model. Unavailable models remain visible with a reason but cannot be selected in either picker. If the selected model has a permanent authentication problem, the composer explains what needs attention; a successful credential refresh clears the gate without an app restart or session change.
Evidence
2a920ab94d329906246fb98b4bcbc04eaeb2034d9d10dcb5d39d09be94f48a1bfce1dbfd7a25690301129d7bbe06ba05f1e4850d6b6a38c4f2a2c22b6b16d6f192669764041b8a36e72ac42de14080e2d68c2cb728c126064276f4fab3e235c285640e38: https://github.com/user-attachments/assets/5a9daca5-041a-4db9-b268-49510bf3f870PASSat 0.91 confidence on the tested app tree carried unchanged into the final green head; report SHA-256184bf26d9b28559adb9f7b958f7998e9067e237dfe3c99114054c3f38a50ec7c.pnpm check:protocol-coveragepnpm lint:swiftpnpm check:changedgit diff --checkpatchandcommand-metadatarefreshes and ensures a metadata event supersedes an in-flight sequence-gap refresh. Both repairs use the existing session/request-fenced catalog owner and have direct ordering regressions.The media use a deterministic local fixture and contain no credentials or private user data. The simulator proof ran at
6793ab7ddfe640ec1ce361fe5cce80617112add7; all 22 task-owned files are byte-identical at final head6b16d6f192669764041b8a36e72ac42de14080e2. The finalappstree also contains an unrelated invoke-timeout refactor merged frommain; the surface-impact audit found no change to the picker, projection, composer, catalog, session, or Gateway metadata paths. The manifest records both tree identities, the final continuous H.264 recording, contact sheet, and transcode checksums. Browser file permissions prevented attaching the final MP4, so the linked recording is labeled with its exact SHA. Proof media are not committed.Compatibility and Scope
Release Note Context
iOS: show whether a model choice affects the session, agent, or global default; disable Gateway-unavailable models and explain permanent authentication failures before sending.
No changelog file was edited; release-owned changelog handling remains unchanged.