Repository navigation
Fixes #26046 - #26600
Fixes #26046#26600
Conversation
…arked (red, #26046) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d, not every one (#26046) Visiting 400 workspaces kept 400 controllers, layout trees, panes and strips mounted until critical memory pressure (footprint 310 to 868 MiB in the issue's measured run). Past ParkedWorkspaceBudget's capacity the least recently parked workspace leaves, as under critical pressure, and mounts again when shown. The one under a top page and multi-view companions never leave, and the workspace being shown leaves the parked set before the current one parks, so it is never trimmed. 32 is well above the old budget of 8, which made cycling 9 workspaces cold (cx-8w027.5). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…iew, #26046) parkContentForPage parks the shown workspace while content is still set, so the top-page keep rule could not name it; it survived only by being newest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the target through the trim (review, #26046) Taking the target out of parked first left a current controller of the same id (a rebuilt workspace model) parked beside its replacement. The original order is back; park(_:keeping:) keeps the workspace about to show. The test now shows the oldest parked workspace while the set is full. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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); NEW: Shipped in:
|
…ed budget (review, #26046) show() parks the current one while the target is still parked, then takes the target out. Counting the target made a switch to a parked workspace with a full set evict one more and leave 31. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review (correctness-first subagent, three rounds), with resolutions:
Fleet runs of the focused suites at the red and head SHAs are in progress; I'll post the results when they finish. |
|
Evidence at head fecdab6:
|
|
Red confirmed at a24bb02 (the test plus the unwired policy type only). Step The two pure policy tests pass at a24bb02, because the type exists there; only the window test fails, since nothing is wired yet. At head fecdab6 the same command passes all 3 suites (step |
Keeps both: workspace hibernation's releaseParked(_:) and the parked budget. The hibernation design's memory table notes the 32-per-window cap. 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. |
|
Found 7 test failures on Blacksmith runners: Failures
|
|
Head c1ad099 merges feat-cmux-next at 96367c7 (conflict in The merge commit also has:
Every red at c1ad099 is a base red:
Attempt 1 of the two package jobs never ran: the runner hook refused them with "a fleet build is waiting for the host". The focused suites passed at fecdab6 (step |
|
For awareness: a recent fleet suite step for this PR reported success while |
Docked workspaces (window.dockedWorkspaces) widened what counts as on screen beside the shown workspace to WindowState.isOnScreenBeside. The parked budget keeps the same set now: keepsParked uses isOnScreenBeside, so the trim never unloads a visible docked workspace or the stage's workspace, and releaseParked() keeps the base's exact predicate. 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. |
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. |
…o CmuxNextHostedChief (#31218) The arch ratchet's app_lines row was +15 at the feat-cmux-next tip against the last green arch tip 006666a (#26600 +22, #31055 +16, #22953 +15, #31147 +5, #31106 -1, #31182 -42). CmuxNextApp may not grow. ServerReachPlan (which paired servers the app reaches, and the parsers of chief.list, team.hosts.list, `cmux link show` and `cmux link peer list`) holds no app state: it is value types and pure functions over CloudChief (CmuxNextHostedChief) and ServerReach (CmuxNextRemote). It moves as it is into CmuxNextHostedChief with a public API; ServerReachService in the App calls it. CmuxNextHostedChief now depends on CmuxNextRemote (service -> service). Behavior-neutral: the only body change is parseChiefs, which read the chiefs through the App's CloudChiefs.parseList after its guard proved `chiefs` is an array; it now maps that array with CloudChief.parse itself, the same result.
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Fixes #26046
A window in cmux NEXT kept every workspace it had ever shown mounted: the controller, layout tree, panes and strips stayed alive until critical memory pressure. Only the GPU surfaces had a cap (the terminal warm-set LRU). In the issue's measured run, visiting 400 workspaces took the app's footprint from 310 MiB to 868 MiB. It never came back down, because nothing below critical pressure released the parked set.
The original freeze and SSH failure were not reproduced (see the issue comments). This fixes the largest per-workspace cost that was measured.
Change
ParkedWorkspaceBudget(CmuxNextBridge) holds the cap and the eviction rule. A window keeps its 32 most recently shown workspaces parked. Parking one more tears down the least recently parked one, using the sameteardown()the critical-pressure path uses. An evicted workspace mounts again the next time it is shown.park(_:leaving:)) neither counts toward the budget nor leaves.show()keeps its original order (park the current one, then take the target out), so the current controller of a rebuilt same-id model is still torn down.plans/cmux-next/tab-lifecycle.mdand theWarmSetBudgetdoc comment.Trade-off: when you return to an evicted workspace, it mounts cold. Terminals reattach through a daemon replay (the same path as a surface the LRU evicted), and strip and screen-bar scroll reset. This is what critical pressure already did. Page tabs stay, because
closeGoneLocalTabsonly closes panes the live tree no longer lists.Regression test
ParkedWorkspaceBudgetTests:WindowControllervisits 40 one-terminal workspaces and must end with exactly the 32 most recent parked. With the set full, the oldest parked workspace and then the previous one must swap back in warm (same controller). An evicted one must mount again, and the count stays at 32.Command (fleet):
cmux-ci run --class light --script scripts/ci/package-test-lane.sh --ref <sha> --env CMUX_CI_XCODE_APP=/Applications/Xcode_26.6.app --arg=suite --arg=Packages/macOS/CmuxNext --arg=ParkedWorkspaceBudgetTests,ParkedWorkspaceApplyTests,SidebarSameTurnTests276efa027c19a944b7940cbf, result in a follow-up comment. By trace,parked.countis 39, not 32.723b94610cf8d6c7ae63219b. All 3 suites passed: ParkedWorkspaceBudgetTests (3 tests), ParkedWorkspaceApplyTests, SidebarSameTurnTests.Observed / Not run
SidebarMultiViewWindowTestswas skipped because the host has no display. Prepush gate. Four review rounds, the last one SHIP at fecdab6 (findings and fixes in the PR comment). Tagged build26046-fixat fecdab6, fleet job0909f10d4b952feae3af1c5f, published.SidebarMultiViewWindowTests(needs a display). No GUI dogfood of the build yet.Changelog
No capture: no visible UI change; this only changes memory retention.
🤖 Generated with Claude Code