Skip to content

base red: a no-folder first Cloud send starts in a fresh ~/chats folder (CloudAgentChatTests, after #31186) - #33096

Merged
lawrencecchen merged 1 commit into
feat-cmux-nextfrom
base-red-cloud-chat-folder
Nov 3, 2026
Merged

lawrencecchen merged 1 commit into
feat-cmux-nextfrom
base-red-cloud-chat-folder

Conversation

@lawrencecchen

@lawrencecchen lawrencecchen commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Base red on feat-cmux-next: CmuxNextAppTests.CloudAgentChatTests.aFirstSendWithNoFolderStartsInTheWorkspacesFolderOnTheMachine fails at CloudAgentChatTests.swift:92/94: the first send returns a session, not agent_session.untrusted_folder.

Cause: #31186 (796b77a) changed the product on purpose (Leo: a no-project Cloud chat starts at once in its own fresh chat). On a Cloud owner link the app sends no folder (AgentTabs+RemoteStart.swift:68), and the machine's daemon makes ~/chats/<chat> there, which needs no trust question. #31186 updated the unit test (AgentTabRemoteStartTests.aModernCloudDaemonReceivesNoFolderForRustToChoose) but not this live two-daemon test, which still asked for the old workspace-folder start.

Fix: the test (renamed aFirstSendWithNoFolderStartsInAFreshChatFolderOnTheMachine) states the new contract end to end with real daemons: the first send starts the chat with no error; the session runs in the machine's acpmux; its folder, as cmux acp --json ls lists it, is under the machine's HOME/chats/, exists, and is not the workspace's folder; the machine's store binds the session to the tab. The explicit-folder trust path stays covered by aNewChatInACloudWorkspaceRunsItsAgentOnTheMachine.

Owner: no OWNERS.md row covers the Cloud agent start; #31186 is teamleaderleo's.

Testing

Command: cmux-ci run --class light --display --script scripts/ci/package-test-lane.sh --ref SHA --arg=suite --arg=Packages/macOS/CmuxNext --arg=CmuxNextAppTests.CloudAgentChatTests (5 runs in one step).

  • Base (feat 73eaec7 on cmuxs-Mac-mini and cmux11s): fails at lines 92 and 94.
  • Tip: job a554671b75a6b853405d5c5d at feat 11dfe91 (cmux8s) is red on the first two of five rounds for this suite.
  • Head: job 9455dac2cf6381e6dcf9963b (cmux11s) at d5fb139: passed 5 of 5. An earlier job, c314a47f5dbec47d7e3f3344 (cmux9s), passed 4 of 4 before its host lost the lease.

Each job's lane summary is red for a reason outside this change: on these hosts the target's XCTest pass aborts (signal 6, after Contacts/AddressBook CoreData store errors) or hangs ~680-900 s with no test in flight, after the Swift Testing pass. The Swift Testing results below are the suite's own.

Observed / Not run

Observed: the fleet runs above. python3 scripts/cmux-next/prepush-gate.py passes.
Not run: no app build; test-only change.

Changelog

none

… starts in a fresh ~/chats folder there

aFirstSendWithNoFolderStartsInTheWorkspacesFolderOnTheMachine failed at
CloudAgentChatTests.swift:92/94: the first send came back with a session,
not agent_session.untrusted_folder. #31186 (796b77a) changed the
product on purpose (Leo: a no-project Cloud chat starts at once in its own
fresh chat): on a Cloud owner link the app sends no folder
(AgentTabs+RemoteStart.swift:68), and the machine's daemon makes
~/chats/<chat> there (acpmux remote_guard cloud_chat_folder), which needs
no trust question. #31186 updated the unit test
(AgentTabRemoteStartTests.aModernCloudDaemonReceivesNoFolderForRustToChoose)
but not this live two-daemon test, which still asked for the old
workspace-folder start.

The test now states the new contract end to end, with real daemons: the
first send starts the chat with no error; the session runs in the machine's
acpmux; its folder, as 'cmux acp --json ls' lists it, is under the
machine's HOME/chats/, exists, and is not the workspace's folder; the
machine's store binds the session to the tab. The explicit-folder trust
path stays covered by aNewChatInACloudWorkspaceRunsItsAgentOnTheMachine.

Culprit: 796b77a (#31186).
Red: fleet job 2bf90b6c18ca136f3fb6c15d at feat 11dfe91.
@lawrencecchen lawrencecchen added the risk:low Risk tier (docs/ci/risk-tiers.md) label Nov 3, 2026
@blacksmith-sh

blacksmith-sh Bot commented Nov 3, 2026

Copy link
Copy Markdown

Found 6 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmpel63qq3m/summary-missing.json (live):/summary-missing.json (live): View Logs
/tmp/tmpisxahtvb/summary-fail.json (live):/summary-fail.json (live): View Logs
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows/
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows
View Logs
[new_workspaces] the window draws no frames/[new_workspaces] the window draws no frames View Logs
[tabs] debug.tab_switch timed 0 of 40 switches/
[tabs] debug.tab_switch timed 0 of 40 switches
View Logs
[tabs] the window draws no frames/[tabs] the window draws no frames View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

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

Review d5fb139: 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=pr33096 -f ref=base-red-cloud-chat-folder -f platform=macos -f backend_mode=local

red: cmux-next checks (god files, concurrency, crash safety, l10n); no finished base run on 6b31a88 to compare; do not merge until green; see lane-rules

Shipped in:

@lawrencecchen

Copy link
Copy Markdown
Contributor Author

Review (independent review subagent, Opus 5.5 claude-opus-5-5, read-only): SHIP at d5fb139

  • Cloud no-folder starts use fresh chat folders #31186 (796b77a) is intended behavior. A Cloud chat that names no folder starts at once in a fresh chat folder, with no trust question. The product code agrees (AgentTabs+RemoteStart.swift:66-73).
  • The new test checks more than before:
    • The first send succeeds with no error.
    • The session list is exactly [session] (stronger than a count).
    • The folder is under the machine's HOME/chats/, is not the workspace folder, and exists.
    • The session is bound to the tab (new).
  • The trust flow with an explicit folder is still tested in aNewChatInACloudWorkspaceRunsItsAgentOnTheMachine. A regression to the old path would get untrusted_folder and fail this test.
  • Global state: the machine's HOME is under a /private/tmp/cn-chat-* folder that a defer removes. ordersWindowsIn = false is unchanged.
  • Fleet: CloudAgentChatTests passed 5 of 5 in job 9455dac2cf63. The lane is red overall only because of the known fleet XCTest-stage AddressBook crash.

Nit: "fresh" is checked only as "under HOME/chats/ and exists". Also check that the folder's last part is the chat's ID, or that a second chat gets a different folder.

@lawrencecchen
lawrencecchen marked this pull request as ready for review November 3, 2026 07:37
@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 Nov 3, 2026
@lawrencecchen

Copy link
Copy Markdown
Contributor Author

Correction to my review receipt above: the lanes were red overall because of the test-bundle run-loop guard, which held the main thread in xctest. It was not the macOS AddressBook store; that was only a symptom. #33023 and #33013 fixed it on feat (ecfbb44). This head is older than that fix, so its lane still shows the XCTest stage red. The suite's own result (passes at this head, fails at the tip) is unchanged. No action is needed on this PR.

@lawrencecchen
lawrencecchen merged commit e3ff4b6 into feat-cmux-next Nov 3, 2026
303 of 326 checks passed
@lawrencecchen
lawrencecchen deleted the base-red-cloud-chat-folder branch November 3, 2026 08:02

This branch was previously deployed

1 inactive deployment
ci-routing-agent — d5fb1391 Deployed Nov 3, 2026 by lawrencecchen via namespace autofix #13101
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:low Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant