Repository navigation
base red: arch app_lines, move #30002's and #31033's app logic into their packages - #31456
Conversation
…heir packages The arch ratchet refused feat-cmux-next's tip with [app_lines] CmuxNextApp +282 against the last green arch tip cf0a547. This moves logic that holds no app state out of CmuxNextApp, behavior-neutral, and leaves the wiring in the App: - #31033 (spare page adopts an existing chat) to CmuxNextAgentPane: the adoption decision (AgentPaneSpareAdoption), the spare's readiness (AgentPaneSpareReadiness, AgentPaneModel.servesExistingChat), the refusal reason (AgentPaneModel.spareRefusal), the trace outcome (AgentPaneSpareOutcome), the pool's slot (AgentPaneSpareSlot) and refill policy (AgentPaneSpareRefill). - #30002 (Cloud chat repick) to CmuxNextAgentPane, next to AgentPaneCloudStart and AgentPaneCloudRepick: the started-chat record (AgentPaneCloudStarted) and the picked-machine match (AgentPaneCloudRepick.machineID(in:)). - #31363: CommandHistory exposes its TerminalCommandSuggestionStore (CmuxNextHistory) instead of four forwarding methods. - #31316: the feed handoff driver and its wire shape (FeedHandoffDriver, FeedHandoffWire) to CmuxNextAgentPane/Approvals, next to FeedHandoffPolicy, which it already depends on. The pure tests move with their code (AgentPaneSpareAdoptionTests, AgentPaneCloudStartTests). No new package edge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
|
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)
red: cmux-next checks (god files, concurrency, crash safety, l10n); no finished base run on 1d6ff66 to compare; do not merge until green; see lane-rules Shipped in:
The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/41367464867 at 0d19fe6 failed: cmux-next daemon tests. |
|
Review (subagent, correctness first): SHIP at c5de0af
|
|
Fleet suites: all 8 passed (job f7b2e07dab01043c87e85830, aws-m4pro-3) at 9878749, whose diff to this head c5de0af is whitespace in one call of AgentTabs.swift only (the undone line join): AgentPaneSpareAdoptionTests 2, AgentPaneCloudStartTests 12, SpareSessionAdoptionTests 5, CloudStartChatMachineTests 10, IncognitoFeedHandoffTests 6, TerminalCommandSuggestionTests 3, NativeNewTabSpareTests 2, NewTabPrewarmStallTests 2 tests executed. Compile at 9878749: job ec567ba5179ef3d3feedea01 (CmuxNext, app, cmux-tui passed). |
|
Found 8 test failures on Blacksmith runners: Failures
|
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Fixes #30002
Fixes #31033
Summary
Replaces #31441, closed: this is the same tree as #31441's head 9878749 except that one call in
AgentTabs.swiftkeeps its four lines. #31441 had joined it to three, a line join the lead asked to undo. The VM's git guard refuses a force push, so the squashed commit goes on a new branch.Base red (priority zero): the arch ratchet refuses the feat-cmux-next tip (2640ee3) with
[app_lines] CmuxNextApp +282against the last green arch tip cf0a547. The two largest contributors are #30002 (Cloud chat repick, +131) and #31033 (an existing chat adopts the prewarmed page, +127); then #31353 (+29), #31363 (+22) and #31316 (+21).This change moves logic that holds no app state out of CmuxNextApp into the package that owns its domain. The App calls the same logic through a public API, and only wiring stays in the App. Behavior does not change. No new package edge and no new target.
servesExistingChat), the refusal reason, the trace outcome, the pool's slot and refill policyAgentTabs+SpareSession.swift(deleted),AgentTabs+Lifecycle.swift,AgentTabs.swift,NewTab/NewTabSparePool.swiftCmuxNextAgentPane/AgentPaneSpareAdoption.swift(AgentPaneSpareAdoption,AgentPaneSpareReadiness,AgentPaneModel.servesExistingChat,AgentPaneModel.spareRefusal,AgentPaneSpareOutcome,AgentPaneSpareSlot,AgentPaneSpareRefill)Cloud/CloudStartChat+Repick.swiftCmuxNextAgentPane/AgentPaneCloudRepick+Machine.swift(AgentPaneCloudStarted,AgentPaneCloudRepick.machineID(in:)), next toAgentPaneCloudStartandAgentPaneCloudRepickTerminalCommandSuggestionStoreHistory/CommandHistory.swiftCommandHistory.suggestionsexposes theCmuxNextHistorystoreFeed/FeedHandoffDriver.swift,Feed/FeedHandoffWire.swiftCmuxNextAgentPane/Approvals/, next toFeedHandoffPolicy, which the driver already used ("Pure, so the driver decides the same way")Total:
app_lines -257against cf0a547 (-539 against the tip).What stays in the App, and why:
CloudStartChat.repick, its runner,Origin) usesAppServicesat every step: the Cloud refusal, the machine list, the toasts, the CLI pin, closing the old tab on its daemon and running the start again. Moving it would need a seam as large as the code.Originis that flow's parameter object, and itscloseclosure is App wiring.adoptSpare,takeConnectedSpareand theview(for:)hook are tab store and pool wiring.CloudServicestate (a second install identity) and its sign-in and sign-out lifecycle, with no logic free of app state. cmux NEXT incognito: withdraw a Feed item whose workspace moved into an incognito window during the send #31316's driver moves instead.The pure tests move with their code:
whichSpareServesAChatandtheDecisiontoAgentPaneSpareAdoptionTests, andaRepickFindsThePickedMachineByIdOrByNametoAgentPaneCloudStartTests. The tests that drive the tab store end to end stay inSpareSessionAdoptionTests.ChatOpenTrace.swift(owner: Performance Lead) changes one comment: it named the oldNewTabSparePool.servesChat.Testing
python3 scripts/cmux-next/arch-ratchet.py --base cf0a547fc499at this head:app_lines -257 (CmuxNextApp -257),no architecture count rises.python3 scripts/cmux-next/prepush-gate.py:no new violations(only warning: the owner note forChatOpenTrace.swift)../scripts/lint-ios-package-conventions.sh --namespace-fixon the changed files: no namespace findings and no fixes. Its one ERROR is the existingChatOpenTrace.sharedsingleton, base debt in a file where this change edits only a comment.python3 scripts/ci/risk_tier.py classify:normal.AgentTabs.swift): jobec567ba5179ef3d3feedea01, CmuxNext passed (333 s), app passed (51 s), cmux-tui passed (12 s).f7b2e07dab01043c87e85830on aws-m4pro-3, all 8 passed, every one with tests executed: AgentPaneSpareAdoptionTests (2 tests), AgentPaneCloudStartTests (12), SpareSessionAdoptionTests (5), CloudStartChatMachineTests (10), IncognitoFeedHandoffTests (6), TerminalCommandSuggestionTests (3), NativeNewTabSpareTests (2), NewTabPrewarmStallTests (2).Observed / Not run
git diff 9878749ebfe2 c5de0af806ff). No build or test on the VM (fleet only). There is no tagged build: this change is behavior-neutral.Changelog
none
Takes back #31363: only its four forwarding methods in CommandHistory.swift; CommandHistory now exposes its suggestion store directly, so callers reach the same store with no behavior change (an app_lines move, not a revert of #31363's feature).