Skip to content

Fix main compile: import CmuxWorkspaces in CodexTurnRestoreIntentPolicy - #14123

Merged
teamleaderleo merged 1 commit into
mainfrom
fix-codex-restore-import
Sep 24, 2026
Merged

teamleaderleo merged 1 commit into
mainfrom
fix-codex-restore-import

Conversation

@azooz2003-bit

@azooz2003-bit azooz2003-bit commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Main has not compiled since 36c30506a79: Sources/CodexTurnRestoreIntentPolicy.swift:13:26: error: cannot find type 'RestorableAgentProcessLiveness' in scope. The type is declared in the CmuxWorkspaces package and the new file never imports it (sibling files such as RestorableAgentSession.swift do). One-line import; blocks every PR that reaches macOS compile admission, observed on #14031.

🤖 Generated with Claude Code


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


Summary by cubic

Fixes main compilation by importing CmuxWorkspaces in CodexTurnRestoreIntentPolicy.swift. The file references RestorableAgentProcessLiveness from that package but never imported it, breaking compile at the macOS admission step for all PRs.

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

Review in cubic

Summary by CodeRabbit

  • Chores
    • Updated an internal module integration. No changes to user-facing features or behavior.

…veness type

36c3050 added CodexTurnRestoreIntentPolicy.swift referencing
RestorableAgentProcessLiveness, which lives in the CmuxWorkspaces package,
without importing it. Top-level type names need a per-file import, so the
app target stopped compiling on main and every PR that reaches macOS compile
admission fails there.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@azooz2003-bit
azooz2003-bit enabled auto-merge (squash) September 24, 2026 03:11
azooz2003-bit added a commit that referenced this pull request Sep 24, 2026
…ompile)

Same one-line fix as #14123, carried
here so this PR's macOS compile admission is not blocked on it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: b1f7224e-c817-4c7d-88c4-0cd2379282f0

📥 Commits

Reviewing files that changed from the base of the PR and between 0be8ab3 and a63cb50.

📒 Files selected for processing (1)
  • Sources/CodexTurnRestoreIntentPolicy.swift

Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The restore intent policy source adds an import for the CmuxWorkspaces module.

Changes

Restore Intent Policy

Layer / File(s) Summary
Module import
Sources/CodexTurnRestoreIntentPolicy.swift
The source file imports the CmuxWorkspaces module.

Priority: ⬆️ High

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to a63cb

The import addresses the reported compile blocker, and the target already links the module; no actionable merge risk remains.

🚥 Pre-merge checks | ✅ 25
✅ Passed checks (25 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the missing CmuxWorkspaces import and the affected file. It accurately summarizes the main compile fix.
Description check ✅ Passed The description clearly explains what changed, why the change is required, the compile error, and the affected type and file. It does not include an explicit Testing section or completed checklist, bu…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Cmux Cloud Persistent Session And Early Input ✅ Passed PASS: The authoritative diff changes only Sources/CodexTurnRestoreIntentPolicy.swift by adding import CmuxWorkspaces. It does not change Cloud terminal creation, transport, renderer readiness, inp…
Cmux Swift Actor Isolation ✅ Passed PASS. The authoritative diff changes only Sources/CodexTurnRestoreIntentPolicy.swift by adding import CmuxWorkspaces. It does not add or alter actors, @MainActor, nonisolated, Sendable, serv…
Cmux Swift Blocking Runtime ✅ Passed The pull request changes only Sources/CodexTurnRestoreIntentPolicy.swift by adding import CmuxWorkspaces. The diff introduces no semaphores, blocking waits, sleeps, delayed dispatch, polling, main…
Cmux Browser Automation Off-Main ✅ Passed PASS: The PR changes only Sources/CodexTurnRestoreIntentPolicy.swift by adding import CmuxWorkspaces. It does not modify the rule-scoped browser automation files and introduces no browser socket c…
Cmux Expensive Synchronous Load ✅ Passed The diff changes only CodexTurnRestoreIntentPolicy.swift by adding import CmuxWorkspaces. It adds or moves no synchronous loader, file read, JSON parsing, directory scan, syscall loop, Task, or …
Cmux Cache Substitution Correctness ✅ Passed The pull request changes only one line: it adds import CmuxWorkspaces to CodexTurnRestoreIntentPolicy.swift. The diff does not replace an authoritative read with a cached or opportunistic value, a…
Cmux No Hacky Sleeps ✅ Passed PASS: The pull request changes only Sources/CodexTurnRestoreIntentPolicy.swift, a Swift source file. The diff adds only import CmuxWorkspaces; it adds no sleep, timer, delay, polling, or wall-cloc…
Cmux Algorithmic Complexity ✅ Passed PASS: The authoritative diff changes only line 1 of Sources/CodexTurnRestoreIntentPolicy.swift, adding import CmuxWorkspaces. The existing method contains only fixed Boolean comparisons and no col…
Cmux Swift Concurrency ✅ Passed The pull request changes only Sources/CodexTurnRestoreIntentPolicy.swift by adding import CmuxWorkspaces. It does not add or expand Dispatch queues, Combine state, completion-handler APIs, or fire…
Cmux Swift @Concurrent ✅ Passed PASS: The authoritative diff changes only Sources/CodexTurnRestoreIntentPolicy.swift by adding import CmuxWorkspaces. The function shouldPreserveAfterOwnerExit remains synchronous and contains n…
Cmux Swift Package Boundaries ✅ Passed The diff changes only Sources/CodexTurnRestoreIntentPolicy.swift by adding import CmuxWorkspaces. It does not introduce or expand feature logic in the app target. The existing policy remains uncha…
Cmux Swiftpm Lockfiles ✅ Passed The authoritative PR diff changes only Sources/CodexTurnRestoreIntentPolicy.swift by adding import CmuxWorkspaces. It does not change a Package.swift, Package.resolved, .gitignore, Xcode pro…
Cmux Swift Logging ✅ Passed The PR changes only one line: import CmuxWorkspaces in Sources/CodexTurnRestoreIntentPolicy.swift. It adds no logging statement or logging-related behavior, so it does not violate the Swift loggin…
Cmux User-Facing Error Privacy ✅ Passed PASS — The pull request changes only Sources/CodexTurnRestoreIntentPolicy.swift by adding import CmuxWorkspaces. It adds no user-facing error, alert, command output, API body, recovery copy, secre…
Cmux Full Internationalization ✅ Passed The authoritative PR diff changes only Sources/CodexTurnRestoreIntentPolicy.swift by adding import CmuxWorkspaces. It adds no user-facing text, metadata, web content, catalog entry, or locale-depe…
Cmux Swiftui State Layout ✅ Passed The pull request changes only Sources/CodexTurnRestoreIntentPolicy.swift by adding import CmuxWorkspaces. It does not introduce SwiftUI state, geometry measurement, lazy/list row store references,…
Cmux Architecture Rethink ✅ Passed PASS: The reviewed diff adds only import CmuxWorkspaces to Sources/CodexTurnRestoreIntentPolicy.swift. The file already referenced the public RestorableAgentProcessLiveness type from that module…
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed PASS: The PR changes only Sources/CodexTurnRestoreIntentPolicy.swift by adding import CmuxWorkspaces. The diff adds no NSWindow, NSPanel, NSWindowController, SwiftUI Window/WindowGroup, …
Cmux Source Artifacts ✅ Passed The PR changes only the hand-written source file Sources/CodexTurnRestoreIntentPolicy.swift by adding import CmuxWorkspaces. The diff adds no logs, generated output, screenshots, caches, temporary…
Cmux No Test Or Debug Seam In Production Source ✅ Passed PASS. The only pull-request change is import CmuxWorkspaces in Sources/CodexTurnRestoreIntentPolicy.swift. The diff adds no #if DEBUG or test guard, test/debug-named member, accessor, visibility…
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

teamleaderleo pushed a commit that referenced this pull request Sep 24, 2026
Ports #14123 so this PR's macOS compile admission can build: main at
36c3050 references RestorableAgentProcessLiveness without importing the
module that declares it. No-op once main carries #14123.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EduXdN9PKnGsMQztJK7WeE
@teamleaderleo

teamleaderleo commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

I think we should just merge this now and not wait for compile

teamleaderleo added a commit that referenced this pull request Sep 24, 2026
Ports #14123 so this PR's macOS compile admission can build: main at
36c3050 references RestorableAgentProcessLiveness without importing the
module that declares it. No-op once main carries #14123.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EduXdN9PKnGsMQztJK7WeE
@teamleaderleo
teamleaderleo merged commit 587de87 into main Sep 24, 2026
49 of 51 checks passed
teamleaderleo added a commit that referenced this pull request Sep 24, 2026
)

