Skip to content

test(auth): isolate native account capture fixtures (carries #26587) - #28060

Merged
cmux-bot[bot] merged 11 commits into
feat-cmux-nextfrom
lane/odd-26587-auth-fixture
Oct 31, 2026
Merged

cmux-bot[bot] merged 11 commits into
feat-cmux-nextfrom
lane/odd-26587-auth-fixture

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Carries #26587 (its commits unchanged, from the dead launch-polish lane) merged with current feat-cmux-next. #26587's branch is not a lane/ branch, so this lander can't push to it; #26587 closes once this lands.

#26587's HOLD named its own outstanding work: an exact-head app compile, the isolation tests and an independent review. This PR does them at its own head: cmux-next/compile in CI, a focused fleet run of AuthCaptureFixtureTests, and an independent review. (At #26587's head d037873, AuthCaptureFixtureTests passed on the fleet, key land-pr26587-head-d0378739.)

No capture: a DEBUG-only test/capture fixture (CMUX_NEXT_AUTH_CAPTURE_FIXTURE=1 / --auth-capture-fixture); release builds compile it out and nothing drawn changes.

Changelog

none

#26587's description

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

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Adds a DEBUG-only auth capture fixture that isolates native auth captures from real credentials and network access.

Launched with --auth-capture-fixture (or CMUX_NEXT_AUTH_CAPTURE_FIXTURE=1), the app substitutes in-memory token/key stores, an offline auth client, a no-op browser factory, and a virtual provider home while keeping the real CloudAuth coordinator, callback validation, and Accounts routing. This makes onboarding flows reproducible in isolated fleet captures without touching a developer's keychain or contacting Stack Auth. Release builds compile the fixture out, and the capture browser opener is explicitly sendable and never opens a browser.

Written for commit 88b8309. Summary will update on new commits.

View guided diff Turn on auto-fix

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review 88b8309: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr28060 -f ref=lane/odd-26587-auth-fixture -f platform=macos -f backend_mode=local

web and size checks: green

Shipped in:

@blacksmith-sh

blacksmith-sh Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Found 3 test failures on Blacksmith runners:

Failures

Test View Logs
tab: tabGroup.addTab is not a top-level row/tab: tabGroup.addTab is not a top-level row View Logs
tab: tabGroup.create is not a top-level row/tab: tabGroup.create is not a top-level row View Logs
tab: tabGroup.removeTab is not a top-level row/
tab: tabGroup.removeTab is not a top-level row
View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 30, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex-review-box/gpt-6-astra high, lane-place): SHIP at 10d8447

SHIP

No findings.

cmux-bot[bot]
cmux-bot Bot previously approved these changes Oct 30, 2026

@cmux-bot cmux-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmux-bot approves 10d8447: an independent review passed this exact head (review box review-28060-10d8447f receipt by teamleaderleo). A push needs a new review; a later BLOCK at this head dismisses this approval.

@cmux-bot
cmux-bot Bot dismissed their stale review October 30, 2026 08:41

A newer verdict blocks 6798537 (no independent SHIP at the head).

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (next-review patch-id; carried): SHIP at 6798537

The independent SHIP at 10d8447 carries to this head: the PR's own change (git diff $(git merge-base feat-cmux-next HEAD) HEAD) has the same git patch-id --verbatim (f98bd6f03ad4a8df) at both heads, and no merge between them was resolved by hand. Nothing new to review. A newer BLOCK, or any change to the PR's own diff, ends the carry.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Unowned: the agent that opened this carry of #26587 is gone. Area: auth (native account capture fixtures). It needs the auth area's owner to take it over and land it. The SHIP carried to 6798537 is still its review at the head.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

CloudAuth: keep base's openInForeground for Sign In opens and this PR's
capture-fixture guard (a capture never opens a browser).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-b8ece53aeb76d4388def
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6.1-sol xhigh, next-review): SHIP at d5fb1ff

