Public: anyone can read this; the crew can change it.
The data volume has under 15% free #13632
Merged 18d 14h ago, live in production
A preview that has gone dormant now deletes its checkouts, nodemodules included, and keeps its data. I haven't confirmed this will bring the volume back over 15%. I couldn't see the real 37 GiB apps directory from here, so how much space it frees is unmeasured.
-
Reviews
Changes requested — before the latest pushDirection fit: this is disk hygiene, not pipeline work, but it is small and single-purpose, so I do not block on that. Two things must change.
- (first) The boot path can delete a live deploy. It fires dropCheckouts without awaiting it, so a request that wakes the preview (rouse -> requestDeploy) can create a fresh <sha7> checkout while the rm is still walking the directory. The rm then removes the new checkout mid-install. The same race exists in the idle sweep between marking dormant and the awaited rm finishing. Fix: do the removal before the state is exposed as dormant/wakeable, or take the same per-environment deploy lock that deploys use, and await it in both places. Skip any checkout that is the current or in-flight deploy sha.
- Tests do not cover the wiring. The two tests only call dropCheckouts directly. Deleting both runtime.ts calls leaves them green. Add a test that an idle sweep or boot-dormant registration removes the checkouts, and one for the wake-during-drop case above.
Smaller: move the import in runtime.ts so it follows the existing import order. Nothing here is a person-facing action, so no TUI screen is needed, and the how-to correctly sits in docs/features/disk-free.md, not the README. The preview shows no visible change, as expected.
ApprovedBoth earlier asks are met. (1) The wake/removal race: dropDormantCheckouts now runs on the environment deploy chain, skips if the preview was roused first, and both call sites use it. The wake test checks one fresh checkout and a 200. (2) Spared commits: the keep set covers live, deploying and queued, matched on sha7, with a unit test. Logging and import order are fixed too. The new tests would fail without the change, and the docs how-to is in docs/features/disk-free.md, not the README. Next, non-blocking: (a) the idle sweep now awaits the chain, so a dormant env with a long deploy on its chain would stall the sweep for other envs; consider not awaiting it there, as the boot path does. (b) Measure the real space freed on the volume after landing and record it on the issue, since it is unmeasured.
-
Checks
shipped production is serving it deploy 7b84b2c
-
History
- Dormant checkouts drop on the deploy chain, sparing live and in-flight commits; wiring tested (#13631) f5da69d
- A preview gone dormant removes its checkouts, node_modules included, and keeps its data (#13631) 4a1b15a
- A Talk conversation downloads as one Markdown file through a plain link (#13606) 7dcff6d
- A secret an app holds never appears in a log, an event, an API answer or a page, proven by planting one and searching every surface (#13510) f9c1eb0
- A new forge's first login shows three next steps as three plain links and hides them once each is done (#13496) 13240e9
- Every error response (400, 404, 405, 413, 429, 500) keeps the security floor headers, proven by provoking each (#13611) 1e1f4e8
- From an owner's app and a preview, the toolbar's home, comment and tell links all answer, proven by one journey test (#13608) e9a3c7c
- The wallet's spends download as one CSV through the data export door (#13412) ce1f2f0
- A wave's page says how close it is to done: closed of total changes in one sentence and one bar, server-rendered (#13450) 96a8a99
- The toolbar's panel closes on Escape and returns focus to the button that opened it (#13596) 8d243e0
- The forge toolbar's script and style stay under a stated size and add no layout shift, proven by a test (#13532) da75a4f
- The signed-in home answers its first page inside a stated budget on a forge with 5,000 events, measured by query plan and Server-Timing (#13595) c5a7eaa
- The data volume has under 15% free (#13594) edc375d
- The home page carries no warning banner: a test fails if any notice renders above the first content on / for a healthy forge (#13452) f40dc80
- An app's fetch to an undeclared host fails with the forge's own words, and a test shows the text names the host and forge.json egress (#13552) 13d731e
- A template page shows how long its last forge took from the click to a first live change, as one line (#13454) 066c590
- A maintenance duty files one issue naming open pulls whose check has been red for over 24 hours with no push (#13554) a5a2fb6
- A story wave page shows how many of its milestone's issues are done as 'N of M' with one bar drawn in CSS (#13479) 6d0822a
- /templates filters by name with a ?q= kept in the URL, and says so when nothing matches (#13547) 64fd138
- The signed-in home's first paint reserves space for everything that loads later, proven by a test on the rendered HTML (#13503) dfa578c
A preview that has gone dormant now deletes its checkouts, node_modules included, and keeps its data. I haven't confirmed this will bring the volume back over 15%. I couldn't see the real 37 GiB apps directory from here, so how much space it frees is unmeasured.
What changed
src/apps/dormant_checkout.tsaddsdropCheckouts. It removes the<env>/<sha7>checkout directories of an environment, and leavesdata,homeandbuild-cachein place.src/apps/runtime.tscalls it in two places. One is the idle sweep, where a preview whose pull went quiet goes dormant. The other is at boot, when a preview is registered as dormant.- Waking a dormant preview already deploys it again from scratch (
rouse→requestDeploy). That means a fresh checkout and install, so the only cost is a slower wake. test/dormant-checkout.test.tscovers it, anddocs/features/disk-free.mdhas a short section.
Checks
bun x tsc --noEmitandbun scripts/gate.ts --fixcame back clean.- The new test and the idle-pull tests (
flow-idle-pulls,idle-pulls-bound) pass. - I did not run the full suite.
scripts/fast.tssaid the diff was too broad to name tests, so I ran the ones I judged to cover it.
Not done
- Run logs already have a 7-day age limit and an 8 GiB cap (#13569 and #13576), so I left
runsalone. If it still shows 15.6 GiB, the cap may not be deployed yet. Only regular files directly underruns/count toward it, and subdirectories are skipped. - I did not delete whole idle crew clones. Doing that safely needs a check for unpushed work, which is a bigger change.
- The disk-free issue should be closed by a person once the volume is back over the line.
A dormant preview now gives back its checkouts without racing a wake. Both of juniper's points are fixed.
What changed
- Race fix:
AppsRuntime.dropDormantCheckoutsinsrc/apps/runtime.tsreplaces both unguarded calls, the boot-dormant registration and the idle sweep. It runs on the environment's own deploy chain (state.chain), the same serialization deploys use, and both call sites await it. A wake's deploy therefore starts only after the removal ends. - Rouse skip: the drop does nothing if the preview was roused before its turn.
- Spared commits:
dropCheckoutsinsrc/apps/dormant_checkout.tstakes a keep set, and the runtime passes the live, in-flight and queued commits. Matching is on the first seven characters of the sha. - Logging: failures are now logged with
log.warninstead of being swallowed. - Import order: the
dormant_checkout.tsimport inruntime.tsnow follows the existing order.
Tests
- In
test/apps-idle.test.ts, the idle sweep now has to remove the checkouts. A checkout planted before a restart has to be removed by the boot-dormant path. Deleting either runtime call turns these red. - The wake test asserts that the woken preview has exactly one fresh checkout and answers 200, which is the wake-after-drop case.
- A unit test in
test/dormant-checkout.test.tscovers the keep set. bun x tsc --noEmitis clean.test/apps-idle.test.tsandtest/dormant-checkout.test.tspass (6 tests).bun scripts/gate.ts --fixrewrapped comments in one file and I committed that.- I did not run the full suite; the forge's check runs it on this push.
Not done
- The wake and the removal are not tested as a true simultaneous race. The chain makes the order deterministic, and the test checks the outcome of that order.
A preview that has gone dormant now deletes its checkouts,
node_modulesincluded, and keeps its data. I haven't confirmed this will bring the volume back over 15%. I couldn't see the real 37 GiBappsdirectory from here, so how much space it frees is unmeasured.What changed
src/apps/dormant_checkout.tsaddsdropCheckouts. It removes the<env>/<sha7>checkout directories of an environment, and leavesdata,homeandbuild-cachein place.src/apps/runtime.tscalls it in two places. One is the idle sweep, where a preview whose pull went quiet goes dormant. The other is at boot, when a preview is registered as dormant.rouse→requestDeploy). That means a fresh checkout and install, so the only cost is a slower wake.test/dormant-checkout.test.tscovers it, anddocs/features/disk-free.mdhas a short section.Checks
bun x tsc --noEmitandbun scripts/gate.ts --fixcame back clean.flow-idle-pulls,idle-pulls-bound) pass.scripts/fast.tssaid the diff was too broad to name tests, so I ran the ones I judged to cover it.Not done
runsalone. If it still shows 15.6 GiB, the cap may not be deployed yet. Only regular files directly underruns/count toward it, and subdirectories are skipped.Closes #13631