fix(test): stop two gates depending on the host and the process interleaving
Summary
Two test-isolation defects where results depended on the machine or the process interleaving, both flagged during #2986.
check:tmpdir-leaks:test (the Repo Guards red). Four files run in one node --test invocation, parallelized per file by default. Two sweep the real shared root: node-test-tmpdir.test.ts asserts pruneAbandonedRunDirectories(TEST_RUN_TMP_ROOT) both keeps and removes a planted directory, and vitest-tmpdir-global-setup.test.ts drives a real vitest whose globalSetup sweeps that same root. One file's sweep can delete the directory the other is mid-flight on, so it observes []. It passed 5/5 locally and failed on CI with exactly that actual: []. Fix: forward --test-concurrency=1 (+2s: 3.4s → 5.5s), pinned by a test requiring the flag among the forwarded args — it spawns node <forwarded…> --test, so a flag before the wrapper path is parsed by the wrapper and leaves the lane silently parallel.
agent-browser-lifecycle.test.ts (red on any Mac with a simulator runtime). It recorded PID 101 and asserted the reaper cleared it. PID 101 is appleaccountd there, so the reaper reads ownership-lost and retains the record: green on CI, red locally. Fix: the NEVER_A_PID idiom the tmpdir lanes already use, which is also the branch the test means to exercise.
The iOS smoke flake is not addressed here; see the #2986 thread for why it needs the Mac lane.
Validation
9b9d184. check:affected --run passed; test:unit 11396 passed 0 failed (that file failed here before the fix); check:tmpdir-leaks:test 25/25; check:gate-manifest:test, depgraph:test, check:layering, check:quick exit 0. The pin fails on the previous package.json and on the misplaced-flag form.