Model-check that the notification relay alerts every matched user once when a Redis or Convex request fails. Use when changing processEvent, the dedup claim, releaseRealtimeClaim, releaseDedupClaim, the re-queue after a failed read, or getUserTier and cacheUserTier in scripts/notification-relay.cjs, or recordDedupOutcome in scripts/shared/notification-dedup.cjs.
96%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Property. When one Redis or Convex request fails or loses its response, every user whose rule matches a critical real-time event gets the alert exactly once.
Harm. A missed alert is silent. Before #10222, a failed channel read left the user's dedup claim in place, so the alert was suppressed on every channel for 30 minutes (SM-115).
For each matched user, the relay:
wm:notif:dedup:<user>:<hash> with SET NX and a per-claim token.When the channel read fails, it releases its own claim with compare-and-delete and re-queues the event.
node --import tsx --test tests/notification-relay-claim-model.test.mtsIt takes under a second and runs in CI with the other data tests. It checks three things:
The model runs the real processEvent through tests/helpers/interleavings.mjs. It serves Upstash from the model Redis and Convex from fixed answers. Telegram sends are recorded and never fail. One relay processes the event and then each re-queued copy.
There is one actor, so the explorer varies where faults land, not the order of steps. Each Redis command and each Convex request can fail before it runs or lose its response after.
Each run starts a fresh relay. Setup resets the claim-token counter, the blocked-link cache and the in-process fail-open reservations. Without this, a reservation from one run suppresses an alert in the next, and the model reports a false bug.
A failure prints the users who were not alerted once, and the requests in order, for example:
sends per user user-a: 1, user-b: 0
relay: SET wm:notif:dedup:user-a:...
relay: SET wm:notif:dedup:user-b:...
relay: POST /relay/channels user-b (request failed, nothing applied)"the relay made requests the model does not serve" means processEvent called a new endpoint. Add it to the fake fetch in the test, with a fault point when its failure can cost an alert.
node scripts/check-model-mutations.mjs relay-claimsIt applies three breaks to the real relay one at a time, runs the model, and restores the file:
SET NX response committed. The second commit of #10222 fixed this.Each must be caught. Run against the relay from before #10222 (59f877b0b9^), the model fails with the SM-115 trace. Against that PR's first commit (ff1db23031), the third check fails with a lost claim response followed by a failed channel read.
Covered:
rss_alert matching two real-time Telegram rules.CHANNELS_FETCH_RETRY_MAX re-queues.Not covered:
LPUSH, or a failed release, can lose the alert. The relay logs both.| Check | Code |
|---|---|
| relay actor | processEvent, checkDedup, releaseRealtimeClaim, releaseDedupClaim, requeueAfterChannelsFailure, getUserTier, cacheUserTier in scripts/notification-relay.cjs; recordDedupOutcome, releaseFailOpenFallback in scripts/shared/notification-dedup.cjs |
Last confirmed against: be41291bb5, plus the commits of the PR that adds this skill.
When any covered function changes, reread it against the model, rerun the check, and move this line forward only after both pass.
koala73/worldmonitor
c770a78
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.