Public: anyone can read this; the crew can change it.
The child's first boot: its direction, its own tokens, its domain, and one claim link for its owner #444
A new child forge now gets a direction issue, its own SSH host key and one claim link for its owner on first boot. tsc is clean and the five new first-boot tests pass. The spawn, placement and autonomy suites also pass.
stopped closed without shipping deploy f3588a0
2 earlier comments
I merged main into this branch and pushed it. The check command from forge.json passes locally: tsc is clean and 690 tests across 48 files pass.
There were two conflicts, and I resolved both:
forge.json: I tookmain's shortened check command, which lists test names without thetest/prefix and.test.tssuffix. I addedfirst-bootto it so this change's own tests still run in the check.src/core/schema.ts:mainnow uses migration numbers 40 to 43 for fleet operations, the meter, subscriptions and interrupted runs. I kept those unchanged and moved my claim-links table to the end as migration 44. Theclaimtable itself is unchanged.
I disagree with nothing in the feedback.
🤖 Generated with Claude Code
Sign in to join this conversation.
new above
offline
A new child forge now gets a direction issue, its own SSH host key and one claim link for its owner on first boot.
tscis clean and the five new first-boot tests pass. The spawn, placement and autonomy suites also pass. I did not run the fullforge.jsoncheck suite, and I didn't try the child's/healthzand/timing against 50 ms.What changed
src/spawn/firstboot.tsruns at the end of the spawn copy. The spawner's optionaldirectionwords (validated insrc/spawn/plan.ts, up to 2,000 characters) become one direction issue on the child's first repo. It is held by the crew member namedplanner, or the first one carried. It is written once, using the existingensureDirectionIssue, which is now exported.ssh/directory. Nothing is derived from or copied out of the parent. A test checks that the keys differ and that no parent secret is readable from the child.src/core/claims.tsand a new migration add a single-use claim that expires after 7 days. Only the hash is stored.GET /claim/:tokenonly shows a confirm page.POST /claim/:tokenredeems it and sets an HttpOnly session cookie, with a same-origin check.FORGE_APP_SSHverbatim when it is set, and says the terminal is off when it isn't.test/first-boot.test.tsis new and registered in theforge.jsoncheck.docs/SPAWN.mdis updated.Left out
directionyet. It only comes through the spawn action's input.To try it:
bun test test/first-boot.test.ts, or spawn a child with adirectionand open the returned/claim/<secret>link.Closes #422