* ci: stripe PR app-host shards across four macOS pools

* test: require four-pool PR app-host routing

* test: match routed pool labels inside matrix rows

* docs: describe four-pool PR app-host lane

* ci: check each app-host shard's exact pool; keep the documented PR pin on 26.3

The four-pool check matched labels as substrings, so macos-15 passed
inside blacksmith-6vcpu-macos-15. Read each matrix row's pr_runner
exactly. The docs example pinned Xcode 26.5, which the macos-15 pools
lack and every app-host shard reads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EduXdN9PKnGsMQztJK7WeE

* ci: let each app-host pool use its own Xcode 26

Same-repository pull-request shards now span images with different
Xcodes (26.3 on macos-15, 26.6 on macos-26). They pin none: each takes
the newest stable macOS 26 SDK Xcode on its machine, and restore accepts
any point release of the admission build's major Xcode instead of an
exact xcodebuild -version match. Forks and other events keep the pin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EduXdN9PKnGsMQztJK7WeE

* docs: app-host PR shards pick their machine's Xcode 26

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EduXdN9PKnGsMQztJK7WeE

* fix: import CmuxWorkspaces in CodexTurnRestoreIntentPolicy

Ports #14123 so this PR's macOS compile admission can build: main at
36c3050 references RestorableAgentProcessLiveness without importing the
module that declares it. No-op once main carries #14123.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EduXdN9PKnGsMQztJK7WeE

* ci: accept per-shard hosted fork routing; verify the hosted route before checkout

#14023's fork routing guard only recognised a literal macos-15 fork
branch. It now also accepts matrix.hosted_runner when every hosted_runner
row in the workflow is a GitHub-hosted macOS label, which is how the
app-host shards split fork-repository runs over macos-15 and macos-26.

