Skip to content

test(buzz-acp): quote the steer capture path for bash - #3733

Open
sumit-m wants to merge 1 commit into
block:mainfrom
sumit-m:windows-acp-test-capture
Open

test(buzz-acp): quote the steer capture path for bash#3733
sumit-m wants to merge 1 commit into
block:mainfrom
sumit-m:windows-acp-test-capture

Conversation

@sumit-m

@sumit-m sumit-m commented Jul 30, 2026

Copy link
Copy Markdown

Problem

spawn_steer_capture_script interpolates the capture path unquoted into a bash -c script:

read -r line; printf '%s' "$line" > C:\Users\me\AppData\Local\Temp\buzz-acp-steer-capture\acp_shape.json

Unquoted, bash consumes the backslashes as escapes, so the redirect target collapses to the relative C:UsersmeAppDataLocalTempbuzz-acp-steer-captureacp_shape.json. Two consequences on Windows:

  • acp_steer_request_omits_expected_run_id_and_carries_session_and_prompt and goose_transport_wins_when_both_run_id_and_capability_present fail, because run_one_steer reads the intended path and finds nothing.
  • Each run litters crates/buzz-acp/ with junk files named C:UsersmeAppData…json.

Change

New bash_path test helper renders the path with forward slashes — accepted by the MSYS bash used on Windows — and the redirect target is quoted so spaces are covered too. Test-only; no production code touched.

Result

On Windows, cargo test -p buzz-acp goes from 3 failures to 1, and no stray files are left behind. The remaining failure is keepalive_resets_idle_past_deadline, an unrelated timing flake that passes in isolation and is not addressed here.

The capture path was interpolated unquoted into a bash -c script, so on Windows
bash ate the backslashes as escapes: the redirect wrote a mangled relative file
into the crate directory and both steer tests failed on the missing capture.
Render with forward slashes and quote the redirect target.

Signed-off-by: sumit-m <33051892+sumit-m@users.noreply.github.com>
@sumit-m
sumit-m requested a review from a team as a code owner July 30, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant