Repository navigation
Action argument contract: the app exports each action's arguments, and a Linux test fails any CLI call site that names one the app does not take - #36260
Conversation
…amelCase names, any spelling folds to them The app's action.run arguments now ship in plans/cmux-next/action-surfaces.json (name, kind, required, enum values, target kind), so the CLI's call sites can be checked against them on Linux. Every argument is lowerCamelCase, the spelling the CLI's --flag-name reaches: new_tab, cmux_next and the in-process keep_focus are renamed. The control router takes any spelling that folds to an argument's name (prompt-id, prompt_id, promptId), so an older caller keeps working for a release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
…ll site sends is one the app's action takes action-surfaces.json now carries each action's args; cli/tests/action_argument_contract.rs scans cmux-tui's sources for call sites (CLI words, action_run_params, "action": ID) and fails on any --flag or args key the action does not take under its canonical name. Runs on Linux. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
…rds the CLI's own grammars take are not app arguments Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
…lags Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
|
Owned by an agent session · session |
…ired agent; check-action-surfaces runs the suite Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
…ntractTests filter runs it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
teamleaderleo
left a comment
There was a problem hiding this comment.
Review (codex gpt-6-astra high, next-review, since=20261105T082332Z): SHIP at c310437
SHIP at c310437
Visual verdict: no images; Leo tries the build
-
[P2] [follow-up] [category:tests] [finding:F1] [outcome:pending] The scanner does not recognize
run_action(...)calls or non-literalaction_run_paramsactions, so hand-written CLI arguments in group_create.rs, space.rs, and chat_control.rs are outside the claimed contract coverage. A future argument drift there would pass this CI test. -
[P2] [follow-up] [category:tests] [finding:F2] [outcome:pending] The compatibility test covers
new_tabandcmux_nextbut omits the renamedtab.moveToNewSplitspellingkeep_focus; add that case so the release-compatibility guarantee covers all three renamed arguments.
Follow-ups:
- F1: Extend the scanner to cover
run_actionand dynamic action names. - F2: Test legacy
keep_focusresolution.
…i-app-args # Conflicts: # plans/cmux-next/action-surfaces.json
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Shipped in:
|
…e merge Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
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. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
…x for tip rust-fmt reds) (#36593) * test(prepush-gate): a changed cmux-tui Rust file left unformatted is a pre-push finding (red) Three tip rust-fmt reds in one hour (#36358, #36524, #36260): each PR head left a cmux-tui file unformatted; the PR's rustfmt job is warn-only and passed; the PR merged on compile before the tip fmt check. * prepush-gate: rustfmt layer judges each changed cmux-tui Rust file with the pinned rustfmt (local only, like SwiftFormat) Cause of the tip rust-fmt reds since m26 (merge on compile + launch): nothing before the merge refuses unformatted Rust. The pre-commit formatter runs only in clones with the hooks installed, the PR rustfmt job is warn-only (it printed 'acpmux is not rustfmt-clean' on #36524 and passed), and the tip's cargo fmt check now runs after the merge. The layer reads each changed cmux-tui/**/*.rs through rustfmt's stdin mode (only that file; never the modules it names) with cmux-tui's pinned toolchain and rustfmt.toml, never installs one, and warns with no finding when rustfmt is absent. It runs where SwiftFormat runs: the pre-push hook and a plain local run, never CI (--base/--head, --commits, GITHUB_ACTIONS). A file the base already left unformatted does not block (base findings cancel). Tests: RustfmtLayerTests 4/4 (red on the previous commit: no gate.rustfmt).
…est (base clippy red) (#36597) clippy::semicolon_if_nothing_returned at action_argument_contract.rs:417 (from #36260) fails `clippy -D warnings` on every PR that touches a cmux-tui package. Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Leo, 2026-11-05, after a Cloud chat failed because the CLI sent
promptIdand the app'scloudRelayChatonly tookprompt-id: "You guys keep running into these. These are weird issues that I feel like you should be able to just fix beforehand and check on beforehand."This makes that class of drift (a CLI call site naming an app action argument the app does not take) fail CI before it merges.
What changes
One source of truth.
ActionSurfaceExportnow writes each action'sargs(name, kind, required, enum values, target kind) into the checked-inplans/cmux-next/action-surfaces.json. It is regenerated here, and the existingexportIsFreshand PR autofix keep it current.Rust contract test (Linux).
cli/tests/action_argument_contract.rsscans cmux-tui's sources for every place an app action is named by hand: CLI words (["cloud", "relay-chat", ..]),action_run_params("ID"), or"action": "ID". It fails on any--flagorargskey the action does not take under its canonical name. Words that the CLI's own grammars take first (mux, agents, and chat_scope's sender flags) are skipped. A self-test plants thepromptIddrift in each call shape.Swift contract test.
ActionArgumentContractTestschecks four things: every argument is lowerCamelCase, no two arguments of one action fold to one name, the export carries every argument, and the old spellings still resolve.Canonical names. camelCase is the canonical spelling, because the CLI turns every
--flag-nameintoflagName. The router folds case,-and_, soprompt-id/prompt_idkeep working for one release.Drift fixed (found by the new checks):
history.opennew_tabbecomesnewTab.palette.installCLIcmux_nextbecomescmuxNext.tab.moveToNewSplitkeep_focusbecomeskeepFocus.None of these could be reached from
cmux.cloudRelayChat'spromptIditself was fixed by Cloud relay chat: argument promptId, so cloud start-chat's --prompt-id reaches it #36193.Changelog
Fixed:
cmux history open --new-tabandcmux settings install-cli-in-path --cmux-nextreach their app arguments.Verification
cargo test -p cmux-tui --lib action_argument_contractpassed on fleet Linux at this head: 3 tests.Agent session: agent session
🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
The app now exports each action's arguments into
plans/cmux-next/action-surfaces.jsonas the single source of truth, so a CLI call site can't name an argument the app doesn't take — which previously brokecmux cloud start-chatwhen the CLI sentpromptIdwhile the app expectedprompt-id. A Linux test scans cmux-tui sources for hand-written call sites and fails on any--flagorargskey the action doesn't take under its canonical lowerCamelCase name.--flag-nameproduces;history.open'snewTab,palette.installCLI'scmuxNext, and the in-processtab.moveToNewSplit'skeepFocusare renamed.-, and_, so old spellings likeprompt-idandprompt_idkeep resolving for a release.check-action-surfaces.shruns it on every catalog change, keeps the export current and checks the router's folding.cmux; thepromptIddrift itself was already fixed.Written for commit a66a580. Summary will update on new commits.