Skip to content

Cloud start: a copy of a folder this Mac trusts is trusted on the machine - #31106

Merged
cmux-bot[bot] merged 9 commits into
feat-cmux-nextfrom
cloud-start-carry-trust
Nov 1, 2026
Merged

cmux-bot[bot] merged 9 commits into
feat-cmux-nextfrom
cloud-start-carry-trust

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

What

A Cloud start copies the person's folder to their machine and opens the chat there. The machine's acpmux had no trust answer for the copy, so the chat showed "Trust the cloud-proof-2025f5 repo?". The first message sat in the composer and was never sent, even though the person had sent it from a folder this Mac trusts.

Evidence: a DEV capture of build ff3f8c9 on 2026-11-01, Cloud fixture, existing machine "cloud-chats". For 5 minutes after the send, debug.surfaces showed the machine's agent pane with "kind": "agent", "phase": "restoring". The still shows the trust card ("Not now: The agent won't run here until you trust it.") above the unsent message.

Policy change: this narrows cx-1bhjj

Under cx-1bhjj, only the person's own click on a machine trusts a folder there. With this PR, the person's existing trust answer on this Mac also counts for their own copy of that same folder, made by this start, on their own Cloud machine. Nothing else changes:

  • Only the copied folder. The answer is recorded for the chat's folder inside the copy this start made. No other folder on the machine gets it.
  • Only when this Mac already trusts it. "Trusts" means this Mac's acpmux reads the chat's folder as level: "trusted" (the same acp.trust.get read its own pane uses). That covers the person's decision, their auto-trust rules, or the agents' own levels.
    • An unknown, untrusted or unreadable answer still asks on the machine.
    • So does a run with no --acpmux-home given.
  • Only on the caller's own machine. The call is agent-session-trust on the chat's tab and is sent only on the link's owner answer (vm_kind: "owner"). The machine daemon's own checks still apply: the machine kind gate, its own agent tab, and the home-folder rule.
  • Not a teammate's or SSH machine. Those never get it: there is no ownerLink, so nothing is sent.

How

  • Rust (cmux link start-chat copy):
    • New --acpmux-home H flag.
    • A successful copy now answers source_trusted, read from that acpmux home's trust record by acpmux::trust::get for the chat's folder (local plus subpath).
    • A failed copy answers nothing.
    • The App passes its own acpmux home (QuitAgents.environment), so a DEV build reads its own record.
  • Swift package (CmuxNextDaemon): new AgentSessionAttachClient.trustCopiedFolder. It sends agent-session-trust at level trusted only when sourceTrusted is true and an owner link exists. A failure is quiet: the page then asks as before.
  • App (CloudStartChat.open): calls it after the tab exists and before the workspace is shown.
    • CmuxNextApp lines are unchanged (+17/−17; arch-ratchet: "no architecture count rises").

Tests

  • New Rust test a_copy_answers_whether_this_macs_acpmux_trusts_the_chats_folder. It covers:
    • no answer, trusted, untrusted and unreadable records;
    • the subpath folder;
    • no acpmux home given;
    • a failed copy answering no trust.
  • Run: cmux-ci test -- cargo test -p cmux-tui --lib link::start_chat_cli. Fleet app compile: cmux-ci compile-check --app at the head.

Related: #31087 (the second copy after a machine update uses the machine's new link socket) touches the same CloudStartChat lines.

Agent session: agent session

🤖 Generated with Claude Code


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


Summary by cubic

Fixes Cloud start so a folder this Mac trusts no longer prompts to trust its copy on the person's own Cloud machine. This narrows cx-1bhjj: the person's existing trust answer on this Mac also counts for their own copy of the same folder on their own Cloud machine, so their first message is no longer held behind a second prompt.

How it works

  • cmux link start-chat copy takes --acpmux-home and answers source_trusted, read from that acpmux home's trust record the same way acp.trust.get reads it.
  • The App records trusted for the copied folder on the machine (agent-session-trust) before the chat shows, only when source_trusted is true and an owner link exists; failures stay quiet and the page asks as before.
  • A failed copy answers no trust, and a copy with no --acpmux-home never answers trusted.
  • Only the copied folder on the caller's own Cloud machine gets this; unknown, untrusted, or unreadable answers still ask there, and teammate or SSH machines are never touched.
  • Tests cover trusted, untrusted, unknown, and unreadable records, the subpath folder, a missing acpmux home, and a failed copy.

Written for commit d600940. Summary will update on new commits.

View guided diff Turn on auto-fix

…hine

A send to Cloud from a folder the person trusts opened its copy on the machine
behind "Trust the cloud-proof repo?", and the first message never went
(capture at ff3f8c9, 2026-11-01).

