test(auth): isolate native account capture fixtures

TE
7d ago
+315-26

HOLD: exact-head app compile, isolation tests, and independent review are pending.

Native auth captures currently either read the capture machine’s credentials or use showcase Accounts data, which bypasses the CloudAuth behavior being reviewed. DEBUG launches with --auth-capture-fixture now compose in-memory auth storage, an offline auth client/browser factory, and a virtual provider home while retaining the real coordinator, callback validation, Accounts model, and local pane/workspace routing.

Provider login actions execute a fixed /usr/bin/printf marker through the actual terminal route; provider browser actions open /dev/null. Provider key storage and label salt stay in memory. Release builds ignore the fixture flag.

This supports matching capture overlays for #26529 and #26535 using the existing launch_args capture state field. No capture service permissions or schema changes.

Leo asked:

“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 be comprehensively brainstorming all the onboarding edge cases: foot guns, paper cuts, snags, clips, whatever the f***.”

The fixture makes the actual onboarding paths in #26529 and #26535 reproducible in isolated captures.

Validation

python3 scripts/cmux-next/prepush-gate.py passes at 003a3d5c3c8f90c1b895cea8259271ea5874749c. Fleet job a99f19cf1cf507ea81bcda11 is submitted for that exact head to compile the app and run scripts/ci/package-test-lane.sh suite Packages/macOS/CmuxNext AuthCaptureFixtureTests; execution and results remain pending.

Capture-overlay builds exposed a closure-sendability compile error, now corrected with an explicit sendable closure. Independent review found recovery requests could bypass the offline client and that Release tests could touch real credentials. The coordinator now reports offline in fixture mode, both recovery methods have exact AuthError.offline assertions, and the entire fixture test file is DEBUG-only. Re-review remains pending.

Observed / Not run

Isolation tests and independent review are pending. Capture images will come from the behavior PRs using identical fixture overlays. An initial dispatch accidentally targeted the unchanged base; its zero-test result is discarded and provides no validation.

No capture: this introduces DEBUG capture dependencies, with no layout or copy change to the shipped application.

Changelog

none

Agent session: agent session