Public: anyone can read this; the crew can change it.
Crew: run the game agent tests in ubuntu:24.04 before an agent.sh release, recorded on the release #18274
Merged 5h 17m ago, live in production
scripts/cut-release.ts now runs the game agent tests in ubuntu:24.04 before it cuts a release that changes src/games/agent.sh. It records the run on the release. I haven't run the docker step itself, because the sandbox has no docker.
-
Reviews
Changes requested — before the latest pushThe shape is right: a small pure module, the record field parsed defensively, and the dry run left alone. Three things need fixing in one round.
- The refusal path has no test. Everything tested is pure helpers. Nothing would fail if
cut-release.tsstopped running the tests, ignored a red exit, or ran them on a dry run. That last one already broke the check once. Move the decision intoagent_tests.tsas a function that takes the changed paths, the flag and an injected runner, and returns{refuse}or theAgentTestsrecord. Then test these cases: unchanged agent.sh runs nothing; changed with--tagand a green runner records; changed with a red runner refuses and records nothing; changed without--tagruns nothing. Also test the 'no earlier tag counts as changed' case. - The automatic cut skips the rule. The release keeper (
src/keeper/wire.ts) cuts tags without running the tests, so an agent.sh change can still ship unchecked. The issue's direction is that Minecraft can't become an attack vector. ROLL.md says 'cut by hand', but that is a convention, not a check. At minimum, make the keeper's cut say loudly on the record when agent.sh changed since the last tag and the tag carries noagentTests. Do not leave the bypass silent. Adding a hold would conflict with the 'no governors' rule, so prefer the loud record to a new hold. - Nothing shows the result.
agentTestsis parsed intoShippedbut never surfaced anywhere, so 'recorded on the release' cannot be seen by a person. Add it to/releases.json, if that serializesShipped, and add a line to the terminal's releases screen. If neither is meant to carry it, say so in ROLL.md. Both doors are a rule here, so a commit line sayingNo door: <why>is acceptable only if it gives the reason.
Smaller points:
- The first real cut may fail on a bare
ubuntu:24.04if the tests need jq or curl. The pull admits it was never run. Check the test files for the tools they call and install or mock them, so the first release is not the experiment. - The import line in
cut-release.tsis far over 100 columns. Wrap it.
ApprovedApproved. The earlier asks are met in the diff since 27c2ae097bce: the rule is one tested decision (
decideAgentTests), the keeper's bypass is marked loudly withagentUnchecked, a bare ubuntu:24.04 now installs and checks curl and jq so skipped tests cannot pass, and the result shows on/releases.jsonand the terminal changelog row./releases.jsononly gains an optionalagentTestsfield, sonameandurlare unchanged and no page markup moved (JSON route, no design-system surface). The docs are in ROLL.md, not the README.Non-blocking, the two I would do next:
uncheckedAgentinsrc/keeper/wire.tshas no test. OnlyuncheckedMarkis covered, so the tag lookup and diff wiring are not. Add one case that cuts through the keeper port.- The changelog row calls
shippedReleases().findonce per row. Build one version-to-record map per render. The web changelog page also does not show the sentence yet, which is a web-viewer gap to close later.
The docker run itself was never exercised, because the sandbox has no docker. The first real agent.sh cut will be its test.
- The refusal path has no test. Everything tested is pure helpers. Nothing would fail if
-
Checks
shipped production is serving it deploy f698c54
-
History
- No look: /releases.json is a JSON route, no page changes; the changelog page is untouched (#18271) 252dbdd
- The container script is a plain constant and the test imports once 2b809c0
- Try: open /releases.json after cutting a tag with an agent.sh change, or run bun test test/release-agent-tests.test.ts 30859b3
- The releases test reads /releases.json from a running app, not a cast context 3dc80de
- The agent-test rule is one tested decision, the keeper marks an unchecked agent.sh cut, and releases show the result 35aab9e
- cut-release runs the agent tests only when it cuts the tag, so the dry run stays the plain record 27c2ae0
- cut-release runs the game agent tests in ubuntu:24.04 when agent.sh changed, and records it on the release 72e0964
- Full suite red: test/data-browser.test.ts (#18260) b983849
- 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
5 earlier comments · 1 event
scripts/cut-release.ts now runs the game agent tests in ubuntu:24.04 before it cuts a release that changes src/games/agent.sh. It records the run on the release. I haven't run the docker step itself, because the sandbox has no docker. The new unit tests and the existing release-shipped test pass, tsc is clean and the gate passes.
What changed
- When it runs:
cut-release.tsdiffssrc/games/agent.shagainst the newest release tag. If it changed, or there is no tag to compare to, it runs everytest/game-agent-*.test.tsfile inubuntu:24.04with docker. The checkout is mounted read-only, the hostbunbinary is mounted in, and the container has no network. - If the tests fail: no tag is made and the script exits 1.
- If they pass: the tag message gains
"agentTests": {"image", "files", "at"}.release/shipped.tsreads it back and drops a malformed value instead of trusting it. - Where the logic lives: the new
src/release/agent_tests.tsholds the pure parts: what counts as touching the agent, the docker command and the record field. - Docs and tests:
docs/ops/ROLL.mddescribes the rule.test/release-agent-tests.test.tscovers the detection, the docker command and the record round-trip. - Reuse: I added no dependency and reused
recordFor,parseRecordand the existing tag record.similar.tswas not run.
Left out
- The release keeper's automatic cut (
src/keeper/wire.ts) does not run the tests, since the forge process has no docker. Whenagent.shchanges, cut by hand. ROLL.md says so. - Nothing yet shows
agentTestson the releases page or the terminal. It is in the tag and the parsed record only. - Whether the agent tests pass on a bare
ubuntu:24.04is untested. If they need tools the image lacks, such asjqorcurl, the first real cut will show it. - Parts 1 and 3 of #18250 (the validator pass and the post-release box watch) and the proxy-plugin QA comment are not done.
- The gate said
src/release/shipped.tshas a comment line over 100 columns. It left it for the nightly rewrap, and I didn't fix it.
To try
Run bun scripts/cut-release.ts 9.9.9 on a commit that changes agent.sh, with docker available. It prints the record with agentTests on success.
🤖 Generated with Claude Code
cut-release.ts now runs the game agent tests in ubuntu:24.04 only when it cuts a tag (--tag) and src/games/agent.sh changed since the last release. I fixed the failing check test and pushed. test/release-load.test.ts and test/release-agent-tests.test.ts pass, along with tsc and the gate. The docker step still hasn't run anywhere, because the sandbox has no docker.
The check failed because test/release-load.test.ts runs a dry run, cut-release.ts 999.0.0 with no --tag. In the checkout the script finds no tag to compare against, so it treated agent.sh as changed and tried to run docker, which failed. A dry run now only prints the record, as before.
What changed
- Before it makes a tag,
scripts/cut-release.tsrunstest/game-agent-*.test.tsinubuntu:24.04whenagent.shchanged since the newest tag. If there is no earlier tag, it treatsagent.shas changed. - A failing run cuts no tag and exits 1. A passing run adds
"agentTests": {"image", "files", "at"}to the tag message, whichrelease/shipped.tsreads back and drops if malformed. - The pure parts are in
src/release/agent_tests.ts, tested intest/release-agent-tests.test.ts.docs/ops/ROLL.mddescribes the rule.
Left out
- The release keeper's automatic cut in
src/keeper/wire.tsdoes not run the tests, since the forge process has no docker. Cut by hand whenagent.shchanges. - The releases page and the terminal don't show
agentTestsyet. It is in the tag record only. - Whether the agent tests pass on a bare
ubuntu:24.04is untested. If they needjqorcurl, the first real cut will show it. - Parts 1 and 3 of #18250 (the validator pass and the post-release box watch) and the proxy-plugin QA comment are not done.
- The gate said
src/release/shipped.tshas a comment line over 100 columns. It left it for the nightly rewrap, and I didn't fix it.
To try
Run bun scripts/cut-release.ts <version> --tag on a commit that changes agent.sh, with docker available. The tag message then carries agentTests.
🤖 Generated with Claude Code
The four checks you listed all pass on this branch as it stands, so I changed nothing and pushed nothing. The branch already matches origin.
- Both doors:
bun scripts/gate.ts --explainis green. Both commits carryNo door: <why> (#18271), since the change is a release script and its tag record, not a page, action, route or tool.test/doorless.test.tsandtest/feature-doors.test.tsalso pass. - Dead code:
test/unused-exports.test.tspasses. Every export insrc/release/agent_tests.tshas a caller:scripts/cut-release.tsorsrc/release/shipped.ts. - Name the issue: both commits carry
Direction: the owner, 12-04: "minecraft cant become an attack vector" (#18250). - Module-level state:
test/module-state.test.tspasses. The change adds no module-level Map, Set or array. - Type check and tests:
bun x tsc --noEmitis clean.test/release-agent-tests.test.tspasses, along withtest/hollow.test.ts.
The gate notes one comment over 100 columns in src/release/shipped.ts. That line is not from this change, and the nightly rewrap handles it on main. gate --fix rewrapped nothing, so there is nothing to commit.
I could not see the check's log or know which commit it refused, so these may have been refusals of an earlier push. If a line still fails on the forge, send me its log.
What the pull does
scripts/cut-release.ts now runs test/game-agent-*.test.ts in ubuntu:24.04 when src/games/agent.sh changed since the last tag. It does this only when it actually cuts the tag, so a dry run stays the plain record. It refuses the tag if those tests fail. It records agentTests {image, files, at} on the release.
src/release/agent_tests.ts holds the plain data: what counts as touching the agent, the docker argv, and the record. src/release/shipped.ts reads the record back from the tag message. The tests are in test/release-agent-tests.test.ts and the how-to is in docs/ops/ROLL.md.
What I left out
- The docker run is not exercised in the sandbox, which has no docker. Only the pure parts are tested.
- The run uses
--network=noneand mounts the checkout read-only.
How to try it
Run bun test test/release-agent-tests.test.ts. On a machine with docker, run bun scripts/cut-release.ts after a change to agent.sh. It runs the agent tests in the container before it tags.
The rule for agent.sh releases is now one tested decision, the keeper's cut says loudly when it skipped the tests, and the result shows on /releases.json and in the terminal. The container run still has not been tried with docker; this sandbox has none. gate --explain is green, tsc is clean, and the new and neighbouring tests pass. I did not run the full suite; the forge runs that on push.
- Refusal path:
decideAgentTestsinsrc/release/agent_tests.tstakes the changed paths (undefined when there is no earlier tag), the--tagflag and an injected runner. It returns either{refuse}or theAgentTestsrecord.scripts/cut-release.tsonly calls it and exits on a refusal, and its long import is wrapped. Tests cover each case you listed:- agent.sh unchanged runs nothing.
- A green run with
--tagrecords. - A red run refuses and records nothing.
- A dry run runs nothing.
- No earlier tag counts as changed.
- An empty file list refuses.
- Keeper bypass: a tag cut by
src/keeper/wire.tsafter an agent.sh change, or with no earlier tag to compare, now carries"agentUnchecked": true. I chose the loud record and added no hold.parseRecordreads the mark back, and anagentTestsrecord wins over it. - Showing the result:
/releases.jsonadds anagentTestssentence to a release that has the record or the unchecked mark, andnameandurlare unchanged. The terminal changelog row (src/tui/screens/changelog.ts) carries the same sentence. I did not add it to the web changelog page.docs/ops/ROLL.mdsays all of this. - Bare ubuntu:24.04: the agent tests skip themselves without
curlorjq, so a bare container would have passed with nothing run. The container now installscurl,jqandca-certificatesfirst, then fails ifbash,curl,jq,timeoutorsha256sumis missing. This costs--network=none, because the install needs the network.
The other commit-line rules were met too: every commit has a Direction: … (#18250) line and a Door: or No door: line with a reason. The as never cast, the duplicate imports and the non-literal sh -c script that the gate flagged are fixed. The gate's note about a long comment in src/release/shipped.ts is not from this change.
How to try it
- Run
bun test test/release-agent-tests.test.ts. - On a machine with docker, cut a tag after an agent.sh change with
bun scripts/cut-release.ts <version> --tag. - Then check
/releases.jsonfor theagentTestssentence.
<!-- look-pages 2b809c066af6 --> Look pages for 2b809c0, from the gate:
look pages (none): this pull changes src/web/standards.ts but the forge could not trace the route of /, /admin/telemetry, /explore and 29 more (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
The look-pages note is answered, and the other four items were already met by earlier commits. I added an empty commit with a No look: line and pushed. I did not re-run bun x tsc --noEmit or any tests, since no code changed.
- Look pages:
src/web/standards.tschanges only/releases.json, a JSON route, so no page changes. The changelog page is untouched. The terminal changelog row already shows the same sentence. - Both doors: the earlier commit
35aab9e18carries theDoor:line for/releases.jsonand the terminal changelog. - Direction and issue number: every commit has a
Direction:line and(#18271). - Gate:
bun scripts/gate.ts --fixran clean. It noted one over-long comment insrc/release/shipped.ts, which I left because the nightly rewrap handles it. - Not checked: I did not run the dead-code export test or the timed-jobs test locally, and I did not add any new exports or jobs.
What the pull does, as before: cut-release runs the game agent tests in ubuntu:24.04 when it cuts a tag after an agent.sh change. agent_tests.ts holds that rule as one tested decision. The keeper marks an unchecked cut with agentUnchecked. /releases.json and the terminal changelog row carry the result.
To try it, run bun test test/release-agent-tests.test.ts. Or cut a tag after an agent.sh change and open /releases.json.
scripts/cut-release.tsnow runs the game agent tests inubuntu:24.04before it cuts a release that changessrc/games/agent.sh. It records the run on the release. I haven't run the docker step itself, because the sandbox has no docker. The new unit tests and the existing release-shipped test pass,tscis clean and the gate passes.What changed
cut-release.tsdiffssrc/games/agent.shagainst the newest release tag. If it changed, or there is no tag to compare to, it runs everytest/game-agent-*.test.tsfile inubuntu:24.04with docker. The checkout is mounted read-only, the hostbunbinary is mounted in, and the container has no network."agentTests": {"image", "files", "at"}.release/shipped.tsreads it back and drops a malformed value instead of trusting it.src/release/agent_tests.tsholds the pure parts: what counts as touching the agent, the docker command and the record field.docs/ops/ROLL.mddescribes the rule.test/release-agent-tests.test.tscovers the detection, the docker command and the record round-trip.recordFor,parseRecordand the existing tag record.similar.tswas not run.Left out
src/keeper/wire.ts) does not run the tests, since the forge process has no docker. Whenagent.shchanges, cut by hand. ROLL.md says so.agentTestson the releases page or the terminal. It is in the tag and the parsed record only.ubuntu:24.04is untested. If they need tools the image lacks, such asjqorcurl, the first real cut will show it.src/release/shipped.tshas a comment line over 100 columns. It left it for the nightly rewrap, and I didn't fix it.To try Run
bun scripts/cut-release.ts 9.9.9on a commit that changesagent.sh, with docker available. It prints the record withagentTestson success.🤖 Generated with Claude Code
Closes #18271