Skip to content

Mission Control: count routine fires via the fires feed (CL-6595) - #329

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-6595-fires-feed
Aug 22, 2026
Merged

Mission Control: count routine fires via the fires feed (CL-6595)#329
TheGreatAxios merged 2 commits into
mainfrom
cl-6595-fires-feed

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Mission Control's active-run count read listTopLevelRuns, which excludes every folded run server-side — and a routine fire is always a folded run, so it could structurally never be counted as running. The Routines page pill was already correct.

Route routine activity through the existing feed=fires listing instead, filtered to routine-tagged fires.

  • Tests first: e0a9ad2f
  • Implementation: 583217cf

bun run check green in the worktree.

The shell's "Running" band and Mission Control's active-run count both
source `listRoutineActivity`, which called `listTopLevelRuns` -- the
listing that excludes every folded run server-side. A routine's own
fire is a folded run, so it could never appear there: a routine
genuinely running showed "0 active" on Mission Control while the
Routines page's own status pill (read off `workflow_run.status`
directly) correctly said "Running now".

These tests pin the fix: `listRoutineActivity` must read the
`feed=fires` listing (which keeps a routine's fire, tagged with its
routineId/routineName) and keep only rows that actually have a
routine parent, dropping a directly-triggered deployment that isn't
routine activity at all. They fail against the current
`listTopLevelRuns`-based implementation.
…ne (CL-6595)

Root cause of routine runs looking stuck on "Running now" forever
while Mission Control simultaneously showed "0 active": the two
surfaces read two different queries of the same run state.

The Routines page's status pill reads `workflow_run.status` directly
by run id (`@corbits/routines`' `health.ts`, via its
`RunSummaryResolver`), so it reflects the run's real terminal status.
Mission Control's active-run count and the shell's "Running" band
instead came from `listRoutineActivity`, which called
`listTopLevelRuns` -- a listing whose whole point is excluding every
folded run (`notExists(folded_run)`) so the Agent Directory only shows
genuine deployments. A routine's fire is launched through
`launchFoldedRun` and is therefore always a folded run, so it never
appeared in that listing at all: Mission Control's "active runs" count
was structurally incapable of ever counting a routine, running or not.

`listTopLevelRuns`'s sibling `feed=fires` listing already exists for
exactly this shape of problem (Insights' run feed, CL-6249): it keeps
a folded run when it is a confirmed routine fire, tagged with the
routine's id and name, and still excludes every other folded run
(workbench hosts, invited agents, tasks). `listRoutineActivity` now
reads that feed through a new `listRoutineRunFires` client function
and keeps only rows with a routine parent, so a running routine is
visible (and counted) on Mission Control exactly when the Routines
page's own pill says so, and a fire leaves that count the moment its
status does.
@TheGreatAxios
TheGreatAxios merged commit c171a08 into main Aug 22, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant