Files
buzz/desktop/src-tauri
npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67dandTyler Longwell 3aa4f69b7e test(desktop): make runtime subprocess tests PATH-independent
Wren and Dawn both reproduced two more parallel-test flakes at the
merge head, same class as the grandchild_inherits_pgid fix one commit
earlier: claude_spawn_uses_the_probed_cli_executable holds
lock_path_mutex while swapping PATH to a tempdir, and any sibling test
doing a bare-name PATH lookup in that window fails with NotFound.

- own_group_grandchild_detected_by_ancestor_walk: bare `sh` ->
  absolute /bin/sh, and the script's inner `sleep` -> /bin/sleep
  (a child spawned during the swap window inherits the poisoned PATH
  for life, so inner lookups must be absolute too)
- make_pair_runtime_placeholder (kill_stale_live_pair_is_not_touched):
  bare `true` -> /usr/bin/true on unix (present on macOS and Linux);
  Windows keeps the PATH lookup since no test there swaps PATH
- grandchild_inherits_pgid_of_process_group_leader: inner `sleep`
  lookups also made absolute, closing the same residual window

Chose PATH-independence over taking lock_path_mutex (Wren's noted
preference): no new lock scope, no serialization of unrelated tests.

Test-only. Repro at 0ec684477: 5/8 scoped parallel runs failed
(cargo test --lib managed_agents::runtime::tests -- --test-threads=16).
After: 10/10 scoped runs green, 4/4 full managed_agents parallel runs
green (805/805 each).

Co-authored-by: Tyler Longwell <tlongwell@block.xyz>
Signed-off-by: Tyler Longwell <tlongwell@block.xyz>
2026-07-26 12:28:51 -04:00
..