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

Runners show what an SLA rests on: queue wait, speed, availability and completion, measured #16845

opened this

Conflicts with main in 6 files

scripts/gate.ts · src/checks/runner_jobs.ts · src/http/api/runners.ts · and 3 more

Phase R1 of #16840 (the runner split). Per runner and for the forge, on Settings → Runners, the terminal's Runners and GET /api/v1/admin/runners: Queue wait: claimable → claimed, p50/p95, last day exact and 30 days in buckets.

Notes · 19 files · +1102 −12

  • Reviews 1 review · 1 asked for changes
    Changes requested

    Good shape overall: the desk-side facts, both doors, docs/features and tests are in place, and README is untouched. Changes needed, all in one round:

    1. Security (medium): the benchmark digest is not proof of work. BENCH_DIGEST is a public constant in the repository, so any runner can POST {ms: 1, digest: BENCH_DIGEST, version: 1} and be scored as the fastest machine. The runner_metrics.ts header and docs/features/settings-runners.md claim these numbers are never from what a runner says of itself, and a report 'whose digest is not the work's is not kept'. That is not true of speed. Fix: either say plainly in the docs and in the speed words that the time is as reported by the runner (the digest only proves the same version of the work), or have the forge issue a per-request nonce that the work folds in so the digest cannot be precomputed. The first is the smaller change.
    2. DoS (medium): POST /api/v1/runner/bench inserts a row per valid report with no limit per runner, and prune runs only from noteClaimed. A runner can flood runner_bench. Keep one row per runner (upsert) or refuse a report newer than a day after the last, and call prune from the bench path too.
    3. Fragile: timedOut in runner_metrics.ts matches the English text of runStep errors with a regex. A reworded error silently turns timeouts into 'done'. Take the timeout from a field on the step result, or import the message from the module that produces it, and test that link.
    4. Design (principles 1, 7 and 8, src/web/pages/runners.ts forgeLines): the forge block is a long run-on paragraph (month wait, availability, completion and reference speed in one muted p), and each row repeats 'Its claims ...' sentences twice. Say one confident line for the page and put the rest as dl fact rows. Reuse an existing named component instead of the hand-rolled status-rows div, or document the new class under docs/design/areas/.
    5. Looks: the forge could not infer a look page. Add a Looks: /settings/runners line to a commit message, plus a review block (JSON steps go/look/expect) for this page change.

    Not blocking: the against query is ORDER BY at DESC LIMIT 60 across all runners, so a busy runner's failures can leave another runner's list empty; query per runner or say so.

  • Checks look

    look it conflicts with main in scripts/gate.ts, src/checks/runner_jobs.ts, src/http/api/runners.ts, and 3 more — bring the branch up to date and it can land deploy 261b26e

    Conflicts in 6 filesdeploy 261b26e

    Website spec: 25 findings (report only)
  • History 1 step

This pull asks for more cpus. Its preview and check run at the size main declares; the larger size applies when the pull lands.

Look

9 pages beside main · 0 new to this pull

/apps

main

at db96b4c ·

this pull

In the dark

main

at db96b4c ·

this pull

at 261b26e ·

/changelog

main

at db96b4c ·

this pull

In the dark

main

at db96b4c ·

this pull

at 261b26e ·

/docs

main

at db96b4c ·

this pull

In the dark

main

at db96b4c ·

this pull

at 261b26e ·

/explore

main

at db96b4c ·

this pull

In the dark

main

at db96b4c ·

this pull

at 261b26e ·

/looks/failed

main

at db96b4c ·

this pull

In the dark

main

at db96b4c ·

this pull

at 261b26e ·

/looks/missing

main

at db96b4c ·

this pull

In the dark

main

at db96b4c ·

this pull

at 261b26e ·

/notes

main

at db96b4c ·

this pull

In the dark

main

at db96b4c ·

this pull

at 261b26e ·

/review

main

at db96b4c ·

this pull

In the dark

main

at db96b4c ·

this pull

at 261b26e ·

/security

main

at db96b4c ·

this pull

In the dark

main

at db96b4c ·

this pull

at 261b26e ·

opened this

Phase R1 of #16840 (the runner split). Per runner and for the forge, on Settings → Runners, the terminal's Runners and GET /api/v1/admin/runners:

  • Queue wait: claimable → claimed, p50/p95, last day exact and 30 days in buckets.
  • Speed: a deterministic reference benchmark (pinned digest, about 0.5 s) at first start and daily, scored against local-1.
  • Availability: minutes connected over 7 days.
  • Completion: done ÷ ended over 30 days, with lost, handed back and timed out counted against it, each with its reason.

Too little history says so instead of showing a number. Additive beside #16836 (lend runners): new modules, plus one note call at each desk change. No timer, no polling.

🤖 Generated with Claude Code

7 earlier comments
commented

<!-- look-pages afcaaa21db81 --> Look pages for afcaaa2, from the gate:

  • look pages (none): this pull changes src/web/pages/runners.ts but the forge could not trace the route of /settings/security/controls (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

<!-- look-pages 654b1a9535f7 --> Look pages for 654b1a9, from the gate:

  • look pages (none): this pull changes src/web/pages/runners.ts but the forge could not trace the route of /settings/security/controls (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

<!-- look-pages 261b26e615fa --> Look pages for 261b26e, from the gate:

  • look pages (none): this pull changes src/web/pages/runners.ts but the forge could not trace the route of /settings/security/controls (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

Taken over by @trevato; stopped @sentinel.

commented

Given back to the crew: a reviewer asked for changes and no one answered for a day, so the builder takes it again.

commented

Parked, offered to the crew again: it sat 6 h with no push, and nobody on the crew can take it from here (a person's branch: no builder can push it), so it waits for its author. The last verdict (changes requested): Good shape overall: the desk-side facts, both doors, docs/features and tests are in place, and README is untouched. Changes needed, all in one round: 1. Security (medium): the benchmark digest is not proof of work. BENCH_DIGEST is a public constant in the repository, so any runner can POST `{ms: … (The forge posts this; nobody wrote it by hand.)

commented

Given back to the crew: a reviewer asked for changes and no one answered for a day, so the builder takes it again.

commented

Answered for #17832, left as it is.

State: conflicted in six files (scripts/gate.ts, src/checks/runner_jobs.ts, src/http/api/runners.ts, src/runner/main.ts, the runners screen and page); changes requested: sentinel's findings on src/http/api/runners.ts.

Why not finished: this pull is trevato's own, a person's branch. #17832 lets a builder rebase, fix or apply reviews only on the crew's own pulls, so the crew does not push here. To hand it to the crew, give it back (or open an issue that names it), and a builder takes it from there. Nothing was merged or closed.

Sign in to join this conversation.

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

Keyboard shortcuts

Docs