Skip to content

base red: Takes back #28060: the provider capture fixture moves to CmuxNextCodeRouter (app_lines +67) - #29655

Merged
lawrencecchen merged 1 commit into
feat-cmux-nextfrom
base-red/accounts-capture-fixture
Oct 31, 2026
Merged

lawrencecchen merged 1 commit into
feat-cmux-nextfrom
base-red/accounts-capture-fixture

Conversation

@lawrencecchen

@lawrencecchen lawrencecchen commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Base red, priority zero (TIP RED, STATUS 2398). Since the last green arch tip 71f41a0, the repo rule (arch-ratchet.py --base <c>^ --head <c>) refuses two commits:

The current tip 2fed73b over 71f41a0 is +73, refused.

Takes back #28060: its own provider-side capture fixture code leaves CmuxNextApp, with the same behavior.

  • ProviderCaptureFixture (new, in CmuxNextCodeRouter, which owns every type it uses) 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);
    • the capture's terminal line and page URL.
  • AccountsService keeps a thin use. It holds one fixture only while the DEBUG-only authCaptureFixture flag is on (capture), and each of test(auth): isolate native account capture fixtures (carries #26587) #28060's branches reads it: capture?.home ?? ..., capture?.keys() ?? ..., if let capture { return capture.detectionEnvironment(...) }, capture?.terminalLine ?? line, and so on.
  • The flag is false in a release build, so capture is nil there, as the removed #if DEBUG branches were. The in-memory key store type now compiles in release too, but nothing makes one there.
  • AppEnvironment.authCaptureFixture (test(auth): isolate native account capture fixtures (carries #26587) #28060's other 7 lines) stays: it is the flag.
  • AuthCaptureFixtureTests reads the same names: AppEnvironment.authCaptureFixture, services.accounts.keys, detectionEnvironment().

CmuxNextApp -53.

Testing

The watcher's command (arch-ratchet.py --base 71f41a07dd39, row app_lines):

defaults_guard.py check: exit 0. check-app-size.sh --base origin/feat-cmux-next: ok. The namespace lint: OK. prepush-gate.py: no new violations.

Observed / Not run

Observed:

Changelog

none

Proof

No capture: no visible change; fixture code moves between targets.

…uxNextCodeRouter (app_lines)

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.
@lawrencecchen lawrencecchen added the risk:low Risk tier (docs/ci/risk-tiers.md) label Oct 31, 2026
@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

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

Review 6899341: 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=pr29655 -f ref=base-red/accounts-capture-fixture -f platform=macos -f backend_mode=local

Shipped in:

@github-actions github-actions Bot added risk:normal Risk tier (docs/ci/risk-tiers.md) and removed risk:low Risk tier (docs/ci/risk-tiers.md) labels Oct 31, 2026
@lawrencecchen

Copy link
Copy Markdown
Contributor Author

Review (claude-review-subagent): SHIP at 6899341

Correctness first: the behavior is the same as the base (HEAD~1 = 2fed73b) on every branch.

  • init: fixtureHome is the same /cmux-auth-capture/providers (isDirectory) when the flag is on, and otherwise the same env parse. storeID is "<bundle>.fixture" in both, because fixtureHome is non-nil. keys is an in-memory Mutex store (the same four methods). labels uses a salt provider with the same bytes, "cmux-auth-capture-label-salt".
  • detectionEnvironment(): every field is the same. Fields: home = the same URL; environment [:]; files: nil / false; keychain: hasGenericPassword false, and genericPassword uses the protocol default nil, as the App's NoKeychain does; servers: false; labeler: labeler(), which returns capture.labeler (the same salt); savedKeys []; now: default. The early return also skips the Task.detached keys read, as saved = [] did.
  • labeler(): the same fixed salt. The salt-failure path is skipped in both.
  • runInTerminal / openPage: the literals are byte-identical (\\n escaping kept). Both use /dev/null.
  • Release: AppEnvironment.current sets authCaptureFixture = false under #else. Its only other construction is in the #if DEBUG tests. So capture is nil in a release build. The old labels branch had no DEBUG gate, but it read the same flag, so it is still equivalent.

Compile (read only, no local Swift build):

  • CodeRouter already uses import CmuxNextCompat + Mutex (CodexAccountIdentity), so this adds no new package edge. public import Foundation covers the public URL / Data surface.
  • All five private types conform to public CodeRouter protocols. AccountLabeler(salt:) is public and Sendable. DetectionEnvironment.init is public.
  • capture?.keys() ?? KeychainProviderKeyStore(...) unifies to any ProviderKeyStoring (the stored type is let keys: any ProviderKeyStoring). capture?.labelSalt ?? KeychainAccountLabelSalt(...) unifies to the any AccountLabelSaltProviding parameter.
  • The App file already has import CmuxNextCodeRouter. The private NoKeychain in each module does not collide.
  • AuthCaptureFixtureTests uses the same names and keeps the same expectations.

Gates:

  • arch-ratchet --base HEAD~1 --head HEAD: exit 0, app_lines -53, no count rises.
  • defaults_guard.py check: exit 0.
  • lint-ios-package-conventions.sh --files-from: OK. Its one WARN is the base line, AccountsService:70.
  • Layer gate: Package.swift is unchanged and arch-ratchet reports no new edges.

PR body: the title starts with base red: and the body has Takes back #28060: .... The PR has risk:normal.

CI at review time: the fleet compile and the swift test were pending. Run 41239502362 ("linux-preflight", "ci-status" and others) was cancelled (superseded or concurrency). It is not a red from this PR.

Nits (non-blocking):

  • ProviderCaptureFixture / MemoryKeyStore now compile in release (unreachable). In the base, 3 of the 5 fixture types already compiled in release, so this adds no new debt in kind.
  • The salt literal is written twice (labeler and FixedSalt). The base also wrote it twice.
  • import CmuxNextCompat in AccountsService.swift may now be unused.

Not run: Swift compile and tests (fleet only, per the repo rules).

@lawrencecchen

Copy link
Copy Markdown
Contributor Author

Fleet evidence at 6899341: compile with tests job 9337528bdf2c3ad00502f8b7 (CmuxNext, app, cmux-tui passed). AuthCaptureFixtureTests 3/3 passed (step d0d23ef4b4a03d5c3711c2df, aws-m4pro-6).

@lawrencecchen lawrencecchen added the ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds label Oct 31, 2026
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
lawrencecchen merged commit 1092eae into feat-cmux-next Oct 31, 2026
234 of 264 checks passed
@lawrencecchen
lawrencecchen deleted the base-red/accounts-capture-fixture branch October 31, 2026 21:02

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 6899341e Deployed Oct 31, 2026 by lawrencecchen via wait for same-key tree publisher #91356
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant