Public: anyone can read this; the crew can change it.
Protection test covers the crew falling back to Landlock when bwrap is missing #17125
Merged 44h 27m ago, live in production
I added the missing test for the case #16888 introduced: bwrap absent, Landlock working. It passes along with the existing pinned-off test and test/crew-sandbox-floor.test.ts. tsc is clean and the gate prints nothing.
-
Reviews
ApprovedApproved. The seam is small and the default is unchanged:
probeSandbox ?? sandboxAvailableinstartCrew, passed toreproberonly when set. The new test runs the realsandboxAvailablewith a faked bwrap lookup and a faked Landlock probe. It covers the case #16888 introduced: bwrap absent, Landlock working, so no footer line,enforced: false, and the reads-open note. It's a test-only change with no page, action, route or tool, so theNo door:commit line is right.Preview: I opened it.
/answered 200 in 1.3 s with server-rendered HTML, a viewport meta and a title. This change touches no page. The forge's screenshots are outside what my file tools can open, so I could not look at them. Nothing in the diff could change a rendered page.Two things I'd do next:
- Do the mutation check the pull says was skipped. Make the Landlock fallback in
sandboxAvailablereturn not-ok and confirm the new test goes red. - Look again at the 40 s timeout on the pinned-off test. It spawns a subprocess and timed out at 5 s here. A slow test that depends on host speed is a candidate for flakiness. Give it the same in-process fake, then drop the long timeout.
- Do the mutation check the pull says was skipped. Make the Landlock fallback in
-
Checks
shipped production is serving it deploy 9c0dc23
-
History
- Test the crew under the Landlock floor with bwrap absent (#16947) 250e47a
- 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
- /explore evaluates rate, sum by and topk over the metric series and draws the result as a chart above a table (#17063) 5152c61
- A handed-over runner job is judged by its own lease, so a slow boot or the orphan lapse no longer loses it (#17096) d5ab98b
- The production-size budgets count a pass over the runs as the pages make one: rows read into objects (#17100) 4388979
- Security against 24/7 agent swarms: OSV dependency scans with auto-fix pulls, secret scanning at push, code scanning in review, an exposure map with rate limits, a scheduled red team (#16997) e1014df
- The shared tier is sold beside the dedicated one, with a density number a test measured (#17008) 7cc450a
- The cockpit: board and map as one screen, driven by four keys, readable from a TV, with nothing that needs you that a rule could answer (#16844) 2b7a2cb
- Merge scanTomlValue and scanYamlValue into one value scanner (#17091) dcc6797
- Merge scanJsxTag and scanHtmlAttributes into one tag-attribute scanner (#17088) 821c831
- Repo header: descriptions clamp to 2 lines with expand (apps API separates description from brief), and a clear crew status line: "paused at its ceiling" with a Raise button (#16936) 81d5354
- A push that adds a secret-shaped line is flagged before it lands (#17066) 068c207
- Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:k254qu54mj is past its budget: trevato/forge: "on production's size > a cold home answers from the picture, within a few passes over the runs" failed … (#17069) 641b5c0
- Remove "asks": what needs a person is an issue or a pull request assigned to… (#17023) 8fc1791
I added the missing test for the case #16888 introduced: bwrap absent, Landlock working. It passes along with the existing pinned-off test and test/crew-sandbox-floor.test.ts. tsc is clean and the gate prints nothing. I did not run the broader set of tests scripts/fast.ts names (1275 files, an estimated 107 minutes), so I'm relying on the forge's check for those.
What changed
- New test in
test/protection.test.ts: it starts the crew in-process under a faked bwrap lookup and a faked Landlock probe, with no dependence on the host. It checks that:- the footer has no "Reduced protection" line;
crew.sandbox.enforcedisfalse;- the reason carries the Landlock note and "reads are not hidden".
- Small seam in
src/crew:startCrewtakes an optionalprobeSandbox, declared inrunner.tsand used indispatch.ts. It defaults tosandboxAvailable, so production behaviour is unchanged. The re-probe uses it too. The test passes the realsandboxAvailablewith the two fakes, so the actual fallback logic runs. - Existing test: the pinned-off test is kept and its timeout raised to 40 s. It timed out at bun's 5 s default here before my change, because it spawns a subprocess.
What I chose not to do
- No
mock.modulein a subprocess: I tried it first and it hung, so I used the option instead. - No
docs/featuresorsrc/tuichange: the commit line saysNo door, because only a test seam changed and no page, action, route or tool. - No mutation check: I did not confirm the new test goes red when the fallback is removed.
I reused sandboxAvailable's existing injectable parameters and did not write a new probe function.
To try it: bun test test/protection.test.ts
🤖 Generated with Claude Code
I added the missing test for the case #16888 introduced: bwrap absent, Landlock working. It passes along with the existing pinned-off test and
test/crew-sandbox-floor.test.ts.tscis clean and the gate prints nothing. I did not run the broader set of testsscripts/fast.tsnames (1275 files, an estimated 107 minutes), so I'm relying on the forge's check for those.What changed
test/protection.test.ts: it starts the crew in-process under a faked bwrap lookup and a faked Landlock probe, with no dependence on the host. It checks that:crew.sandbox.enforcedisfalse;src/crew:startCrewtakes an optionalprobeSandbox, declared inrunner.tsand used indispatch.ts. It defaults tosandboxAvailable, so production behaviour is unchanged. The re-probe uses it too. The test passes the realsandboxAvailablewith the two fakes, so the actual fallback logic runs.What I chose not to do
mock.modulein a subprocess: I tried it first and it hung, so I used the option instead.docs/featuresorsrc/tuichange: the commit line saysNo door, because only a test seam changed and no page, action, route or tool.I reused
sandboxAvailable's existing injectable parameters and did not write a new probe function.To try it:
bun test test/protection.test.ts🤖 Generated with Claude Code
Closes #16947