Repository navigation
cmux NEXT: the Chief's cmux-tui owner hands off to this build once an update replaced it - #28314
Conversation
…nary Red before the fix: there is no handsOffForUpdate and DaemonIdentity has no cliPath (the owner was never handed off, so it ran the old build after every update). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-0208360f23a3700be142
… update replaced it The Chief home's conversation owner was never handed off to the connecting binary, so after an update it ran the old build until it exited on its own. From what the owner says of itself in identify (cli_path, build_commit; DaemonIdentity now decodes cli_path), the app hands it off once it is idle (IdleOwnerRestart over OwnerIdleProbe, the install-key restart's path) with DaemonLauncher.handOffForUpdate when its binary is gone, or is this app's own bundled binary's path with another build (an update wrote this build over it). An owner run by another install's existing binary is still kept, so two builds sharing NIGHTLY's Chief home never restart each other's owner. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-0208360f23a3700be142
|
@lawrencecchen for awareness: this changes ChiefConversationOwner (you have most of its recent commits). The Chief owner now hands off to the bundled build once an update replaced its binary. The app decides from the owner's own identify |
|
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)
web and size checks: green Default changesThis pull request changes 1 default at
Signed off on this commit by Merge receipt: merged as Regenerate the snapshot with Shipped in:
|
|
Found 6 test failures on Blacksmith runners: Failures
|
…ched A real daemon: IdleOwnerRestart over OwnerIdleProbe with DaemonLauncher.handOffForUpdate (ChiefConversationOwner.restartIfReplaced's restart) waits while a chief-chat client is attached, and hands the owner off once it detaches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-0208360f23a3700be142
Review of #28314 (P2): the real-daemon test built IdleOwnerRestart around handOffForUpdate directly, so it would pass with restartIfReplaced always nil. ChiefOwnerReplacedHandoffLiveTests (CmuxNextHomeEngineTests) now runs a real owner through restartIfReplaced: as it is it is never handed off; with its cli_path gone it waits under an open chief-chat client and hands off once the chat detaches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-0208360f23a3700be142
It uses the daemon's internal resourceRequest and ResourceRequestEnvelope, as OwnerRestartWaitsForChatTests does from inside the daemon's own tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-0208360f23a3700be142
|
Fresh-home launch of
Screenshot withheld: the pr-media privacy check or upload refused it.
|
|
Owned by an agent session · took over from an earlier session · session |
The suite's enabled-if trait named ChiefOwnerReplacedHandoffLiveTests.binary, the type it decorates, which Swift rejects as a circular reference resolving the attached Suite macro. The binary is now a file-level private value; the test itself is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-ede8863ae66def7a83aa
|
Fresh-home launch of
Screenshot withheld: the pr-media privacy check or upload refused it.
|
|
Review (codex gpt-6-astra high, next-review): SHIP at 41f7eea No blocking findings. |
|
Fresh-home launch of
Screenshot withheld: the pr-media privacy check or upload refused it.
|
|
Review (next-review patch-id; carried): SHIP at 1a4b580 The independent SHIP at bb393ca carries to this head: the PR's own change ( |
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. |
|
Review (next-review patch-id; carried): SHIP at bbdf2cc The independent SHIP at bb393ca carries to this head: the PR's own change ( |
|
Review (next-review patch-id; carried): SHIP at 3651938 The independent SHIP at bb393ca carries to this head: the PR's own change ( |
|
Review (subagent claude-opus-5-5 medium, post-merge): SHIP at d606b8b This PR merged with no review at its head, so this is an after-the-fact review. No blocking findings. Follow-ups:
|
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Leo: "HOW THE F*** IS THIS STILL NOT FING CHANGED IT'S LITERALLY "STOP SHOWING FING NONSENSE ON LOAD" + "JUST FING REMOVE THE FING OLD DAMEMONS WHAT THE F*** ARE YOU GUYS FU CKING DOING""
Problem
The Chief home's cmux-tui conversation owner (
ChiefConversationOwner) was never handed off to the connecting binary (its doc said so on purpose). So after an update it kept running the old build until it exited on its own. The reason it was never handed off: two builds that share NIGHTLY's Chief home (or one set byCMUX_NEXT_CHIEF_HOME) would each restart the other's owner on every launch.Change
The owner is now handed off when its binary is no live build's own. The app decides from what the owner reports about itself in
identify(cli_path,daemon-build-v1;build_commit); cmux-next never inspects another process:cli_path)daemon-build-v1), or same build, or this app runs an externalCMUX_NEXT_TUI_BINThe handoff takes the same path as the DEV install-key restart:
IdleOwnerRestartoverOwnerIdleProbe: only while no Chief turn, other app, page orcmux chiefchat is connected. A busy owner hands off on the event that ends the busy state.DaemonLauncher.handOffForUpdatesendsshutdown-daemonwith the owner's pid and generation, and the nextensurestarts this build's owner on the same home and state.DaemonIdentitynow decodescli_path, keeping it only when the path is absolute. The decision and its file checks run off the main actor, throughFileManager.checked.Tests
ChiefOwnerReplacedHandoffLiveTests(CmuxNextHomeEngineTests, a real owner) drivesChiefConversationOwner.restartIfReplaceditself:cli_pathgone → a restart that waits while acmux chiefchat is attached, then hands off once the chat detaches (new pid, same registry id).ChiefOwnerUpdateHandoffTests(CmuxNextHomeEngineTests) covers:cli_path, or an external binary → kept;identifycarriescli_path, and a relative one is dropped.The test commit
0bb04cecomes first and fails to compile without the fix.Observed / Not run
cmux-ci/fresh-homestatus is posted at that commit.build_commitec3b144), on the same sessioncmux-chief-…with a new pid. The old pid was gone within about 22 s, including B's roughly 6 s startup. No stall.chiefs.sqlite3were kept.@testableimport fix). The handoff check isn't repeated for it. A fresh-home rerun at the final head has been requested so the Chief rule's status covers the exact head.No capture: no visible UI change. The handoff runs in the background, and the fresh-home launch above shows that Home and the Chief still render.
Changelog
risk:normal. This touches the Chief's conversation owner: Chief landing rules apply (independent review, every failing test compared by name with base, a fresh-home launch on a fleet Mac, area owner asked to review).
Agent session: agent session
🤖 Generated with Claude Code