Skip to content

Send an alert of a retried fault only when its rows come in a crowd (0.8.0) - #24

Merged
XopoIII merged 1 commit into
mainfrom
burst-alerts
Oct 20, 2026
Merged

XopoIII merged 1 commit into
mainfrom
burst-alerts

Conversation

@XopoIII

@XopoIII XopoIII commented Oct 19, 2026

Copy link
Copy Markdown
Owner

A rule may say burst: { count, seconds }: its alert goes only from the batch that takes a window to count rows of its kind, from every server together, once a window, saying (N within S s); the cool-down then applies as to any alert. For a fault that is expected now and then and retried by itself (a storage write refused for a moment): noise alone, an outage in a crowd.

The window is a row of alert_state under burst:<key>, written by one upsert as the cool-down's is and pruned with it: no migration. Released as 0.8.0 (README, CHANGELOG, dist).

Checked: lefthook run pre-commit --all-files clean; npm test 96 pass, 2 new; the crossing condition mutated to held >= count failed the burst test and was restored.

🤖 Generated with Claude Code

A rule may now say `burst: { count, seconds }`: its alert goes only from the batch that takes a
window to `count` rows of its kind, from every server together, and once a window, saying how many
the window holds. The cool-down then applies as to any alert. A live game's storage writes were
refused for a moment by the platform a few times a day and each refusal was retried and landed,
yet every one of them raised a critical message; one is noise, a hundred in ten minutes is an
outage, and only the second is worth the owner's phone.

The window is a row of `alert_state` under `burst:<key>` (its start in `sent_at`, its rows in
`held`), written by one upsert as the cool-down's is and pruned with it, so no migration is added.
`alertsFor` hands the burst and the batch's row count on with the alert. A count or seconds that is
not a whole number above zero throws as the Worker loads. Released as 0.8.0.

Checked: lefthook run pre-commit --all-files, every gate clean (lockfile, format, lint, file-size,
strict-mode, english-only, worker, types); npm test, 96 tests pass, 2 of them new; the crossing
condition mutated to `held >= count` failed the burst test (a second message in one window) and
was restored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@XopoIII
XopoIII merged commit ff4f58a into main Oct 20, 2026
3 checks passed
@XopoIII
XopoIII deleted the burst-alerts branch October 20, 2026 00:06
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