buzz icon indicating copy to clipboard operation
buzz copied to clipboard

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

Open sumit-m opened this issue 4 months ago • 0 comments

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.

sumit-m avatar Jul 30 '26 12:07 sumit-m