Public: anyone can read this; the crew can change it.

Games survival step 4: admin mods (luckperms fabric, ledger with fabric-language-kotlin) #18148

opened this

Merged 4h 46m ago, live in production

This adds an admin set, set:admin (LuckPerms and Ledger), that a Fabric server's Mods block previews and installs in one commit, through the same planner as the survival set (#18090). The set is only names.

Notes

opened this

This adds an admin set, set:admin (LuckPerms and Ledger), that a Fabric server's Mods block previews and installs in one commit, through the same planner as the survival set (#18090).

The set is only names. The planner picks each project's newest release for the server's Minecraft version and loader, and pulls Fabric Language Kotlin in as Ledger's required dependency. All three land in the lockfile with their sha512, the compose env is rebuilt from the lock, and the commit is on the sha you previewed.

I did not touch the live survival box. Installing it, the quiet-hours restart and watching the numbers for a day remain operator steps. The first earlier parked try was declined for that reason.

The planner takes the newest release, not a fixed version. The 5.5.10 and 1.3.13 in the issue are not fixed in code. If Modrinth has no Ledger build for 1.21.6, the plan is refused with that reason and nothing is written. It would be worth running a dry run first.

What moved

  • src/games/mod_sets.ts: adds ADMIN and a SETS list. setNamed now looks the name up in that list, and each set has a terminal key (s for survival, r for admin).
  • src/games/mods.ts: an unknown set name now lists every set.
  • Web, terminal and MCP: the web Mods block and the terminal mods screen loop over SETS instead of naming one set. The MCP mods_install doc line mentions set:admin. docs/features/game-mods.md documents the set; removing Ledger takes Fabric Language Kotlin with it, which is the way back.

I reused the existing planner and planSet, and added no dependency or new route.

Tests

  • test/game-mods.test.ts has a new "admin set" block with a stand-in Modrinth: the plan holds all three and writes nothing, a Paper server is refused, the page offers it, one commit locks all three, and removing Ledger drops its Kotlin dependency.
  • I tightened one old assertion that assumed no set was offered once survival was installed.
  • test/game-mods.test.ts (29) and test/tui-games.test.ts (15) pass, and tsc and design-lint are clean.
  • I did not run the broad suite. scripts/fast.ts named 452 files, about 31 minutes, so the forge's check runs it on the push.

Try it

On a Fabric server's page /games/<box>/<service>, open Mods and press Preview the set under the admin lines. In the terminal, press r on the mods screen. Over MCP, call games with mods_install and project: "set:admin".

[{"go":"/games/net/smp","look":"Mods block on a Fabric server: an Admin set with LuckPerms and Ledger lines and a Preview the set button","expect":"the preview lists Adds LuckPerms, Adds Ledger and Adds Fabric Language Kotlin (required by Ledger), with Install and restart"}]

🤖 Generated with Claude Code

Closes #18090

6 earlier comments
commented

This adds an admin set, set:admin (LuckPerms and Ledger), that a Fabric server's Mods block previews and installs in one commit, through the same planner as the survival set (#18090).

The set is only names. The planner picks each project's newest release for the server's Minecraft version and loader, and pulls Fabric Language Kotlin in as Ledger's required dependency. All three land in the lockfile with their sha512, the compose env is rebuilt from the lock, and the commit is on the sha you previewed.

I did not touch the live survival box. Installing it, the quiet-hours restart and watching the numbers for a day remain operator steps. The first earlier parked try was declined for that reason.

The planner takes the newest release, not a fixed version. The 5.5.10 and 1.3.13 in the issue are not fixed in code. If Modrinth has no Ledger build for 1.21.6, the plan is refused with that reason and nothing is written. It would be worth running a dry run first.

What moved

  • src/games/mod_sets.ts: adds ADMIN and a SETS list. setNamed now looks the name up in that list, and each set has a terminal key (s for survival, r for admin).
  • src/games/mods.ts: an unknown set name now lists every set.
  • Web, terminal and MCP: the web Mods block and the terminal mods screen loop over SETS instead of naming one set. The MCP mods_install doc line mentions set:admin. docs/features/game-mods.md documents the set; removing Ledger takes Fabric Language Kotlin with it, which is the way back.

I reused the existing planner and planSet, and added no dependency or new route.

Tests

  • test/game-mods.test.ts has a new "admin set" block with a stand-in Modrinth: the plan holds all three and writes nothing, a Paper server is refused, the page offers it, one commit locks all three, and removing Ledger drops its Kotlin dependency.
  • I tightened one old assertion that assumed no set was offered once survival was installed.
  • test/game-mods.test.ts (29) and test/tui-games.test.ts (15) pass, and tsc and design-lint are clean.
  • I did not run the broad suite. scripts/fast.ts named 452 files, about 31 minutes, so the forge's check runs it on the push.

Try it

On a Fabric server's page /games/<box>/<service>, open Mods and press Preview the set under the admin lines. In the terminal, press r on the mods screen. Over MCP, call games with mods_install and project: "set:admin".

[{"go":"/games/net/smp","look":"Mods block on a Fabric server: an Admin set with LuckPerms and Ledger lines and a Preview the set button","expect":"the preview lists Adds LuckPerms, Adds Ledger and Adds Fabric Language Kotlin (required by Ledger), with Install and restart"}]

🤖 Generated with Claude Code

commented

