@@ -47,3 +47,25 @@ packaged ones. `www/video/getting-started.vtt` captions a recording made before
4747misaligned comment column does not show up in a diff review — render the page and look at
4848the block before calling an edit done. In the scaffold tree, the ` # ` comments all sit at
4949visible column 33.
50+
51+ ## Disk I/O: keep throwaway data off the drives
52+
53+ Test databases, sandboxes and temp files must not wear out the developer's drives.
54+
55+ - ** Throwaway data goes in RAM.** Put scratch files, mutation-testing sandboxes (Stryker
56+ ` tempDirName ` ) and test-only temp directories under ` $DEV_SCRATCH ` (fall back to the system temp
57+ directory when it is unset). Delete what you create when the run ends.
58+ - ** Test databases run on a capped tmpfs at the image's ` VOLUME ` path** (` postgres:18* ` :
59+ ` /var/lib/postgresql ` ; ` postgres:16/17 ` and ` pgvector:*-pg17 ` : ` /var/lib/postgresql/data ` ;
60+ ` mysql:8* ` : ` /var/lib/mysql ` ; check others with ` docker image inspect -f '{{json .Config.Volumes}}' ` ),
61+ ` size=2g ` , with Postgres durability off: ` -c fsync=off -c synchronous_commit=off -c full_page_writes=off ` .
62+ - ** Every container you start, you remove.** Use ` docker run --rm ` , Testcontainers with Ryuk enabled,
63+ or explicit teardown in a ` finally ` /` trap ` . Never leave a hand-started database running after your
64+ task. A database you mean to keep gets the label ` dev.keep=true ` .
65+ - ** Generators and tools never rewrite a file whose bytes did not change** , write any manifest once per
66+ run (not once per file), and verify drift in memory rather than by rendering everything to a temp
67+ directory.
68+ - ** Run the narrowest tests that prove the change** while iterating (one module, the affected test
69+ classes); run the full suite once, before the PR.
70+ - ** No background processes outlive the task.** Kill test watchers, dev servers and sandboxes you
71+ started before you finish.
0 commit comments