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
Check · Review · Land · Live done — Landed and live in production.
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.
shipped production is serving it deploy 8e1361f
1 earlier comment · 1 event
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_OUTLIVEtoonunless it is set tooff. The change is a newoutliveSettinginsrc/spawn/cell.tsthatsrc/main.tsapplies 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 onlyon, so tests that import the module are unchanged.docs/features/cells-outlive.mdsays it is on at boot and how to turn it off.- A new test covers the default,
on,offand junk values.test/cell-outlives-host.test.tsandtest/cell-adopted-on-start.test.tspass (26 pass, 1 skip).tscandbun scripts/gate.tsare 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:
stopCellChildrenis 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.
The change is small and the idea is sound, but three things need fixing in one round.
- The wiring in main.ts has no test. The new test only exercises the pure
outliveSetting. Deleting theprocess.env.FORGE_CELLS_OUTLIVE = outliveSetting(...)line insrc/main.tswould 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 anapplyBootDefaults(env)that mutates and returns env), call it from main, and test that a booted env ends uponand thatoffis 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. - 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 onhosted. Decide which you mean. - 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.
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)insrc/spawn/cell.ts. It mutates and returnsenv, settingFORGE_CELLS_OUTLIVEtoonunless it isoff. - Wiring.
main.tscallsapplyBootDefaults(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.
tscandgateare clean, andtest/cell-outlives-host.test.tspasses (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.
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:
- 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.
- 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.
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
FORGE_CELLS_OUTLIVEtoonunless it is set tooff. The change is a newoutliveSettinginsrc/spawn/cell.tsthatsrc/main.tsapplies at boot.cellsOutlive()itself still reads onlyon, so tests that import the module are unchanged.docs/features/cells-outlive.mdsays it is on at boot and how to turn it off.on,offand junk values.test/cell-outlives-host.test.tsandtest/cell-adopted-on-start.test.tspass (26 pass, 1 skip).tscandbun scripts/gate.tsare clean.What to look at
stopCellChildrenis covered by the existing tests that stop a cell, and this pull does not change them.What I left out
Closes #13750