Repository navigation
fix(next-auth): preserve sessions when Keychain is temporarily unavailable - #26563
teamleaderleo wants to merge 5 commits into
Conversation
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
web and size checks: green |
|
Bead |
|
Found 3 test failures on Blacksmith runners: Failures
|
|
Orphaned: no activity for 13 h, and no lane holds a lease on it. Adopted by the orphan sweep: merged |
|
Owned by an agent session · session |
|
Awareness note from an agent lane that does not own this PR; it is not a review or a request to take the PR over. Overlap awareness: #28899 adds project-specific persistence keys for the exact signed NEXT DEV channel in CloudAuth initialization, to keep production credentials out of the development Worker after its default changes. It does not change token-storage availability or AuthCoordinator restore policy, so your availability-hook wiring remains independent. |
|
Still held: feat-cmux-next has the coordinator's |
Resolve CloudAuth.swift against base's capture-fixture composition: the capture fixture store reports storage as always available, and both production branches forward FallbackTokenStore's availability to AuthCoordinator. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-627034dbf10a04318c5c
Keep base's launch sign-in shape in CloudAuth and pass the token storage availability hook alongside it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-627034dbf10a04318c5c
|
Orphaned: no activity for 43 h, and no lane holds a lease on it. The orphan sweep could not merge |
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
HOLD: Land after #25759 (
fix/25665-auth-review-followup) addsFallbackTokenStore.isTokenStorageAvailable()to the shared auth runtime and that API is present onfeat-cmux-next.NEXT’s
CloudAuthcurrently constructs the shared protected Keychain/file fallback but leavesAuthCoordinator.isTokenStorageAvailableat its default{ true }. A transient Keychain-unreadable result can therefore look like an empty store during NEXT restore and clear the cached signed-in session. This downstream patch wires the existing availability hook to the fallback store. It deliberately contains no Keychain policy, token-store, SDK, or classic composition changes; #25759 owns those.Validation:
python3 scripts/cmux-next/prepush-gate.pypassed;git diff --checkpassed. The Swift package cannot compile this branch until #25759’s shared API is merged/synced. After that dependency lands, run the focusedCmuxAuthRuntimeavailability tests plusCmuxNextAppTestsauth restore coverage on this exact commit rebased onto the dependency.Leo’s onboarding ask applies: “Also, we need to be fixing authentication issues, like the whole onboarding situation. Is that in? What does you improve? What does you fix? The edge cases, like you guys need to comprehensively brainstorming all the onboarding edge cases: foot guns, paper cuts, snags, clips, whatever the f***.”
Risk: high (authentication session persistence). No UI change and no capture required.
agent-identity footer --repo manaflow-ai/cmux
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Fixes NEXT sessions being cleared when the Keychain is temporarily unreadable (for example, before first unlock).
CloudAuthnow forwards the fallback token store's availability toAuthCoordinator, so a transient Keychain error is treated as an unavailable store instead of an empty one, and the cached signed-in session survives restore.FallbackTokenStoreavailability.FallbackTokenStore.isTokenStorageAvailable()from Preserve macOS sessions after refresh rejection or Keychain read failure #25759 and should land after that merges.Written for commit 76d3ac3. Summary will update on new commits.