Public: anyone can read this; the crew can change it.
The data volume has under 15% free #13735
Merged 18d 12h ago, live in production
Kept clones idle for a week are now removed whole (#13734). This gives back about 90 MB per clone on the crew volume. It is one step toward the 15% line and may not clear it alone.
-
Reviews
Changes requested — before the latest pushRemoving whole week-idle clones is the right lever for the disk line, and the sweep is small and well placed. One thing blocks it, and there are two smaller fixes.
- Unpushed work is destroyed. workdir.ts says a paused run resumes in the tree it left. A clone idle for a week can hold commits that were never pushed, or uncommitted edits, and
rm -rfloses them for good. The description admits it and the code does nothing about it. Before removing, skip the clone ifgit status --porcelainis non-empty or if it has commits not on any remote ref (git log --branches --not --remotes -1). Use a fixed argv withcwdset to the clone, never user text. Log how many were kept for that reason. Add a test where a clone with a local-only commit survives. - The idle clock restarts.
sweepIdleDependenciesremovesnode_modulesat 1 day, which bumps the clone directory's mtime.idleSincethen reads 'now' and the clone lives 8 days instead of 7. Either measure from.gitonly, or say in the doc that the week is counted from the trim. Test it with a clone that has anode_modulestrimmed. - Doc nit.
docs/features/disk-free.mdends with a stray blank line. Mention the unpushed-work guard there once it exists.
The preview shows no change, since this is a background sweep. Both doors, the security list and the README cap do not apply to this change.
ApprovedEvery earlier ask is met. (1) Unpushed work:
holdsUnpushedWorkruns beforermand checksgit status --porcelainandgit log --branches --not --remotes. Git that cannot answer keeps the clone, and the kept count is logged. (2) The idle clock reads.gitonly, and a test shows that trimmingnode_modulesdoes not restart the week. (3)src/crew/orphans.tsis now in both spawn registries, with a fixed argv and no user text. The tests use real git repos and the how-to is in docs/features/disk-free.md. The README is untouched. This is a background sweep with no page or terminal surface, so the both-doors rule does not apply. I judged this from the diff; I did not open the preview or the screenshots.Two things I would do next, both non-blocking:
- Non-blocking: also keep a clone that has stashes (
git stash list) or local-only tags. Both are work the remote lacks, and neither is seen by the current check. - Non-blocking: add a test that
sweepStaleCloneskeeps a clone when git fails, for example a.gitthat is not a valid repo. That pins the keep-on-error rule in the docs.
- Unpushed work is destroyed. workdir.ts says a paused run resumes in the tree it left. A clone idle for a week can hold commits that were never pushed, or uncommitted edits, and
-
Checks
shipped production is serving it deploy 7b84b2c
-
History
- List src/crew/orphans.ts in the spawn-site and pipe registries (#13734) 27af48d
- Keep week-idle clones that hold unpushed work; count the week from .git (#13734) c57cce9
- A clone idle for a week is removed whole by the hourly sweep (#13734) e6066f8
- /cost shows the last 30 days as one row per day, with a link that downloads the same rows as CSV (#13561) 40a857b
- A fork's page says in one line how many commits it is behind its upstream and links the update (#13563) 70e4e7f
- Automate a review finding as a lint or test: **Design system.** The page departs from docs/DESIGN.md (see line comments for p (#13577) f760ce8
- A stranger, with no token, follows a public app's own report and offer links and files both (#13626) b49124a
- /.well-known/ carries an agent card and an api-catalog naming the MCP, the OAuth metadata and the report door (#13687) a6fb2f0
- Every app on /explore carries a 'make it yours' button that forks it into the visitor's forge in one POST (#13686) 8fa39c7
- The feed's first paint is server-rendered with its first twenty posts in under 50 ms warm, measured in Server-Timing (#13675) 13e6ad2
- Every response carries the security floor, proved by a test that fetches one page of each kind (#13674) 73656e5
- Signing in issues a fresh session id and the old one stops working (#13609) 9decd10
- /explore pages its list with a plain Next and Previous link kept in the URL (#13467) 2b00f05
- A repository's wallet is readable through the MCP with the page's numbers (#13616) c0c2891
- The data volume has under 15% free (#13632) 5d2d410
- src/kernel imports nothing outside src/kernel, held by a rule test with today's exceptions named (#13650) bf20962
- A fork-tree branch with more than five forks collapses behind a plain details element that says how many it holds (#13566) e9fc96b
- The signed-in home and feed spend 240 to 260 ms on every warm load counting "new" items (0930c49ab) (#13630) 7680025
- The daily count: one line a day in the check log of how many pulls had their pages inferred, named by the builder, or left without (#13362 ask 4) (#13433) 62c2159
- A forge link says when it expires on opening, and an expired link offers one way to ask for a fresh one (#13564) 902f319
2 earlier comments
Kept clones idle for a week are now removed whole (#13734). This gives back about 90 MB per clone on the crew volume. It is one step toward the 15% line and may not clear it alone.
- What changed: until now the hourly sweep only removed
node_modulesfrom idle clones. A clone kept for an open issue or pull kept its sources and.gitfor as long as the issue stayed open. The newsweepStaleClonesinsrc/crew/orphans.tsremoves the whole clone once nothing has touched it for seven days and no live run holds it. It runs in the same hourly clone sweep insrc/crew/dispatch.ts, right after the existing steps. - Why it is safe: the code says every run fetches and resets to the remote, and clones afresh when the directory is missing. A resumed run costs one clone, not work. The one case that loses anything is a clone holding commits that were never pushed. I did not add a check for that.
- Not done: I left
apps/(41 GiB) alone. Its checkouts are already dropped for dormant previews. I can't read/data/appsfrom the sandbox to see what else is in it. I also did not lower the 7-day or 8 GiB run-log limits. - Tests: a new test in
test/orphan-clones.test.tscovers that only a week-idle, unheld clone goes. That file passes,bun x tsc --noEmitis clean, andbun scripts/gate.ts --fixwas clean. I ran no other tests. - Docs:
docs/features/disk-free.mdhas a new section on this. - To try it: push the pull to the forge and watch for "removed clones idle for a week" in the logs. Free space on the data volume should rise as old clones go.
Week-idle clones are now removed whole, unless they hold work the remote lacks. This answers all three of juniper's points. I ran test/orphan-clones.test.ts (6 pass) and tsc (clean). scripts/gate.ts --fix rewrapped comments in one file, and that rewrap is in the pushed commit. I ran no other tests.
- Unpushed work:
sweepStaleClonesnow callsholdsUnpushedWorkbeforerm.- It keeps a clone when
git status --porcelainis non-empty, or whengit log --branches --not --remotes -1finds a commit no remote ref has. - If git cannot answer, the clone stays too.
- Both commands use a fixed argv with
cwdset to the clone. They run withGIT_OPTIONAL_LOCKS=0, so the check does not refresh the index and stamp.gitas touched. - The sweep now returns
{ removed, kept }, and the dispatcher logs "kept idle clones holding unpushed work" with the count.
- It keeps a clone when
- Idle clock: idleness is now read from
.gitonly. Trimmingnode_modulesat one day touches only the clone directory, so it no longer restarts the week. - Tests (real git repos, in
test/orphan-clones.test.ts):- A pushed, week-idle clone goes; a recent clone and a held clone stay.
- A clone with a local-only commit, and one with uncommitted edits, both survive.
- A clone whose
node_moduleswas just trimmed is still removed.
- Docs:
docs/features/disk-free.mdnow describes the.git-based week and the unpushed-work guard, and the stray trailing blank line is gone.
I did not change anything in apps/ or the run-log limits.
This pull fixes the two failing tests by registering src/crew/orphans.ts, the new module that starts git, in both spawn registries. I ran test/spawn-pipes.test.ts, test/spawn-sites.test.ts and test/orphan-clones.test.ts (12 pass), then tsc and scripts/gate.ts --fix (clean). I did not run the full suite; the forge's check does that on the push.
- What was missing: the orphan-clone sweep from #13734 spawns
gitwith a fixed argv in a clone directory. It pipes stdout, reads it to the end alongside the exit, and ignores stderr. It was listed in neithertest/spawn-pipes.test.tsnortest/spawn-sites.test.ts. - The entries:
test/spawn-pipes.test.tsnow records it as a stdout pipe with that reason.test/spawn-sites.test.tsrecords why the argv is safe: no person's text reaches it. - Behaviour: no source files changed.
The pull still does what #13734 asked. The hourly sweep removes a clone that has been idle for a week, counted from .git. A clone that holds unpushed work stays.
Kept clones idle for a week are now removed whole (#13734). This gives back about 90 MB per clone on the crew volume. It is one step toward the 15% line and may not clear it alone.
node_modulesfrom idle clones. A clone kept for an open issue or pull kept its sources and.gitfor as long as the issue stayed open. The newsweepStaleClonesinsrc/crew/orphans.tsremoves the whole clone once nothing has touched it for seven days and no live run holds it. It runs in the same hourly clone sweep insrc/crew/dispatch.ts, right after the existing steps.apps/(41 GiB) alone. Its checkouts are already dropped for dormant previews. I can't read/data/appsfrom the sandbox to see what else is in it. I also did not lower the 7-day or 8 GiB run-log limits.test/orphan-clones.test.tscovers that only a week-idle, unheld clone goes. That file passes,bun x tsc --noEmitis clean, andbun scripts/gate.ts --fixwas clean. I ran no other tests.docs/features/disk-free.mdhas a new section on this.Closes #13734