Repository navigation
base red: move #26770's GitHub connection logic into CmuxNextAccounts (tip arch red from 8219b5769870) - #32567
Conversation
…Accounts (tip arch red from 8219b57)
…s into CmuxNextAccounts
… App drops the imports it no longer needs
|
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)
Default changesThis pull request changes 2 defaults at
Signed off on this commit by Merge receipt: merged as Regenerate the snapshot with Shipped in:
|
|
Review (claude-opus-5.5 review subagent): SHIP at 9f300a0 Independent review, correctness first. The PR is a pure move: each moved block is equivalent line by line (the owner-API call, team header, idempotency key, 5xx/408/429 retry vs refusal, reply checks, LinkRouter open; the githubConnect result; the Settings Accounts gesture routing). The lazy var still evaluates Fleet at this head: compile 4038af54fb5e1d866f96108e passed (CmuxNext, app, cmux-tui). GitHubConnectionsTests 5b978e985761487ae9057a8c: "Test run with 19 tests in 1 suite passed". |
|
Swift logic follow-up (tip watcher swift-logic row, STATUS 13027 "SWIFT LOGIC CULPRITS"; lead order). This PR raised
plans/cmux-next/layer-ownership.md says Rust owns every state, list and rule and Swift is the platform shell. Please move the new logic of this PR in a follow-up: to Rust (the crate that owns the area; the owner lists in STATUS 12147-12165 name the target per area), or at least out of the app into its package. If a declaration above is platform code (AppKit, Core Animation, OS calls, strings, tokens, DEBUG tooling), reply here and the table gets a PLATFORM row with your reason instead. The swift-logic row is a report, not a gate: nothing blocks on this comment. |
Summary
The feat-cmux-next tip 152c505 is red in arch-ratchet:
[app_lines] CmuxNextApp Swift lines: +79 (CmuxNextApp +79), 14 allowed by the exceptions this push adds, judged over the last green arch tip 4464796. #28410 brings +14 and its own exception covers it. #26770 (8219b57) brings the other +65.This PR moves the App-side logic of #26770 into
CmuxNextAccounts, which already ownsGitHubConnections. Behavior does not change: the code moves as it is.GitHubConnections+Live.swift(new):signedInScopeandlive(auth:ownerAPI:preview:), the owner-API call (bearer token,x-cmux-team, idempotency key, refusal versus retryable status), and the open throughLinkRouter. They were an extension at the end ofAccountsService.swift.GitHubConnections+Entrypoints.swift(new):connectResult(), theaccounts.githubConnectaction result that wasAccountsHandlers.githubConnectResult;accountsPageState(_:)andrunAccountsPage(_:accounts:), the Settings Accounts page state and gestures (GitHub gestures, thenAccountsPageAction, then the GitHub refresh after refresh, focus or a team switch) that were inline inPageFactory.lazy var githubline inAccountsService, the action bind inAccountsHandlers, and two provider lines inPageFactory.CmuxNextAccountsnow depends onCmuxNextActions(core) andCmuxNextPages(ui), forActionResultValue/ActionWorkFailure,PageErrorandLinkRouter. There is no cycle, and no layer row goes up. The comment that lists the package graph is updated to match.GitHubConnectionsTestscallsmodel.connectResult()in place ofAccountsHandlers.githubConnectResult(model). The test stays inCmuxNextAppTests(its other subjects did not move).No accounts owner is listed in plans/cmux-next/OWNERS.md.
Testing
Arch ratchet, run as tip-watcher.py runs it (
python3 -I scripts/cmux-next/arch-ratchet.py --repo WT --base B --head H):app_lines +79, 14 allowed: push refusedapp_lines -18(with the 14 of #28410's exception counted): no architecture count risesapp_lines +65: push refusedapp_lines -65: no architecture count rises--auditat the head:app_lines158008 (tip 158073, last green 158026);blocking_allow_escapes1 andobserver_sites354, the same as the tip and the last green tip. No other row goes up.python3 scripts/cmux-next/prepush-gate.py: no new violations.risk_tier.py classify: normal.Fleet, at the head:
cmux-ci compile-check --app --package CmuxNext --recipe-version 2, job 4038af54fb5e1d866f96108e: passed (CmuxNext 261 s, app 34 s, cmux-tui 14 s)scripts/ci/package-test-lane.sh suite Packages/macOS/CmuxNext GitHubConnectionsTests, job 5b978e985761487ae9057a8c (class light, aws-m4pro-9): "Test run with 19 tests in 1 suite passed", exit 0Observed / Not run
Observed: the arch ratchet ranges and the audit above, the prepush gate, the risk classifier, and the fleet compile and test jobs above.
Not run: a tagged build, and a live GitHub connect from Settings. The change moves code and does not change behavior, so the fleet compile and the existing GitHubConnectionsTests are the evidence.
Changelog
none
Proof
No capture: the code moves out of the App, and the UI does not change.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Moves #26770's GitHub connection logic from the App into
CmuxNextAccounts, fixing the architecture-ratchet violation that made thefeat-cmux-nexttip red. Behavior does not change; the code moves as-is.GitHubConnections+Live.swiftandGitHubConnections+Entrypoints.swifthold the live connection factory, theaccounts.githubConnectresult, and the Settings Accounts page state and gestures.lazy var githubline, one action bind, and two provider lines inPageFactory.CmuxNextAccountsnow depends onCmuxNextActionsandCmuxNextPages; no cycles and no layer counts rise.GitHubConnectionsTestscallsmodel.connectResult()and stays inCmuxNextAppTests.Written for commit 9f300a0. Summary will update on new commits.