Skip to content

Routines: run history and list status read fire outcomes (CL-6681) - #333

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-6681-run-history-fire-outcome
Aug 22, 2026
Merged

Routines: run history and list status read fire outcomes (CL-6681)#333
TheGreatAxios merged 2 commits into
mainfrom
cl-6681-run-history-fire-outcome

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Summary

  • Fixes routine run history/status reading deployment liveness instead of fire outcome. Warm-keep deliberately leaves a routine fire's delivery agent deployed after it replies, so workflow_run.status never settles out of running on its own — every fire (and the routine's own health pill) read as "RUNNING NOW" forever.
  • Adds fireOutcomeStatus to @corbits/routines's health.ts: the one place that tells a fire still doing work apart from one merely staying warm. A running status older than FIRE_RUNNING_WINDOW_MS (10 minutes) since the fire started reads as completed instead of taken literally.
  • Routes routineHealth, cleanFireStreak, and the Routines page's RunStatusCell (shared by the global list's Last run column, the canvas panel's run table, and the detail page's Run history table) all through this one function, so every surface that badges a fire's status agrees.

Root cause

GET /routines/:id/runs embeds each fire's run summary straight off workflow_run (apps/hub/src/routine-run-summary.ts), and the platform never flips a warm-kept fire's status out of running — it is deliberately left resident so the agent can handle follow-ups. RunStatusCell and routineHealth's stateAndWords badged that raw column directly, so a fire that had already delivered its reply displayed as perpetually in flight. This mirrors CL-6595's Mission Control fix in spirit (separating "deployed" from "did the actual work"), but not in mechanism — a routine's run history has no alternate feed to re-point at, since it's already the platform's own fire ledger, so the fix lives in @corbits/routines's own health/status vocabulary instead.

Test plan

  • WORKBENCH_CHECK_SINCE=origin/main bun run typecheck
  • WORKBENCH_CHECK_SINCE=origin/main bun run test
  • bun run lint

Warm-keep deliberately leaves a routine fire's delivery agent deployed
after it replies, so workflow_run.status never settles out of
"running" on its own. These tests pin the fix: a fire's displayed
status should read as its actual outcome (completed once its reply
window has passed) rather than the raw, permanently-live column, both
in health.ts's own unit tests and in the Routines list's rendered
markup.
Deployment liveness and fire outcome are two different facts, and the
Routines list's status cell and the detail page's run history table
both badged the former: a fire's raw workflow_run.status, which
warm-keep deliberately leaves at "running" once the delivery agent
stays deployed after replying. That column never settles back down on
its own, so every fire (and the routine's own health pill) read as
"RUNNING NOW" forever, matching CL-6595's Mission Control fix in
spirit (the fires feed's job is separating a real deployment from a
fired run) but not in mechanism, since a routine's run history has no
feed to re-point at — it is already the platform's own fire ledger.

health.ts's new fireOutcomeStatus is the one place that tells a fire
still doing work apart from one merely staying warm: a "running"
status past FIRE_RUNNING_WINDOW_MS since the fire started reads as
"completed" instead of taken literally. routineHealth, cleanFireStreak,
and the health pill's own "latest fire is running" check all route
through it, and so does the Routines page's RunStatusCell (which feeds
both the global list's Last run column and the detail page's Run
history table) — one function decides for every surface that badges a
fire's status, the same rule health.ts already claims for itself.
@TheGreatAxios
TheGreatAxios merged commit 3fb7c7f 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