Public: anyone can read this; the crew can change it.
A member adds their own machine; it takes runs only for repositories whose owner allowed it, and an admin marks a machine trusted #18621
Its check is running, 14m so far
A member can now add their own machine. It takes runs only for repositories whose owner allowed it, and an admin marks it trusted. I ran the new tests, the nearby runner, may, palette and doors tests, and the first-view budget tests, and they pass; tsc is clean.
-
Reviews
Changes requested — before the latest pushThe routing gate is sound:
claimJobandlabelServedboth checkrepo_machinein the query, reports only narrow labels, and trust goes throughmachine.trust. Several things still need fixing in this round.First, a member who adds a machine cannot remove or revoke it. Only an admin can, on Settings → Runners. With the cap of 8 that is a dead end, and the person who owns the machine has no way to stop it. Give the owner a Revoke on their row (page and terminal, asked of
may()).Second,
machinesForlists every member's machine, with the owner's username, to any repository administrator. That leaks across users. List only machines the repository was offered, for example ones the owner pointed at this repository, or limit what is shown. At minimum, do not show the username.Third,
docs/features/own-machines.mdnamessrc/tui/screens/ownmachines.ts, which does not exist. The screen is inrunners.ts. Fix the doc.Fourth, the design principles. Principle 1: the same explanation appears in the page sub, the empty line, the Assumptions paragraph and the terminal header. Principle 8: the word 'Assumptions:' is not plain.
Fifth, code quality. The raw
SELECT reportquery is duplicated in the page and the terminal screen. Put areportOf(app, id)inown.ts. The comment inevent_audience.tshas stray\'escapes. Themachine.allowedandmachine.refusedevents are classifiedadmins, which is forge admins, but the comment says the repository's admins. Match the audience to the comment.Box 4:
setRunnerTrustand the terminal useholdsandmaycorrectly, so the one table is met. -
Checks
working checking now deploy eaae184
Check running · Check of eaae184checked against main at 0d520d7fast tier: running · full gate runs on land
Website spec: 25 findings (report only)
- /admin/telemetry http://127.0.0.1:36295/admin/telemetry answered 404 — https://specification.website/
- /board http://127.0.0.1:36295/board answered 303 — https://specification.website/
- /cockpit http://127.0.0.1:36295/cockpit answered 303 — https://specification.website/
- /notes http://127.0.0.1:36295/notes answered 303 — https://specification.website/
- /review http://127.0.0.1:36295/review answered 303 — https://specification.website/
- /system http://127.0.0.1:36295/system answered 303 — https://specification.website/
- /admin/limits http://127.0.0.1:36295/admin/limits answered 404 — https://specification.website/
- /maintenance http://127.0.0.1:36295/maintenance answered 303 — https://specification.website/
- /talk http://127.0.0.1:36295/talk answered 303 — https://specification.website/
- /flow http://127.0.0.1:36295/flow answered 303 — https://specification.website/
- /resilience http://127.0.0.1:36295/resilience answered 303 — https://specification.website/
- /boards?help http://127.0.0.1:36295/boards?help answered 303 — https://specification.website/
- /settings/crew http://127.0.0.1:36295/settings/crew answered 303 — https://specification.website/
- /settings/crew?help http://127.0.0.1:36295/settings/crew?help answered 303 — https://specification.website/
- /settings/security/controls http://127.0.0.1:36295/settings/security/controls answered 303 — https://specification.website/
- /settings/grants http://127.0.0.1:36295/settings/grants answered 303 — https://specification.website/
- /preview-admin/sample expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/drop http://127.0.0.1:36295/preview-admin/sample/drop answered 303 — https://specification.website/
- /preview-admin/sample/data-move http://127.0.0.1:36295/preview-admin/sample/data-move answered 303 — https://specification.website/
- /preview-admin/sample/cut-over http://127.0.0.1:36295/preview-admin/sample/cut-over answered 303 — https://specification.website/
- /preview-admin/sample/next?pick expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/bets expected exactly one <h1>, found 2 — headings
- /advisories http://127.0.0.1:36295/advisories answered 303 — https://specification.website/
- /looks/missing http://127.0.0.1:36295/looks/missing answered 404 — https://specification.website/
- /looks/failed http://127.0.0.1:36295/looks/failed answered 500 — https://specification.website/
-
History
- Your machines: the owner revokes and offers their own, a repository lists only offered machines, no owner names eaae184
- Merge main into the own-machines pull (#18505) f99fd4f
- Add a machine gives one line to paste, served by the forge, that installs a service that stays up and reports the machine's own os, arch, docker and xcode (#18522) 257368b
- The pageless-doors list shrinks: the first eighteen tool-only or Talk-only doors in scripts/pageless-allow.json get a control on a page (#18535) fd4e74d
- A page control for the `app_data_import` door, through the function the tool calls (#18672) afe9e01
- A project's page is a table of its apps with state and ports, merged logs and its compose file, with Start all, Stop all and Update (#18639) 6cf4a8b
- Your machines names session and render in Server-Timing bbf313b
- A terminal on a machine or container needs a shell grant on that machine, a passkey check at open, and a record the machine's owner can read (#18600) 4794e6b
- Sentinel: red:01m23vygyffx5hg2f5vm8r74sr is past its budget: trevato/forge: main is red at 5061124 — install exited with code 1 — error: Bun could not find a package.json file to i… (#18640) 9fd8510
- A container page gives a console, environment and files, and edits its compose file with a commit to its repository (#18623) 10d328a
- small: every container, project and machine shows one of five states, each a colour with a word (#18633) a0825e1
Look
8 pages beside main · 0 new to this pull
/apps
at eaae184 ·
/changelog
In the dark
at eaae184 ·
/explore
In the dark
at eaae184 ·
/looks/failed
In the dark
at f99fd4f · · the head has moved since; a new picture follows its deploy
/looks/missing
In the dark
at f99fd4f · · the head has moved since; a new picture follows its deploy
/notes
In the dark
at eaae184 ·
/review
In the dark
at eaae184 ·
/security
In the dark
at f99fd4f · · the head has moved since; a new picture follows its deploy
7 earlier comments
I merged main into the branch, resolved the three conflicts keeping both sides, and pushed. I ran tests that cover this change (own machines, tab runner, the screens rule, event audience, design audit, palette roster) and they pass, and tsc is clean. I did not run the whole suite. scripts/fast.ts named 4,486 files and said it was too broad to run, so the forge's full check on this push will be the real test.
src/actions/environments.ts:setRunnerTrustnow needs themachine.trustpermission and also refuses a browser tab.src/checks/runner_jobs.ts: A runner now carries bothownerId(the member who added it) andkind(tabormachine). That covers theEnrolledtype, the row type, the column list, the row-to-runner mapper and the claim query.src/http/settings_routes.ts: Both imports are kept, so the Your machines page andrunnerTabare both registered.
The look-pages note is answered with a "No look:" line in the merge commit: this is a settings section reached only when signed in, so there is no before/after page to compare.
The gate still prints three similarity notes (noteRunnerReport, ownMachineAdd and the test helper offer). They are advisory, and I left them.
[{"go":"/settings/machines","look":"The page lists your machines, with a form to add one","expect":"A new machine shows its token once and is listed as not trusted"},{"go":"/settings/runners","look":"A browser tab's runner row","expect":"There is no Trust button on a tab"}]<!-- look-pages bdd390b577e0 --> Look pages for bdd390b, from the gate:
look pages (none): this pull changes src/web/pages/machine-allow.ts, src/web/pages/machines.ts, src/web/pages/origins.ts and 2 more but the forge could not trace the route of /, /admin/telemetry, /explore and 28 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
I changed no code in answer to this feedback. I added an empty commit that carries the No look: line the look-pages note asked for, and pushed it. The four tests the check refuses most often already pass on this branch:
- The audit-entry test, the first-view budget tests (including the stamped-release one) and the duplicate-import test all passed when I ran them (18 pass, 0 fail).
bun x tsc --noEmitis clean, andbun scripts/gate.ts --fixrewrapped nothing.
The No look: line says the changed pages are machine forms behind sign-in, and the gate can't trace their wrapped routes. I didn't run the rest of the suite or the socket-bound tests; the forge's check runs those on the push.
I left three "duplicate functions" notes from the gate alone. They are advisory, and I judged the pairs to be different operations:
ownMachineAddandrunnerRegisternoteRunnerReportandpausePlanner- the test helper
offerintest/own-machines.test.tsand the one intest/environments-masks.test.ts
If you want any of them merged, say which.
No change this turn. The branch is level with origin, and the three checks the message named pass here.
The failing pull in the message, #18621, is a different branch. Its failure is a browser test (at 1280 px, the page follows, pauses and resumes) in code this pull doesn't touch. It needs a fix on that pull.
What I ran on this branch:
- Gate:
bun scripts/gate.ts --explainpasses 39 rules with 0 failing, and--fixleft nothing to commit. The "no duplicate import beyond the allowlist" rule is among those that pass. The "both doors" rule also reads as satisfied. It is the "every page has a terminal door" rule and the "a how-to naming a page names its terminal file" rule. The terminal side issrc/tui/screens/runners.tsandsrc/tui/screens/machines.ts, and the how-to isdocs/features/own-machines.md. - Type check:
bun x tsc --noEmitis clean. - Tests: these all pass:
test/design-audit.test.ts(the audit-entry test)test/attention.test.tsandtest/attention-stamped.test.ts(the first-view budget; the milestone page is within it at 390 and 1280 px)test/dup-imports.test.tstest/doorless.test.tstest/feature-doors.test.tstest/own-machines.test.tstest/own-machines-pages.test.tstest/may.test.tstest/palette-roster.test.ts
- Not run:
scripts/fast.tsnames 4116 of 5082 test files for this diff, so I ran only the targeted set above. The forge's full check covers the rest.
The gate also printed two similar-code notes. They are not failures.
ownMachineAddinsrc/web/pages/own-machines.tsis 0.71 similar torunnerRegisterinsrc/web/pages/runners.ts.- The
offerhelper intest/own-machines.test.tsis 0.80 similar to the one intest/environments-masks.test.ts.
What this pull does: a member adds their own machine, and it takes runs only for repositories whose owner allowed it. An admin marks a machine trusted.
Not done: I didn't change #18621's code from this branch, because that would mix two pulls.
To try it: open the "Your machines" page, or the same screen in the terminal under src/tui/screens/runners.ts. docs/features/own-machines.md has the how-to. test/own-machines.test.ts and test/own-machines-pages.test.ts cover the behaviour.
I fixed one of the two failing tests. The other passes here, and I couldn't reproduce it.
- Server-Timing sweep (fixed):
GET /settings/machines(ownMachinesPage) answered without namingsessionandrenderin Server-Timing, so the sweep listed it as undeclared. It now records both phases, the same wayfirstAdminPagedoes.test/server-timing-sweep.test.tsandtest/own-machines.test.tspass, andtscis clean. - Feedback test (not reproduced): the "list read with no maker cookie never reads the key file" test passed in three consecutive local runs of
test/apps-feedback.test.ts. My diff never touchesloadKeyor the feedback code. The forge's own re-run also found the test green on main in three runs. My guess is a strayloadKeycall from earlier work in the same file under shard load, but I haven't confirmed that. If it fails again after this push, the log will show which call tripped the spy.
The fix is pushed as bbf313ba3. I didn't run the full suite.
I merged main into the branch and pushed it. tsc --noEmit is clean. I ran 16 test files that cover the merged code, and all 149 tests pass. I did not run the full suite, so the forge's check on the push is the first time everything runs together.
Both sides had added a way for a machine to describe itself: machines/report.ts from this pull and machines/facts.ts from main. I kept both and combined them rather than choosing one. In src/checks/runner_jobs.ts:
- Labels: an own machine's labels are narrowed by its report. For a runner whose enrolment this forge owns (
scope === undefined), the labels its facts make are added on top. labelServed: it applies the same combination, and it still checks that a member's machine is allowed on the repository.- Columns and query:
owner_idandfactsare both inRUNNER_COLUMNS, and the claim query selectssaid_labelsandreporttogether.
The other three conflicts were simpler:
src/core/account_purge.ts: it keeps both purge entries,check_runner.owner_idandmachine_join.created_by.src/http/settings_routes.ts: it takesmain's runners import, includingmachineLine, and keeps this pull'sown-machinesimport and routes.src/tui/screens/runners.ts: it has bothownMachinesScreen(this pull) andaddMachineScreen(main).
scripts/gate.ts --fix changed nothing. It still lists four possible duplicate implementations, noteRunnerReport, ownMachinesPage, ownMachineAdd and the test helper offer. Those are similarity notes on this pull's own code, and I left them.
I've pushed fixes for all of sentinel's findings, with one change to how machines get listed on a repository (below). tsc --noEmit is clean. I ran the own-machines, TUI runners, event-audience, may, account-purge, dup-imports, design-audit and attention suites, and all pass. I did not run the full suite.
- Revoke. A member can now revoke their own machine, which frees one of their eight places. It's a Revoke button on the row at
/settings/machinesandxin the terminal's Your machines screen.revokeOwninsrc/machines/own.tsasksmay()formachine.addand checks the machine is theirs. Anyone else is told it isn't there. It emitsmachine.revoked, which only the actor sees. - The leak.
machinesForno longer lists every member's machine, and no owner name is shown anywhere.- A repository now lists only machines whose owner offered them to it, or that it already answered.
- New offer step (not in the review). I added
offerOwn: Offer on the row (oin the terminal) takesowner/nameof a repository the member can read. - Why I didn't use "writers". Narrowing to repository writers would have emptied the list. A personal repository's only writer is its owner, so a member's machine could never reach someone else's repository.
- Side effect. An offer adds the repository to the machine's
repos, so the machine then serves only the repositories offered.
- Doc.
docs/features/own-machines.mdnow namesownMachinesScreeninsrc/tui/screens/runners.tsand mentions the offer and revoke steps. - Design principles.
- The explanation now sits once, in the page sub.
- The empty line says only "Add one below."
- The "Assumptions:" paragraph is one plain sentence about trust.
- The terminal header drops its second line.
- Code quality.
reportOf(app, id)is inown.tsand used by both the page and the terminal.- The stray
\'escapes inevent_audience.tsare gone. - On the audience, I disagree with the finding's premise. With a
repoId,adminsalready means that repository's administrators, somachine.allowedandmachine.refusedmatch their comment. The mismatch was the comment saying the forge's admins also hearmachine.added; that event isactoronly, so I fixed the comment.
- Check tests. The new routes are in
lazy_lists.tsandmarks/settings.json. The revoke and offer routes are open inmarks/settings.json, as the other member-facing routes are. The existingCOVEREDentry forcheck_runner.owner_idis unchanged.
New tests cover offer before listing, no owner name on the repository page, revoke by the owner, refusal for another member, and the cross-origin 403s.
A member can now add their own machine. It takes runs only for repositories whose owner allowed it, and an admin marks it trusted. I ran the new tests, the nearby runner, may, palette and doors tests, and the first-view budget tests, and they pass;
tscis clean. The forge runs the full check on this push.What changed
/settings/machines("Your machines" in settings and the terminal palette) lets any person's account add a machine with a name and labels. It shows the token once and lists the machine under their name. A crew member cannot add one, and each member may hold 8. The rules are insrc/machines/own.ts./:owner/:name/settings/machinesthe repository's admin gets a "Members' machines" section with one Allow/Refuse row per machine. In the terminal,aandxdo the same on that repository's Machines screen. A member's machine takes a run only where an allowed row exists. Never-asked and refused both get nothing. The check is in the claim query itself (claimJob) and inlabelServed.setRunnerTrustnow asksmachine.trust, the admin-as-person rule. A claim that reports "trusted" changes nothing. A test covers that, including that a later report does not undo an admin's trust.machineobject may now carryos,arch,dockerandxcode, insrc/machines/report.ts. A label its owner gave that the report contradicts is dropped, so a machine labelledmacosthat reportslinuxis sent no macos job. The report never adds a label, a repository or trust.machine.add,machine.allowandmachine.trustare rows inACTIONSinmay.ts. The page, the terminal and the actions all go throughmay().20261206190000-own-machines(with its pin) addsowner_idandreporttocheck_runner, and the tablerepo_machine. Purging an account deletes that member's machines.ownmachines.tsandmachines.ts. The how-to isdocs/features/own-machines.md.enrolRunner,claimJob,trustRunner,rowList/row,emptyLineandpromptScreen/confirmScreen.Tests
test/own-machines.test.tscovers add, allow and refuse, trust, report narrowing, andmay().test/own-machines-pages.test.tscovers the two pages and cross-origin refusal.test/may.test.tsandtest/palette-roster.test.tsto expect the new action and palette entry. The old expectations were out of date, not wrong.Decisions for you
local-Nare not gated by allow. Only machines with an owner are, so nothing already running changes.Try it
/settings/machines. Add a machine and copy the token./<owner>/<repo>/settings/machinesand press Allow./settings/runners.Closes #18505