Skip to content

fix(testing): the Linux test sandbox starts in the in-memory runtime folder - #716

Merged
leemour merged 1 commit into
mainfrom
fix/test-sandbox-on-tmpfs
Nov 24, 2026
Merged

leemour merged 1 commit into
mainfrom
fix/test-sandbox-on-tmpfs

Conversation

@leemour

@leemour leemour commented Nov 24, 2026

Copy link
Copy Markdown
Member

On Linux, enterSandbox starts in $XDG_RUNTIME_DIR (tmpfs) when it is writable, otherwise in tmpdir() as before. macOS keeps /tmp.

Why: every store commit waits for fsync. On a loaded disk an attio test's CRM sync took 14 s instead of 1.5 s (strace -T: 58 fsync calls, 13.5 s). It went past the 15 s timeout, and attio 0.5.1's bin/release failed three times. With TMPDIR on tmpfs the same release passed on the first try (355/355).

Checked: src/testing tests (29 passed, with new cases for the runtime folder and the fallbacks), typecheck, biome, docs check. The child-run test sets XDG_RUNTIME_DIR to its watched folder so it still sees the leftovers.

🤖 Generated with Claude Code

…folder

Every store commit waits for fsync. On a disk other jobs keep busy, a
CRM sync in an attio test took 14 s instead of 1.5 s (strace: 58 fsync
calls, 13.5 s), past the 15 s timeout, and attio 0.5.1's local release
check failed three times. With TMPDIR on tmpfs it passed at once. The
sandbox now starts in $XDG_RUNTIME_DIR when it can write there, else in
the temporary folder as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@leemour
leemour merged commit c5367c5 into main Nov 24, 2026
10 checks passed
@leemour
leemour deleted the fix/test-sandbox-on-tmpfs branch November 24, 2026 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant