`closeRunUndelivered` stamped `error`, emitted a run event and called
`notifyRunClosed` — but never `advanceEscalation`. It was the ONLY
failing-close path feeding the ladder nothing: the funnel
(updateOrchestrationRun) advances, the reaper advances, this did not. A
dispatch that died before an agent ever saw it therefore could not build
a streak no matter how often it repeated, so the `human` rung — the one
that raises the alert — was unreachable from this path.
Notification did not cover the gap and could not: formatRunCloseMessage
self-gates on payload.notifyOnClose, which only human-initiated
dispatches carry ("autopilot churn stays quiet"). For an autopilot or
cron dispatch the notify call returns null, so the close said nothing to
anyone at all.
Measured on prod today: six dispatches failed across FOUR projects
(loki, kivvi, solon, reparaturbonus-zh) within twelve hours on an
exhausted Claude quota — every one through this path — while the newest
row in `alerts` was six days old.
Derived, not assumed, via the same ladderEffectForClose predicate the
other two call sites use, so there is one rule for what a close does to a
ladder. The ladder's own `lastOutcome` keeps it honest downstream: it
already distinguishes a streak built from undelivered dispatches from one
built from an agent's failing work.
Attaches the missing signal only — it does not change the outcome, the
notification policy, or what a streak means.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>