The GitHub-hosted route check now runs before checkout, and the job
comment no longer claims the shards share one exact Xcode pin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EduXdN9PKnGsMQztJK7WeE

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
rustybret pushed a commit to rustybret/bmux that referenced this pull request Sep 24, 2026
5b646b7 ci: apply the queue janitor threshold per runner pool (manaflow-ai#14131)
d49a1b1 ci: reuse the headless cmux-tui build in SDK conformance (manaflow-ai#14108)
ba85a1b ci: key reload-build caches on the commit and fall back across branches (manaflow-ai#14099)
27fb3bf ci: hand focused test-macos-suite dispatches to run-e2e.sh (manaflow-ai#14075)
d18c1b9 ci: let a failed compile admission mark a run doomed for the queue janitor (manaflow-ai#14129)
dfdce2c ci: bind pull request product reuse to the merge it compiled (manaflow-ai#14080)
afacff3 ci: sparse-checkout the Claude wrapper regression job (manaflow-ai#14088)
35a6bb1 ci: stop pinning remote-daemon macOS tests to the macOS 26 pool (manaflow-ai#14128)
1ba6d77 ci: run macOS jobs on GitHub-hosted runners alongside Blacksmith (manaflow-ai#14097)
587de87 Import CmuxWorkspaces where CodexTurnRestoreIntentPolicy names its liveness type (manaflow-ai#14123)

# Conflicts:
#	.github/workflows/ci-guards.yml
#	.github/workflows/ci-macos.yml
#	.github/workflows/ci-queue-janitor.yml
#	.github/workflows/ci.yml
#	.github/workflows/cmux-tui-sdks.yml
#	.github/workflows/reload-build.yml
#	.github/workflows/remote-daemon.yml
#	.github/workflows/test-macos-suite.yml
@austinywang austinywang mentioned this pull request Sep 24, 2026
5 of 6 tasks
azooz2003-bit added a commit that referenced this pull request Sep 24, 2026
… keystroke-echo bypass (#14031)

* Add failing pacer tests for the mobile render-grid frame firehose

An animating TUI ships ~27 render-grid frames/second (~100KB/s over the
relay) to paired phones because the mobile emission path captures on every
Ghostty tick. Field histograms show keystroke echoes queueing behind that
burst traffic. This commit adds MobileTerminalFramePacer with the pre-pacer
behavior (every update emits immediately) plus tests specifying the paced
contract - floor ~11fps per surface, echo-bearing frames bypass, transport
shed widens the period, quiet recovers it - so CI shows them red before the
fix lands.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Pace mobile render-grid emission per surface with echo bypass

MobileTerminalFramePacer now coalesces sustained repaints to a dynamic
per-surface rate: floor 90ms (~11fps), widened multiplicatively toward a
500ms ceiling each time the transport sheds for that surface (the existing
bounded-queue full-resync signal), decaying back to the floor after quiet
recovery intervals. Frames whose accepted-input marker moved since the last
emit bypass pacing entirely - the keystroke echo must never queue behind the
animation firehose it is being protected from. Theme deliveries and
cold-attach baselines also bypass and re-anchor the period.

Pacing gates capture, not emission of already-diffed frames: a coalesced
tick simply defers the next capture, so every emitted delta still diffs
against the previous emitted frame and the render-grid revision chain stays
gapless (no interaction with the stale-frame/replay machinery).

Field baseline this addresses: an animating agent ships ~27 frames/second
(~100KB/s over the relay, 263MB in one session) while text carries no
information above ~10 changes/second, and keystroke echoes pay for that
volume in queue time.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Hoist mutating pacer calls out of #expect

Swift Testing's #expect macro captures its operands immutably, so calling
mutating pacer methods inside it fails to compile in the app-host test
target.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Normalize project.pbxproj after merging main

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Import CmuxWorkspaces in CodexTurnRestoreIntentPolicy (unbreak main compile)

Same one-line fix as #14123, carried
here so this PR's macOS compile admission is not blocked on it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Read matchingObservation after it is declared in the restore liveness check

The Codex restore-intent early return landed on the same line as the
effectiveRestorableAgent guard and reads matchingObservation, which is
declared a few lines later, so main stopped compiling:
"use of local variable 'matchingObservation' before its declaration".
Move the check below the declaration. The intervening statements only
compute values, so the early return behaves exactly as intended.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
rajinsyed pushed a commit to rajinsyed/supermux that referenced this pull request Oct 3, 2026
… keystroke-echo bypass (#14031)

* Add failing pacer tests for the mobile render-grid frame firehose

An animating TUI ships ~27 render-grid frames/second (~100KB/s over the
relay) to paired phones because the mobile emission path captures on every
Ghostty tick. Field histograms show keystroke echoes queueing behind that
burst traffic. This commit adds MobileTerminalFramePacer with the pre-pacer
behavior (every update emits immediately) plus tests specifying the paced
contract - floor ~11fps per surface, echo-bearing frames bypass, transport
shed widens the period, quiet recovers it - so CI shows them red before the
fix lands.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Pace mobile render-grid emission per surface with echo bypass

MobileTerminalFramePacer now coalesces sustained repaints to a dynamic
per-surface rate: floor 90ms (~11fps), widened multiplicatively toward a
500ms ceiling each time the transport sheds for that surface (the existing
bounded-queue full-resync signal), decaying back to the floor after quiet
recovery intervals. Frames whose accepted-input marker moved since the last
emit bypass pacing entirely - the keystroke echo must never queue behind the
animation firehose it is being protected from. Theme deliveries and
cold-attach baselines also bypass and re-anchor the period.

Pacing gates capture, not emission of already-diffed frames: a coalesced
tick simply defers the next capture, so every emitted delta still diffs
against the previous emitted frame and the render-grid revision chain stays
gapless (no interaction with the stale-frame/replay machinery).

Field baseline this addresses: an animating agent ships ~27 frames/second
(~100KB/s over the relay, 263MB in one session) while text carries no
information above ~10 changes/second, and keystroke echoes pay for that
volume in queue time.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Hoist mutating pacer calls out of #expect

Swift Testing's #expect macro captures its operands immutably, so calling
mutating pacer methods inside it fails to compile in the app-host test
target.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Normalize project.pbxproj after merging main

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Import CmuxWorkspaces in CodexTurnRestoreIntentPolicy (unbreak main compile)

Same one-line fix as manaflow-ai/cmux#14123, carried
here so this PR's macOS compile admission is not blocked on it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Read matchingObservation after it is declared in the restore liveness check

The Codex restore-intent early return landed on the same line as the
effectiveRestorableAgent guard and reads matchingObservation, which is
declared a few lines later, so main stopped compiling:
"use of local variable 'matchingObservation' before its declaration".
Move the check below the declaration. The intervening statements only
compute values, so the early return behaves exactly as intended.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants