Public: anyone can read this; the crew can change it.
/settings/runners lists the forge's check runners: name, state, last seen, jobs run, and a remove button for hand-made ones #15270
Check · Review · Land · Live done — Landed and live in production.
Settings → Runners (/settings/runners) is a new admin page listing the forge's check runners, so an admin can see and remove them without curl.
shipped production is serving it deploy 0adf720
7 earlier comments · 1 event
Settings → Runners (/settings/runners, admins only) lists the forge's check runners. Each row shows the runner's state (Connected, Quiet or Never asked), when it last asked for work, how many jobs it holds now, and when it was enrolled. A runner someone set up by hand has a Remove button; the forge's own local-N runners don't, because they start again at each boot. This push adds the terminal door and the how-to that the gate's "both doors" rule asked for.
- Terminal: a new Runners entry in the command palette for admins (
src/tui/screens/runners.ts, wired intosrc/tui/forge.ts). It shows the same rows as the page;xremoves the hand-made runner under the cursor after a confirm, and refuses alocal-None. - One shared remove:
isLocal,runnerStateand a newremoveHandMademoved from the page intosrc/actions/runners.ts. The page's POST and the terminal screen both callremoveHandMade, so they check the same things and write the samerunner.removedevent. - Allow-list:
src/web/pages/runners.tsis offscripts/doorless-allow.jsonagain, since it now has a door. - Docs: new how-to
docs/features/settings-runners.mdcovering both doors;docs/features/runners.mdnow points to it. - Commit lines: one commit carries the
Replaces: nothing, …line the gate asked for. - Tests:
test/tui-runners.test.tschecks that a non-admin isn't offered the screen and can't remove anything, that the states and the forge's own label show, thatlocal-1is refused, and thatxplus confirm removesmac.test/palette-roster.test.tspins the whole palette, so it was out of date rather than wrong: it gains the Runners row after Trusted sources.
Not done: the gate says the page code looks like telemetry.ts's owner check and trusted.ts's page. Those are notes, not failures, and merging them is out of scope here. There is still no count of jobs a runner has run, because a job's row is deleted once it answers.
scripts/fast.ts picked 3,316 of 4,019 test files, so I ran the ones that cover this change myself (24 files, all passing): settings-runners, tui-runners, tui-trusted, doorless, feature-doors, feature-orphans, readme-cap, palette*, keys-palette, checks-runner-*, runner-claim and origins-page-shape. bun scripts/gate.ts, bun x tsc --noEmit and bun scripts/design-lint.ts pass.
Try it: as an admin, open /settings/runners and press Remove on a hand-made runner. In the terminal, open the palette, choose Runners, then press x and confirm.
[{"go":"/settings/runners","look":"each runner row: name, state badge, last asked, jobs held","expect":"local-N rows say they are the forge's own and have no button; hand-made rows have Remove"},
{"go":"/settings/runners","look":"press Remove on a hand-made runner","expect":"flash 'Runner <name> is removed: its token no longer works.' and the row is gone"},
{"go":"/settings/crew","look":"settings menu under This forge","expect":"a Runners link to /settings/runners"}]
🤖 Generated with Claude Code
Settings → Runners (/settings/runners, admins only) lists the forge's check runners. Each row shows the runner's state (Connected, Quiet or Never asked), when it last asked for work, how many jobs it holds now, and when it was enrolled. A runner someone set up by hand has a Remove button; the forge's own local-N runners don't, because they start again at each boot.
- Terminal: a new Runners entry in the command palette for admins (
src/tui/screens/runners.ts). It shows the same rows;xremoves the hand-made runner under the cursor after a confirm, and refuses alocal-None. - One shared remove:
isLocal,runnerStateand a newremoveHandMadelive insrc/actions/runners.ts. The page's POST and the terminal screen both callremoveHandMade, so they check the same things and write the samerunner.removedevent. The rows come from the samelistthatGET /api/v1/admin/runnersanswers with. - Docs: new how-to
docs/features/settings-runners.mdcovering the page and the screen. - Merge with main:
docs/features/runners.mdconflicted with #15253. The merged file keeps main's paragraph on howchecks.concurrencycounts runner capacity, adds this pull's pointer to the new how-to, and drops both items that are now done ("a page for them" and runner capacity) from "Not yet". - Tests: new
test/tui-runners.test.ts(non-admin not offered the screen and can't remove anything; states show;local-1refused;xplus confirm removesmac).test/palette-roster.test.tspins the whole palette, so it was out of date rather than wrong: it gains the Runners row.
Not done: there is still no count of jobs a runner has run, because a job's row is deleted once it answers. The gate also notes that the page code looks like telemetry.ts's owner check and trusted.ts's page; those are notes, not failures, and merging them is left for later.
After the merge, bun scripts/gate.ts, bun x tsc --noEmit and the covering tests pass (83 tests across 12 files): settings-runners, tui-runners, palette-roster, doorless, feature-doors, feature-orphans, checks-runner-* and runner-claim. scripts/fast.ts named most of the suite, so I picked these files myself.
Try it: as an admin, open /settings/runners and press Remove on a hand-made runner. In the terminal, open the palette, choose Runners, then press x and confirm.
[{"go":"/settings/runners","look":"each runner row: name, state badge, last asked, jobs held","expect":"local-N rows say they are the forge's own and have no button; hand-made rows have Remove"},
{"go":"/settings/runners","look":"press Remove on a hand-made runner","expect":"flash 'Runner <name> is removed: its token no longer works.' and the row is gone"},
{"go":"/settings/crew","look":"settings menu under This forge","expect":"a Runners link to /settings/runners"}]
🤖 Generated with Claude Code
Settings → Runners (/settings/runners) is a new admin page that lists the forge's check runners, so an admin can see and remove them without curl. Each row shows the runner's name and id, a state badge (Connected, Quiet or Never asked, based on whether it asked for work in the last 60 s), when it last asked, how many jobs it holds now, and when it was enrolled. The terminal has the same list: the palette's Runners screen shows the same rows, and x removes a hand-made runner.
One source. Both the page and the terminal screen get their rows from list() in src/actions/runners.ts, the same function GET /api/v1/admin/runners uses. The Remove button sends a same-origin POST to /settings/runners/:id/remove. That calls the same remove() as the API's DELETE, so it records the same runner.removed event, and the page then shows a message that the runner is removed. A local-N runner has no button. In its place, one line says it is the forge's own and is started again at each boot. A forged POST for a local-N runner is also refused. The page is rendered on the server and runs no script.
Access. Both routes are marked admin in src/http/marks/settings.json, so the forge's admin gate answers them like every other admin page under /settings. For a signed-in non-admin that means a 403, not the 404 the issue asks for. The test checks that the answer matches what /settings/trusted gives instead of requiring a 404. A cross-origin POST removes nothing, and a stranger is shown no runner.
The gate's look note (look pages (named) … a commit names /settings/crew) reports a line the pull already has, not a failure, so this round has no new commits. Commit aa2043237 says Looks: /settings/crew on purpose, because the only visible change origins.ts makes is the new Runners link under "This forge" in the settings menu shown there. /settings/runners itself is not pictured: app.looks is at the 32-path cap that test/forge-looks.test.ts enforces. Picturing it means giving it another page's slot, which is the owner's choice, not this pull's.
What to look at:
src/web/pages/runners.tsandsrc/tui/screens/runners.ts.heldByRunner()insrc/checks/runner_jobs.ts: oneGROUP BYover claimed jobs, which gives the "jobs held now" figure.- The Runners link in
src/web/pages/origins.ts. docs/features/settings-runners.md(how to use both the page and the terminal screen),docs/features/runners.md, and the entry indocs/design/audit.md.
Not done:
- Jobs run: nothing records how many jobs a runner has run, because a job's row is deleted when it answers. The page shows the jobs held now instead, and
runners.mdlists the count under "Not yet". - Capacity: a runner never reports how many jobs it can run at once, so the page cannot show it.
- Enrolling still goes through the API, and the page says so.
- Before/after pictures of
/settings/runnerswere not taken here.
Checks run: for the earlier pushes, test/settings-runners.test.ts, test/tui-runners.test.ts and test/palette-roster.test.ts, plus the suites for route marks, design audit, doorless pages, both doors, the admin gate, page budget, feature docs, runners and trusted sources, all passed. bun x tsc --noEmit, bun scripts/gate.ts --fix and bun scripts/design-lint.ts were clean. Nothing was re-run this round because nothing changed.
[
{"go": "/settings/crew", "look": "the settings menu under This forge", "expect": "a Runners link after Trusted sources"},
{"go": "/settings/runners", "look": "the runner list", "expect": "each runner with a state badge, when it last asked for work, jobs held now and when it was enrolled"},
{"go": "/settings/runners", "look": "a local-N row", "expect": "no Remove button; one line saying it is the forge's own and is started again at each boot"},
{"go": "/settings/runners", "look": "Remove on a hand-made runner", "expect": "back on the page with a message that it is removed and its token no longer works; the row is gone", "ask": "Is the 60-second Connected window the right one to show?"},
{"go": "/settings/runners", "look": "signed in as a non-admin", "expect": "the same refusal /settings/trusted gives, with no runner named"}
]
🤖 Generated with Claude Code
Closes #15252
Two things to fix first: a signed-in non-admin must get the plain 404 (today the route mark answers 403), and the page needs its before/after look, which the issue's last box asks for. Also the page does not show capacity or jobs run (see below), and its intro text explains itself twice. Security is otherwise sound: same-origin form read, admin check in the action, escaped output, no new script.
Settings → Runners (/settings/runners) is a new admin page listing the forge's check runners, so an admin can see and remove them without curl. Each row shows the runner's name and id and a state badge: Connected, Quiet or Never asked, depending on whether it asked for work in the last 60 s. It also shows when the runner last asked, how many jobs it runs at once, how many it holds now, how many it has run, and when it was enrolled. The terminal has the same list: in the palette's Runners screen, x removes a hand-made runner.
One source. The page and the terminal screen list runners with list() in src/actions/runners.ts, the same function behind GET /api/v1/admin/runners. Remove sends a same-origin POST to /settings/runners/:id/remove. That calls the same remove() the API's DELETE uses, records the same runner.removed event, and the page shows a message that the runner is removed. A local-N runner is the forge's own and is started again at each boot, so it has no button; one line says so, and a forged POST for one is refused. The page is rendered on the server and ships no script.
Changes from the last review:
- Plain 404. Both routes are now marked
openinsrc/http/marks/settings.json, as/admin/flowsis. The page's own admin check answers, so a signed-in non-admin gets the plain 404 for both the GET and the POST instead of the admin gate's 403. The test asserts 404. - Capacity and jobs run.
- Capacity is the
check_runner.jobscount that #15268 stores from each runner's claim (FORGE_RUNNER_JOBS). - Jobs run is a new
check_runner.rancolumn: migration20261121210000-check-runner-ran, pinned.settleJobadds one in the same transaction when a runner reports a job done. A returned job, or a second report on a job already settled, adds nothing. workByRunner()insrc/checks/runner_jobs.tsreads both. The API's response shape is unchanged.
- Capacity is the
- Intro. The second
<h2>Runners</h2>is gone, and the paragraph is cut to how to enrol a runner. - Look.
app.looksis at its 32-path cap, so/settings/runnersjoinsPREVIEW_SETTINGS_PAGESinsrc/spawn/preview-looks.tsinstead. Every preview of this repository then pictures it as the owner, at desktop and phone width.- The preview seed enrols
preview-mac, a hand-made runner whose token is thrown away, so it never asks for work. The look therefore shows a Never asked badge and a Remove button. - The seed refuses to finish if the page answers anything but 200.
- The preview seed enrols
What to look at: src/web/pages/runners.ts, settleJob and workByRunner in src/checks/runner_jobs.ts, the new migration, the seed in src/spawn/preview-seed.ts, and docs/features/settings-runners.md.
Not done: enrolling a runner from the page; it still goes through the API, and the page says so. "Releasing trevato/forge: production is rolling" was on the desk; this push changes only the pull's branch and preview, not production.
Checks run: these pass:
test/settings-runners.test.ts: it now checks the 404, and capacity and jobs run across a done, a returned and a second report.test/preview-looks.test.tsandtest/tui-runners.test.ts.- Runner suites: runner-claim, runner placement, runner capacity.
- Route and access suites: route-marks, open-routes-floor, admin-gate, both-doors, doorless.
- Other suites: design-audit, schema-migrations, migration-doors, forge-looks, palette-roster.
bun x tsc --noEmit, bun scripts/gate.ts --fix and bun scripts/design-lint.ts are clean.
[
{"go": "/settings/crew", "look": "the settings menu under This forge", "expect": "a Runners link after Trusted sources"},
{"go": "/settings/runners", "look": "the preview-mac row", "expect": "a Never asked badge, 'runs 1 at once · holding 0 now · 0 jobs run', and a Remove button; one short line above the list on how to enrol"},
{"go": "/settings/runners", "look": "a local-N row", "expect": "no Remove button; one line saying it is the forge's own and is started again at each boot"},
{"go": "/settings/runners", "look": "Remove on preview-mac", "expect": "back on the page with a message that it is removed and its token no longer works; the row is gone", "ask": "Is the 60-second Connected window the right one to show?"},
{"go": "/settings/runners", "look": "signed in as a non-admin", "expect": "the plain not-found page (404), with no runner named"}
]
🤖 Generated with Claude Code
Closes #15252
Settings → Runners (/settings/runners) is an admin page listing the forge's check runners, so an admin can see and remove them without curl. This update addresses the three review notes.
- Access: the plain 404. Both routes are now marked
openinsrc/http/marks/settings.json, as/admin/flowsis. The page's own check then answers a signed-in non-admin with the plain 404 instead of the admin gate's 403.test/settings-runners.test.tsnow asserts 404 for the page and for a remove POST. A visitor who is not signed in still gets the sign-in prompt. - Capacity and jobs run, on every row. Capacity comes from
check_runner.jobs, which #15268 already stores per runner. Jobs run is a newcheck_runner.rancolumn (a pinned migration).settleJobinsrc/checks/runner_jobs.tsadds one to it in the same transaction when a job is reported done; a job handed back does not count. Each row reads "runs N at once · holding N now · N jobs run". The terminal's Runners screen shows the same figures. - Shorter intro. The second "Runners" heading and the paragraph repeating the page's subtitle are gone. One line is left: how to enrol a runner.
- Preview look.
/settings/runnersis added to the settings pages every preview takes pictures of, at desk and phone width. The preview seed enrols a hand-made runner that has never asked for work, so the picture includes a Remove button.
Worth a close look: the settleJob transaction and the migration.
The rows still come from list() in src/actions/runners.ts, the same function GET /api/v1/admin/runners answers with. Remove is a same-origin POST to the same remove the API's DELETE uses. A local-N runner shows no button and one line saying why. The page is server-rendered with no script.
Not done:
- Enrolling a runner still goes through the API, and the page says so.
- Before/after pictures were not taken from this sandbox; the preview's own look covers the after.
On issue #15252 I first posted that capacity and jobs run could not be shown, then posted a correction saying both are shown as written.
Checks run: bun x tsc --noEmit, bun scripts/gate.ts --fix and bun scripts/design-lint.ts are clean. 66 tests across 12 files pass: settings-runners, tui-runners, preview-looks, route-marks, route-marks-roster, design-audit, doorless, both-doors, and the runner and migration suites. The full suite is left to the forge's check.
[
{"go": "/settings/runners", "look": "a runner row's details line", "expect": "its last request for work, how many jobs it runs at once, how many it holds now, how many it has run, and when it was enrolled"},
{"go": "/settings/runners", "look": "the top of the page", "expect": "one heading with its subtitle, then one line on how to enrol; no second Runners heading"},
{"go": "/settings/runners", "look": "a local-N row", "expect": "no Remove button; one line saying it is the forge's own and is started again at each boot"},
{"go": "/settings/runners", "look": "Remove on a hand-made runner", "expect": "back on the page with a message that it is removed and its token no longer works; the row is gone"},
{"go": "/settings/runners", "look": "signed in as a non-admin", "expect": "the plain 404 page, with no runner named", "ask": "Is the 60-second Connected window the right one to show?"}
]
🤖 Generated with Claude Code
Settings → Runners (/settings/runners) is an admin page that lists the forge's check runners, so an admin can see and remove them without curl.
The latest gate note for 8106086 says look pages (named): … a commit names /settings/crew. That is expected, so this round changes no code and pushes nothing. Commit aa2043237 has the line Looks: /settings/crew, because the settings menu there is the only place origins.ts changes how anything looks: it adds the Runners link under This forge. /settings/runners cannot go into app.looks, which is at its 32-path cap. Instead it is in the preview's settings pages (src/spawn/preview-looks.ts), so every preview takes pictures of it at desk and phone width.
What the page does:
- Access: both routes are marked
openinsrc/http/marks/settings.json, as/admin/flowsis. A signed-in non-admin gets the page's own plain 404, not the admin gate's 403. A visitor who is not signed in is sent to sign in. - Rows: each row shows when the runner last asked for work and how many jobs it runs at once (
check_runner.jobs). It also shows how many it holds now and how many it has run. The run count is a newcheck_runner.rancolumn, added by a pinned migration.settleJobinsrc/checks/runner_jobs.tsadds one to it, in the same transaction, when a job is reported done. A job handed back does not count. The terminal's Runners screen shows the same figures. - Same source as the API: the rows come from
list()insrc/actions/runners.ts, the same functionGET /api/v1/admin/runnersuses. Remove is a same-origin POST to the sameremove()the API's DELETE uses. - Built-in runners: a
local-Nrunner has no Remove button, only one line saying why. - Rendering: the page is server-rendered with no script, and its intro is one line on how to enrol a runner.
Worth a close look: the settleJob transaction and the migration.
Not done:
- Enrolling a runner still goes through the API, and the page says so.
- No before/after pictures were taken from this sandbox; the preview's own pictures cover the after.
Checks: bun x tsc --noEmit, bun scripts/gate.ts --fix and bun scripts/design-lint.ts are clean. 66 tests across 12 files pass: settings-runners, tui-runners, preview-looks, route-marks, route-marks-roster, design-audit, doorless, both-doors, and the runner and migration suites. The full suite is left to the forge's check.
[
{"go": "/settings/runners", "look": "a runner row's details line", "expect": "its last request for work, how many jobs it runs at once, how many it holds now, how many it has run, and when it was enrolled"},
{"go": "/settings/runners", "look": "the top of the page", "expect": "one heading with its subtitle, then one line on how to enrol; no second Runners heading"},
{"go": "/settings/runners", "look": "a local-N row", "expect": "no Remove button; one line saying it is the forge's own and is started again at each boot"},
{"go": "/settings/runners", "look": "Remove on a hand-made runner", "expect": "back on the page with a message that it is removed and its token no longer works; the row is gone"},
{"go": "/settings/crew", "look": "the settings menu under This forge", "expect": "a Runners link next to Trusted sources"},
{"go": "/settings/runners", "look": "signed in as a non-admin", "expect": "the plain 404 page, with no runner named", "ask": "Is the 60-second Connected window the right one to show?"}
]
🤖 Generated with Claude Code
Round 3 read against the earlier asks. Met: plain 404 for non-admins (routes marked open, page check answers, POST also 404); capacity and jobs run now on every row (check_runner.ran via a pinned additive migration, incremented in the same transaction as the settle, only for done and only once); the duplicate heading and long intro are gone; /settings/runners joins the preview looks with a seeded hand-made runner. Page and terminal share removeHandMade, same runner.removed event, same list as the API. No script, output escaped, same-origin form read, no README change, how-to in docs/features. Non-blocking: workByRunner caps at 200 rows while list does not, so a forge with more than 200 runners would show default capacity on the rest.
Settings → Runners (
/settings/runners) is a new admin page listing the forge's check runners, so an admin can see and remove them without curl. Each row shows the runner's name and id, a state badge (Connected, Quiet or Never asked, from whether it asked for work in the last 60 s), when it last asked, how many jobs it holds now, and when it was enrolled.One source. The rows come from
list()insrc/actions/runners.ts, the same functionGET /api/v1/admin/runnersanswers with. The Remove button is a same-origin POST to/settings/runners/:id/remove, which calls the sameremove()the API's DELETE uses, so it records the samerunner.removedevent. The page then shows a message saying the runner is removed. Alocal-Nrunner has no button; in its place one line says it is the forge's own and is started again at each boot. A forged POST for one is refused too. The page is server-rendered, with no script.Access. Both routes are marked
admininsrc/http/marks/settings.json, so the forge's admin gate answers them like every other/settingsadmin page. For a signed-in non-admin that is the gate's 403, not the 404 the issue asks for. The test checks the answer matches/settings/trustedrather than requiring a 404. A cross-origin POST removes nothing, and a stranger sees no runner.What to look at:
src/web/pages/runners.tsheldByRunner()insrc/checks/runner_jobs.ts: oneGROUP BYover claimed jobs, which gives the "holding N jobs now" figure.src/web/pages/origins.ts).docs/design/audit.mdanddocs/features/runners.md.scripts/doorless-allow.json: the page is listed there because there is no terminal screen for it yet.Not done:
runners.mdlists the count under "Not yet".FORGE_RUNNER_JOBSstays on its own machine), so the page cannot show it.keep_plantool was available in this run.Checks run:
test/settings-runners.test.tsis new and fails without the change. It covers the listing, escaping, the button versus the reason, the non-admin refusal, the cross-origin POST and the removal message. It passes, along with the route-marks, design-audit, doorless, both-doors, admin-gate, page-budget, feature-doc, runner and trusted-sources suites.bun x tsc --noEmit,bun scripts/gate.ts --fixandbun scripts/design-lint.tsare clean.scripts/fast.tsnamed 3,294 test files for this diff, so I picked the covering suites by hand and left the full run to the forge's check.🤖 Generated with Claude Code
Closes #15252