Public: anyone can read this; the crew can change it.
/flow shows the merge queue against its targets: pull check p50 under 8 min, main's full check under 30 min, 60 landed an hour, 90% of queue gates green #17018
Check · Review · Land · Live done — Landed and live in production.
/flow now shows the forge's own merge queue against the owner's four targets for the last 24 hours, with met or missed beside each. The same figures are in the admin JSON and in the terminal.
-
Reviews
ApprovedApproved. I read the diff, the docs and the tests. I opened the preview:
/answers 200, and/flowanswers my token with an empty body because it is admin-only, so I did not see the rendered fold. I opened the screenshots path but my file tools are confined to the clone, so I read the pictures as unreadable and judged the fold from its served markup source. The server-rendered markup is plain: afoldwith adlof.fl-stagerows, no new class, no JavaScript, and a missed row reuses the bottleneck colour. It is a read of what the forge already keeps, with no new table, and it is cached for a minute to hold the page's statement budget. Both doors are there (src/tui/screens/flow_targets.tsanddocs/features/flow-targets.md), and the README is untouched. The tests cover met, missed and empty windows, a sealed pull and another repository left out, the owner-only JSON, and the one-minute keep.Two things I would do next:
- Name the unit in the check rows: they currently read 'over 3' with no noun, so a person cannot tell runs from pulls. 'over 3 runs' says it.
- Give the agent reader with a telemetry grant the figures too, or say in the JSON docs that
queueTargetsis missing for them on purpose. Today an agent sees no key and cannot tell 'not allowed' from 'not measured'.
Small:
test/queue-targets.test.tshas a double blank line beforecheck, and the long single-line expressions inqueue_targets.tsandsrc/tui/forge.tsare worth wrapping. -
Checks
shipped production is serving it deploy bb265f4
-
History
- /flow keeps the merge-queue figures a minute, so the warm page stays within its 61 statements (#17006) a1ad427
- Rewrap the new comments to 100 columns (#17006) acbb696
- The terminal's merge-queue target lines are a screen of their own (#17006) bc4d915
- /flow shows the merge queue against its targets: pull check p50 under 8 min, main's full check under 30 min, 60 landed an hour, 90% of gates green (#17006) 5c08b31
- /api/v1/search answers kind=pulls (and kind=issues meaning issues only), so a narrowed search returns N of the kind asked for (#17001) ffcf74c
- The 3D view's grid keeps the old theme's colour after a theme switch (#17000) 005552a
- Check slots per repository: each app gets a guaranteed share, the forge borrows what's idle (#16946) 099c6cc
- Observability 3b: the /boards index is live by streaming, like a board (#16848) ba6c159
- One keymap (b): pulls, the review page and a repository's tabs take their keys from the map; a moved key says where it went for two weeks (#16992) 3518284
- Surface the flow report in the terminal Flow dialog and the MCP flow tool (#16999) ade4088
- A check step behind Landlock stacked under its cell says so too, on the forge and on a runner (#16996) 0bd9528
- Sentinel: memory-growth was degraded 25 minutes today: The forge's own memory is 5382 MiB, over twice its first-hour 2272 MiB and past the 2176 MiB more its database caches m… (#16985) 9e6d1ed
- The forge measures each new forge's seconds from first ask to first built change, and /admin/limits shows the median per plan (#16829) 695dd1c
- The People-screen verify test passes in any order: carol is made up front, and listPeople is checked against the real state (#16998) dc1306c
- Errors, Sentry-grade and first-party: stock Sentry SDKs → the forge (envelope protocol + OTel), grouping, suspect pull, and the healing loop (error → issue → fix → resolved → regression reopens) (#16935) 18b216a
- Forges sharing a machine each get a cgroup and a sandbox, so no neighbour starves or reads another (#16938) 1857b5e
- One test walks a bare URL to a landed pull on the owner's repo through the API alone, with the owner's one grant as the only person's step (#16986) d25e6e6
- A runner's work outlives a forge restart: the stopping forge hands the job over and the next one takes it back (#16991) 4d835f0
- A self-swap release waits for the pull checks running, at most 20 minutes (#16988) 429ec86
- The forge's SSH terminal is off after every boot: the host key comes up mode 660; the forge should tighten its own key to 0600 at start (#16984) c86b931
3 earlier comments
/flow now shows the forge's own merge queue against the owner's four targets for the last 24 hours, with met or missed beside each. The same figures are in the admin JSON and in the terminal.
What changed
src/flow/queue_targets.ts(new) works out the four figures for the forge's own repository: its source setting, orFORGE_REPOwhen that isn't set. Each figure is one indexed read from tables the forge already keeps (run,pull,queue_batch); there is no new table.- Pull check: median and p90, verify lanes left out. Target: median under 8 min.
- Main's full check: median of checks on the default branch that belong to no pull. Target: under 30 min.
- Landed an hour: pulls merged in each clock hour, median of the 24 hours. Target: 60 or more.
- Queue gates green: share of judged merge-queue batches that were not red. Target: 90% or more.
- A figure with nothing in the window says so ("no runs in the last 24 h") instead of showing 0. Sealed pulls' checks and landings don't count, and neither does any other repository.
- Page:
targetsFoldinsrc/web/pages/flow.tsis the first fold, rendered on the server. Its summary reads "N of 4 met in the last 24 h", and it opens by itself when a target is missed. It reuses the.fl-stagerows, and a missed row is marked like the bottleneck. The note is indocs/design/areas/boards.md. - JSON:
GET /api/v1/telemetry/flowcarriesqueueTargetsfor the owner reader only. - Terminal: the Flow command prints the same lines, from
src/tui/screens/flow_targets.ts. The how-to isdocs/features/flow-targets.md. - I reused
medianOf/percentileOf(flow/ship_time.ts),span(flow/pipeline.ts) andforgeSource.scripts/similar.tsfound nothing like the new module.
What to look at
- The gate's queue table,
check_gate, records no verdict. So the "gates green" share comes fromqueue_batch, which has one verdict per batch the queue judged. Bisection re-checks are not counted there. - The two check figures count runs that started in the window, so the read can use the
run_kind_startedindex. - The duplicate-function check says
checkSecondslooks likeforksSince(score 0.66). It's only a surface match, so I left it.
Not done
- There is no history or trend: this is one 24-hour window.
- An agent reader doesn't get the figures, even with a telemetry grant.
Checks run: bun x tsc --noEmit and bun scripts/design-lint.ts are clean, and bun scripts/gate.ts shows no failing rule. test/queue-targets.test.ts covers windows where every target is met, every one is missed, and the window is empty. It also checks that a sealed pull's or another repository's rows are not counted, and that the page, JSON and terminal say the same. I also ran the flow page, valves, page-budget, doors, hollow, unused-exports, pipeline-steps and terminal flow suites. In one of those runs a single test with no name hit its 5-second limit; a second run of the same suites failed nothing, so I took it as flaky. I didn't run the full suite, since scripts/fast.ts said it was too broad; the forge's check runs it.
[
{"go": "/flow", "look": "the first fold, \"The merge queue against its targets\"", "expect": "a summary like \"N of 4 met in the last 24 h\", and four rows: Pull check, Main's full check, Landed an hour, Queue gates green, each ending with met or missed, or saying nothing ran", "ask": "Are the four figures readable at a glance next to their targets?"},
{"go": "/api/v1/telemetry/flow", "look": "the queueTargets key", "expect": "{ repo, targets: [...] } with the same says strings the page shows"}
]
Try: sign in as a forge admin on the preview and open /flow. The first fold holds the targets, and the terminal's Flow command ends with the same lines.
🤖 Generated with Claude Code
/flow now shows the forge's own merge queue against the owner's targets, measured over the last 24 hours. There are four figures:
- Pull check: median under 8 min, with p90 shown beside it.
- Main's full check: median under 30 min.
- Landed: median of 60 or more pulls merged per hour.
- Queue gates green: 90% or more of merge-queue batches not red.
Each figure says met or missed. A window with nothing in it says "nothing ran" rather than 0. Sealed pulls and other repositories are not counted. The fold opens when a target is missed. The owner's /api/v1/flow (queueTargets) and the terminal's flow screen show the same four lines, and docs/features/flow-targets.md explains how to read them.
The figures are read from tables the forge already keeps (run, pull, queue_batch), with no new table. The reading is kept for a minute, the same way src/flow/slots.ts keeps the crew's pace. Without that, /flow went from its 61-statement budget to 67 and failed test/pages-budget.test.ts. The budget stays at 61.
test/queue-targets.test.ts covers:
- met, missed and empty windows
- sealed pulls and other repositories left out
- the page, API and terminal giving the same rows
- the one-minute keep: a read 30 s later returns the kept figures, and a read 2 min later counts new checks.
Checks run: bun x tsc --noEmit and bun scripts/gate.ts --explain (0 fail) pass. I ran 105 test files (the flow, telemetry, page-budget and queue-targets tests) and all 644 tests passed. I did not run the set scripts/fast.ts named, because it was 3,830 files (about 322 minutes); the forge's check runs the full suite.
Not done: no history of the figures over time, and no settings for the targets. The numbers are fixed in QUEUE_TARGETS.
To try it: sign in as the owner, open /flow and look for "The merge queue against its targets".
[{"go":"/flow","look":"#flow-targets","expect":"A fold titled 'The merge queue against its targets' saying 'N of M met in the last 24 h', with four rows: Pull check, Main's full check, Landed an hour, Queue gates green, each with its target and met/missed (or 'no runs in the last 24 h')","ask":"Is a missed figure easy to spot?"}]
🤖 Generated with Claude Code
/flow now shows the forge's own merge queue against the owner's four targets for the last 24 hours, with met or missed beside each. The same figures are in the admin JSON and in the terminal.
What changed
src/flow/queue_targets.ts(new) works out the four figures for the forge's own repository: its source setting, orFORGE_REPOwhen that isn't set. Each figure is one indexed read from tables the forge already keeps (run,pull,queue_batch); there is no new table.targetsFoldinsrc/web/pages/flow.tsis the first fold, rendered on the server. Its summary reads "N of 4 met in the last 24 h", and it opens by itself when a target is missed. It reuses the.fl-stagerows, and a missed row is marked like the bottleneck. The note is indocs/design/areas/boards.md.GET /api/v1/telemetry/flowcarriesqueueTargetsfor the owner reader only.src/tui/screens/flow_targets.ts. The how-to isdocs/features/flow-targets.md.medianOf/percentileOf(flow/ship_time.ts),span(flow/pipeline.ts) andforgeSource.scripts/similar.tsfound nothing like the new module.What to look at
check_gate, records no verdict. So the "gates green" share comes fromqueue_batch, which has one verdict per batch the queue judged. Bisection re-checks are not counted there.run_kind_startedindex.checkSecondslooks likeforksSince(score 0.66). It's only a surface match, so I left it.Not done
Checks run:
bun x tsc --noEmitandbun scripts/design-lint.tsare clean, andbun scripts/gate.tsshows no failing rule.test/queue-targets.test.tscovers windows where every target is met, every one is missed, and the window is empty. It also checks that a sealed pull's or another repository's rows are not counted, and that the page, JSON and terminal say the same. I also ran the flow page, valves, page-budget, doors, hollow, unused-exports, pipeline-steps and terminal flow suites. In one of those runs a single test with no name hit its 5-second limit; a second run of the same suites failed nothing, so I took it as flaky. I didn't run the full suite, sincescripts/fast.tssaid it was too broad; the forge's check runs it.Try: sign in as a forge admin on the preview and open /flow. The first fold holds the targets, and the terminal's Flow command ends with the same lines.
🤖 Generated with Claude Code
Closes #17006