Public: anyone can read this; the crew can change it.
Hosted child forges on a host with Landlock and no bubblewrap are not held by the floor #17133
Check · Review · Land · Live done — Landed and live in production.
A forge started on a machine (FORGEMACHINES) is now held by the Landlock floor when no bubblewrap cell can be made and the kernel has Landlock. This was the unconfined path: processMachine in src/spawn/machines.ts ran the forge with no confinement at all.
-
Reviews
ApprovedApproved. A forge started on a machine is now held by the Landlock floor when no cell can be made and the kernel has Landlock. Its own directory is readable and writable. The parent's data and the machine's root (siblings, pids, spawn records) are hidden. The real-process test shows denied reads, and the doc is updated. No page, action or MCP tool changed, so no terminal side is owed.
Two things I would do next:
- Close the open tcp. A held forge can still reach the parent and the network, so the proxy-port design the doc names is the real remaining gap. Until then, make the 'runs uncontained' log line loud enough that an operator sees it.
- Tidy two small things.
scripts/spawn-argv-allow.jsonrewrote every…as\u2026, which is churn unrelated to this change: keep the file's existing characters and add only the new entry. Inmachines.ts,hold.log ?? (() => {})is repeated in both branches, so resolve it once.
-
Checks
shipped production is serving it deploy 01e9b02
-
History
- machine-floor test: the child script uses require, not a second node:fs import line (#16963) ec0f2e1
- Allow the machine start's argv in the spawn list (#16963) 36330f2
- A forge hosted on a machine with Landlock and no bubblewrap is held by the floor: own directory kept, the parent's data and its siblings hidden (#16963) edd09a0
- Sentinel: 2 deploy runs wait with no slot being used (#17123) c8785d3
- Protection test covers the crew falling back to Landlock when bwrap is missing (#17125) 6e85472
- runner-adopt: the lease test leaves no check queued, so the next test's claim cannot take it (#17118) c7160ee
- A test's leaked process can no longer hang the gate: a shard's output is cut 5 s after it exits (#17117) bb265f4
- Load highlighter grammars only for the file kind opened; split src/tui/screens/workspace.ts (#17109) 2c7070a
- The fast tier guesses for an unseen file by its importers, and reads no doc through a helper the suite runs (#17111) d4b9f5a
- A release that passed its stay-up watch is not called wrong because the last health probe could not connect (#17103) 763fd5a
- The ten test files that cost pull checks the most seconds each finish in under 30 s, with no test skipped (#17030) d1623ea
- Edges: snapshots as an infra kind, offered before retire (#17094) 8cf0295
- Every cloud's boot config is plain ASCII: strings are written as escaped YAML, and anything else is refused (#17113) 4a4be72
- A DXF drawing can be moved, scaled or have a layer removed, previewed, then saved as one commit, from the page and from MCP (#17077) 63ed874
- Sentinel: memory-growth was degraded 31 minutes today: The forge's own memory is 5754 MiB, over twice its first-hour 2064 MiB and past the 2176 MiB more its database caches m… (#17108) e5218fb
- Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:10bdvndtlg is past its budget: trevato/forge: "each page stays inside its first-view budget" failed on 3 pulls in the last hour — the lane's red, not … (#17106) 18b6c25
- A sleeping forge wakes when its app's own timer falls due (#17105) 39a436d
- Gate's comment rewrap reflows // comments inside JS template strings, which can break page scripts (#17102) 30ecfb4
- An outside runner picks up a new forge build between jobs, never mid-job (#17099) 492abf7
- Registry: per-app ownership records for installed items (#17055) 6517425
A forge started on a machine (FORGE_MACHINES) is now held by the Landlock floor when no bubblewrap cell can be made and the kernel has Landlock. This was the unconfined path: processMachine in src/spawn/machines.ts ran the forge with no confinement at all.
The new tests, tsc, the spawn-argv test and all 32 gate rules pass. The three machine suites that already used processMachine (machine-load, machine-beats, move-machine) passed too, but I ran them before adding the spawn-list entry and did not re-run them. I did not run the dead-code, "builds the real input", timed-job or process-wide-state tests by name. The gate and the type check cover that code and show nothing, and I added no module-level state.
What changed
src/spawn/machine_floor.ts(new) builds the floor as plain data. The forge's own directory iskeepand writable. The parent's data directory and the machine's whole root (sibling forges, spawn records, pids) arehide. The forge's code tree stays readable.machineFloorandfloorHomein that file are called frommachines.tsstart. When the cell probe says no and Landlock is available, the forge runs behindlandlockArgv, withHOMEandTMPDIRpointed at.homeand.tmpinside its own directory.- If Landlock is unavailable the forge still runs unrestricted, and the log says why.
machinesOfpasses the parent's data directory and a warn logger to the machine.- The existing
Bun.spawn(argv)inmachines.tsneeded an entry inscripts/spawn-argv-allow.json, with a reason, to pass the spawn-argv test. docs/features/landlock-floor.mdno longer says hosted forges are unheld.test/machine-floor.test.tschecks the floor and the plan it produces. It also starts a real forge process and shows it is denied reads of the parent's and a sibling's files, while it can still write and answer on its port.
Not done
- TCP stays open for these forges, and the log says so. They reach the parent and the network, so confining connects would need the proxy-port design the doc already names.
- A forge's
HOMEis now inside its own directory. Anything it expects in the forge user's real home, such as a model login, is not readable there.
Reused
landlockPlan, landlockArgv, probeLandlock, cellsAvailable and READS_PARTLY (checkFloor was the pattern). I did not run similar.ts.
No page, action or MCP tool changed, so there is no terminal side or review block.
Try it
bun test test/machine-floor.test.ts. It runs the real-process case on a Landlock kernel and skips it otherwise.
🤖 Generated with Claude Code
I fixed the duplicate-import failure and pushed. test/dup-imports.test.ts and test/machine-floor.test.ts pass locally (9 tests). I haven't seen the forge's re-run of the check.
- Cause: the child script inside
test/machine-floor.test.tshad its ownimport … from "node:fs"line. The dup-import scan counted it as a second import ofnode:fsin that file. - Change: that script now gets
readFileSyncandwriteFileSyncwithrequire("node:fs"). Only the test file changed. - Not fixed: "every screen that binds r…" in
test/keymap-terminal.test.tsfails the same way on main (6be5e30), and the check already excluded it from this pull's count. I left it alone.
A forge started on a machine (
FORGE_MACHINES) is now held by the Landlock floor when no bubblewrap cell can be made and the kernel has Landlock. This was the unconfined path:processMachineinsrc/spawn/machines.tsran the forge with no confinement at all.The new tests,
tsc, the spawn-argv test and all 32 gate rules pass. The three machine suites that already usedprocessMachine(machine-load,machine-beats,move-machine) passed too, but I ran them before adding the spawn-list entry and did not re-run them. I did not run the dead-code, "builds the real input", timed-job or process-wide-state tests by name. The gate and the type check cover that code and show nothing, and I added no module-level state.What changed
src/spawn/machine_floor.ts(new) builds the floor as plain data. The forge's own directory iskeepand writable. The parent's data directory and the machine's whole root (sibling forges, spawn records, pids) arehide. The forge's code tree stays readable.machineFloorandfloorHomein that file are called frommachines.tsstart. When the cell probe says no and Landlock is available, the forge runs behindlandlockArgv, withHOMEandTMPDIRpointed at.homeand.tmpinside its own directory.machinesOfpasses the parent's data directory and a warn logger to the machine.Bun.spawn(argv)inmachines.tsneeded an entry inscripts/spawn-argv-allow.json, with a reason, to pass the spawn-argv test.docs/features/landlock-floor.mdno longer says hosted forges are unheld.test/machine-floor.test.tschecks the floor and the plan it produces. It also starts a real forge process and shows it is denied reads of the parent's and a sibling's files, while it can still write and answer on its port.Not done
HOMEis now inside its own directory. Anything it expects in the forge user's real home, such as a model login, is not readable there.Reused
landlockPlan,landlockArgv,probeLandlock,cellsAvailableandREADS_PARTLY(checkFloorwas the pattern). I did not runsimilar.ts.No page, action or MCP tool changed, so there is no terminal side or
reviewblock.Try it
bun test test/machine-floor.test.ts. It runs the real-process case on a Landlock kernel and skips it otherwise.🤖 Generated with Claude Code
Closes #16963