docs(R-329/R-386/R-387): the severity contract, the intent ruling, and Part 5 recorded
gates / gates (push) Successful in 17s
gates / gates (push) Successful in 17s
The alarm ladder gains the severity contract (the hub's vocabulary is exact, it coerces silently, and three things now hold it) and the intent test with its three-way ruling on unknown. Both marked [DESIGN] with the live measurements. Part 5 is RECORDED AND NOT IMPLEMENTED: the operator's notification philosophy, verbatim, marked plainly as direction rather than current behaviour, with the 12 -> 15 toggle growth as the argument. Filed as R-388, a product decision. R-329 and R-386 compressed into CLOSED-ITEMS with their rules kept and the full-text commit named. R-387 filed closed - including WHY the dispatcher branch was kept rather than deleted, which is evidence (three monitor checkers call ProcessEvent directly) and not caution. The drill record names three things that had to be re-run: an inert red-proof mutation, Scenario G refused twice behind an HTTP 200, and the live Scenario A NOT proving the customer gate because demo-hp has no prefs row at all. Register: OPEN 328325 -> 328132 B, CLOSED 71441 -> 74642 B.
This commit is contained in:
1 parent
68a9f5475c
commit
2f7c9a6ce5
33 files changed
+5774
-104
No files matched your search
+81
@@ -14,6 +14,87 @@
|
||||
> language, one screen, no identifiers in the prose. Same subjects, different readers; merging them
|
||||
> would make one of the two audiences stop reading. `STATUS.md` is also a **view of `OPEN-ITEMS.md`**
|
||||
> and holds nothing of its own; this file does hold its own content, namely the standing rulings below.
|
||||
## The severity a controller sends is the HUB's vocabulary, and getting it wrong deletes the alert (2026-08-23, R-329 / R-387)
|
||||
|
||||
**[RULING] The set is exactly `{info, warning, error, critical}`.** The hub **coerces anything else to
|
||||
`info` at ingest**, and `severityNotifies` drops `info` **before both** delivery legs. So a severity
|
||||
outside the set means: stored, `200` returned, dashboard shows it, **e-mailed to nobody**.
|
||||
|
||||
**It shipped twice** — `DiskAlertKind.Severity` until controller v0.215.0, `app_start_failed` until
|
||||
v0.223.0. Measured on the live hub DB: **91 `app_start_failed` events stored all-time, ZERO
|
||||
`notification_log` rows** before 2026-08-23.
|
||||
|
||||
**[MECHANISM, because a comment already recorded this lesson and it happened again]** An AST walk over
|
||||
the whole controller pins every emitted severity. **grep cannot do this job** — `"warn"` is a
|
||||
legitimate *healthcheck status* in `internal/monitor` and `internal/selftest`; the 2026-08-23 sweep hit
|
||||
nine such strings and exactly one defect. The walk cannot follow a variable, so the six call sites that
|
||||
pass one are **registered by name with the values each can take**; a new dynamic site fails the test.
|
||||
**An unlisted limit is not a limit, it is a hole.**
|
||||
|
||||
**[RULING] The hub's coercion STAYS and now SPEAKS (hub v0.107.0).** A rejected event is a *lost*
|
||||
event, and losing an alarm is worse than mis-routing one — that is why it was a coercion. The fix is
|
||||
that it logs `WARN` naming customer, type and value. **The guard that should have caught this class sat
|
||||
downstream of the rewrite and was structurally blind to it** — note the asymmetry it lived beside: an
|
||||
unknown event *type* 400s loudly, an unknown *severity* was silent.
|
||||
|
||||
**[RULING] `dispatcher.go`'s `unrecognized severity` branch is KEPT, on evidence.** `cmd/hub/main.go`
|
||||
wires `ProcessEvent` **directly** as the `monitor.EventNotifyFunc` for three checkers that never pass
|
||||
the ingest handler. For those it is the only severity guard there is.
|
||||
|
||||
**[RULING] `app_start_failed`: operator always, customer OFF by default.** `processOperator` consults
|
||||
only `operatorOn`, the address and a 1-hour cooldown — **never** customer preferences — so one word
|
||||
fixed the operator leg and left the customer leg where the ruling wanted it. It is deliberately **not**
|
||||
in `operatorOnlyEvents`: that would make the new toggle visible, flickable and structurally incapable
|
||||
of delivering.
|
||||
|
||||
**[GOTCHA, now load-bearing] The operator cooldown key carries no app identifier**
|
||||
(`customerID:eventType`), so **only the first app-down per hour e-mails the operator**; the rest are
|
||||
logged `suppressed`. Harmless while the event was undeliverable. Not any more. R-182's shape, filed.
|
||||
|
||||
## "The customer stopped this" is a RECORD, never an inference (2026-08-23, R-386)
|
||||
|
||||
**[RULING] Ask `DesiredState`, do not read the container state.** `aggregateState` folds `StateExited`
|
||||
into the stopped counter, so an all-down stack returns `StateStopped` whatever killed it — an
|
||||
out-of-band stop and a customer's Stop are byte-identical on the Docker side. Measured: `privatebin`
|
||||
stopped out of band, nine scans, **zero events, zero banner**, while a comment claimed it "still
|
||||
alerts".
|
||||
|
||||
**[RULING] The tri-state, and the third value is the whole safety property.** `Stopped` → no alarm.
|
||||
`Running` → **alarm**. **Absent → UNKNOWN, keep the old behaviour, AND announce it.** Reading absent as
|
||||
"nobody asked" would, on the first cycle after upgrade, e-mail about every app any owner ever
|
||||
deliberately stopped — fleet-wide, from a field that predates the intent being asked of it. **The
|
||||
backfill cannot help: it seeds `Running` only from an observed-UP reading**, so anything stopped at
|
||||
upgrade time stays unknown — exactly the ambiguous population.
|
||||
|
||||
**[MECHANISM] `AppRunState.IntentUnknown` + an INFO line naming the apps**, on the heartbeat cadence.
|
||||
An operator must be able to ask *"how many apps am I blind to?"* and get a number. **A rule without a
|
||||
mechanism is a wish.** Measured on `demo-hp`: **0 of 8** deployed apps had an absent intent.
|
||||
|
||||
**[FENCE] Adding a `DesiredState` WRITER is the fenced act; reading it anywhere is fine.** Twelve of
|
||||
`StopStack`'s fourteen callers are machines, so recording intent in the primitive would make a nightly
|
||||
backup indistinguishable from the customer pressing Stop.
|
||||
|
||||
**[FENCE] `failedRestart` must still lift a `Stopped` intent** — the quiesce loop stops stacks by the
|
||||
same path a customer does, and one it stopped and could not restart must alarm whatever the intent
|
||||
says. Removing that term re-opens F-CRIT-1.
|
||||
|
||||
## Two settings toggles each governed two alarms, and the labels named one (2026-08-23)
|
||||
|
||||
„Lemez figyelmeztetés (90%+)" also wrote `disk_critical` — the drive-is-**failing** alarm. Split into
|
||||
four honest toggles; **12 → 15**. **[RULING] The migration, not the split, was the risk:** a save whose
|
||||
event **set** is unchanged now stores the **existing slice verbatim**, so byte-identity is by
|
||||
construction. Without that guard the defaults case reorders — the red-proof caught it. Legacy compound
|
||||
form names are still read, so a stale browser tab cannot drop a key.
|
||||
|
||||
## Customer notification model — DIRECTION, recorded and deliberately NOT implemented (2026-08-23, R-388)
|
||||
|
||||
The operator's framing, verbatim: *"A customer should be notified only about things they can act on or
|
||||
are responsible for… **A failed backup is our incident, not theirs.**… The subscription should feel
|
||||
like being looked after, not like being on call."* Full entry at
|
||||
`documentation/architecture/08-alarm-ladder.md` §8, marked **not current behaviour**. The settings page
|
||||
grew 12 → 15 toggles in one session and grows by one per detector — that growth is the argument.
|
||||
**Nothing in this session implements it.**
|
||||
|
||||
## App data placement is a DECISION, and it had never been written down as one (2026-08-22, R-376)
|
||||
|
||||
**Recorded here on 2026-08-22 to give an existing decision a home. It is NOT new, and this entry is
|
||||
|
||||
Reference in new issue
Block a user