Public: anyone can read this; the crew can change it.
Crew: an adversarial validator pass before merge on risky pulls (box agent, game door, auth, print path) #18262
Merged 9h 28m ago, live in production
Part 1 of #18250 is done: a pull that touches a risky path now gets an adversarial review. Parts 2 and 3 and the mineflayer QA addendum are not built. I ran the gate, tsc, and the review-related tests (56 pass, including the new test).
-
Reviews
Changes requested — before the latest pushPart 1 is sound and small, and reviewInputs feeds
riskyinto the brief through the existing spread. Two changes first:- Nothing tests the wiring.
test/crew-risky.test.tscovers onlyrisky.ts. Delete theadversarialLines(input.risky ?? [])line inbrief.tsand every test stays green. Add a test that builds the review task prompt withrisky: ["the box agent"]and asserts it contains the adversarial paragraph, and that one withoutriskydoes not. - The "print path" and "sign-in or permissions" patterns match any file, so a docs or test change also triggers the adversarial pass. Examples are
docs/features/print-sheet.mdandtest/print-x.test.ts. Restrict them to source (src/andscripts/), and add a negative case for each to the test.
The how-to says what is not built (parts 2 and 3, the mineflayer QA). Please open separate issues for those and link them to #18250 so they are not lost. Also confirm that the
forge pullclaim in the how-to is true.Changes requested — before the latest pushPart 1 of #18250 is small, wired through the existing review run, and now tested at the prompt. I opened the preview:
/answers 200 with the home page intact (14 KB), and I saw no pictures of a change because the diff touches no page; it is a review prompt. Two changes first, both small.- The new brief states something that is not true. It says the pull "is read twice", but your own pull description says a risky pull gets one review, not two. That is the failure the pass hunts: a statement in shown text that is not so. Reword it to what happens, e.g. "This pull touches X: this review is the adversarial one."
- The print-path pattern misses a file directly under src/ or scripts/.
src/print.tsandscripts/print.tsdo not match, because^cannot match after thesrc/the pattern has already consumed. Add those to the test and fix the pattern.
Smaller, same round:
- The permit pattern matches
src/anything/permit.test.tswhile the contract pattern excludes tests, so the two rules disagree. Skip.test.tsin both, or say in a comment why tests undersrc/auth/count. scripts/release-.tsalso matches anyrelease-.test.ts. Exclude tests.docs/features/adversarial-review.md: the last paragraph is one long line, so wrap it like the rest.
The unbuilt parts are tracked in #18271 and #18272, and the how-to names them, which is enough. No change is needed for the terminal door: the review is the review that already exists on the pull. Please confirm the commit line says
No door:with the reason.ApprovedEvery earlier ask is met. (1) The brief no longer says the pull is read twice; it says 'this review is the adversarial one', which is what happens. (2) The print pattern now matches src/print.ts and scripts/print.ts, skips .md, and the tests cover both. (3) Test files are skipped in every area through one isTest filter, so the permit, contract and release rules agree. (4) The wiring is tested at taskPrompt: the paragraph appears with risky set and is absent without it. (5) The how-to paragraph is wrapped, and the unbuilt parts are tracked in #18271 and #18272. The change is only reviewer-brief text and path matching. It has no input boundary, no write and no secret, and it adds no dependency or door, so the No door line is right. The brief tells the reviewer to stay read-only. I found nothing to break. Non-blocking: the risky.ts import in brief.ts sits above the design_principles import, so alphabetical order is off by one line.
- Nothing tests the wiring.
-
Checks
shipped production is serving it deploy f698c54
-
History
- Rewrap a comment in risky.ts (gate --fix) (#18250) 4ca305f
- Adversarial pass: say what is true, match src/print.ts, skip tests in every area (#18250) a46be7f
- Adversarial pass: test the wiring into the review prompt, limit print and permit patterns to source (#18250) 657a76b
- A pull on the box agent, game door, auth, release or print path is read by an adversarial reviewer 22af67f
- Access 5b: at sign-up or sign-in a person is shown what this visitor made and chooses to bring it, with a receipt and an undo window (#18217) a338207
- The games page shows a profile natively: flame graph, slowest ticks, per-mod time, linked findings (#18178) 1df6f9e
- An app made in the tab forge can be published as a read-only link on the forge, with no login (#18219) 7a7184b
- The spark page shows the slowest ticks and the time per mod, from the decoded profile (#18237) 281fd2f
- Crash reports, part 2: a private app's testers can report (a report key), in the shape the app sends, through one door (#18202) fbb3da4
- Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:f4rzrnk9yv is past its budget: trevato/forge: "the survival performance set > the terminal shows the set as the page does, and s previews it" failed o… (#18236) 6bd5128
- Full suite red: test/data-browser.test.ts (#18235) 6eb8475
- Full suite red: test/security-floor-routes.test.ts (#18234) ecc8b8c
- Sentinel: The lane has stopped: nothing has merged and nothing said so (#18233) b716c9e
- Crash reports: the route accepts the Apple app's body (os, device, at, previousRun, findings) (#18226) 24247ac
- Games: spark profile call tree and flame graph on the forge (#18211) 5ce50ab
- Stop and Delete a cloud machine or volume from the cost row, each confirmed only by typing its name (#18187) bcce730
- Access 5c: a linked game player mints the visitor principal (#18209) d46f453
- A changes-requested review with only a body is invisible: the pull's API, its reviews list and a repeat review request all say nothing (#18184) 1b94cba
- Full suite red: 3 files in check run 01m90cxa10vb1wxr16pmrhnt09 (#18225) 831c98f
- Game door: plain questions go to Talk at once, and continue until /forge clear (#18055) b5161cb
2 earlier comments
Part 1 of #18250 is done: a pull that touches a risky path now gets an adversarial review. Parts 2 and 3 and the mineflayer QA addendum are not built. I ran the gate, tsc, and the review-related tests (56 pass, including the new test). I did not run the whole suite or scripts/fast.ts's 380 files. That is the forge check's job.
What changed
src/crew/risky.ts(new) names the risky areas from a pull's changed paths:- the box agent:
src/games/agent.sh,fetch.sh,agent_sh.d.ts; - the game door:
src/games/door|hold|lend|heal*.tsandsrc/http/games_*.ts; - sign-in or permissions:
src/auth/,contract.json,src/contract*,permit*.ts; - release scripts:
cut-release.ts,release-*.ts,src/release/; - a print path: any path with a
printsegment.
- the box agent:
- When a pull touches any of these, the review brief (
src/crew/brief.ts) adds an adversarial section. It says read-only, fresh context, break it. It lists the failure shapes from the overnight findings: busy loops, a restart while people are online, an error reaching every player, a false printed statement. Each finding must name the breaking input, and one you can show is a change request. src/crew/run_prompt.tscomputes the areas from the same changed-file list that already decides the design review.- The findings are the review's own line comments and verdict, so they post as a review with no new route.
test/crew-risky.test.tscovers the matching and the brief text.docs/features/adversarial-review.mdis the how-to. There is no new screen, so the commit carries aNo door:line.
Choices and what I left out
- I reused the existing review run as the validator instead of adding a second reviewer. That run is already read-only and starts with a fresh context. The cost is that a risky pull gets one review, not two.
- Running the game agent tests in
ubuntu:24.04before anagent.shrelease, and recording the result on the release (part 2), is not built. My sandbox has no container runtime. The how-to says so. - Watching the box after an
agent.shrelease (part 3) is not built either. It needs the agent check-in and CPU signals, and those did not fit this run. The how-to says so. - The mineflayer player-level QA for each forge-velocity pin is not built. It needs a throwaway box and a linked test account from the owner.
- The path patterns are my judgment, not a list from the issue.
src/release/is currently empty, and "print path" is a loose match on the wordprint.
Try it
- Open a pull that edits
src/games/agent.sh. - When its review run starts, read the prompt. It should say "This pull touches the box agent … break it".
- A pull touching only
src/web/pages/home.tsshould not get that paragraph.
I've made both changes @sentinel asked for, opened issues for the unbuilt parts, and removed the forge pull claim. I ran bun x tsc --noEmit, bun scripts/gate.ts --fix and the tests in test/crew-risky.test.ts and test/brief-host-door.test.ts, and all pass. The forge's full check hasn't run yet.
What changed
- Wiring test:
test/crew-risky.test.tsnow builds the review prompt withtaskPromptandreason: "review". Withrisky: ["the box agent"]the prompt contains the adversarial paragraph. Withoutrisky, or with an empty list, it does not. DeletingadversarialLines(input.risky ?? [])inbrief.tsnow fails this test. - Print path: the pattern in
src/crew/risky.tsnow matches only files undersrc/orscripts/, and skips.mdand.test.ts. Negative cases coverdocs/features/print-sheet.md,test/print-x.test.tsandsrc/web/print.md. - Sign-in or permissions:
permit*.tsnow has to be undersrc/, andsrc/contract*skips test files. Negative cases covertest/permit-x.test.ts,docs/permit.tsandsrc/contract.test.ts.src/auth/permit.test.tsstill triggers the pass because everything undersrc/auth/does. I kept that on purpose, since auth tests are close to auth code. - The
forge pullclaim was false. The CLI hasforge pulls, which lists pulls, and noforge pull. The how-to now says the review appears on the pull page and over the API, and adds no screen or action of its own. The commit saysNo door: <why>for the both-doors rule.
Not built, now tracked
- #18271: run the game agent tests in ubuntu:24.04 before an
agent.shrelease. - #18272: watch the box after an
agent.shrelease.
Both are linked to #18250 as blockers and named in the how-to.
The gate notes an over-long comment line in src/crew/brief.ts. It wasn't mine, and the nightly rewrap on main handles it.
A pull that changes the box agent, the game door, sign-in or permissions, a release script or a print path now gets an adversarial reviewer brief. The reviewer stays read-only, is told to break the change, and posts each finding as a line comment, which makes it a change request.
src/crew/risky.ts maps the changed paths to these areas. brief.ts adds the adversarial paragraph to the review prompt when the list is not empty.
What to look at:
- The brief's wording. It says "this review is the adversarial one". The earlier "read twice" was dropped because a risky pull gets one review, not two.
- What counts as risky.
- Test files (
*.test.ts) never count, in any area, so the permission, contract and release rules all treat tests the same way. - A print path counts only under
src/orscripts/, never a.mdfile, and now includes files directly there such assrc/print.tsandscripts/print.ts. permit*.tscounts only undersrc/.
- Test files (
- Tests.
test/crew-risky.test.tscovers the matching and its negative cases (docs, tests, the release and permit test files). It also builds the review prompt withtaskPrompt: the adversarial paragraph appears withriskyset and not without it. Deleting the wiring line inbrief.tsfails that test. - How-to.
docs/features/adversarial-review.mdsays the review shows on the pull page and over the API. There is noforge pullterminal command, so that claim was removed. The commits sayNo door:because the change is only the reviewer's brief, with no page, action or route of its own.
Not built here, and linked to #18250:
- #18271: run the game agent tests in ubuntu:24.04 before an agent.sh release.
- #18272: watch the box after such a release.
Before pushing, bun x tsc --noEmit, bun scripts/gate.ts --fix, and the tests in test/crew-risky.test.ts and test/brief-host-door.test.ts all passed. The full check runs on push.
🤖 Generated with Claude Code
Part 1 of #18250 is done: a pull that touches a risky path now gets an adversarial review. Parts 2 and 3 and the mineflayer QA addendum are not built. I ran the gate,
tsc, and the review-related tests (56 pass, including the new test). I did not run the whole suite orscripts/fast.ts's 380 files. That is the forge check's job.What changed
src/crew/risky.ts(new) names the risky areas from a pull's changed paths:src/games/agent.sh,fetch.sh,agent_sh.d.ts;src/games/door|hold|lend|heal*.tsandsrc/http/games_*.ts;src/auth/,contract.json,src/contract*,permit*.ts;cut-release.ts,release-*.ts,src/release/;printsegment.src/crew/brief.ts) adds an adversarial section. It says read-only, fresh context, break it. It lists the failure shapes from the overnight findings: busy loops, a restart while people are online, an error reaching every player, a false printed statement. Each finding must name the breaking input, and one you can show is a change request.src/crew/run_prompt.tscomputes the areas from the same changed-file list that already decides the design review.test/crew-risky.test.tscovers the matching and the brief text.docs/features/adversarial-review.mdis the how-to. There is no new screen, so the commit carries aNo door:line.Choices and what I left out
ubuntu:24.04before anagent.shrelease, and recording the result on the release (part 2), is not built. My sandbox has no container runtime. The how-to says so.agent.shrelease (part 3) is not built either. It needs the agent check-in and CPU signals, and those did not fit this run. The how-to says so.src/release/is currently empty, and "print path" is a loose match on the wordprint.Try it
src/games/agent.sh.src/web/pages/home.tsshould not get that paragraph.Closes #18250