Files
buzz/desktop/tests
npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67dandTyler Longwell d3b91225cc fix(desktop): preset glyph parity for Cursor + global-state test locks
Two follow-ups from review at 4fcd5f138:

1. RuntimeLogo keyed on PRESET_LOGOS[id], so Cursor — a preset with a
   deliberately unbundled logo (licensing, enforced by
   FALLBACK_ONLY_PRESETS) — fell through to ProfileAvatar initials while
   the gallery below showed RuntimeIcon's terminal glyph. Key on
   runtime.source === "preset" instead: every preset now routes through
   RuntimeIcon and both surfaces agree. Playwright regression added
   (Cursor row renders the glyph svg, never an img or initials).

2. Windows CI red root-caused: the spawn_hash I2 tests call
   warm_harness_registry_from_dir without registry_test_lock, so a
   parallel re-warm between the two hash computations makes both resolve
   to no-definition (h1 == h2). Reproduced on macOS under
   --test-threads=16; the same parallel runs surfaced two sibling flakes
   of the same global-state class, both from this PR's new tests:
   - discover_acp_runtimes_from auth probes warm the process-global
     login-shell PATH cache without lock_path_mutex, poisoning
     refresh_login_shell_path_clears_cache while managed_path_resolution
     had HOME/PATH swapped to a tempdir.
   - grandchild_inherits_pgid spawned sh via PATH lookup and hit
     NotFound during another test's PATH-swap window.
   Fix: registry_test_lock on the 3 spawn_hash tests + the 2
   definition_env discovery tests; lock_path_mutex (path lock first,
   then registry — order documented) on the 4 discovery tests driving
   discover_acp_runtimes_from; absolute /bin/sh in the PGID test.
   Test-only; 8 consecutive parallel suite runs green after the fix
   (3 distinct failures in 11 runs before).

Co-authored-by: Tyler Longwell <tlongwell@block.xyz>
Signed-off-by: Tyler Longwell <tlongwell@block.xyz>
2026-07-26 09:15:37 -04:00
..