d-miner5(kat): pin undelivered-no-throttle (failed alert must retry, never masquerade as handled) - #563
Merged
Conversation
evaluate() emitted a back_online event whenever the prior sample was offline, regardless of whether an OFFLINE alert had actually fired. A sub-threshold blip (dark < offline_min) never fires OFFLINE, so the recovery edge would tell the miner they are back from an outage they were never told about and that never met the alert threshold -- a false-positive notification. Gate the back_online edge on offline_fired so a recovery is only reported when the outage itself was reported. Add KAT scenario 6b (blip-then-recover stays silent); selftest 10/10.
…observed peak)
Extends the D-MINER.5 notify-engine selftest to regression-lock the
HASHRATE_DROP edge cases, completing the per-kind honesty sweep
(offline/back_online/daily-summary already pinned):
6c first-online (peak==0 guard) must NEVER fire a drop -- a drop with
no observed prior peak is a fabricated alert.
6d a real halving vs the observed peak fires exactly one drop.
6e a dark (hashrate==0) sample is an OFFLINE concern, never a -100%
drop -- drop is evaluated in the online branch only.
Test-only / SAFE-ADDITIVE: pins existing honest behavior, no engine
logic change. Selftest 13/13.
…, never masquerade as handled)
frstrtr
added a commit
that referenced
this pull request
Jun 27, 2026
* d-miner5(fix): gate back_online on a reported outage
evaluate() emitted a back_online event whenever the prior sample was
offline, regardless of whether an OFFLINE alert had actually fired. A
sub-threshold blip (dark < offline_min) never fires OFFLINE, so the
recovery edge would tell the miner they are back from an outage they
were never told about and that never met the alert threshold -- a
false-positive notification.
Gate the back_online edge on offline_fired so a recovery is only
reported when the outage itself was reported. Add KAT scenario 6b
(blip-then-recover stays silent); selftest 10/10.
* d-miner5(kat): pin hashrate_drop honesty (no fabricated drop without observed peak)
Extends the D-MINER.5 notify-engine selftest to regression-lock the
HASHRATE_DROP edge cases, completing the per-kind honesty sweep
(offline/back_online/daily-summary already pinned):
6c first-online (peak==0 guard) must NEVER fire a drop -- a drop with
no observed prior peak is a fabricated alert.
6d a real halving vs the observed peak fires exactly one drop.
6e a dark (hashrate==0) sample is an OFFLINE concern, never a -100%
drop -- drop is evaluated in the online branch only.
Test-only / SAFE-ADDITIVE: pins existing honest behavior, no engine
logic change. Selftest 13/13.
* d-miner5(kat): pin undelivered-no-throttle (a failed alert must retry, never masquerade as handled)
* d-miner5(kat): pin throttle re-fire after window elapses (stale alert must never masquerade as permanent coverage)
Completes the throttle-honesty triad with #8 (within-window suppress) and
#8b/#563 (undelivered retries): once the throttle window has ELAPSED, a
still-true condition (e.g. an ongoing outage) must re-fire. Guards the
`< window` bound in recently_sent() against a >=/off-by-one regression that
would swallow every later real alert and warn the miner only once though
the rig is still down. selftest 15/15.
---------
Co-authored-by: frstrtr <frstrtr@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds one regression-lock to the D-MINER.5 notify-engine selftest (case 8b):
a prior undelivered notification row must NOT throttle the retry of the
same kind. Bumps selftest to 14/14.
Why
recently_sent()deliberately filtersstatus=deliveredso the throttlewindow only counts alerts that actually reached the miner. Case 8 already
pins that a delivered alert throttles within the window — but nothing pinned
the honesty-critical inverse. If someone "simplified"
recently_senttothrottle on any row, a send that failed (SMTP error -> status=undelivered)
would be suppressed forever and never retried: a dropped alert masquerading
as handled. That is exactly the kind of silent health-lie the dashboard
charter exists to forbid.
Test
python3 scripts/miner_notify_engine.py selftest-> SELFTEST OK (14/14).Pure-policy assertion (route_event on a seeded undelivered row); no network,
no schema change. Stacks on the open notify KAT line (#557 -> #558 -> #559).