Skip to content

Add remote agent hooks to the cmux ssh relay - #8440

Closed
austinywang wants to merge 23 commits into
mainfrom
issue-8396-remote-hooks-namespace
Closed

austinywang wants to merge 23 commits into
mainfrom
issue-8396-remote-hooks-namespace

Conversation

@austinywang

@austinywang austinywang commented Jul 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add the missing remote hooks namespace to cmuxd-remote so agents inside cmux ssh can install, uninstall, and invoke every Swift-catalogued hook provider.
  • Keep the macOS Swift CLI as the single semantic owner of hook catalogs/installers while relaying authenticated lifecycle events and validated transactional filesystem plans.
  • Bound payloads, output, execution time, transfer concurrency/lifetime, and mutation scope; cancel abandoned uploads and retain claimed slots until execution completes.

Closes #8396

Testing

  • go test -count=1 ./... in daemon/remote
  • Native arm64 swift test in Packages/macOS/CmuxControlSocket: 271 tests passed
  • Warnings-as-errors Swift bridge typecheck, CLI parse, and Swift Testing file typecheck with TestingMacros
  • pbxproj normalization and test-wiring guards
  • workspace package-group and Package.resolved policy guards
  • localization JSON parse plus all 17 new keys verified translated in English and Japanese
  • git diff --check and Swift file-length audit
  • Separate red/green commits prove the missing hooks namespace, atomic remote mutations, staged 8 MiB input cap, claimed-slot retention, and failed-upload cancellation

Local Xcode tests and XCUITests were intentionally not run per the issue instructions; CI exercises the wired cmuxTests target.

Demo Video

N/A: this changes remote CLI and relay behavior, not UI. The requested cloud reload command is intentionally deferred until after CI handoff.

Review Trigger (Copy/Paste as PR comment)

@codex review
@coderabbitai review
@greptile-apps review
@cubic-dev-ai review

Checklist

  • I tested the deterministic local paths allowed by the issue instructions
  • I added or updated behavioral tests
  • Docs/changelog changes are not needed; the documented hooks commands now work remotely
  • I requested bot reviews after the latest commit
  • All actionable code review bot comments are resolved or answered with repository-policy evidence
  • All human review comments are resolved

Summary by CodeRabbit

  • New Features

    • Added remote hook bridge support, including hooks <agent> <action> for install/uninstall and chunked hook invocation staging (begin/append/execute with cancellation).
    • Introduced remote bridge commands (__remote-*) with config snapshot planning and mutation application.
  • Bug Fixes

    • Improved execution policy and routing for hooks.invoke* on the socket-worker lane.
    • Enhanced relay-backed detection and safer setup error reporting; added dynamic relay timeouts.
  • Tests

    • Added scenarios for append-failure cancellation, bridge concurrency/size/timeout limits, transfer ownership behavior, and snapshot/mutation validation.
  • Documentation/Chores

    • Updated CLI help output and expanded localized error messages for remote hook bridge and setup failures.

@coderabbitai

coderabbitai Bot commented Jul 19, 2026 •

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds remote hook installation and invocation across the Go relay and macOS CLI, including filesystem snapshots and mutations, chunked payload transfers, bounded process execution, socket-worker routing, localization, and integration tests.

Changes

Remote hook relay bridge

Layer / File(s) Summary
Remote CLI hook relay and filesystem application
daemon/remote/cmd/cmuxd-remote/cli.go, daemon/remote/cmd/cmuxd-remote/hooks.go, daemon/remote/cmd/cmuxd-remote/*_test.go
Adds hook setup, uninstall, invocation relay, environment propagation, chunked transfers, transactional filesystem mutations, and tests.
Local invocation bridge
Sources/RemoteHookInvocation*, Sources/TerminalController*, cmuxTests/RemoteHookInvocationBridgeTests.swift
Validates requests, stages transfers, launches the bundled CLI, captures bounded output, and tests transfer, timeout, and output-limit behavior.
Remote configuration bridge
CLI/CMUXCLI+RemoteHookBridge.swift, CLI/RemoteHook*.swift
Adds catalog and configuration commands, mirrored installer execution, snapshot restoration, mutation generation, path checks, and encoded plans.
Routing, timeout, localization, and build integration
CLI/cmux.swift, CLI/CMUXCLI+AgentHookDefinitions.swift, CLI/CMUXCLI+CodexFireAndForgetHooks.swift, Packages/macOS/..., Resources/Localizable.xcstrings, cmux.xcodeproj/project.pbxproj
Updates relay-child paths and environment handling, routes hook methods to socket workers, extends hook relay timeouts, adds localized errors, and registers sources and tests.

Estimated code review effort: 5 (Critical) | ~120 minutes

Sequence Diagram(s)

sequenceDiagram
  participant HookProcess
  participant RemoteCLI
  participant RelaySession
  participant SocketWorker
  participant InvocationBridge
  HookProcess->>RemoteCLI: Invoke hook event
  RemoteCLI->>RelaySession: Send hooks.invoke* request
  RelaySession->>SocketWorker: Route hook method
  SocketWorker->>InvocationBridge: Validate and execute request
  InvocationBridge-->>SocketWorker: Return output or error
  SocketWorker-->>RelaySession: Return v2 result
  RelaySession-->>RemoteCLI: Return relayed response
Loading

Possibly related PRs


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (3 errors, 1 warning)

Check name Status Explanation Resolution
Cmux Swift Package Boundaries ❌ Error FAIL: RemoteHookInvocationBridge and its DTOs were added under root Sources//CLI/; tests show they're standalone domain logic, so they should live in a SwiftPM package. Extract the hook bridge into a small package (e.g. Packages/macOS/CmuxRemoteHooks) exposing RemoteHookInvocationBridge plus RemoteHookInvocation/RemoteHookPlan; keep TerminalController/CMUXCLI as adapters.
Cmux User-Facing Error Privacy ❌ Error FAIL: remoteHookInvocationError returns raw decoded stderr to users, and hook relays print StdoutBase64/StderrBase64 directly, exposing upstream messages. Replace raw stderr passthrough with a generic user-facing error and keep detailed installer/stdout/stderr only in sanitized logs or internal telemetry.
Cmux Full Internationalization ❌ Error Resources/Localizable.xcstrings adds new remote-hook keys with only en/ja, but the catalog already supports 20 locales; that violates full-internationalization. Add translations for every existing locale on each new key in Resources/Localizable.xcstrings, or reduce the catalog’s supported locales in the same change.
Docstring Coverage ⚠️ Warning Docstring coverage is 4.12% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (21 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding remote agent hooks to the cmux SSH relay.
Description check ✅ Passed The description matches the template with Summary, Testing, Demo Video, Review Trigger, and Checklist sections filled in.
Linked Issues check ✅ Passed The changes implement the remote hooks namespace, relay install/invoke flows, and related tests needed by #8396.
Out of Scope Changes check ✅ Passed All added files and edits support remote hook relay, installation, validation, localization, or tests; no clear unrelated changes.
Cmux Swift Actor Isolation ✅ Passed PASS: New Swift types are plain value models; RemoteHookInvocationBridge is nonisolated Sendable, and the TerminalController hook bridge matches existing nonisolated V2 patterns.
Cmux Swift Blocking Runtime ✅ Passed No banned runtime primitives were added; the new bridge uses kqueue-driven subprocess supervision and adds no semaphores, sleeps, main-syncs, or manual locks in production Swift.
Cmux Browser Automation Off-Main ✅ Passed No browser automation routing changed; browser.* wait/callback verbs remain on the socket worker and the diff only adds hooks.invoke routing/tests.
Cmux Expensive Synchronous Load ✅ Passed PASS: no agent-history loader was added; hooks.invoke routes to socket-worker code and the new file I/O is bounded, not main-actor UI history loading.
Cmux Cache Substitution Correctness ✅ Passed The snapshot/install paths still do fresh disk reads (os.Lstat/os.ReadFile, String(contentsOf:)); no cached or opportunistic value replaced an authoritative read.
Cmux No Hacky Sleeps ✅ Passed No new fixed sleeps or polling were added in the changed runtime code; hook relay uses bounded RPC deadlines, and waits appear only in test scaffolding.
Cmux Algorithmic Complexity ✅ Passed Changed scans are bounded: static 17-agent catalog, 4 transfer slots, and explicit 8 MiB caps; no nested rescans or hot-path repeated sort/filter chains were added.
Cmux Swift Concurrency ✅ Passed The Swift additions use synchronous Process/FileHandle code; I found no new DispatchQueue, Combine, completion-handler, or fire-and-forget Task patterns in the changed files.
Cmux Swift @Concurrent ✅ Passed No @concurrent misuse found; added hook work is sync or explicitly hopped off UI/actor context (socket-worker/global-queue paths).
Cmux Swiftpm Lockfiles ✅ Passed PR changes only add Swift source files to project.pbxproj; no SwiftPM package-reference, .gitignore, workflow, or Package.resolved diffs are present.
Cmux Swift Logging ✅ Passed Only added print is CLI JSON stdout in the remote hook bridge; no new NSLog/debugPrint/dump/Logger in runtime code.
Cmux Swiftui State Layout ✅ Passed PASS: The PR only touches CLI/backend remote-hook code; no changed SwiftUI view files or new state/layout patterns from the rule were found in the touched files.
Cmux Architecture Rethink ✅ Passed Adds a required remote hook bridge with a single shared action path; no new sleeps, polling, locks, or split lifecycle ownership in the added hunks.
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed No Swift standalone-window code was added or changed; the actual diff only touches a Go test, and cmuxAuxiliaryWindowIdentifiers is untouched.
Cmux Source Artifacts ✅ Passed Only changed path is daemon/remote/cmd/cmuxd-remote/hooks.go, a normal Go source file; the hunk just initializes a slice, not an artifact.
Cmux No Test Or Debug Seam In Production Source ✅ Passed Changed Sources files add normal runtime hooks bridge code; no new DEBUG/test-only members or wrapper seams appear in the production Sources diff.
Cmux No Ambient Global State ✅ Passed No new ambient global state: added APIs live on CMUXCLI/TerminalController extensions or the injectable RemoteHookInvocationBridge struct, with no free funcs or new singletons.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-8396-remote-hooks-namespace

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.

@austinywang
austinywang marked this pull request as ready for review July 19, 2026 02:34
@greptile-apps

greptile-apps Bot commented Jul 19, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds the missing hooks namespace to the cmux SSH relay so agents inside a remote session can install, uninstall, and invoke every Swift-catalogued hook provider. The macOS Swift CLI remains the semantic owner of hook catalogs and installers; the Go relay daemon orchestrates snapshot/plan/mutation cycles with bounded payloads and atomic rollback.

  • Go relay (hooks.go): new 946-line file wiring cmux hooks to five socket methods (hooks.invoke, hooks.invoke.begin/append/cancel/execute), with path-scoped mutation validation, pre-flight state capture, and rollback on failure.
  • Swift bridge (RemoteHookInvocationBridge + extensions): nonisolated struct routing all hooks.* methods on the socket worker, with kqueue-based subprocess I/O capture, slot-based chunked transfer staging, and argument allow-listing.
  • Swift CLI bridge (CMUXCLI+RemoteHookBridge.swift): __remote-catalog/describe/configure commands that mirror the remote filesystem into a sandbox, run the installer, and diff the result into a mutation plan. User-facing CLI bridge errors currently embed raw internal snake_case codes via cli.hooks.remoteBridge.error rather than distinct actionable messages.

Confidence Score: 4/5

Safe to merge with one fix: the CLI bridge error formatter embeds raw internal codes in user-visible terminal output.

The remote hook relay is well-structured: path traversal guards, pre-flight state capture with rollback, slot-based transfer staging with claimed-slot retention, kqueue-based bounded subprocess capture, and correct socket-worker routing for all five hook methods. One issue prevents a clean merge: the shared remoteHookBridgeError helper formats every failure as a raw snake_case code visible on the user terminal, while every other CLI error in the same file uses a distinct localized user-readable sentence.

CLI/CMUXCLI+RemoteHookBridge.swift — remoteHookBridgeError and its ~20 call sites need distinct localized, actionable messages instead of the shared %@ format with raw internal codes.

Important Files Changed

Filename Overview
CLI/CMUXCLI+RemoteHookBridge.swift New Swift remote hook bridge: handles __remote-catalog/describe/configure commands, mirrors filesystem, runs installer subprocess, and diffs files to produce a mutation plan. Exposes raw internal error codes in user-facing CLI output via the shared remoteHookBridgeError formatter.
Sources/RemoteHookInvocationBridge.swift New nonisolated Sendable struct handling hooks.invoke* methods on the socket worker. Argument allow-listing, environment sandboxing, and input size validation are well-implemented.
Sources/RemoteHookInvocationBridge+Transfers.swift Slot-based chunked transfer staging with atomic rename for claim/cancel, bounded by slot count and size limits. Stale slot cleanup and claimed-slot retention on execute are correct.
Sources/RemoteHookInvocationBridge+Process.swift kqueue-based non-blocking I/O multiplexer for subprocess output capture with byte and deadline limits; process.waitUntilExit() called only after NOTE_EXIT fires so it returns immediately. Clean SIGTERM+SIGKILL teardown.
Packages/macOS/CmuxRemoteWorkspace/Sources/CmuxRemoteWorkspace/Relay/RemoteCLIRelaySession.swift Dynamic per-request relay timeout: 135s for hooks.invoke/execute, 15s for all others. isHookInvocation correctly excludes begin/append/cancel which are bounded operations.
daemon/remote/cmd/cmuxd-remote/hooks.go 946-line Go relay: catalog/describe/configure bridge, chunked stdin upload with cancel-on-failure, path-scoped mutation application with pre-flight state capture and rollback. Path traversal guards, duplicate-path detection, and 8 MiB limits present.
Resources/Localizable.xcstrings 17 new keys with English and Japanese translations. The cli.hooks.remoteBridge.error key embeds the raw internal error code as %@, which is the source of the user-facing exposure issue.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant User as User (Linux)
    participant GoRelay as cmuxd-remote (Go)
    participant Bridge as RemoteHookInvocationBridge (Swift)
    participant CLI as bundled cmux CLI (Swift)

    User->>GoRelay: cmux hooks omp install
    GoRelay->>Bridge: hooks.invoke [__remote-describe, omp]
    Bridge->>CLI: cmux hooks __remote-describe omp
    CLI-->>Bridge: JSON descriptor
    Bridge-->>GoRelay: descriptor
    GoRelay->>GoRelay: snapshot local filesystem
    GoRelay->>Bridge: hooks.invoke.begin
    Bridge-->>GoRelay: transfer_id
    loop Each 6 KiB chunk
        GoRelay->>Bridge: hooks.invoke.append
        Bridge-->>GoRelay: appended
    end
    GoRelay->>Bridge: hooks.invoke.execute
    Bridge->>CLI: cmux hooks __remote-configure
    CLI->>CLI: restoreSnapshot to runInstaller to diffFiles
    CLI-->>Bridge: mutation plan JSON
    Bridge-->>GoRelay: plan
    GoRelay->>GoRelay: validate and applyMutations
    GoRelay-->>User: Done: 1 installed, 0 skipped
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    participant User as User (Linux)
    participant GoRelay as cmuxd-remote (Go)
    participant Bridge as RemoteHookInvocationBridge (Swift)
    participant CLI as bundled cmux CLI (Swift)

    User->>GoRelay: cmux hooks omp install
    GoRelay->>Bridge: hooks.invoke [__remote-describe, omp]
    Bridge->>CLI: cmux hooks __remote-describe omp
    CLI-->>Bridge: JSON descriptor
    Bridge-->>GoRelay: descriptor
    GoRelay->>GoRelay: snapshot local filesystem
    GoRelay->>Bridge: hooks.invoke.begin
    Bridge-->>GoRelay: transfer_id
    loop Each 6 KiB chunk
        GoRelay->>Bridge: hooks.invoke.append
        Bridge-->>GoRelay: appended
    end
    GoRelay->>Bridge: hooks.invoke.execute
    Bridge->>CLI: cmux hooks __remote-configure
    CLI->>CLI: restoreSnapshot to runInstaller to diffFiles
    CLI-->>Bridge: mutation plan JSON
    Bridge-->>GoRelay: plan
    GoRelay->>GoRelay: validate and applyMutations
    GoRelay-->>User: Done: 1 installed, 0 skipped
Loading

Reviews (6): Last reviewed commit: "fix(remote): encode empty hook arguments..." | Re-trigger Greptile

Comment thread daemon/remote/cmd/cmuxd-remote/hooks_relay_test.go Outdated
Comment thread daemon/remote/cmd/cmuxd-remote/hooks_relay_test.go Outdated
@cursor

cursor Bot commented Jul 19, 2026

Copy link
Copy Markdown

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@coderabbitai coderabbitai 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.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cmux.xcodeproj/project.pbxproj`:
- Around line 7510-7515: Update every PBXSourcesBuildPhase.files entry in
cmux.xcodeproj/project.pbxproj to reference its corresponding PBXBuildFile UUID:
change sites 7510-7515 to trailing IDs 2, A, 8, 6, 6, 4; site 5802 from ...B to
...0C; site 7870 from ...3 to ...04; site 8138 from ...1 to ...02; and sites
8167-8171 to trailing IDs 2, 8, A, 4, 6. Verify each referenced UUID maps to an
isa = PBXBuildFile declaration.

In `@Resources/Localizable.xcstrings`:
- Around line 240265-240276: Update the English values for
cli.hooks.setup.tooManyTargets and cli.hooks.setup.conflictingTargets to use
“hook targets” and “hook target” respectively, while preserving the existing
Japanese translations and the rest of each message.

In `@Sources/RemoteHookInvocationBridge`+Transfers.swift:
- Around line 80-93: Update takeTransfer in the chunked invocation path to
enforce the same per-hook input limit as decodeInvocation after reassembling the
input, using maximumHookInputBytes for non-__remote-configure methods while
preserving the larger maximumInputBytes staging limit. Widen
maximumHookInputBytes from private to instance-internal within the type so
takeTransfer can reference it, and apply the cap based on the decoded invocation
arguments or method.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: fc1c17e1-2709-464f-9421-18d95ce107c3

📥 Commits

Reviewing files that changed from the base of the PR and between 1e6a996 and f34f04d.

📒 Files selected for processing (27)
  • CLI/CMUXCLI+AgentHookDefinitions.swift
  • CLI/CMUXCLI+CodexFireAndForgetHooks.swift
  • CLI/CMUXCLI+RemoteHookBridge.swift
  • CLI/RemoteHookDescriptor.swift
  • CLI/RemoteHookMutation.swift
  • CLI/RemoteHookPlan.swift
  • CLI/RemoteHookSnapshot.swift
  • CLI/RemoteHookSnapshotEntry.swift
  • CLI/cmux.swift
  • Packages/macOS/CmuxControlSocket/Sources/CmuxControlSocket/Wire/ControlCommandExecutionPolicy.swift
  • Packages/macOS/CmuxControlSocket/Tests/CmuxControlSocketTests/ControlCommandExecutionPolicyTests.swift
  • Packages/macOS/CmuxRemoteWorkspace/Sources/CmuxRemoteWorkspace/Relay/RemoteCLIRelaySession.swift
  • Resources/Localizable.xcstrings
  • Sources/RemoteHookInvocation.swift
  • Sources/RemoteHookInvocationBridge+Process.swift
  • Sources/RemoteHookInvocationBridge+Transfers.swift
  • Sources/RemoteHookInvocationBridge.swift
  • Sources/RemoteHookInvocationBridgeError.swift
  • Sources/RemoteHookTransferMetadata.swift
  • Sources/TerminalController+RemoteHookInvocation.swift
  • Sources/TerminalController.swift
  • cmux.xcodeproj/project.pbxproj
  • cmuxTests/RemoteHookInvocationBridgeTests.swift
  • daemon/remote/cmd/cmuxd-remote/cli.go
  • daemon/remote/cmd/cmuxd-remote/hooks.go
  • daemon/remote/cmd/cmuxd-remote/hooks_relay_test.go
  • daemon/remote/cmd/cmuxd-remote/hooks_unit_test.go

Comment thread cmux.xcodeproj/project.pbxproj
Comment thread Resources/Localizable.xcstrings
Comment thread Sources/RemoteHookInvocationBridge+Transfers.swift

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cmuxTests/RemoteHookInvocationBridgeTests.swift`:
- Around line 9-83: Add dispatch-level tests using
RemoteHookInvocationBridge.handle for "hooks.invoke.cancel" and
"hooks.invoke.execute", alongside the existing direct transfer tests. Verify
cancellation returns the expected "cancelled" result and execution releases the
claimed transfer slot via its deferred cleanup, covering the dispatch wiring
rather than only cancelTransfer and takeTransfer.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: fa90c239-40ef-4099-92e1-d5a5237353ef

📥 Commits

Reviewing files that changed from the base of the PR and between f34f04d and def74e3.

📒 Files selected for processing (10)
  • CLI/cmux.swift
  • Packages/macOS/CmuxControlSocket/Sources/CmuxControlSocket/Wire/ControlCommandExecutionPolicy.swift
  • Packages/macOS/CmuxControlSocket/Tests/CmuxControlSocketTests/ControlCommandExecutionPolicyTests.swift
  • Resources/Localizable.xcstrings
  • Sources/RemoteHookInvocationBridge+Transfers.swift
  • Sources/RemoteHookInvocationBridge.swift
  • Sources/TerminalController.swift
  • cmuxTests/RemoteHookInvocationBridgeTests.swift
  • daemon/remote/cmd/cmuxd-remote/hooks.go
  • daemon/remote/cmd/cmuxd-remote/hooks_relay_test.go

Comment thread cmuxTests/RemoteHookInvocationBridgeTests.swift
@austinywang

Copy link
Copy Markdown
Contributor Author

Automated review follow-up for 89e6d93:

  • The dispatch-coverage nit is addressed in 89e6d93. The new test exercises hooks.invoke.cancel and hooks.invoke.execute through handle(), verifies the cancelled response, and proves both dispatch paths release exactly one transfer slot.
  • The blocking-runtime pre-check is rejected: process capture runs on the socket-worker lane, waits on kqueue events with hard deadlines, and calls waitUntilExit only after NOTE_EXIT/ESRCH. It is bounded event-driven supervision, not polling or main-actor blocking. The canonical cmux review and Aziz policy check are clean.
  • The package-boundary suggestion is rejected: a single-facility CmuxRemoteHooks micro-package would violate the repository rule against narrow packages. The new internal types are one-type-per-file executable integration glue around Bundle, Process, the bundled CLI, and the app socket.
  • The error-privacy suggestion is rejected: stdout/stderr return only to the same authenticated relay invoker that launched the hook installer/event. Preserving the invoked command diagnostics is intentional CLI behavior; the output is bounded and is not exposed to another user or telemetry.
  • The locale-coverage claim is rejected against the checked-in cmux localization policy: supported locales are English and Japanese. All 17 new remote-hook keys were parsed and verified translated in both.
  • The global docstring-percentage warning is not applicable: this PR adds no public API in a new Swift package, which is the repository DocC boundary.
  • The PR description now follows the repository template and records testing, the non-UI demo rationale, review triggers, and checklist.

The final canonical branch review reports no actionable findings, and cmux-policy-check reports no Aziz-derived findings.

@cursor

cursor Bot commented Jul 19, 2026

Copy link
Copy Markdown

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@lawrencecchen lawrencecchen added the stale-revisit Closed after 30+ days without activity; preserved for possible revisit or reopening. label Sep 23, 2026
@github-project-automation github-project-automation Bot moved this from Todo to Done in cmux backlog Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale-revisit Closed after 30+ days without activity; preserved for possible revisit or reopening.

Projects

None yet

3 participants