Public: anyone can read this; the crew can change it.
Games: a new pin for the forge's proxy plugin replaces the old jar, in PLUGINS and on disk, and the page says which one loaded #18111
Merged 5h 59m ago, live in production
This covers point 1 only: committing a pin now replaces the same plugin's entry in PLUGINS. The jar cleanup on apply, the named stray jars and the loaded-version line from the issue are not built, so the issue isn't done.
-
Reviews
Changes requested — before the latest pushOnly box 1 is built. Boxes 2 and 3 are not, so a person still cannot tell which plugin version the proxy loaded, which was the point of the issue. Changes needed, all in one round:
- (first) Box 3: read the proxy log after the restart for "Loaded plugin forge ..." and show the loaded version on the proxy's page. When it differs from the pinned one, say so in words. Add a test that fails without it.
- Box 2: on apply, remove from the proxy's plugins directory (/server/plugins) the jars the forge put there (its /forge-jars/ copies, told by name and hash) that PLUGINS no longer names. Leave a hand-placed jar alone and name it on the page. The present prune only touches the forge's own copy folder
jars/, which is not the plugins directory, so the stale jar on disk is untouched. - The agent.sh prune deletes every jar in
jars/if thejqcall fails, for example when$listis empty or malformed, because a failedjq -efalls through torm -f. Delete only whenjqsucceeds and answers false. - Both doors: the page now reports the loaded version, so add the terminal side under
src/tui/and thedocs/features/how-to. TheNo doorline is not valid once item 1 lands. - Add a test for the on-disk removal, and a test that a hand-placed jar is kept.
- Cleanup: the filter
!(p.startsWith(AT) && stemOf(p) === stemOf(AT + pin.name))is written twice inwithJar. Name it once. - The page work needs a
reviewblock (JSON steps go/look/expect) and abun scripts/design-lint.tsrun.
ApprovedApproved. Since my last review the head adds all three boxes: a new pin replaces the same plugin's entry in PLUGINS, the agent removes the forge's own stale jars from the plugins folder (told by name and by bytes matching the hash), and the box page and terminal both say which version the proxy loaded, in words, including when it is not the pinned one. The earlier asks are met: the terminal door exists, the how-to is in docs/features/games.md rather than the README, the new behaviour has tests that would fail without it, and the text from the box is cut to plain characters and escaped. The jar removals only run when the jar list is good.
Two things I would do next, neither blocking:
- Non-blocking: say 'The proxy's log does not say it loaded forge yet' more plainly for someone on a phone, and put the stray-jar line first when there is one, since that is the one a person must act on.
- Non-blocking: the MCP box tool and the /games/<box>/<service> page carry none of the new lines; add them so every door tells the same story.
-
Checks
shipped production is serving it deploy 5ce50ab
-
History
- Direction: the box reports which plugin version the proxy loaded, so a stale jar is visible (#18110) 5d975bd
- Try: open /games/mc as the box's owner; under Box, the lines say which version of forge the proxy loaded a7f2ec4
- games: the box says which plugin version the proxy loaded; the agent removes the forge's stale jars from /server/plugins and names a hand-placed one 85f1766
- games: a new pin replaces the old jar of the same plugin in PLUGINS; the agent drops jars no pin names 4b720d3
- Apps without a login 3: an app made on one device opens on another, as a file or a read-only link (#18079) 868ed93
- API routes the Apple app lacks: the arcade's games, an app's log, pausing a runner (#18075) cd50587
- Full suite red: test/talk-preview-frame.test.ts (#18098) 78d5a5f
- Post-quantum: the game agent's channel uses a hybrid key exchange (#18074) 2df3631
- Trace index backfill stands aside when the database is locked (the hold on v0.7.729) (#18082) 52a26e1
- Every new TLS socket must check the peer's certificate (a lint) (#18063) c09e592
- Post-quantum: one test proves every door negotiates a hybrid key exchange (#18064) f0fb2b5
- Post-quantum signatures and host keys: track ML-DSA, nothing to build yet (#18078) c265edf
- Sentinel: Crew runs in trevato/deal-clock keep failing at the push or the sandbox (#18076) a98d939
- Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:sh74wg48ib is past its budget: trevato/forge: "on production's size > a cold /map answers within a few passes over the runs" failed on 3 pulls in the … (#18070) c5a926e
- Traces 2: /traces lists every trace with facets and search (#18015) 1c60934
- Traces 1a: a trace index table, filled when a run or Talk turn ends and backfilled once off the serving thread (#18061) 35e4ee2
- Games: pin forge-velocity f7d5d4e72 (/forge words as you type, Yes and No to click, an answer shown once) (#18036) 0003ecb
- Merge pull request #18054 from sold/agent-rollback d6960b3
- Games: a new server's words are searched on Modrinth, not matched against five names (#18041) 31cdee4
- Lists answer next_cursor as a string, as openapi.json declares (full suite red, #18027) (#18040) ab67833
4 earlier comments · 1 event
This covers point 1 only: committing a pin now replaces the same plugin's entry in PLUGINS. The jar cleanup on apply, the named stray jars and the loaded-version line from the issue are not built, so the issue isn't done.
Tests: test/game-proxy-jars.test.ts passes (20), including a new test for the replacement, and tsc is clean. A wider run of test/game-*.test.ts hit the sandbox's network block on api.modrinth.com and timed out, so I don't have a result for it. The forge's check runs the full suite on the push.
What changed
- Replacement in
withJar(src/games/proxy_jars.ts): a pin for a/forge-jars/jar now drops any other/forge-jars/entry of the same plugin, told by the name before the version or hash. Entries for other plugins, and uploaded-jar URLs likehttps://…/a.jar, are kept. The plan shows the old entry under "gone". - AutoStopper check: the "give the proxy forge-velocity first" check now ignores the entry being replaced. Without that, replacing the only AutoStopper entry would have passed the check wrongly.
- Prune in
src/games/agent.sh:jars_readynow deletes any regular file in the box's ownjars/directory that the forge's jar list doesn't name. That directory is the forge's copy folder beside the compose file, not/server/plugins.
What I left out
- Removal from
/server/plugins: no helper-container step that removes forge-placed jars thatPLUGINSno longer names, and no naming of hand-placed jars on the page. Per the correction, the image already removes the old jar whenPLUGINSnames something. The existing AutoStopper helper inagent.shis the pattern to extend. - Loaded version on the page: no "Loaded plugin forge …" read from the proxy log, and no words when it isn't the pinned one. This is the biggest gap, since it would have settled the incident at a glance.
- Doors: the commit line says
No doorbecause the form already exists and only what it writes changed. If review wants the terminal and how-to side for the loaded-version line, it comes with that work. - Test box: no end-to-end test with an old jar on disk; the new test covers the
PLUGINSedit only.
To try it, upload the new forge-velocity jar on the proxy's page while PLUGINS names an older /forge-jars/forge-velocity-… entry. The plan should show the old entry under "gone" and a single forge-velocity entry added.
All three boxes from the issue are built, and I pushed to #18111. tsc, design-lint, the gate, and the module-state, unused-exports and route-timing tests are clean. The agent, proxy-jars and terminal tests pass (41). I did not run the full suite or the other game-*.test.ts files. The agent's removal and log-reading run in the tests against a fake docker, not a real proxy.
What changed
- Pin replaces the old entry (
withJar): thekeptlist is computed once and used in both places (item 6). - Loaded version (box 3):
- Agent report:
agent.shreads the proxy's log for "Loaded plugin <id> <version> by …", at most once a minute, and reports it in the sync's diag with the jar names the forge pinned. - Page and terminal:
src/games/plugins_loaded.ts(pluginLines) turns that into words, and both the page's box block and the terminal's box screen print it. It says "The proxy loaded forge 0.1.0, the pinned version.", or "…forge 0.0.9, not the pinned forge-velocity 0.1.0.", or that the log doesn't show the plugin loaded yet. - Doc: the how-to is in
docs/features/games.md. TheNo doorline is gone.
- Agent report:
- On-disk removal (box 2): after a successful
up,plugins_tidyruns a helper container over/server/plugins. It removesforge-velocity-orAutoStopper-jars thatPLUGINSno longer names and whose bytes match the hash in their file name. Any other jar with a pinned plugin's name stays and is reported as stray, and the page names it. It does nothing when the jar list is empty or broken. - Copy-folder prune (item 3): it now deletes only when
jqran and answeredfalse.
What I chose not to do
- Stray scope: a jar counts as stray only when its name starts with one of the two pinned plugins. I can't tell a hand-placed jar from a Modrinth one, so an unrelated jar like WorldEdit is never touched or named.
- Older agents: they send none of the new fields, so the page shows nothing new until the agent updates itself.
- MCP and
/games/<box>/<service>page: no new lines there.
Tests
test/game-agent-plugins.test.ts: on-disk removal, hand-placed jar kept and named, empty or broken list removes nothing, log report, and the copy-folder prune.test/game-proxy-jars.test.ts: the replacement inPLUGINS, and the page's loaded-version and mismatch words.test/tui-games.test.ts: the terminal's box screen shows the same words as the page.
To try it
Open /games/mc as the box's owner. Under Box, the lines say which forge version the proxy loaded, what was taken out, and what was left.
[
{"go": "/games/mc", "look": "the Box section, after the box has synced with an agent that reports plugins", "expect": "a line 'The proxy loaded forge <version>, the pinned version.' or '…not the pinned forge-velocity 0.1.0.'"},
{"go": "/games/mc", "look": "the same section when a jar was removed or a hand-placed one left", "expect": "'Taken out of the proxy's plugins…' names the removed jars and 'Left in the proxy's plugins…' names the hand-placed ones"},
{"go": "/games/mc/velocity", "look": "Forge plugins, pin forge-velocity while an older forge-velocity entry is in PLUGINS", "expect": "the plan's lines add the new entry and its 'gone' lines show the old one"}
]<!-- look-pages a7f2ec4d25f4 --> Look pages for a7f2ec4, from the gate:
look pages (none): this pull changes src/web/pages/games.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
<!-- look-pages 5d975bd266d3 --> Look pages for 5d975bd, from the gate:
look pages (none): "Looks: /games/mc" is not a page of app.looks in forge.json; this pull changes src/web/pages/games.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
This covers point 1 only: committing a pin now replaces the same plugin's entry in
PLUGINS. The jar cleanup on apply, the named stray jars and the loaded-version line from the issue are not built, so the issue isn't done.Tests:
test/game-proxy-jars.test.tspasses (20), including a new test for the replacement, andtscis clean. A wider run oftest/game-*.test.tshit the sandbox's network block on api.modrinth.com and timed out, so I don't have a result for it. The forge's check runs the full suite on the push.What changed
withJar(src/games/proxy_jars.ts): a pin for a/forge-jars/jar now drops any other/forge-jars/entry of the same plugin, told by the name before the version or hash. Entries for other plugins, and uploaded-jar URLs likehttps://…/a.jar, are kept. The plan shows the old entry under "gone".src/games/agent.sh:jars_readynow deletes any regular file in the box's ownjars/directory that the forge's jar list doesn't name. That directory is the forge's copy folder beside the compose file, not/server/plugins.What I left out
/server/plugins: no helper-container step that removes forge-placed jars thatPLUGINSno longer names, and no naming of hand-placed jars on the page. Per the correction, the image already removes the old jar whenPLUGINSnames something. The existing AutoStopper helper inagent.shis the pattern to extend.No doorbecause the form already exists and only what it writes changed. If review wants the terminal and how-to side for the loaded-version line, it comes with that work.PLUGINSedit only.To try it, upload the new forge-velocity jar on the proxy's page while
PLUGINSnames an older/forge-jars/forge-velocity-…entry. The plan should show the old entry under "gone" and a single forge-velocity entry added.Closes #18110