4 months ago
e338f16Codex review (commit 975e72f): withTmpScratch skipped the /tmp scratch root for a /tmp-scoped child but still added /private/tmp. Since /tmp is a symlink to /private/tmp on macOS, that re-opened the same tree (e.g. a child scoped to /tmp/proj/src could write /private/tmp/proj/...), bypassing the targetPaths scope. The ancestor check now normalizes the macOS firmlink aliases (/tmp,/var -> /private/*) on both sides of the comparison (emitted roots keep their original spelling; no-op on Linux), so both temp scratch roots are skipped for a /tmp-scoped child while normal workspaces still get /tmp scratch. Verified: bun run check, typecheck, docs:check, sandbox + spawnAgent + bash tests (64).
Parentc73f2d1