Skip to content
Toolkit

ADR-0116 — A notice is a claim, and it promises only what the deployment is armed to do

Status: Accepted · Date: 2026-08-30 · Track: 009 URL lifecycle, phase 03 · Supersedes: nothing · Related: 0113, 0114, 0115

Context

Phase 02 left three transitions that a clock moves and nobody is told about. The charter's order is that the owner is told before anything is taken, and ADR-0115 made phases 03 and 05 the documented precondition for arming LIFECYCLE_TAKING_ENABLED. This is the first thing in the track that reaches a person, and two things about it are unlike everything before it.

Idempotence does not mean the same thing. A transition is re-runnable because the row leaves its own predicate: MarkQuietAsNotified moves nothing the second time because the first run moved the rows out of active. A notice has no such effect — sending a message changes nothing about the resource — so a notice sent from a SELECT … WHERE quiet is sent again by the next run, by the retry after a partial failure, and by a second process. The charter's risk table names this outright: a notice storm — the same owner told repeatedly.

A notice makes a promise, and a disarmed deployment cannot keep it. The useful sentence is "this stops serving on the 2nd of May". But TakingEnabled is off by default (ADR-0114), and in a deployment where it is off nothing stops serving on any date. A product that says otherwise is not warning anybody; it is lying to them on a schedule.

Decision

1. A notice is a claim: the statement that selects the resources due is the statement that marks them. links.lifecycle_notice (migration 000040) is one rung — quiet, warning, final, or NULL for nothing said — and ClaimQuietNotices is a single UPDATE … WHERE lifecycle_notice IS NULL … RETURNING. What comes back is what was marked, so the row has left the predicate before anybody is told: two runs racing cannot both claim a resource, and the second run of the day claims nothing. The ladder is climbed in order — each rung's claim requires the one below — so nobody is sent a final warning without first being told the resource went quiet.

2. At most once, and the claim is given back when the send fails. The claim comes before the send, so the failure mode is an owner told once too few rather than a hundred times too many. ReleaseNoticeClaim narrows even that: a send that errors hands its rung back, scoped to the rung it claimed, and the next run claims that resource again. Where the release itself fails the row stays claimed — which is the residue we accept, and the direction we accept it in.

3. A revival clears the ladder in the same statement that revives the state. Both maintenance paths — the click path and the edit path — already set lifecycle_state back to active; they now null the rung beside it. A resource in use has not been told anything about a quiet it is no longer in, and a resource that goes quiet a second time is owed its notices a second time. One assignment in a statement that was already being written costs nothing per click, and a separate sweep to do it would be a second clock reading a state this one already knows.

4. The notice states a consequence only where the consequence is armed. Armed, the body states the date the resource stops serving and how long after that the address is released — both computed from the windows the service was handed, never written into the sentence, so an owner who changes a window changes what the notice says without a deploy. Disarmed, it reports the quiet and the fact that using the resource clears the notice, and promises nothing. The sweep itself runs either way: it is the taking transitions' precondition, not their consequence.

5. The path is the existing one. CreateBatch on InternalNotificationRepository — the call the admin broadcast makes and 006's comments make — reaching the bell the owner already reads. The service is handed that path rather than building one, and with no notifier it claims nothing: a claim is a promise that somebody was told, and marking resources notified with nowhere to send is the one failure this design cannot recover from.

Consequences

  • The notice ladder is one column, not a table. What was actually sent is already a row in internal_notifications; what the lifecycle needs is which rung this resource stands on.
  • notice.quiet is enforced — the ledger reads 5 of 9 — and its reader is the notifications surface, which is what a notice row's reader means.
  • The two notices left (warning, final) inherit all of this: a claim scoped to their own rung, their own window key, and the same rule about what a disarmed deployment may say.
  • The residue is honest: a claim whose release also fails is a notice nobody gets. The alternative was a storm, and this track's risk is the repeated message rather than the missed one.

Source: docs/decisions/0116-a-notice-is-a-claim-and-it-promises-only-what-the-deployment-is-armed-to-do.md

Library