<!-- look-pages a6601e91c7f3 --> Look pages for a6601e9, from the gate:

  • look pages (none): "Looks: /games/net/smp" 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
commented

This pull adds an admin mod set for Fabric servers. It holds LuckPerms and Ledger, and the planner pulls Fabric Language Kotlin as Ledger's dependency. All three go into one locked install, each pinned by sha512.

The only new commit is an empty one, 3098d8332, that fixes the look-pages and issue-number feedback with commit lines. A pushed commit can't be amended without a force push, so it carries the lines the gate wanted instead. I didn't run the tests or tsc again. bun scripts/gate.ts runs clean on the updated branch and the push went through.

  • Look pages: /games/net/smp isn't a page in app.looks, so the new commit says No look:. The page is behind login on a per-box route, and the change is one more button in an existing list.
  • Name the issue: the new commit has a Direction: line citing #18090 and #18059.
  • Both doors: the page, terminal and MCP all take set:admin. The terminal key is r on the mods screen, and docs/features/game-mods.md says so. The new commit repeats this as a No door: line.
  • Dead code, module-level state: nothing needed changing. SETS is used by setNamed and planInstall, and it is a frozen constant, not state that requests write to.
  • Comment width: the gate flags three comment lines over 100 columns in files this pull touches (src/games/mods.ts, src/http/mcp/tools/games.ts, src/web/pages/games.ts). I left them, since the nightly rewrap handles them on main.

Try it: on a Fabric server's page /games/<box>/<service>, open Mods and press Preview the set under Admin. In the terminal, press r on the mods screen. Over MCP, call games mods_install with project set:admin.

🤖 Generated with Claude Code

commented

Each set's preview button now names the set in its visible text: "Preview the admin set" and "Preview the survival performance set". A person can tell which one a button installs. I changed the label in src/web/pages/games.ts and fixed the one line in docs/features/game-mods.md that quoted the old "Preview the set" text.

The tightened survival assertion in test/game-mods.test.ts now also checks that the page no longer offers "Preview installing the survival performance set". The same test also checks that the page offers "Preview the admin set". I updated the two other assertions that used the old label.

test/game-mods.test.ts passes after the rename, and tsc and design-lint are clean. The gate's only note was three files with comment lines over 100 columns, which it says the nightly rewrap handles, so I left them. I did not run bun test beyond that one file.

Not changed: I added no new route, so there is no new terminal or MCP side. The terminal already prints "<title> set: …", so the page now matches it.

commented

I merged main into the branch and pushed; the merge conflicts are resolved.

test/game-mods.test.ts passes (36 tests), and tsc is clean. The gate's only note is the long comment lines it leaves to the nightly rewrap. I ran no other test files, because the tool that names tests for a change reported all of them (3,988 files, over the 5-minute budget).

Conflict resolution:

  • Three sets: main added the quality-of-life set, so the page and the terminal now offer survival, quality and admin. Each set uses main's fields, a terminal key and a one-sentence about. The admin set keeps r and gets its own about line.
  • Button labels: I took main's capitalised wording, so the buttons read "Preview the Survival performance set", "Preview the Quality of life set" and "Preview the Admin set". Each button still names its set, which is what @sentinel asked for.
  • Docs: docs/features/game-mods.md and the MCP doc string in src/http/mcp/tools/games.ts now describe the admin set alongside the quality set.
  • Tests: I updated the label assertions to match main, including the check that the page no longer offers "Preview installing the survival performance set". The unknown-set error now lists the sets as set:survival, set:quality, set:admin, and I changed the test to expect that order.
commented

I merged main into this branch and pushed it. It had conflicts in two files, which I resolved by keeping both sides' changes.

  • docs/features/game-mods.md: I took main's Quality of life line, which now lists Sleep Warp. I kept this branch's set:admin paragraph (LuckPerms and Ledger).
  • src/http/mcp/tools/games.ts: I kept this branch's mods_install doc text, which includes set:admin, and added sleep-warp to the set:quality list from main.

The type check (bun x tsc --noEmit) printed nothing. The run covered 1364 tests across 219 files, all passing, though that is more than the test files I named. I didn't run scripts/gate.ts or scripts/design-lint.ts, so the forge's check will be the first to run them.

commented

This push fixes the one gate failure behind the three red checks: comment rewraps in files this pull didn't write. I didn't change any behaviour, and the admin mods work from earlier commits is unchanged.

What changed

  • I restored src/games/when_quiet.ts, src/core/migrations/20261204100000-game-quiet-reports.ts and test/game-when-quiet-door.test.ts to their main versions. An earlier --fix had rewrapped their comments, and the "the diff is the change" rule (rewrapNoiseRefusal) refused those lines.

Checks I ran locally

  • bun scripts/gate.ts --explain now reports 0 failures out of 37 rules. That covers the rules that came up repeatedly: both doors, dead exports, naming the issue, and no module-level state.
  • bun x tsc --noEmit printed nothing but an unrelated large-blob ENOENT warning from the test harness, which I took to mean no type errors.
  • The four test files I ran all pass (50 tests): game-mods, game-when-quiet-door, unused-exports and module-state.
  • The sandbox denied outbound requests to api.modrinth.com. I don't know whether any of those tests depend on that host.

What I left alone

  • src/http/mcp/tools/games.ts has one comment line over 100 columns. The gate only notes it, and running --fix on it would rewrap lines this pull didn't write, so I left it for the nightly rewrap.
Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs