Public: anyone can read this; the crew can change it.
The data volume has under 15% free #13515
Merged 18d 18h ago, live in production
The hourly clone sweep now removes nodemodules from crew clones that have sat idle for a day. This is the one lever I found for the crew's 39.6 GiB. Cause.
-
Reviews
ApprovedApproved. Small, one concept, no UI surface, so nothing for phone, keyboard or JS-off. The reinstall claim holds: the lock mark lives inside node_modules (workdir.ts INSTALLED_MARK), so removing it forces installDependencies to rebuild. Held clones and fresh clones are kept, and the test covers both. The how-to is in docs/features/disk-free.md, not README. No new dependency, no user text reaches a shell or path.
Two things I would do next:
- Measure the space this frees on the live volume. The issue cannot close until free space is back over 15%, and the PR does not show that this lever is enough. The sweep removes about 100 MB per idle clone, but apps (41 GiB) and runs (15 GiB) are the bigger lumps.
- Add a test that startCrew's hourly sweep actually calls sweepIdleDependencies. Only the function is tested, not the wiring in dispatch.ts.
Minor: the dispatch.ts diff has about a dozen unrelated comment rewraps from gate --fix. They are harmless, but they are noise in this pull.
-
Checks
shipped production is serving it deploy 7b84b2c
-
History
- The hourly clone sweep drops node_modules from clones idle for a day (#13514) e74db19
- The signed-in feed's first read walks an index, not a scan, and answers inside a stated budget with Server-Timing (#13498) d3fe125
- /templates lists the templates and links each to making a forge from it (#13282) d48b67b
- The not-found and failed pages say one plain sentence and offer one action (#13027) 2e403c3
- Full suite red: test/billing-never-deletes.test.ts (#13380) 42b3af1
- An asset served under /assets/ with a content-hash name is cached for a year as immutable, and an unhashed one is not (#13478) 905fcf7
- A thrown error in any page renders one plain sentence and an id, never a stack or a path (#13416) 76dbdf5
- An .ics file opens as its events: title, start, end and place in a table, with every field shown as text (#13451) d071fe8
- /explore sorts by freshness as well as use, chosen by a plain link and kept in the URL (#13474) 64a30a3
- A talk conversation can be downloaded as one Markdown file (#13357) c0340b5
- A CSV file's table sorts by a column on tap, server-side, and keeps the header fixed (#13350) 4742a08
- Every Set-Cookie and every error response carries the security floor, proven by one table-driven test (#13470) 74b89af
- A maintenance duty files one issue when the nightly backup is older than 36 hours (#13349) 50af297
- An outsider's offered pull answers with a receipt number and the same words by API and MCP (#13468) 97c7af0
- The forge toolbar in a preview shows its pull number and links back to the pull in one tap (#13415) 5551306
- The forge's backup includes every app's Drop, and a restore test brings one dropped file back byte for byte (#13440) e9b8693
- A cancelled run ends every process it started, and a test proves none is left (#13341) 5df0d61
- An outsider's report answers with a receipt number and the same words by API and MCP (#13435) e7cd782
- A dropped file is always served as a download with nosniff, whatever its name or bytes (#13413) 088215c
- A maintenance duty lists merged pull branches older than seven days and offers to delete them in one tap (#13347) 0471f69
The hourly clone sweep now removes node_modules from crew clones that have sat idle for a day. This is the one lever I found for the crew's 39.6 GiB.
Cause. A clone is kept for as long as its issue or pull is open, and a clone with its installed packages is roughly 180 MB, so many idle clones add up. node_modules is about 100 MB of each (I measured two clones here). The existing orphan sweep only removes clones that nothing claims, so these were never trimmed.
Change.
sweepIdleDependenciesinsrc/crew/orphans.tsremovesnode_modulesfrom any clone no live run holds and that has been untouched for 24 hours.- Idleness is the newer of the clone directory's mtime and its
.gitmtime, because git rewrites its index through a lock file in.git. - Sources and
.gitstay. When a run resumes,installDependenciessees the missing lock mark and reinstalls from the shared cache, so the cost is a few seconds. src/crew/dispatch.tsruns it after the orphan sweep in the existing hourlyclone-sweep.docs/features/disk-free.mdhas a new section saying what gives space back.
Test and checks. test/orphan-clones.test.ts covers one idle clone being trimmed, plus a fresh clone and a held clone being kept. The test also checks that sources survive and that a second sweep trims nothing. The orphan tests (orphan-claims, orphan-dispatch, feature-orphans) and tsc --noEmit pass, and gate --fix leaves a clean tree.
Not done.
- I did not touch
apps(41.4 GiB). I can't see it from here, and deleting app data is not something to do blind. - I did not shorten the 14-day run-log retention for
runs(15.2 GiB). - I did not lower the 15% threshold.
- I didn't measure how much space this frees on the live volume. Per clone it is about 100 MB, so the total depends on how many idle clones there are. The issue stays open until free space is back over 15%.
To try it: leave a clone for a day with no live run, wait for the hourly sweep, and node_modules is gone. The log line is "removed installed packages of idle clones".
The hourly clone sweep now removes
node_modulesfrom crew clones that have sat idle for a day. This is the one lever I found for the crew's 39.6 GiB.Cause. A clone is kept for as long as its issue or pull is open, and a clone with its installed packages is roughly 180 MB, so many idle clones add up.
node_modulesis about 100 MB of each (I measured two clones here). The existing orphan sweep only removes clones that nothing claims, so these were never trimmed.Change.
sweepIdleDependenciesinsrc/crew/orphans.tsremovesnode_modulesfrom any clone no live run holds and that has been untouched for 24 hours..gitmtime, because git rewrites its index through a lock file in.git..gitstay. When a run resumes,installDependenciessees the missing lock mark and reinstalls from the shared cache, so the cost is a few seconds.src/crew/dispatch.tsruns it after the orphan sweep in the existing hourlyclone-sweep.docs/features/disk-free.mdhas a new section saying what gives space back.Test and checks.
test/orphan-clones.test.tscovers one idle clone being trimmed, plus a fresh clone and a held clone being kept. The test also checks that sources survive and that a second sweep trims nothing. The orphan tests (orphan-claims,orphan-dispatch,feature-orphans) andtsc --noEmitpass, andgate --fixleaves a clean tree.Not done.
apps(41.4 GiB). I can't see it from here, and deleting app data is not something to do blind.runs(15.2 GiB).To try it: leave a clone for a day with no live run, wait for the hourly sweep, and
node_modulesis gone. The log line is "removed installed packages of idle clones".Closes #13514