From a145c8d611632db569931c32554572e1709606fb Mon Sep 17 00:00:00 2001 From: Simon Klee Date: Sat, 7 Nov 2026 00:22:14 +0100 Subject: [PATCH] test(cli-rs): compare mini shell output, record the tools filter TS mini drops every kind "tool" commit in RunFooter.append while mini.tools is hide, the default, so a ! shell turn prints nothing. The verbosity presets gate model tools and skills in the transport; shell turns are dropped only by the footer's generic filter, a side effect. Rust keeps printing them. M.2/shell-output now sets tools: show and compares the output rows. --- .../parity/deviations/M07-mini-shell-tools.md | 18 ++++++++++++++++++ .../parity/scenarios/M.2/shell-output.pty.ts | 6 +++--- 2 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 packages/cli-rs/parity/deviations/M07-mini-shell-tools.md diff --git a/packages/cli-rs/parity/deviations/M07-mini-shell-tools.md b/packages/cli-rs/parity/deviations/M07-mini-shell-tools.md new file mode 100644 index 00000000000..67279c365b1 --- /dev/null +++ b/packages/cli-rs/parity/deviations/M07-mini-shell-tools.md @@ -0,0 +1,18 @@ +# M07, M13: `!` shell turns show while `tools` is `hide` + +TypeScript: `RunFooter.append` (`packages/tui/src/mini/footer.ts:606`) drops every commit that +`toolTranscript` (`footer.ts:1176-1178`) matches, `kind === "tool"`, while `mini.tools` is `hide`. That is the +default (`verbosity.ts:17-23`). A `!` shell turn's commits are `shellCommit`s, `kind: "tool"` +(`stream-v2.transport.ts:340-353`), so at the default verbosity TS prints neither `$ ` nor the output: +the user's own command leaves no row in the scrollback. In `parity/scenarios/M.2/shell-output.pty.ts` with the +default settings, TS shows no shell rows after the turn ends, after 4 s more, or after another key; with +`tools: "show"` it shows them as soon as the turn ends. + +Rust: mini prints the `!` shell turn (`$ `, its output, and the exit error) whatever `tools` is. + +Reason: the `tools` filter came with the verbosity presets (#47931), which gate model tool calls and skills in +the transport (`showTools()`), and whose "Tools" setting names "files skills activity work steps". Shell turns +are not gated there; they are dropped only by the footer's generic filter. `runShellTurn` even holds the turn +up to 1.5 s "so the output commit renders inside it" (`stream-v2.transport.ts:395-398`). Hiding a command the +user typed is a side effect, not the intent. With `tools: "show"` the two clients print the same rows, so the +scenario sets it and compares the output. diff --git a/packages/cli-rs/parity/scenarios/M.2/shell-output.pty.ts b/packages/cli-rs/parity/scenarios/M.2/shell-output.pty.ts index 247f24854b4..ba4da739646 100644 --- a/packages/cli-rs/parity/scenarios/M.2/shell-output.pty.ts +++ b/packages/cli-rs/parity/scenarios/M.2/shell-output.pty.ts @@ -62,15 +62,15 @@ export default definePty({ setup: async (root) => { await Bun.write( `${root}/home/.config/opencode/cli.json`, - JSON.stringify({ animations: false, mini: { splash: "hide" } }), + // TS hides `!` shell turns while `tools` is `hide`, the default (`M07-mini-shell-tools.md`). + JSON.stringify({ animations: false, mini: { splash: "hide", tools: "show" } }), ) }, steps: [ opened, { keys: "!echo hello", settle: 300 }, { keys: "\r", settle: 400, checkpoint: "waiting" }, - // The shell's output entry is not compared: TS holds it back past this scenario. - { until: { screen: /^build · model · demo/m }, settle: 400 }, + { until: { screen: /^build · model · demo/m }, settle: 400, checkpoint: "output", scrollback: 4 }, ...leave, ], exits: true,