Verified: Alarms
Each claim the Alarms page makes, with the tests that
prove it in the last green CI run: 18 of 41 verified, 3 with no test yet.
The claims live in docs/claims/alarms.yaml.
Last green CI run 16 Oct 2026, 14:48 UTC on c7618d3 · all runtime claims
ALM-001 verified
A project with no alarms section behaves exactly as before: there is no alarm engine, all five /api/alarms routes answer 404, /api/meta reports alarms false, and stream frames carry no alarms field.
- pass
TestNoAlarmsSectionMeansNoEngineininternal/project - pass
TestAlarmRoutes404WithoutAnEngineinserver - pass
TestFrameCarriesAlarmSummaryinserver
ALM-002 partly verified
match takes type, member and tag, all globs; a rule with a member matches struct members, and a rule without one matches flat BOOL tags.
- pass
TestMatchMemberDiscriminatesStructFromFlatinalarm
ALM-003 verified
Rules are tried in file order and the first matching rule wins.
- pass
TestExpandCoversTheFleetFromFewRulesinalarm
ALM-005 partly verified
An unknown placeholder in an id, name, site, area, display or enable template is a load error, not literal braces on an operator screen.
- pass
TestExpandRejectsUnknownPlaceholderinalarm - pass
TestBadTemplateFailsAtLoadininternal/project
ALM-006 partly verified
An alarm id declared in two sources (two rules, a rule and an explicit definition, or a manifest and an alarm file) is an error naming both sources, never last-wins.
- pass
TestExpandRejectsDuplicateIDsinalarm - pass
TestExpandRejectsRuleCollidingWithExplicitAlarminalarm - pass
TestAlarmFilesDuplicateIDIsAnErrorininternal/project
ALM-007 verified
Alarm files are bare YAML lists, composed with the manifest's own alarms section.
- pass
TestLoadAlarmFileinalarm - pass
TestAlarmFilesComposeininternal/project
ALM-008 verified
site-from and area-from patterns set each definition's site and area from the tag name (RTU9_ZONE15_FIT_001 gives site RTU9, area ZONE15).
- pass
TestRulesExpandAgainstComposedTagsininternal/project
ALM-009 verified
A condition becomes Unack-Active only after it has held for on-delay; a bit that drops before the delay elapses never qualifies and journals nothing.
- pass
TestOnDelayQualifiesAgainstTheClockinalarm - pass
TestAlarmOnDelayWalksInVirtualTimeinacceptance
ALM-010 partly verified
An active alarm whose condition goes false returns to Unack-RTN only after it has held false for off-delay.
- pass
TestOffDelayHoldsTheAlarmUpinalarm
ALM-011 verified
The ISA-18.2 transition table holds: Unack-Active acks to Ack-Active, Ack-Active returns to Normal on clear, Unack-RTN needs an ack to reach Normal, and Unack-RTN going true again becomes Unack-Active.
ALM-012 verified
ack-required false collapses Unack-Active to Ack-Active and Unack-RTN to Normal on arrival; auto-clear false latches: an acked alarm whose condition clears goes to Unack-RTN, not Normal.
- pass
TestStateMachineTableinalarm(7 of 7 passed)
ALM-013 verified
A shelf always expires (there is no permanent shelf), and the alarm then returns to the state it interrupted rather than dropping to Normal.
- pass
TestShelveExpiresinalarm - pass
TestShelveRejectsThePastAndTheUnshelvableinalarm - pass
TestAckShelveAndUnshelveinserver - pass
a shelved high-level alarm is silent and always expiresinexamples/lift-station
ALM-014 verified
A shelved alarm is silent: off the active list, and journalling nothing while its condition cycles.
- pass
TestShelveIsSilentButStillTracksinalarm - pass
TestShelveExpiresinalarm - pass
a shelved high-level alarm is silent and always expiresinexamples/lift-station
ALM-016 verified
When the enable path goes false the alarm becomes Suppressed (leaving the active list), and returns to its live state when enable goes true again, with suppress and unsuppress journalled.
- pass
TestSuppressedWhenEnableFalseinalarm - pass
a dark site suppresses its own pump-fault alarm instead of leaving it activeinexamples/remote-fleet/scada
ALM-017 verified
A definition whose tag does not resolve (a site that has never birthed) is Suppressed with a reason, never an error that faults the engine.
- pass
TestMissingTagSuppressesWithAReasoninalarm
ALM-018 verified
Acknowledgement and shelf persist through the retain store, and a restarted or failed-over engine restores them: an acked alarm is Ack-Active again rather than unacked, and a shelved alarm stays shelved.
ALM-019 partly verified
A standby re-reads the retain store on the leadership edge and restores alarm state, so a failover does not resurrect acked alarms as unacked.
- pass
TestTakeoverRestoresAlarmsOnTheLeadershipEdgeinruntime
ALM-020 partly verified
Only ack and shelf persist; active and RTN are not retained but re-derive from the field.
- pass
TestRetainedAckSurvivesRestartinalarm
ALM-021 partly verified
Acknowledgement and shelf are never written back to the edge device's tags.
- pass
TestAlarmAckVerbinacceptance
ALM-022 verified
GET /api/alarms returns a timestamp, the summary and the active alarm list.
- pass
TestAlarmsListAndSummaryinserver
ALM-023 verified
POST /api/alarms/ack acknowledges the listed ids, or all of them in one request.
ALM-024 partly verified
POST /api/alarms/shelve shelves an alarm for the given seconds and records who (by); POST /api/alarms/unshelve takes it off the shelf.
- pass
TestAckShelveAndUnshelveinserver
ALM-025 partly verified
GET /api/alarms/journal filters by from, to, site, priority, id, kind, state, free text q and limit.
ALM-026 partly verified
Alarm writes (ack, shelve, unshelve) require the same authorization as a tag write (Bearer or X-Nautilus-Token), while reads stay ungated.
- pass
TestAlarmWritesHonorAuthinserver
ALM-027 no test yet
A standby forwards alarm writes to the leader the same way it forwards a tag write.
ALM-028 partly verified
Each stream frame carries a counts-only alarms summary (active, unacked, shelved, suppressed, byPriority, worst, newest, rev), never alarm rows.
ALM-029 partly verified
The summary rev bumps on any state change and stays constant across quiet scans.
- pass
TestSummaryRevBumpsOnlyOnChangeinalarm
ALM-030 verified
/api/meta reports whether the alarm engine is present and the offered shelve times in seconds.
ALM-032 verified
Every state change produces exactly one journal event of kind active, rtn, ack, shelve, unshelve, suppress or unsuppress.
ALM-033 partly verified
An in-memory journal ring is always on and bounded by its keep depth, dropping the oldest events, so the journal works without any database.
- pass
TestRingJournalRoundTripinalarm
ALM-034 partly verified
The file journal sink is a durable journal written as rotated JSONL.
ALM-035 partly verified
The postgres journal sink creates its table idempotently at startup.
- pass
TestPGJournalinalarm
ALM-036 partly verified
The postgres sink reads its connection string from the environment variable dsn-env names, defaulting to NAUTILUS_ALARM_DB_URL and falling back to DATABASE_URL.
- pass
TestPostgresJournalNeedsAnEnvironmentVariableininternal/project
ALM-038 partly verified
Notifiers (log, and webhook with a header) receive each event and run off the scan goroutine.
ALM-039 no test yet
A slow notifier drops events with a counter on a bounded queue instead of stalling the scan.
ALM-040 partly verified
The engine evaluates once per main scan on the post-scan hook, so one scan over a tripped limit is enough to raise the alarm.
- pass
TestEngineEvaluatesOnScanininternal/project
ALM-041 partly verified
A standby never evaluates alarms because it skips Scan.
- pass
TestStandbyDoesNotScaninruntime
ALM-042 verified
The same engine works on a single controller against a BOOL its own logic computes, on a one-box memory-driver project.
- pass
a shelved high-level alarm is silent and always expiresinexamples/lift-station
ALM-043 partly verified
naut check reports a condition path naming a missing member or a non-BOOL as an error, an undeclared tag and a rule matching nothing as warnings.
- pass
TestCheckAlarmsCatchesUnknownMemberininternal/project - pass
TestCheckAlarmsWarnsOnUndeclaredAndDeadRuleininternal/project
ALM-044 verified
Acceptance tests assert alarm state with the alarms matchers (active, unacked, shelved, state, priority, journal) and drive it with the ack, shelve and unshelve verbs, in virtual time so an on-delay is exact.
- pass
TestAlarmOnDelayWalksInVirtualTimeinacceptance - pass
TestAlarmAckVerbinacceptance - pass
TestAlarmShelveAndUnshelveVerbsinacceptance - pass
TestAlarmFailureNamesWhatItSawinacceptance(7 of 7 passed)
ALM-045 no test yet
naut alarms list dumps the expanded alarm set (-o yaml re-loadable, with -count, -site and -priority narrowing it).