You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
aggregator(alerts): persistently failing incidents can monopolize the oldest-20 pending delivery/escalation batch #3701
Codex review on PR #3690 (fix for #3685) raised a P2: now that all-error incidents stay pending, pendingDeliveries() / pendingEscalations() in pm-stack/aggregator/src/alerts.ts always select the oldest 20 by first_seen_at, so a set of persistently per-incident-failing incidents could monopolize every tick's batch and indefinitely suppress newer, deliverable incidents.
The oldest-20 selection is pre-existing design; the concern becomes material only if per-incident persistent send failures exist (e.g. oversized payloads).
Acceptance
Pending delivery/escalation selection cannot be indefinitely monopolized by persistently failing incidents (e.g. retry scheduling/backoff, fair pagination, or a last-attempt ordering), OR a documented decision that oldest-first retry is intended.
Tests cover a batch where the oldest incidents keep failing and a newer incident is still attempted.
Filed from the Codex P2 disposition on PR #3690; that PR proceeds without this change.
Acceptance criteria
Pending delivery/escalation selection cannot be indefinitely monopolized by persistently failing incidents (e.g. retry scheduling/backoff, fair pagination, or last-attempt ordering), OR a documented decision that oldest-first retry is intended is recorded on this issue.
Tests cover a batch where the oldest incidents keep failing and a newer incident is still attempted.
Related:#3685 and PR #3690 (the Codex P2 disposition this was filed from; that PR proceeds without this change). No merged PR referencing #3701 was found at intake.
Notes: The body already carried an ## Acceptance section (restated above) and a fair self-assessment: the failure mode is material only if per-incident persistent send failures exist, since the known failure (VAPID key unavailable) is subscription-wide. priority/normal accordingly.
Risks: Changing batch selection touches alert delivery ordering; keep the change inside pendingDeliveries()/pendingEscalations() selection, not the AlertsStore SQL (which #3685's packet excluded).
Suggested approach: Order or rotate the pending batch by last-attempt time so a failing incident yields its slot, with the regression test described in the criteria.
🤖 Agent note · filed
Agent: fleet monitor (repo-fleet-monitor)
Session / ID: repo-fleet-monitor run 2026-11-01 08:12 CST
agent-note:v1
state: triaged (coverage pass)
Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as triage at priority 40 (priority/normal). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
Found via: coverage pass 2026-11-03
agent-note:v1
state: picked_up
agent: repo-worker-code
lane: c8b9355e-319a-4640-8096-7ad19480d151
session: ses_e5e5cdc10c3ffelGMZXMY6nNhq
task: 8709 (small_fix)
found_via: queue claim
expectation: implement fair delivery and escalation selection plus regressions; close or park only with fresh verification.
Activity
developing-today commentedon Nov 1, 2026
CODE-1505
dezren39 commentedon Nov 1, 2026
Intake review
Related: #3685 and PR #3690 (the Codex P2 disposition this was filed from; that PR proceeds without this change). No merged PR referencing #3701 was found at intake.
Notes: The body already carried an
## Acceptancesection (restated above) and a fair self-assessment: the failure mode is material only if per-incident persistent send failures exist, since the known failure (VAPID key unavailable) is subscription-wide. priority/normal accordingly.Risks: Changing batch selection touches alert delivery ordering; keep the change inside
pendingDeliveries()/pendingEscalations()selection, not the AlertsStore SQL (which #3685's packet excluded).Suggested approach: Order or rotate the pending batch by last-attempt time so a failing incident yields its slot, with the regression test described in the criteria.
🤖 Agent note · filed
developing-today commentedon Nov 3, 2026
agent-note:v1
state: triaged (coverage pass)
Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as triage at priority 40 (priority/normal). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
Found via: coverage pass 2026-11-03
dezren39 commentedon Nov 3, 2026
🤖 Agent note · picked up
5 remaining items
dezren39 commentedon Nov 3, 2026
agent-note:v1
state: picked_up
agent: repo-worker-code
lane: c8b9355e-319a-4640-8096-7ad19480d151
session: ses_e5e5cdc10c3ffelGMZXMY6nNhq
task: 8709 (small_fix)
found_via: queue claim
expectation: implement fair delivery and escalation selection plus regressions; close or park only with fresh verification.
Merge pull request #5148 from developing-today/queue/8709-3701-alert-…
dezren39 commentedon Nov 3, 2026
agent-note:v1
state: done
agent: repo-worker-code
lane: c8b9355e-319a-4640-8096-7ad19480d151
session: ses_e5e5cdc10c3ffelGMZXMY6nNhq
task: 8709 (small_fix)
found_via: queue claim
result: fixed_merged
pr: #5148
merge_sha: f34b6fd
tests: bun test test/alerts.test.ts passed (36); GitHub checks passed. Typecheck remains blocked by existing test/overview.test.ts HealthView.conflicts fixture mismatch.