`cmux link start-chat copy --acpmux-home H` now answers `source_trusted`: this
Mac's acpmux reads the chat's folder trusted (acp.trust.get's level). The App
then records `trusted` for the copy on the person's own Cloud machine
(agent-session-trust, owner link only) before the chat shows. An unknown or
untrusted folder is still asked about there. This narrows cx-1bhjj: the
person's answer on this Mac counts for their own copy of the same folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

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

Review 4945d28: 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=pr31106 -f ref=cloud-start-carry-trust -f platform=macos -f backend_mode=local

web and size checks: green

Shipped in:

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Nov 1, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex, router-review): SHIP at d9f8208

Reviewer: codex gpt-6.1-sol xhigh, fast tier.

SHIP at d9f8208

Visual verdict: no images; Leo tries the build

No actionable findings. Static review completed; test tools were unavailable in the box.

Follow-ups: none

teamleaderleo and others added 2 commits November 1, 2026 08:06
…-carry-trust

# Conflicts:
#	Packages/macOS/CmuxNext/Sources/CmuxNextApp/Cloud/CloudStartChat.swift
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex, router-review): SHIP at 6beed07

Reviewer: codex gpt-6-astra high, fast tier.

SHIP at 6beed07

Visual verdict: no images; Leo tries the build

No findings.

Follow-ups: none

@cursor

cursor Bot commented Nov 1, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot 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.

@blacksmith-sh

blacksmith-sh Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Found 2 test failures on Blacksmith runners:

Failures

Test View Logs
test_runtime_added_app_capabilities_are_runtime_only (main.StaticCapabilityRuntimeO
nlyTests.test_runtime_added_app_capabilities_are_runtime_only)/
test_runtime_added_app_capabilities_are_runtime_only (main.StaticCapabilityRuntimeO
nlyTests.test_runtime_added_app_capabilities_are_runtime_only)
View Logs
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)/
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)
View Logs

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

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex, router-review): SHIP at 272f612

Reviewer: codex gpt-6-astra high, fast tier.

SHIP at 272f612

Visual verdict: no images; Leo tries the build

No correctness findings. Focused Rust tests could not run because cargo is unavailable in this box.

Follow-ups: none

@cmux-bot cmux-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmux-bot approves 272f612: an independent review passed this exact head (router-review receipt by teamleaderleo). A push needs a new review; a later BLOCK at this head dismisses this approval.

teamleaderleo and others added 2 commits November 1, 2026 08:38
… source lines flat

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
…-carry-trust

# Conflicts:
#	Packages/macOS/CmuxNext/Sources/CmuxNextCloud/Move/CloudMoveCLI.swift
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex, router-review): SHIP at c865960

Reviewer: codex gpt-6-astra high, fast tier.

SHIP at c865960

Visual verdict: no images; Leo tries the build

No correctness findings.

Follow-ups: none

@cmux-bot cmux-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmux-bot approves c865960: an independent review passed this exact head (router-review receipt by teamleaderleo). A push needs a new review; a later BLOCK at this head dismisses this approval.

teamleaderleo and others added 2 commits November 1, 2026 09:15
…-carry-trust

# Conflicts:
#	Packages/macOS/CmuxNext/Sources/CmuxNextApp/Cloud/CloudStartChat.swift
@cursor

cursor Bot commented Nov 1, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot 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.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (independent Codex gpt-6.1-sol, high, via the review router; full diff from merge base e0fa06f to this head): SHIP at 4945d28.

[P2] [follow-up] Packages/macOS/CmuxNext/Sources/CmuxNextApp/Cloud/CloudStartChat.swift:148 - the new trust RPC can await up to 10 seconds after the last account check; if the user switches accounts during it, the stale chat still opens and the local tab closes - recheck the account immediately after trustCopiedFolder before showing or closing tabs.

@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent November 1, 2026 17:59 Inactive
@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent November 1, 2026 17:59 Inactive
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (next-review patch-id; carried): SHIP at d600940

The independent SHIP at 4945d28 carries to this head: the PR's own change (git diff $(git merge-base feat-cmux-next HEAD) HEAD) has the same git patch-id --verbatim (82d17daff0c7af60) at both heads, and no merge between them was resolved by hand. Nothing new to review. A newer BLOCK, or any change to the PR's own diff, ends the carry.

@cmux-bot
cmux-bot Bot merged commit 98cb5a3 into feat-cmux-next Nov 1, 2026
174 of 179 checks passed
@cmux-bot
cmux-bot Bot deleted the cloud-start-carry-trust branch November 1, 2026 18:09
lawrencecchen added a commit that referenced this pull request Nov 1, 2026
…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.

This branch was previously deployed

3 inactive deployments
artifacts — d6009402 Deployed Nov 1, 2026 by cmux-bot[bot] via add the Windows daemon to the tree #97055
sentry-dsyms — d6009402 Deployed Nov 1, 2026 by cmux-bot[bot] via upload cmux-tui dSYMs to Sentry #97055
ci-routing-agent — d6009402 Deployed Nov 1, 2026 by cmux-bot[bot] via namespace autofix #11514
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant