Repository navigation
agent-pane: Swift test of the fork scope rule, live in the policy cases, live peer-fork message (#28332 re-review) - #28512
Conversation
… click, live or through a turn Re-review of #28332 (finding 1, 2): no Swift test proved the host's scope rule for acp.session.fork; check.json runs in Rust only. Adds a transport test in AgentPaneForkRelayTests (live and throughSeq, with and without the click), the matching live case in check.json (55 cases), live in params.json's every-known-param case, and corrects the two comments that said Swift runs check.json. Coverage of existing behavior, not a red-first bug fix.
…h a turn" Re-review of #28332 (finding 3). Fails on the base: the live fork gets "forking a chat on another computer through a turn is not supported yet".
A live fork (Fork Conversation) names no turn; its refusal for a chat on another computer no longer says "through a turn". Daemon error text in English, as acpmux's other errors: the pane never sends a fork of a peer's chat (messageMenu.ts forkServed), so no person-facing string changes.
|
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:
|
|
Review (independent review subagent, Claude Opus 5.5): FIX at dc4d15e Scope: Findings
Observed / Not run
|
…emote finds its chat Review of #28512 (finding 1): the fixture added the peer's row to remote_sessions but not the peer to hub.peers, so resolve_remote returned None and both the red and the green step failed on "no session matches" (jobs 35eb3b76, 0b2ce261). The test now asserts the fixture resolves first. Also corrects the parity.rs comments that named a Swift harness for check.json and sources.json (no Swift test reads them).
|
Review (independent review subagent, Claude Opus 5.5): SHIP at d4bfd23 Scope: the whole PR ( Findings
Observed / Not run
|
|
Check classification at head d4bfd23 (
No red of this PR's own. Fleet proof of the changed suites is in the PR body (Swift |
Summary
Fixes forward the findings of the independent re-review of merged #28332 (comment). None of them is a security defect; finding 1 is a test gap on a security path.
acp.session.forkof a chat outside the pane's scope waits for the click's scope credit.check.jsonruns only in the Rust crate.AgentPaneForkRelayTests.aForkFromOutsideTheScopeGoesOutOnlyWithTheClickdrives the realAgentPaneTransportagainst the stand-in acpmux server:{"sessionId":"other","live":true}and{"sessionId":"other","throughSeq":3}get.gestureRequiredwith no click and nothing reaches acpmux; the pane's own chat forks with no click; after a click one fork goes out with its params unchanged; the next fork outside the scope needs its own click.check.jsoncase "live fork from outside the scope uses scope credit" (count 54 -> 55 intests/parity.rs).check.json(AgentPaneTransport+Check.swift,tests/parity.rs) now say that only the crate runs it and that the Swift rule has its own Swift tests.params.json: the case "acp.session.fork every known param" now has"live": true.livefork of a chat on another computer was refused with "forking a chat on another computer through a turn is not supported yet". It names no turn, so it now gets "forking a chat on another computer is not supported yet". ThethroughSeqmessage does not change.RpcError. The pane never sends a fork of a peer's chat (webviews/.../conversation/messageMenu.tsforkServedrefusessummary.peer; Fork Conversation then shows the localizednotice.forkFailed), so only a raw protocol client reads this text. No string a person sees in the app changes.The new Swift test and the two JSON cases pin existing behavior: they are coverage tests, not a red-first bug fix. They are expected to pass on the base too. Only the acpmux message has a red-first test. Commit
ead6efbd071in the history is NOT valid red evidence (its fixture lacked the peer, so it failed for the wrong reason). The red result is scratch3cb9ea55783(=ead6efbd071+ the fixture fixd4bfd23c647, without the message fixdc4d15e9e1a; never merge), jobb27f3045d1a265a584d16074: it fails on the live assert only (left "forking a chat on another computer through a turn is not supported yet", right "forking a chat on another computer is not supported yet"). The green result is the headd4bfd23c647, job25ae0ce9de68429cb575916b: PASS. Focused command:scripts/ci/cmux-tui-rust-check.sh test a_peer_chats_fork_is_refused_with_what_it_asked_for. The first review (FIX, #28512 (comment)) found that this test's fixture did not list the peer, soresolve_remotefound nothing and the test failed for the wrong reason at both commits.d4bfd23c647lists the peer, asserts that the fixture resolves, and corrects three more stale "Swift runs" comments inparity.rs.Review request. The agent-pane policy file asks for the protocol/origin lead's review. The protocol/origin lead (session ad349) is asked to review this PR together with #28332 and d6c70e6. acpmux owner PL-acpmux (session cmux-4f): this PR changes one refusal message in
server/fork_through.rsand adds its unit test.Testing
All runs are on the fleet (
cmux-ci, poolperf-lead); nothing was compiled or tested on the VM.Fleet results (pool
perf-lead; Rust steps went to Blacksmith overflow). Every attempt counted; nogate-notice: FLAKYin any passing log.bdeb92e3767a6bba4fbcf99662e9b8d30408c6b8efd2bb74AgentPaneForkRelayTests(3 tests, new one included)1022b994772f65d5e135ea90cmux-tui-rust-check.sh test full_check_order(55 cases)da2f676b55a0956e1f228e8btest params_ruled7de6bad330a24d4e4ccbdb0test a_peer_chats_fork_is_refused_with_what_it_asked_for, redscratch/fork-relay-rereview-28332-red-never-merge, never merge)b27f3045d1a265a584d1607425ae0ce9de68429cb575916bclippy3f74be9526e58e7267ec49d40b2ce261bfa5e4154390f170,35eb3b762b8d5a88b1fc9e98The Swift test and the two JSON cases passed at once, as expected: coverage of existing behavior.
Observed / Not run
python3 scripts/cmux-next/prepush-gate.pypassed on the head (no new violations; owner note for acpmux). The fleet results above.Changelog
none
Proof
No capture: no native UI change (tests, comments and one acpmux protocol error text).