Public: anyone can read this; the crew can change it.
The forges list asks no forge that is asleep: one look at it woke every sleeping forge at once #13788
Check · Review · Land · Live done — Landed and live in production.
clientRows (the /forges page, the forges MCP tool, GET /api/v1/forges, the terminal's Forges screen) fetched every child's public /api/v1/forge.
shipped production is serving it deploy 59903fa
A second commit (ac8d0c709): now that the boot pass no longer asks (and wakes) every child, the minute's pass asks a forge it knows is awake the first time it sees it, so after a restart no awake forge reads "Unknown" until someone opens the list. A pass that is not told who sleeps asks nobody, as before. I first tried reading claimed from the child's tables for every forge that had not said; five existing tests assert "Unknown" when a child does not answer, so that fallback stays for sleepers only.
Checked again on Linux (release image, Bun 1.4.4): 20 test files that read the list, 196 pass, 0 fail; bun x tsc --noEmit exit 0; bun scripts/gate.ts exit 0.
Seen while this was open: production restarted at 01:30:00Z and all 16 forges were up again between 01:30:02Z and 01:30:05Z, together, before the serial boot could have reached them: the boot pass's question to each address is what started them (#13816).
Effect on a restart, to know before landing: today the boot pass's questions start every forge at once (see the note on #13816). With this pull they do not, so after a restart the forges are started by the serial boot loop alone (bootHostedChildren, about 3 s each: 16 forges in about a minute instead of 5 s). A visitor's request still wakes its forge at once.
The list now asks no forge that is asleep. A sleeper reads what it last said, or claimed/unclaimed from its own tables. The tests cover awake vs asleep, the remembered word, the clock pass, and the table fallback. The change is small, adds no dependency, and keeps the security floor. It is a bug fix that cuts wake-ups and load, so it fits the pipeline-first direction. I did not run the preview or read the screenshots, because no page changed. Two things to do next: (1) After a restart, forges now start only through the serial boot loop, about a minute for 16 forges instead of 5 s. Measure it, and if it matters, make the boot loop start them in parallel on purpose (see #13816) instead of by accident. (2) claimed now has three sources: the forges own answer, the clock-pass ask and the sleeper tables. Move that choice into one small named function in src/spawn/ so clientRows stays readable.
What
clientRows(the/forgespage, theforgesMCP tool,GET /api/v1/forges, the terminal's Forges screen) fetched every child's public/api/v1/forge. A request to a sleeping forge's address wakes it (wakeGate), so one look at the list booted every sleeping forge together, up to the awake ceiling, and each wake was counted against the spawner'sforges.wakes_per_person_hour.Measured on production (0.7.613), 2026-11-16 00:56:30Z: one
forgestool call woke 15 sleeping forges within two seconds; the forge's own process census went 1,251 -> 1,893 in a minute; 15 of the 30 wakes an hour that all forges sent by one admin share were spent by a read. With N hosted forges this is a wake storm of min(N, ceiling) on every page view.Change
src/spawn/clients.ts: the list is told which children are asleep on this host (useSleepers) and asks none of them. A sleeper keeps the last word it said. One that never said (after a restart) reads claimed or not from its own tables, by the rule it answers with itself (hasAdmin=personReading().claimedBy), so it does not read "Unknown".src/main.ts: wired beside the reach watch, which already passes sleepers over for the same reason (startReachWatch(app, undefined, (name) => !childAwake(app, name))).test/client-list-sleepers.test.ts: a sleeper is not asked and an awake forge is; a sleeper keeps its last word; a sleeper never heard from reads Claimed / Not claimed yet from its tables.Unset (tests, a forge that hosts none) every child is asked as before. Web, MCP, API and terminal all read
clientRows, so they say the same.Checked
bun x tsc --noEmit: exit 0.bun scripts/gate.ts: exit 0.test/client-list-sleepers.test.ts,test/client-list.test.ts,test/client-states.test.ts,test/boot-idle-children.test.ts: 30 pass, 0 fail.Try: with a hosted forge asleep, open /forges (or call the forges tool) and see it stays asleep (awake: false) and still reads Claimed or Not claimed yet.
From the scale measurement in
scratchpad/scale-hosting.md(the mitosis repository).🤖 Generated with Claude Code