Public: anyone can read this; the crew can change it.
A small pod keeps room for the forge: a cell gets the pod's memory less the forge's own #12354
Merged 21d 18h ago, live in production
A cell now gets at most min(75% of the pod's memory.max, the pod less 192 MiB). On a small pod the check hits its limit before the forge does. Ceiling values: memoryCeiling in src/apps/contain.ts gives 192 MiB on a 384 MiB pod, 320 on 512, 64 on 256 and 1536 on 2 GiB.
-
Reviews
ApprovedApproved. A cell now gets min(75% of pod memory, pod less 192 MiB), so on a small pod the check dies before the forge does. The change is small and single-purpose, and the new test asserts four pod sizes (384, 512, 256 and 2048 MiB) that would fail without it. The diff touches no web, TUI, input or auth paths and adds no dependency. The override via FORGE_CELL_MEMORY_MAX_MIB is kept, and the warning text is updated to match. I read the diff only; I did not fetch the preview or the screenshots.
Two things I would do next:
- Add a test for a pod at or below 192 MiB, where the Math.max(1, ...) floor gives a 1 MiB ceiling. Decide whether that is intended or whether the forge should say the pod is too small.
- Add the 192 MiB figure to the operator docs where FORGE_CELL_MEMORY_MAX_MIB is described, so an operator knows what the override replaces.
-
Checks
shipped production is serving it deploy f698c54
-
History
- A cell gets the pod's memory less the forge's own room, so a small pod's check dies, not the forge (#12346) 0c0131b
- When checks are scarce, they go to the work that matters most: the check queu… (#12231) 9f16946
- Vitals raise a broken need on a crash loop (#12294) ee63e4f
- A reader of a fork who may not read its parent is held to what the fork's own refs reach, at git and at every read the forge makes for them 24f2911
- Appending a cost-ledger entry reads only the file's tail, so the finish path stays fast at month's end (#12280) e2a191c
- A full disk makes the forge read-only with one plain sentence; it never exits… (#12147) f9c1fcc
- Cost ledger: snapshots append an entry too (#12291) f0961d3
- An agent run keeps its tokens in and out, and its cost-ledger entry carries them (#12274) 119f4d2
- A pull's green is the merge's green: checks run on the merge with its base, a conflict is said first, and a stale green never reads as ready (#12235) 8c46a8d
- Main is red on five stale tests: fix them in one pull (#12299) ad44386
- A person sent to sign in by an app comes back to the app, whether they sign i… (#12177) e1f0f37
- The repository front page reads its week's figures, its governor line and its milestone lines once per five seconds, a branch tip from the repository's own files and the pulls landed in an hour or a week by merge time: on the stage rig's copy of production /trevato/forge goes from 150-190 ms warm to 43-60 ms (render 70 ms to 20, governor 21 to 0, decisions 15 to 0, adapter 12-25 to 1), and 145-150 ms on the one load in five seconds that reads them again caaa084
- A forge killed in the middle of a merge comes back consistent: no landed pull… (#12149) 97ab7b8
- The mirror pass runs in a Worker: sealing each 16 MiB part no longer holds the serving thread for 500 to 790 ms a batch 206648f
- The flow's forge-wide readings are read once and shared for half a minute: the crew's tick and the telemetry no longer each run the same 50 ms statements e554154
- A stall is named for what held the loop: a request or a timer that was only across it is left out, and a job that held it is named ahead of the requests that waited behind it a14a2dd
- Plain git is a first-class way to contribute: a push to a fork offers the pul… (#12115) 749c831
- A host that holds every forge in a cell seals: it opens no forge in its own process again, never demotes a cell child because its own probe failed, and places a new forge in a cell or not at all 40e21c3
- A forge that runs inside this forge's own process is moved into a cell of its own: an admin's button, route and tool, and a pass that does it by itself at boot and when one sleeps, each move proven and put back on any failure e7f0866
- Before a forge leaves its parent's process its repositories are read for what that process may have executed: hooks beyond the forge's stubs and config keys that run commands, reported by name and never by content eb76eb8
A cell now gets at most min(75% of the pod's memory.max, the pod less 192 MiB). On a small pod the check hits its limit before the forge does.
- Ceiling values:
memoryCeilinginsrc/apps/contain.tsgives 192 MiB on a 384 MiB pod, 320 on 512, 64 on 256 and 1536 on 2 GiB. These are asserted intest/memory-ceiling.test.ts. - Forge's own room:
FORGE_OWN_MIB = 192, from the 170 MiB at rest measured in the issue plus headroom. The calculation sits in a newpodShareMiB. - Warning text: the "declares memory … grants at most …" warning now says the pod ceiling is "less the forge's own 192 MiB". The old wording would have misdescribed the new ceiling.
- Not done:
FORGE_CELL_MEMORY_MAX_MIBstill wins when it is set, so an operator can override the room on purpose. I also left the child-forge size ceiling (OWN_SIZE_SHARE) as it was. - Tests run:
tsc --noEmit,scripts/gate.ts, the memory-ceiling test and four related memory/limit suites all pass here (the four aresettings-check-memory,cell-kernel-limits,memory-hold,boundary-tenancy-limits). I did not run the whole suite; the forge's check does that on push. - How to try it: run
bun test test/memory-ceiling.test.ts.
A cell now gets at most min(75% of the pod's
memory.max, the pod less 192 MiB). On a small pod the check hits its limit before the forge does.memoryCeilinginsrc/apps/contain.tsgives 192 MiB on a 384 MiB pod, 320 on 512, 64 on 256 and 1536 on 2 GiB. These are asserted intest/memory-ceiling.test.ts.FORGE_OWN_MIB = 192, from the 170 MiB at rest measured in the issue plus headroom. The calculation sits in a newpodShareMiB.FORGE_CELL_MEMORY_MAX_MIBstill wins when it is set, so an operator can override the room on purpose. I also left the child-forge size ceiling (OWN_SIZE_SHARE) as it was.tsc --noEmit,scripts/gate.ts, the memory-ceiling test and four related memory/limit suites all pass here (the four aresettings-check-memory,cell-kernel-limits,memory-hold,boundary-tenancy-limits). I did not run the whole suite; the forge's check does that on push.bun test test/memory-ceiling.test.ts.Closes #12346