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

/flow: the forge shows its own bottleneck — every stage from ready to live with its queue, wait and capacity, the knob beside it, machine use, and 24 h throughput #1570

Closed opened this in answer to
Closed without merging

Adds /flow, a page for forge admins only that shows the whole pipeline and names its bottleneck. It's the first link in the header and is also in the command palette. The page is built only from data the forge already keeps (runs, pulls, reviews, capacity settings, autonomy) and adds no dependencies.

Notes

stopped closed without shipping deploy 5a85d41

opened this

Adds /flow, a page for forge admins only that shows the whole pipeline and names its bottleneck. It's the first link in the header and is also in the command palette. The page is built only from data the forge already keeps (runs, pulls, reviews, capacity settings, autonomy) and adds no dependencies.

What the page shows

  • Stages, left to right: ready → building → check queue → checking → review queue → reviewing → approved → landed → releasing → live. Each stage shows how many items are waiting and how many are being worked, its capacity, and how long the oldest waiting item has waited.
  • Bottleneck: the stage whose oldest waiting item has waited longest is outlined, with one sentence saying why, e.g. "3 checks wait to start; checks at once = 1, shards = 6." A check that is running doesn't count as waiting, so a long check doesn't make its stage the bottleneck.
  • Knobs beside their stages:
    • Building has crew runs at once; checking has checks at once and shards.
    • Each autonomous repository's slots and daily ceiling can be edited in place. This form changes only those two values, so the repository's mode and direction are left alone.
    • The check cell's CPUs and memory come from each repository's forge.json on its default branch. They are read-only here, with an "edit" link to the file.
    • Forges this one may send (children.max) sits in the machine card.
  • Undo: capacity changes go through the same action and change record as Settings → Capacity. The Changes list on /flow has an Undo button per change. Autonomy changes are not undoable in the same way: the confirmation message says what they were before, so you set them back by hand.
  • Machine use: the pod's CPU and memory from its cgroup, and the node's load and memory, with one line saying whether there is room to raise concurrency. The pod's CPU is a rate measured between two page loads, so the first load after a restart reads "measuring — reload".
  • Last 24 hours: a small chart per stage of items in and out per hour, plus the median time from ask to live.
  • Drill-down: every count links to /flow/:stage, which lists the items with their age and links to each issue, pull or run.

Approximations to check (in src/core/flow.ts)

  • "Ready" means open, unblocked issues in autonomous repositories with no run in flight and no open pull from them. It is not exactly the autonomy loop's own ready list.
  • "Landed" means merged into an app's default branch with no production deploy since. "Releasing" means a production deploy that hasn't started serving yet.
  • For ask → live, the ask is the issue the agent run worked on (or the pull itself if there's none), and live is the first production deploy serving after the merge.
  • The 24-hour chart counts only runs created in the last three days. Migration 76 adds an index on run(created_at) to keep that cheap.

Other changes

  • flow is now a reserved name.
  • The page's styles are in flowCss, served from the main stylesheet the same way the board's are.
  • test/flow.test.ts is added to the gate list in scripts/gate.ts. It passed 10 runs in random order, but not under load: I didn't run flake-hunt.ts admit, so the pull doesn't have the ten-run proof the gate asks for.
  • docs/APPS.md describes the page.

Not done

  • No dollar figures: the ledger (#1386) hasn't landed.
  • Settings → Capacity stays, because it also holds the egress and new-account guard settings.

Tests: the type check passes. test/flow.test.ts seeds a forge and checks the stage counts, that the page names the check queue with its sentence, that each count opens its list, that a knob change appears in Changes and can be undone, that slots and ceiling change while the direction stays, that a non-admin gets 404 everywhere, and the 24-hour counts. The five cross-check test files pass. One existing test fails: capacity.test.ts › an admin changes each one…. It fails the same way on main, because this sandbox sets FORGE_CHECK_SHARDS=6.

To try it: sign in as an admin and click Flow in the header.

🤖 Generated with Claude Code

Closes #1554

commented

Parked by the crew: the check failed ("report mode is loud to admins, and to nobody else > reported: the Capacity page says it once, as a note; vitals do not") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs