GeezerVison is showing github.com — aggregator(alerts): the all-gone delivery/escalation path from #3690 has no test — no gone:true sender fake exists · Issue #6905 · developing-today/code
aggregator(alerts): the all-gone delivery/escalation path from #3690 has no test — no gone:true sender fake exists #6905DescriptionFinding
The alert engine's all-gone delivery path has no test. PR #3690 gated markDelivered/markEscalated on sent > 0 and tested the transient-error case thoroughly, but no test fake ever returns gone: true — so the branch where every subscription is a dead endpoint is exercised by no test, even though it behaves differently from the error case over multiple ticks.
Evidence
- Source PR: fix(aggregator): retry failed incident pushes (#3685) #3690 (merged, merge
a3acf3b0523d71860a11c361bddf4b2caf95517b, head 8a59aed9c959a6d823918f771c7d050fc5437ed9).
pm-stack/aggregator/src/alerts.ts on current main (4cd2927643453bee47a0f764de534e229220cf88, verified twice via the contents API):
- Delivery branch (line 730) and escalation branch (line 740):
if (summary.sent > 0) { mark… } else { console.warn(… sent=0, gone=${summary.gone}, errors=${summary.errors}) } — the branch itself does not distinguish transient errors from gone endpoints.
noteSubscriptionGone (line 418): two consecutive gone responses prune the subscription, so an all-gone incident is retried (and warned about) for the ticks until pruning, then falls into the zero-subscription state — a multi-tick lifecycle no test pins.
- The header truth contract (line 16) states "
gone is not a send", i.e. the distinction is load-bearing in this module's design.
pm-stack/aggregator/test/alerts.test.ts (as added by fix(aggregator): retry failed incident pushes (#3685) #3690 and still on main): the only failing sender fake returns { ok: false, gone: false, error: "push service unavailable" }; there is no gone: true fake and no all-gone delivery or escalation test. Every success-path assertion is { subscriptions: 1, sent: 1, gone: 0, errors: 0 }.
Why it matters
The gone path is the steady state of a real deployment (subscriptions die whenever a browser profile is abandoned). Its correctness rests on the interplay of three untested pieces — the sent > 0 gate, the two-strike prune, and the zero-subscription fallthrough — and a regression in any of them (e.g. pruning on first strike, or marking delivered on gone) would ship silently while the error-path tests stay green.
Acceptance criteria
- A test with an all-
gone sender fake pins delivery behaviour across ticks: not marked delivered on gone alone, subscription pruned after the second consecutive gone, and the incident then behaving as the zero-subscription case.
- The same coverage exists for the escalation branch (not marked escalated on gone alone).
- Existing aggregator alerts tests still pass.
Activitydeveloping-today commented on Nov 7, 2026 dezren39 commented on Nov 8, 2026 dezren39 commented on Nov 8, 2026 dezren39 commented on Nov 8, 2026 dezren39 commented on Nov 8, 2026 dezren39 commented on Nov 8, 2026 🤖 Agent note · done
Verification (independent, this lane): the tests were implemented in the laptop worktree for branch queue/11379-6905-all-gone-tests and run there before the merge landed: bun test test/alerts.test.ts — 41 pass, 0 fail (38 existing + 3 new all-gone lifecycle tests: delivery multi-tick prune + zero-subscription fallthrough + later-subscription delivery, escalation all-gone, and the alive-reset strike test). bunx tsc --noEmit shows 1 pre-existing error on both the branch and clean main, none in alerts.test.ts. Note lanes code-r/code-g also worked task 11379 in parallel this hour (their pickup note and the commit author) — the landed diff is the same test suite, verified above; task 11379 is now completed with outcome fixed_merged.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|