Repository navigation
Pane policy: policy.json matches the macOS host's params, with a Swift parity test (cx-ctddg) - #20947
Conversation
policy.json lags AcpmuxPaneMethods.knownParams: session/new noProject, session/prompt context, _acpmux/models refresh and _acpmux/permission_respond _meta. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
policy.json gains what AcpmuxPaneMethods.knownParams already allows: session/new acpmux noProject, session/prompt acpmux context, _acpmux/models refresh, and _acpmux/permission_respond _meta, which holds the pick's gesture ticket and nothing else (the same rule as Swift's breaksParamsRule). The allowlist test also reads the method of direct.ts's typedRequest calls (#20576 moved permission_respond there). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
|
Found 1 test failure on Blacksmith runners: Failure
|
- regenerated schemas/defaults/cmux-next.json Autofix-Run: https://github.com/manaflow-ai/cmux/actions/runs/38699935874
…pick nothing (red) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GesturePick::new gains Swift's AgentPaneGesturePick branch: a
_acpmux/permission_respond picks {sessionId, permissionId, optionId}, and
nothing when it carries answers. lib.rs says hosts strip a session/new's
_meta.acpmux.noProject in their folder step. The deleted
AgentPanePolicyParityTests are no longer cited (policy.json, lib.rs, the
Swift checkOne comment). The typedRequest scan reads the call's own
literal second argument or fails. Two more permission_respond _meta cases.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-swift-parity # Conflicts: # cmux-tui/crates/cmux-agent-pane-policy/tests/parity.rs
…-parity' into op-next-replay/pane-policy-swift-parity
…oes not touch) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…defaults snapshot Brings back the autofix hunk: it is not a new default, it fixes the base defaults-snapshot red. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bugbot needs on-demand usage enabledBugbot 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. |
|
Not verified: macOS jobs did not run: compile and app tests were skipped on CI passes on Written by |
…is base's to land) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bugbot needs on-demand usage enabledBugbot 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. |
…-swift-parity # Conflicts: # cmux-tui/crates/cmux-agent-pane-policy/tests/typescript.rs
|
Gate on head 6688ec1: the only red, |
|
Merged 752d254 at exact head 6688ec1 on the coordinator's ruling. Waived: the external cmuxterm-hq |
cx-ctddg. The Rust pane policy (
cmux-agent-pane-policy/policy.json) had drifted from the macOS host's tables (AcpmuxPaneMethods.requestsandknownParams). Those Swift tables are what enforce the pane's frames today. The Swift side of the parity tests was deleted, so nothing caught the drift. #20644 broke local chats when the two sides disagreed (cx-ibngi).Change
tests/swift.rs: reads both Swift tables and asserts thatpolicy.json'srequestsandknown_paramsequal them.policy.json: gains the four params Swift already allows (scoping below).src/params.rs: a_acpmux/permission_respond_metamust hold the pick's gesture ticket and nothing else. This is the same rule as Swift'sbreaksParamsRule. Without it, adding_metato the list would have let anacpmuxkey through.tests/cases/params.json:_metawith more than the ticket, and_metawithout it.tests/typescript.rs: base has since fixed the same allowlist scan oftypedRequestcalls (6bf943f, cx-js8uc). After the base merge this file is identical to base.Review fixes
src/check.rs:GesturePick::newgains Swift'sAgentPaneGesturePickbranch for_acpmux/permission_respond. Its pick is{sessionId, permissionId, optionId}, and there is no pick when it carriesanswers. Before, Rust droppedsessionIdfrom the pick, and this PR's_metaparam made that path reachable.src/lib.rs: says hosts strip asession/new's_meta.acpmux.noProjectin their folder step, asAcpmuxPathPolicydoes.AgentPanePolicyParityTestsis no longer cited inpolicy.json's description,lib.rs, or the SwiftcheckOnedoc comment. That comment is the only Swift change._meta: {}on permission_respond breaks; a non-string ticket passes the params rule, as in Swift.Scoping of each added param
Swift already allows each of these with the same reason, and no new method is added.
session/new_meta.acpmux.noProjectsession/prompt_meta.acpmux.contextsessionIdmust be the pane's (session_scoped)._acpmux/modelsrefresh_acpmux/permission_respond_metaVerification
All runs were on the Linux builder, with the same focused command:
the_known_params_are_the_macos_hostsfails on exactly the four params above.Gesture pick, with the focused command
cargo test -q -p cmux-agent-pane-policy --test parity full_check_order:{optionId, permissionId}; the expected pick also namessessionId: s1.On the fix:
The only Swift change is one doc comment.
sbx buildon the merged head (base dbb1123) completes. On the merged head, the crate passes 16 + 2 + 4 and rustfmt is clean. No host runs the Rust policy's frame check at runtime today, so nothing changes for users.Defaults snapshot
This PR does not change
schemas/defaults/cmux-next.json. The autofix bot added a line recording Lawrence's existingkey.home.switchViewdefault, and I dropped it. A reddefaults-snapshotcheck here is the base red for that missing record, not a new default from this PR.Changelog
none
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Restores parity between the Rust pane policy (
policy.json) and the macOS host's Swift tables, which enforce the pane's frames today. The Swift parity tests were deleted, so nothing caught the drift — #20644 broke local chats when the two sides disagreed (cx-ibngi).tests/swift.rs, which assertspolicy.json's requests and known params equal the Swift tables.session/newnoProject,session/promptcontext,_acpmux/modelsrefresh, and_acpmux/permission_respond_meta._acpmux/permission_respond_metaholds the gesture ticket and nothing else, matching Swift'sbreaksParamsRule.answers— matching Swift'sAgentPaneGesturePick.typedRequestcall indirect.tsnames, fixing a pre-existing red test after acpmux: one typed protocol registry; generated web types and drift checks (hq#2025, no bead) #20576 moved_acpmux/permission_respondto that helper.lib.rsthat hosts strip asession/new's_meta.acpmux.noProjectin their folder step, and drops stale references to the deletedAgentPanePolicyParityTests(including the SwiftcheckOnecomment).No Swift behavior changes, and no host runs the Rust policy's frame check at runtime, so nothing changes for users.
Written for commit 6688ec1. Summary will update on new commits.