Repository navigation
base red: MCP connect reads and writes its card JSON without an index (panic ratchet indexing_slicing 703 > 686) - #34032
Conversation
… (panic ratchet, from b6e681e) b6e681e (acpmux: MCP connect card that only the person approves) added serde_json index reads and writes in hub/mcp_connect.rs (card["name"], four card[..] = writes) and secret_mcp.rs (the connect_mcp_server arguments, two result["status"] reads). Reads go through field() (get, else Null, the value an index gives); writes through JsonSet::set on the card, which card_of always builds as an object. Same values; the card and its consent path do not change.
… text without an index (panic ratchet, from ccd0852) ccd0852 (after approval the daemon connects once) reads the card's transport, url, auth, keyName and keyOptional and writes the result record by serde_json index in hub/mcp_connect.rs, and secret_mcp.rs reads the result's connect, name and scope by index. Reads go through field(), the record writes through JsonSet::set (the record is a copy of a json! object). Same decisions: the key still goes only into the server's own header, keyNeeded and signInNeeded are answered as before.
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. |
|
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)
web and size checks: green Shipped in:
|
|
Review (independent subagent): SHIP at c3dddb9 I read the full diff against the merge base 74c166b and the three commits one by one. No cargo was run; the fleet panic, clippy and Reads (same value at each site)
Writes
Consent and the key
Lint and compile
Commit mapping
No findings. |
|
Panic step at the base 6eb610f (step 4fe3906df73561ad36e3b597): rust-panic-ratchet RED, acpmux: clippy::indexing_slicing 703 > baseline 686. At this head (step 4521d2536cd175ac20b07131): exit 0. |
…pmux-panic-mcp-connect
… an index (panic ratchet, from #33811) #33811 (63381ba, workflow: dispatch durable agents to paired machines) added serde_json index reads and writes in hub/workflow_activity/remote.rs (four request[..] writes), server/requests/workflow_dispatch.rs (the brief, title, from and briefId reads) and server/workflow_activity.rs (the owner call's hello _meta). Reads go through field() (get, else Null); writes through JsonSet::set and set_path (every target is a json! object; hello has no _meta, so set_path builds the same {_meta:{acpmux:{CALLER:..}}}). Same values; the receipt token and the caller proof go where they went.
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. |
…pmux-panic-mcp-connect
|
Found 6 test failures on Blacksmith runners: Failures
|
…pmux-panic-mcp-connect
|
Review (independent subagent): SHIP at a54af9d Scope: the two commits added after the earlier pass at c3dddb9, 7cb3b32 (workflow dispatch) and a54af9d (workflow runs). Read-only review; no Rust build or test run by this reviewer. What I checked:
No behavior change found. The receipt token and the caller proof go where they went before. Not caused by these commits: |
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Fixes the tip panic-ratchet red
acpmux: clippy::indexing_slicing 703 > baseline 686(STATUS 9357; last green panic tip ab54fff). One commit per culprit:hub/mcp_connect.rscard["name"]read and fourcard[..] =writes;secret_mcp.rsthe threeconnect_mcp_serverarguments and tworesult["status"]readssecret_mcp.rst["name"]in the tool-list filterhub/mcp_connect.rsfirst_connectreads of the card (transport,url,auth,keyName,keyOptional,name) and two record writes;secret_mcp.rsthe result'sconnect,name,scopereadsTakes back #33811 and #33785: only the form of their JSON reads and writes changes; every value is the same.
Takes back b6e681e, 29b3781 and ccd0852 (direct pushes): only the form of their JSON reads and writes changes; every value and decision is the same.
Fix
Reads go through a small
field(value, key)in each file (get, elseNull, the value a serde_json index gives for a missing key or a non-object). Writes go throughcmux_json::JsonSet::set, as the rest of acpmux does; each target is an object (card_ofbuilds the card withjson!({..}), and the record is a copy of ajson!({..})result). No#[allow], no baseline change.Security core files touched
This is the MCP connect consent path. The PR changes only
cmux-tui/crates/acpmux/src/hub/mcp_connect.rs(the card, the person's answer, the first connect) andcmux-tui/crates/acpmux/src/secret_mcp.rs(the agent-side tool and the text it reads). It does not change who may answer the card (hub/person.rs), the resolver and URL/command rules (cmux-mcp-connect), ormcp_probe. The key still goes only into the server's own header:key_headeris built from the same three values.risk_tier.pygrades these files normal; the review was asked to check each consent decision against the base.Red at the base, green at the head
Command (fleet):
cmux-ci run --class light --script scripts/ci/cmux-tui-rust-check.sh --arg panic --os linux --ref SHAacpmux: clippy::indexing_slicing 703 > baseline 686. The current base 6eb610f runs as step 4fe3906df73561ad36e3b597 (result in a comment).rust-panic-ratchet: 86 crates checked, 36 at deny, no row over its baseline).Later culprits on the base (the count rose to 714 while this PR was open)
hub/workflow_activity/remote.rsfourrequest[..] =writes;server/requests/workflow_dispatch.rsbrief, title, from and briefId reads;server/workflow_activity.rsthe owner call'shello["_meta"]writeshub/workflow_runs.rsspec["name"]Reads use
field()orget; writes useJsonSet::setandset_path(the hello has no_meta, soset_pathbuilds the same{_meta:{acpmux:{callerSession:..}}}). Green at the head a54af9d merged with the tip 649cebc: panic step a555ef647ddc57ef2d522e56 exit 0; clippy step b03745b31215f89b2c6b87f1 exit 0;test workflowstep ee6eeac74b809ad9f1957b64 122 of 122 passed.Changelog
none
Observed / Not run
Observed on the fleet (Linux) at this head: panic step green (above); clippy step ad64ec83d77ad1926bb18c6c exit 0;
cmux-tui-rust-check.sh test mcpstep ccff63d97be06ad6bfb0b8e2: 342 of 342 passed. rustfmt andprepush-gate.pypassed.Not run: no local cargo (rule); the live end-to-end test (
CMUX_MCP_CONNECT_LIVE=1) needs the network servers.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Replaces indexed JSON reads and writes in the MCP connect and workflow dispatch paths to satisfy the panic-ratchet baseline without changing behavior.
Null; existing request, consent, caller-proof, and receipt-token values are preserved.JsonSet::setandset_pathfor JSON writes, with no baseline changes or lint suppressions.hello_meta, and the workflow-spec name read.Written for commit a54af9d. Summary will update on new commits.