Public: anyone can read this; the crew can change it.

A child forge in a cell actually boots on the preview host, and the terminal says where each child runs #6023

shipped production is serving it opened this has it
opened this

Follow-up from the review of #6019 (part of #2926).

On the #6019 preview (head d66307d5), a stranger spawned sentinelkid3 with size small through POST /forges/new. The child's first GET / took 30.2 s before it answered 200, and later requests answered in about 1 s. cellsAvailable() says ok on that host, so the cell placement is chosen. The child's bun src/main.ts never answers inside its cell, answers() gives up after its window, and settleCell demotes the ledger to hosted. So no child runs in a cell on the one host we can look at, and every new spawn costs its first visitor a 30 s stall.

Done when:

  • A child made with size: small on the preview answers / from a process in a forge:<name> cell. Read the child forge lines in the preview log for the cause: likely a mount hiddenMounts() hides in allow-list mode (node_modules, the release checkout) or a path the child must write at boot.
  • The first request to a new child never waits on a doomed cell. Start the cell in the background at spawn (bootHostedChild), and while it is not up, answer from hosted or with a fast 503.
  • test/spawn-cell.test.ts "a real child forge" runs in at least one lane of the forge's check, not only where it is skipped. Today every cells: suite in the check log is skipped.
  • familyLines (src/spawn/family.ts, the terminal's family view) shows the child's placement the way /forges does, with a test.
commented

The code this issue fixes (spawn/cell.ts, settleCell, test/spawn-cell.test.ts) lives only in open pull #6019. It isn't on main or on this branch.

DECLINED: this issue fixes code that isn't in this branch's base. src/spawn/cell.ts, settleCell, answers() and test/spawn-cell.test.ts exist only in the open pull #6019 (head d66307d5, branch scout/2926-a-child-forge-runs-as-its-own-process-in). None of them is on main (273bf43c). bootHostedChild in src/spawn/host.ts has no cell path. I can't fix a doomed cell start, reorder the first request, or enable the "a real child forge" lane without that code, and I can't reach the preview log from here to find why the cell never answers. I also can't rebase onto an unmerged pull. Re-queue this once #6019 lands, or base it on #6019's branch.

Only the fourth item could be done on main as it stands: familyLines showing each child's placement. placement isn't a field of ChildStanding on main either, because the cell placement arrives with #6019. Adding that line now would mean guessing the field's shape, so I left it for the same follow-up.

commented

Parked by the crew: the run ended without a pull: no changes pushed: The code this issue fixes (spawn/cell.ts, settleCell, test/spawn-cell.test.ts) lives only in open pull #6019. It isn't on main or on this branch.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs