Repository navigation
fix(ios): fall back to memory when the simulator support directory is missing - #16032
Conversation
`MobileAuthComposition.tokenStore` still returns `.none` when the application-support directory does not resolve in a simulator build. `StackClientApp` maps `.none` to a `NullTokenStore`, so the next authenticated operation calls `fatalError`. That is the same trap manaflow-ai#14302 removed from the missing-app-identity path, left on the other return. Inject the directory so the path is reachable from a test, and assert `.memory`. This commit is red on purpose; the fix follows. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Return `.memory` instead of `.none`, so a simulator build whose application-support directory does not resolve loses its session on relaunch rather than trapping the process on the next authenticated operation. No `return .none` remains in `tokenStore`. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 2 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. Review configuration: ⚙️ Run configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
All contributors have signed the CLA ✍️ ✅ |
|
Status on the iOS lane. Both new assertions pass. The The surrounding log shows the grid settling at I have rerun that job to establish whether it is flaky or newly broken, and will report |
|
The red half is now demonstrated, so the two-commit evidence is complete.
Against the head commit
Two notes on that dispatch run, neither affecting the result above. It also failed Remaining blocker here is the |
|
Independent review pass before merge. No blocking defect; recording what it checked and the three things it raised that the description did not. Verified rather than assumed
Raised, and not previously disclosed
🤖 Generated with Claude Code |
|
Merge receipt for |
a302b3a fix(cloud): replay placement only for new daemon tabs and display views (manaflow-ai#16030) ec42b7e fix(cloud): keep the link client's last stderr lines in its exit error (manaflow-ai#16057) 8793407 Keep Cloud terminal prompts intact when resizing (manaflow-ai#15924) 2dbe472 Bound Iroh release gate phases (manaflow-ai#16084) 4df2a40 fix(agent-chat): keep ACP Stop off live turns and quiet cancelled startups (manaflow-ai#16093) d916e5c Merge pull request manaflow-ai#16006 from manaflow-ai/feat-dashboard-settings-hub-plans 6844b12 coderouter: no empty state while shared accounts are unreachable 7b51cc9 test: an unreachable shared-account service must not show the empty state 0fcbc54 ci: make E2E rescue and video capture fail soft (manaflow-ai#16027) 56b06d1 dashboard: capitalize remaining labels, buttons, and the LLM/CLI acronyms b76ad61 billing: show the upgrade welcome only once the plan confirms it 2eb9bee ci: simplify macOS pool picker (manaflow-ai#15988) fe2dd0e Preserve Cloud chat row measurements when appending turns (manaflow-ai#16011) 5ae227e test: a stale welcome link must not hide the upgrade prompt 7e39c92 fix(ios): fall back to memory when the simulator support directory is missing (manaflow-ai#16032) 87c78fe ci: do not wait on a busy producer root for tests (manaflow-ai#16077) aae7dae test: keep the hosted client's real exports in the coderouter procedure mock ef01450 coderouter: name an unreachable shared-account service and log account failures 0183942 Settle the session status when Stop cancels ACP startup (manaflow-ai#16081) d664799 test: an unreachable shared-account service is its own state 1c2d14c Merge remote-tracking branch 'origin/main' into feat-dashboard-settings-hub-plans 3fc0c8d billing: one price shape on every plan card; clearer Cloud empty text 167d1a3 test: every plan card shows its price in one shape d3a63a6 settings: list the subnav's teams from the team catalog 258cd09 test: the settings subnav lists teams from the team catalog 74d2419 billing: say a reason all other plans share once, and no price for a granted plan aa820ae test: a reason all other plan cards share shows once 504df35 billing: report a downgrade's net credit 7c48432 test: a downgrade credit is net of the new plan's remaining time 952940a billing: plan picker with in-app switching, cancel with reasons, and upgrade prompts 4dc8964 test: Plan & billing defaults to the personal plan 9a69fe7 test: plan picker states and the optional cancel reason 0163f67 billing: in-app plan switch, cancel reasons, and checkout returnTo 31048db test: in-app plan change, cancel reasons, and checkout returnTo 596ff2a dashboard: make Settings the hub for billing and teams, title-case the navigation ff11627 test: settings is the hub for billing and teams, with title-case navigation # Conflicts: # .github/workflows/ci-guards.yml # .github/workflows/ci-macos.yml # .github/workflows/ci.yml # .github/workflows/ios-screenshots.yml # .github/workflows/iroh-release-gate.yml # .github/workflows/test-e2e.yml # .github/workflows/test-ios.yml
Problem
MobileAuthComposition.tokenStorehas two ways to fail to pick a store. #14302 fixed oneof them: a missing app identity now selects
.memoryrather than.none, becauseStackClientAppmaps.noneto aNullTokenStoreand then callsfatalErroron thenext authenticated operation:
The other return kept the trap. In a simulator build, when the application-support
directory does not resolve, the function still returned
.nonewith a perfectly validapp namespace. Surfaced while reviewing #16024.
Change
Return
.memorythere too. Losing the session on relaunch is recoverable; trapping theprocess is not. No
return .noneremains intokenStore.The directory lookup is now an injected parameter defaulting to the previous expression,
so the failure path is reachable from a test. The one production call site omits the
argument and gets the default.
One consequence worth stating plainly: the lookup used to sit inside
#if DEBUG && targetEnvironment(simulator)and was absent from the device binary. Adefault argument is emitted at the call site instead, so a Release device build now
evaluates one
NSSearchPathForDirectoriesInDomainscall at launch that it previously didnot. The
#elsekeychain branch still ignores the value.Verification
Two commits, so the split is visible in the Commits tab:
005e06b501aaddsunresolvableSupportDirectoryFallsBackToMemory()and the injectionpoint, with the source still returning
.none.49e063197abreturns.memory.Both were pushed together, so pull-request CI only checked the head and the first commit
carries zero check runs. The red half was therefore established by a separate dispatch of
test-ios.ymlat005e06b501aon the fork:unresolvableSupportDirectoryFallsBackToMemory()005e06b501a(test only, source returns.none)49e063197ab(source returns.memory)iphoneandipadThe iOS simulator lane routes on this pull request because it touches
ios/, andcmuxFeatureTestsis in the default test plan. Both shards are green. Theiphoneshardfirst failed on an unrelated
TerminalSurfaceMountOwnershipTestsflake inPackages/iOS/CmuxMobileShellUIand passed on rerun; see the comments below.Changelog
Fixed: a simulator build whose application-support directory cannot be resolved no longer
crashes on the first authenticated request.
🤖 Generated with Claude Code