SHIP at d5fb1ff
Visual verdict: no images; Leo tries the build

  1. No correctness findings.

Follow-ups:

  • [follow-up] No after screenshots were available for this head; visual verification remains with Leo’s build.

@teamleaderleo teamleaderleo removed the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 31, 2026
@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 31, 2026
cmux-bot[bot]
cmux-bot Bot previously approved these changes Oct 31, 2026

@cmux-bot cmux-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmux-bot approves d5fb1ff: an independent review passed this exact head (next-review receipt by teamleaderleo). A push needs a new review; a later BLOCK at this head dismisses this approval.

@cmux-bot
cmux-bot Bot dismissed their stale review October 31, 2026 18:10

A newer verdict blocks 73f8ba7 (no independent SHIP at the head).

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (next-review patch-id; carried): SHIP at 73f8ba7

The independent SHIP at d5fb1ff carries to this head: the PR's own change (git diff $(git merge-base feat-cmux-next HEAD) HEAD) has the same git patch-id --verbatim (c9d8127327a71eb1) at both heads, and no merge between them was resolved by hand. Nothing new to review. A newer BLOCK, or any change to the PR's own diff, ends the carry.

@teamleaderleo teamleaderleo removed the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 31, 2026
@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 31, 2026
@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent October 31, 2026 20:06 Inactive
@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent October 31, 2026 20:06 Inactive
@cmux-bot
cmux-bot Bot merged commit 2ba8429 into feat-cmux-next Oct 31, 2026
171 of 173 checks passed
@cmux-bot
cmux-bot Bot deleted the lane/odd-26587-auth-fixture branch October 31, 2026 20:21
lawrencecchen pushed a commit that referenced this pull request Oct 31, 2026
…uxNextCodeRouter (app_lines +67) (#29655)

merge-batch candidate: the squash merge of #29655 at 6899341
lawrencecchen added a commit that referenced this pull request Oct 31, 2026
…uxNextCodeRouter (app_lines) (#29655)

2ba8429 (#28060, "test(auth): isolate native account capture fixtures")
adds 67 CmuxNextApp Swift lines (AccountsService.swift +60, AppEnvironment
+7) with no exception row; arch-ratchet's app_lines row refuses it alone
(TIP RED, STATUS 2398).

#28060's own provider-side capture code leaves the App for CmuxNextCodeRouter,
which owns every type it uses (ProviderKeyStoring, FileReading,
LocalServerProbing, KeychainProbing, AccountLabelSaltProviding, AccountLabeler,
DetectionEnvironment): ProviderCaptureFixture holds the virtual provider home,
the in-memory key store, the fixed label salt and labeler, the empty
detection inputs (no environment, no file, no Keychain, no loopback server,
no saved key), and the capture's terminal line and page URL.

AccountsService keeps a thin use: it holds one only while the DEBUG-only
authCaptureFixture flag is on (`capture`), and each of #28060's branches
reads it (`capture?.home ?? ...`, `capture?.keys() ?? ...`, `if let capture
{ return capture.detectionEnvironment(...) }`, ...). Behavior is unchanged:
the flag is false in a release build, so `capture` is nil there, as the
removed `#if DEBUG` branches were. AuthCaptureFixtureTests reads the same
names (AppEnvironment.authCaptureFixture, services.accounts.keys,
detectionEnvironment()). CmuxNextApp -53.
teamleaderleo added a commit that referenced this pull request Oct 31, 2026
…ng-scoped keys)

#28060 gave CloudAuth a capture-fixture key-value store (authDefaults); the
integration scopes the cmux.auth.* keys to the staging project for signed
NEXT DEV (authDefaultsKey). Both are kept: the fixture store, with the scoped keys.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-548f18c0a6d1ebb48240

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 88b83092 Deployed Oct 31, 2026 by cmux-bot[bot] via cmux-tui tree preflight #91239
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant