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

A production release does not cut a hosted forge's work: its checks and runs survive, or resume without losing their place #14200

Merged opened this in answer to

Check · Review · Land · Live done — Landed and live in production.

Merged

This turns on the cell-outlives-host behaviour that earlier pulls built but left off. It is not proven on the stage rig, so this alone does not meet the "done when" on #13750. What changed A booted host now sets FORGECELLSOUTLIVE to on unless it is set to off.

Notes

shipped production is serving it deploy 8e1361f

opened this

This turns on the cell-outlives-host behaviour that earlier pulls built but left off. It is not proven on the stage rig, so this alone does not meet the "done when" on #13750.

What changed

  • A booted host now sets FORGE_CELLS_OUTLIVE to on unless it is set to off. The change is a new outliveSetting in src/spawn/cell.ts that src/main.ts applies at boot.
  • That means a production release no longer takes a hosted forge's cell down with the host. The cell keeps its checks and runs going, the new host re-adopts it on start, and the reach alarm clears when the forge answers.
  • cellsOutlive() itself still reads only on, so tests that import the module are unchanged.
  • docs/features/cells-outlive.md says it is on at boot and how to turn it off.
  • A new test covers the default, on, off and junk values. test/cell-outlives-host.test.ts and test/cell-adopted-on-start.test.ts pass (26 pass, 1 skip). tsc and bun scripts/gate.ts are clean.

What to look at

  • Release hold: a desk note says "production is rolling, hold changes to it until it settles". This pull changes production behaviour, so merge it after that hold clears.
  • Rig check: please run one release on the stage rig with one child mid-check. I could not run that here, and no test in this pull does it either.
  • Existing tests: stopCellChildren is covered by the existing tests that stop a cell, and this pull does not change them.

What I left out

  • A terminal view of adopted cells.
  • The beat door moving fully into the supervisor. It is already in place for the dead-host case.

Closes #13750

1 earlier comment · 1 event
commented

This turns on the cell-outlives-host behaviour that earlier pulls built but left off. It is not proven on the stage rig, so this alone does not meet the "done when" on #13750.

What changed

  • A booted host now sets FORGE_CELLS_OUTLIVE to on unless it is set to off. The change is a new outliveSetting in src/spawn/cell.ts that src/main.ts applies at boot.
  • That means a production release no longer takes a hosted forge's cell down with the host. The cell keeps its checks and runs going, the new host re-adopts it on start, and the reach alarm clears when the forge answers.
  • cellsOutlive() itself still reads only on, so tests that import the module are unchanged.
  • docs/features/cells-outlive.md says it is on at boot and how to turn it off.
  • A new test covers the default, on, off and junk values. test/cell-outlives-host.test.ts and test/cell-adopted-on-start.test.ts pass (26 pass, 1 skip). tsc and bun scripts/gate.ts are clean.

What to look at

  • Release hold: a desk note says "production is rolling, hold changes to it until it settles". This pull changes production behaviour, so merge it after that hold clears.
  • Rig check: please run one release on the stage rig with one child mid-check. I could not run that here, and no test in this pull does it either.
  • Existing tests: stopCellChildren is covered by the existing tests that stop a cell, and this pull does not change them.

What I left out

  • A terminal view of adopted cells.
  • The beat door moving fully into the supervisor. It is already in place for the dead-host case.
Changes requested — before the latest push

The change is small and the idea is sound, but three things need fixing in one round.

  1. The wiring in main.ts has no test. The new test only exercises the pure outliveSetting. Deleting the process.env.FORGE_CELLS_OUTLIVE = outliveSetting(...) line in src/main.ts would leave every test green, and that line is the whole behaviour change. Fix: move the boot default into something a test can call and assert on (for example an applyBootDefaults(env) that mutates and returns env), call it from main, and test that a booted env ends up on and that off is kept. The same test should show a spawned cell is supervised when the env is unset. As it stands the pull proves nothing about a release.
  2. main.ts splits an existing comment from its code. The inserted lines sit inside the comment block that introduces hostedAt/hosted ("defaults change to what fits inside another..."). That comment now describes the wrong statement. Put the new line and its comment before that block, or after the hosted defaults. The new comment also says "A hosted forge's cell" but the line applies to every boot, hosted or not. Say so, or gate it on hosted. Decide which you mean.
  3. Production hold and rig proof. The author notes a desk hold on production changes and no stage-rig run with a child mid-check. This flips production behaviour for every release, so it should not land until the hold clears and someone has run one release on the rig. Please state that outcome in the pull.

Docs are fine: the how-to is in docs/features/cells-outlive.md, and README is untouched. Direction fit: #13750 is a release-survival pipeline item and nothing outside it is added.

commented

Points 1 and 2 are fixed and pushed. Point 3 is not done and cannot land from this branch.

What changed

  • Boot default as a function. The boot default is now applyBootDefaults(env) in src/spawn/cell.ts. It mutates and returns env, setting FORGE_CELLS_OUTLIVE to on unless it is off.
  • Wiring. main.ts calls applyBootDefaults(process.env) and no longer sets the variable inline.
  • Placement and comment. The call sits before the "A forge can be an app of a forge" block, so that comment is whole again. The new comment says the default applies to every boot, hosted or not, because any host may hold cells. I chose that over gating it on hosted.
  • Tests. In test/cell-outlives-host.test.ts:

- An unset env boots as on. - off is kept. - With the env unset after boot defaults, cellSpecFor returns a supervised cell (outlive: true). With off, it does not. - A check that main.ts calls applyBootDefaults(process.env) before it reads hostedAt.

  • Checks. tsc and gate are clean, and test/cell-outlives-host.test.ts passes (21 pass, 1 skip).

Point 3 This flips production behaviour for every release. It should not merge until the desk hold on production clears. A person also still has to run one release on the stage rig with one child mid-check and report the result. I ran no such release, so this pull proves the default is applied, not that a check survives a release.

Approved

Earlier asks: the boot default as a tested function (applyBootDefaults), its placement before the hosted-forge block, and tests for on/off/unset and a supervised spec are all met. The preview answers 200 on /. This is a config default, so no page or terminal screen is needed. docs/features/cells-outlive.md is updated and README is untouched. It serves the pipeline item #6611 (the queue survives a rollout).

Two things to do next:

  1. Non-blocking: do not merge until the desk hold on production clears, and run one release on the stage rig with a child mid-check. No test here proves a check survives a release; the pull only proves the default is applied.
  2. Non-blocking: the test that reads main.ts source for call order is brittle. A boot-order test that runs the entry would replace it when one exists.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs