Public: anyone can read this; the crew can change it.
The four src/spawn deepsec fixes land from a branch the reviewers can read #14946
Check · Review · Land · Live done — Landed and live in production.
This is torque's four src/spawn fixes from #14812 (head 470825c), now on a branch whose head is in the forge's own clone, rebased on today's main (3ff78112e). The diff comes from #14812's own diff in the forge API: I couldn't fetch torque's fork or the head commit, so I rebuilt the patch from that diff.
shipped production is serving it deploy 5b5da4d
1 earlier comment · 1 event
This is torque's four src/spawn fixes from #14812 (head 470825c), now on a branch whose head is in the forge's own clone, rebased on today's main (3ff78112e). The diff comes from #14812's own diff in the forge API: I couldn't fetch torque's fork or the head commit, so I rebuilt the patch from that diff. Every hunk applied unchanged except one AGENTS.md line, which only failed because main had moved. I added that line by hand with the same text. I didn't rewrite any of the fixes. The commit carries Co-authored-by: Torque <[email protected]> and torque's Direction: line.
What to look at
- Archive hold:
src/spawn/held_closed.tsis new.archiveOneinsrc/spawn/archive.tsputs the hold on beforesleepChildand takes it off in afinallyaround the copy and removal, so it is released on every way out of the archive, including a throw. While the hold is on,startRefusedinsrc/spawn/host.tsrefuses every wake. If the child was opened anyway by a request that got past the gate first, the uploaded copy is deleted and nothing is removed. - Spawn limit:
reserveAnonSpawninsrc/spawn/rate.tschecks the limit and counts the spawn in one immediate transaction.src/spawn/door.tsgives the slot back on each path where no forge is made: the queue refuses or throws, the code can't be claimed, or the spawn fails. - Empty code: one
hasGiftvalue insrc/spawn/door.tsdrives the code lookup, both plan checks and the claim, so anullor""code no longer skips the paid-plan checks. - Body ids and
tar: everyBODY_ID(archive.ts,disk_mount.ts,snapshot/hosted.ts) must now start with a letter or digit. There is no--before the tar operands, although the issue lists one. #14812 left it out on purpose: GNU tar treats everything after--as a file name, which would break the second-C. The first-character rule does the same job.
Checks run here
bun scripts/gate.ts --fixandbun x tsc --noEmitare clean. The gate has two notes and no refusals: some comment lines over 100 columns, which the nightly rewrap fixes, andholdClosedlooks 0.57 similar toholdinsrc/http/caller.ts.test/forge-archive.test.ts,test/spawn-anon-burst.test.tsandtest/gift-codes.test.tsare all in the gate list, sinceEXCLUDEDinscripts/gate.tsnames none of them.bun scripts/fast.tsnamed 2,717 files, far over its 5-minute budget, so I picked the test files myself. Besides the three named, I ran the four other changed tests (release-prober,snapshot-hosted,disk-mount,spawn-anon) and the files that usestartRefused,wakeGate,archiveForge, the anonymous spawn limit,bodyIdOforvalidBodyId. That was 14 files: 134 pass, 0 fail.
Left open
- The branch went to
scout/forge, the push remote this clone is set up with. I couldn't push totrevato/forgeitself. - I haven't closed #14812. That needs this pull's number, so torque or a maintainer should close it pointing here.
- There is a release hold on trevato/forge ("production is rolling"). This pull doesn't deploy anything, but merging should wait until production settles.
- I didn't record a plan with
keep_plan, because the tool wasn't available in this session.
[{"go":"/forges","look":"Archive a test forge to a configured backup destination and open its address while the upload runs","expect":"The address answers 503 \"<name> is being archived and does not start until that is done\"; afterwards the forge is listed under Archived","ask":"Did any request wake the forge during the archive?"}]
🤖 Generated with Claude Code
Closes #14931
The four fixes are present and tested: archive hold released in a finally with a post-copy awake check, reserveAnonSpawn with release on every no-forge path (existing-forge path handled via born), one hasGift driving the code checks, and the letter-or-digit BODY_ID in all three places. Leaving out -- is right: GNU tar would read the second -C as a file name. Next two things I would do: (1) close #14812 pointing at this pull; (2) add a test where the awake check fires after a throw in the copy, and fold BODY_ID into one shared export so the three regexes cannot drift.
Left #14931 open: 1 unticked item remain (#14812 is closed pointing at the new pull).
This is torque's four src/spawn fixes from #14812 (head 470825c), now on a branch whose head is in the forge's own clone, rebased on today's main (3ff78112e). The diff comes from #14812's own diff in the forge API: I couldn't fetch torque's fork or the head commit, so I rebuilt the patch from that diff. Every hunk applied unchanged except one AGENTS.md line, which only failed because main had moved. I added that line by hand with the same text. I didn't rewrite any of the fixes. The commit carries
Co-authored-by: Torque <[email protected]>and torque'sDirection:line.What to look at
src/spawn/held_closed.tsis new.archiveOneinsrc/spawn/archive.tsputs the hold on beforesleepChildand takes it off in afinallyaround the copy and removal, so it is released on every way out of the archive, including a throw. While the hold is on,startRefusedinsrc/spawn/host.tsrefuses every wake. If the child was opened anyway by a request that got past the gate first, the uploaded copy is deleted and nothing is removed.reserveAnonSpawninsrc/spawn/rate.tschecks the limit and counts the spawn in one immediate transaction.src/spawn/door.tsgives the slot back on each path where no forge is made: the queue refuses or throws, the code can't be claimed, or the spawn fails.hasGiftvalue insrc/spawn/door.tsdrives the code lookup, both plan checks and the claim, so anullor""code no longer skips the paid-plan checks.tar: everyBODY_ID(archive.ts,disk_mount.ts,snapshot/hosted.ts) must now start with a letter or digit. There is no--before the tar operands, although the issue lists one. #14812 left it out on purpose: GNU tar treats everything after--as a file name, which would break the second-C. The first-character rule does the same job.Checks run here
bun scripts/gate.ts --fixandbun x tsc --noEmitare clean. The gate has two notes and no refusals: some comment lines over 100 columns, which the nightly rewrap fixes, andholdClosedlooks 0.57 similar toholdinsrc/http/caller.ts.test/forge-archive.test.ts,test/spawn-anon-burst.test.tsandtest/gift-codes.test.tsare all in the gate list, sinceEXCLUDEDinscripts/gate.tsnames none of them.bun scripts/fast.tsnamed 2,717 files, far over its 5-minute budget, so I picked the test files myself. Besides the three named, I ran the four other changed tests (release-prober,snapshot-hosted,disk-mount,spawn-anon) and the files that usestartRefused,wakeGate,archiveForge, the anonymous spawn limit,bodyIdOforvalidBodyId. That was 14 files: 134 pass, 0 fail.Left open
scout/forge, the push remote this clone is set up with. I couldn't push totrevato/forgeitself.keep_plan, because the tool wasn't available in this session.🤖 Generated with Claude Code
Closes #14931
Closes #14931