Skip to content

cmux NEXT: await FolderChanges.events() in MachineConsentChanges (build fix) - #27758

Merged
teamleaderleo merged 1 commit into
feat-cmux-nextfrom
fix-next-machine-consent-async
Oct 30, 2026
Merged

teamleaderleo merged 1 commit into
feat-cmux-nextfrom
fix-next-machine-consent-async

Conversation

@azooz2003-bit

@azooz2003-bit azooz2003-bit commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

feat-cmux-next does not compile. Two changes that landed an hour apart don't build together:

Fleet build 549a2bfa50c634b6131799d8 at 6d8838a09200 fails in swift_compile:

Packages/macOS/CmuxNext/Sources/CmuxNextApp/Remote/JoinConsent+App.swift:222:29: error: 'async' call in a function that does not support concurrency

This change makes MachineConsentChanges.events(armed:) async and awaits the folder watch. That ordering is what its doc comment already promised: folder watch registered, then file watches, then armed, then one yield. Its three callers (the model's watch task and two JoinConsentTests) now await it. The package runs with NonisolatedNonsendingByDefault, so the non-Sendable armed closure stays on the caller's actor.

Changelog

none

Review

A subagent did a correctness review of 8dec64d15a7b and found nothing blocking. It checked:

  • every FolderChanges.events() and MachineConsentChanges.events call site in Packages/;
  • isolation under the package settings;
  • ordering;
  • cancellation: a cancelled FolderChanges wait returns a finished stream, the detached loop exits, and the file watches are cancelled and the continuation finished. Nothing leaks.

It noted one older issue that this PR does not cause: watchFiles resumes its file sources without waiting for registration, the race #26517 fixed for folders. That's left for a follow-up.

Observed / Not run

  • Observed: base 6d8838a09200 fails to compile on the fleet (job 549a2bfa50c634b6131799d8, error above).
  • Pending: scripts/ci/package-test-lane.sh suite Packages/macOS/CmuxNext JoinConsentTests at the head (cmux-ci step 22cfe1759689444cd520dd0e). The result will be posted here before ready-to-land.
  • Not run: no runtime change beyond the ordering above, so no capture (No capture: build fix, no UI change).

🤖 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 the feat-cmux-next build break by making MachineConsentChanges.events(armed:) async to match the now-async FolderChanges.events().

  • The folder watch is now awaited before file watches fire, matching the ordering the doc comment already promised.
  • The three callers (model watch task and two JoinConsentTests) now await the call.

Written for commit 8dec64d. Summary will update on new commits.

View guided diff Turn on auto-fix

…ld fix)

#26517 made FolderChanges.events() async (it returns once its watches are
registered); #27223, which landed an hour before it, calls it from the
synchronous MachineConsentChanges.events(armed:). Together they stop
CmuxNextApp from compiling (JoinConsent+App.swift:222: 'async' call in a
function that does not support concurrency; fleet job
549a2bfa50c634b6131799d8). MachineConsentChanges.events(armed:) is async
now and awaits it, so the folder watch is registered before the file
watches and the armed handshake, as its comment already promised; its
callers (the model's watch task and JoinConsentTests) await it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@azooz2003-bit azooz2003-bit added the risk:low Risk tier (docs/ci/risk-tiers.md) label Oct 30, 2026
@azooz2003-bit

Copy link
Copy Markdown
Collaborator Author

Head 8dec64d15a7b: CmuxNext builds and scripts/ci/package-test-lane.sh suite Packages/macOS/CmuxNext JoinConsentTests passes (cmux-ci step 22cfe1759689444cd520dd0e on cmux19-perf: JoinConsentTests passed 18s, All 1 suites passed). The base 6d8838a09200 fails to compile (fleet job 549a2bfa50c634b6131799d8, JoinConsent+App.swift:222). The correctness review in the description found nothing blocking; its one note (file-watch registration in watchFiles) is older than this PR and left for a follow-up.

@azooz2003-bit azooz2003-bit 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 Oct 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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

Review 8dec64d: 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=pr27758 -f ref=fix-next-machine-consent-async -f platform=macos -f backend_mode=local

@github-actions github-actions Bot added risk:normal Risk tier (docs/ci/risk-tiers.md) and removed risk:low Risk tier (docs/ci/risk-tiers.md) labels Oct 30, 2026
@teamleaderleo
teamleaderleo merged commit cec0a36 into feat-cmux-next Oct 30, 2026
202 of 230 checks passed
@teamleaderleo
teamleaderleo deleted the fix-next-machine-consent-async branch October 30, 2026 01:23
teamleaderleo added a commit that referenced this pull request Oct 30, 2026
…/fix-dataloss-a-journal

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lawrencecchen added a commit that referenced this pull request Oct 30, 2026
The head's base (87cbcaa) has the compile break of #27223 (JoinConsent+App.swift:222); the cmux-next/compile status of 2b6b1bc failed on it. #27758 fixed it on feat-cmux-next.
@github-actions

Copy link
Copy Markdown
Contributor

Shipped in:

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 8dec64d1 Deployed Oct 30, 2026 by azooz2003-bit via namespace autofix #6738
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:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants