Factory alarms
Alarms raised by the factory watchers, with a contour (open → closed or false): raise and close actions without duplicates, checks that an alarm says what fired and how it ended, and that a watcher has one open alarm.
About the package
The collection Alarms and its contour: open → closed or false. An alarm is raised by a watcher: an automation or a script that looks at the factory (disk, silent agents, failing runs). The short name of the watcher goes in watch.
Actions: shtuk run alarms raise --watch <watcher> --title "..." opens an alarm if that watcher has no open one yet; shtuk run alarms close --watch <watcher> --by "..." closes it and records who closed it and when.
Norms: ALR-R01 says an alarm states what fired and how it ended (check alarm); ALR-R02 says one open alarm per watcher (check one-open).
Why "alarms" and not "incidents": product incidents (a failure in the customer's environment) are the Incident kind of the Operations layer. An alarm is trouble in the agent factory itself. The watchers (what to watch and the thresholds) are automations of the automations package or project scripts; who to wake on an alarm is an automation too.
Norms 2
| ID | Norm | Level | Mode | Enforcer |
|---|---|---|---|---|
| ALR-R01 | An alarm names the watcher and the time; a closed one says who closed it and when |
SHOULD | blocks | check |
| ALR-R02 | While a watcher's alarm is open, the same watcher does not raise a new one |
SHOULD | blocks | check |
"Blocks": the enforcer stops a violation. "Observes": it only notes it. Level MUST means required; SHOULD means yes by default.
Actions 5
| Name | What it does | File | When |
|---|---|---|---|
| place | Add the Alarm kind to the placement map | bin/place.ts | after install after update |
| raise | Open an alarm if the watcher has no open one | actions/raise.ts | shtuk run |
| close | Close the watcher's open alarms: who closed them and when | actions/close.ts | shtuk run |
| alarm | An alarm says what fired and how it ended norm ALR-R01 | checks/l01_alarm.ts | check |
| one-open | One open alarm per watcher norm ALR-R02 | checks/l02_one_open.ts | check |
shtuk check runs the checks; shtuk run alarms <name> runs any action. "After install" actions run by themselves only if the package comes from a trusted source.
Pages 7
They go into the project at these paths.
- /
- Alarms collection
- /alarms/contours/
- Alarm contour contour
- /alarms/contours/alarms/
- Closed contour phase
- False contour phase
- Open contour phase
- /norms/rules/alarms/
- An alarm says what fired and how it ended ALR-R01
- One open alarm per watcher ALR-R02
Package files 6
They go into .shtukbase/packages/alarms/; actions run from there.