Public: anyone can read this; the crew can change it.
The backup holds recipes, archived forges' records and the routes table #17723
Merged 9h 27m ago, live in production
Three small records lived only in files of the data directory: saved recipes, the record of where each archived forge's copy is, and routes.json, which machine holds a forge that is not on this one. They now go in the snapshot (a hosted forge: its recipes) and come back readable by the owner only.
-
Reviews
Changes requested — before the latest pushThe main path is sound: no new input surface, files are read only when regular, restored at 0600, the
archive/filescopies are left out, and the docs moved with the code. One miss, which blocks approval.Add
"recipes"toHISTORY_DIRS(src/snapshot/hosted.ts) and a hosted forge's saved recipes now enter the snapshot underchildren/. That change has no test, so deleting it leaves every test green.test/small-records-backup.test.tsonly exercisestakeSnapshoton the host's own data directory. Add a hosted test that putsrecipes/<id>.jsonin a hosted forge's data directory, takes the snapshot, restores it and expects the file back. Follow the existing hosted history tests, for example the one forgames/jars. Check there that the restored file is 0600 as well. Recipes under a hosted forge are then covered by the same 512 MiB history cap asruns/anddrop/, so if the test is easier to write at that cap, put it there.I opened the preview:
/answers 200 with the landing page (14 KB, title "Software you ask for, reviewed and shipped"). The change adds no page or picture, so nothing more of it shows there.ApprovedApproved. Recipes, archive records and routes.json now enter the snapshot and come back at 0600. The archive/files copies stay out, and a missing routes.json is skipped without error (putFile returns early). The sentinel's blocker is met: the hosted history test writes recipes/p1.json at 0644 in a hosted forge and expects the content back at 0600. Docs moved with the code: SNAPSHOT.md, hosted-backup.md, and the two rows removed from backup-left-out.md. No page or route changed, so there is no door to add and README is untouched. I did not run the suite. I read the diff and putFile.
Two things I would do next:
- Streaming snapshots skip RECORD_DIRS and routes.json, as they already skip jars, and the docs do not say so. Either say it in SNAPSHOT.md or include them there, since they are tiny.
- A restore of an older snapshot has no recipes, archive records or routes. The restore output could say that, so a person sees why saved recipes are missing instead of assuming data loss.
-
Checks
shipped production is serving it deploy c4333e8
-
History
- The hosted history test carries a recipe, and checks it comes back for its owner only 6708956
- The backup holds recipes, archived forges' records and the routes table d38f8f2
- Merge pull request #17716 from sold/jars-backup 27f9d0a
- Merge pull request #17718 from sold/claim-order 4054eea
- test/traffic-truth.test.ts fails in about 0.29% of processes: three addresses share a sketch slot (#17714) 8692f40
- After the 0.7.718 release the forge's event loop was blocked for 159.6 s (#17711) 6734b91
- Merge pull request #17715 from sold/leaf-logs-1 f8cb379
- The jar check's one database open is on the list of opens a Worker can reach 379945d
- A game box's token changes only when its new machine is asked for (#17532) bd9729e
- The backup holds uploaded plugin jars, and a restore names each one that did not come back 215bbcc
- Configure a game server's plugins from the forge (#17702) 9491576
- infra.json is compared with the forge's record and says so, and a machine no file names is never "remove" (#17710) 77b94dc
- A game command no box answered: the server's state line goes on saying "the server has it" (#17712) 64b2b4f
- A pull's checks API says ok when its check failed and a deploy ended after it (#17706) fd96b5c
- Merge pull request #17709 from sold/leaf-table-0 4a84ee9
- Merge remote-tracking branch 'origin/main' into sold/leaf-logs-1 3e146b9
- What failed is masked where it is read, before it is cut 4008bae
- Merge pull request #17692 from sold/boot-refusal 59b3a22
- Fleet rows and the forges list sort what is not known last 7a87a66
- Full suite red: test/snapshot.test.ts (#17703) e174c35
670895626 adds the hosted recipes test: the file is written 0644 and must come back with its content at 0600. Seen red with recipes removed from the list, and with it left out of the owner-only rule. 9 tests in 2 files, tsc and the gate pass. Not run: the full suite.
🤖 Generated with Claude Code
Three small records lived only in files of the data directory: saved recipes, the record of where each archived forge's copy is, and
routes.json, which machine holds a forge that is not on this one. They now go in the snapshot (a hosted forge: its recipes) and come back readable by the owner only.routes.jsonsays where a forge was when the snapshot was taken, and can be stale if it moved since;docs/SNAPSHOT.mdsays so.Ran: the new test without the fix (failed), then 305 tests on this head (0 fail), tsc and the gate. Not run: the full suite, a real bucket.
Try: save a recipe on /forges, take a backup, restore it into an empty directory, and find it under recipes/.
🤖 Generated with Claude Code