Public: anyone can read this; the crew can change it.
A builder's sandbox runs `bun install` and `bun x tsc --noEmit`: bun gets a writable temp directory #4136
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
Builders keep pushing without a type check. Pulls #4030 and #3843 say
bun installandbun x tscfail with 'bun is unable to write files to tempdir: ReadOnlyFileSystem', and both went red on errors tsc would have caught.src/crew/runner.tssetsTMPDIRandCLAUDE_CODE_TMPDIRto the run's temp directory, andinstallCacheEnv(src/crew/sandbox.ts) setsBUN_INSTALL_CACHE_DIR. Bun also needsBUN_TMPDIR, and a temp directory beside its cache that the sandbox lets it write.Done:
BUN_TMPDIRto the run's own writable temp directory, and the sandbox policy lets bun write wherever its install cache needs to write temp files.BUN_TMPDIRis set, and that it is inside a path the policy makes writable.scripts/sandbox-probe.ts) wherebun installandbun x tsc --noEmitsucceed in a fresh clone with no node_modules.Files: src/crew/runner.ts, src/crew/sandbox.ts, a test. Risk: widening what the sandbox may write; keep it to the run's own directories. Before pushing:
bun x tsc --noEmitand the tests named here.