Title: Design: delivered means delivered — one truth contract for the aggregator alert throat · Issue #3702 · developing-today/code · GitHub
Open Graph Title: Design: delivered means delivered — one truth contract for the aggregator alert throat · Issue #3702 · developing-today/code
X Title: Design: delivered means delivered — one truth contract for the aggregator alert throat · Issue #3702 · developing-today/code
Description: Summary The alert throat (pm-stack/aggregator/src/alerts.ts + push.ts, landed 2026-11-01 in #3676 under the #1254 push design) is the one PM-stack system whose entire value is that Drew can believe it — and within hours of landing, three...
Open Graph Description: Summary The alert throat (pm-stack/aggregator/src/alerts.ts + push.ts, landed 2026-11-01 in #3676 under the #1254 push design) is the one PM-stack system whose entire value is that Drew can believe...
X Description: Summary The alert throat (pm-stack/aggregator/src/alerts.ts + push.ts, landed 2026-11-01 in #3676 under the #1254 push design) is the one PM-stack system whose entire value is that Drew can believe...
Opengraph URL: https://github.com/developing-today/code/issues/3702
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Design: delivered means delivered — one truth contract for the aggregator alert throat","articleBody":"## Summary\n\nThe alert throat (`pm-stack/aggregator/src/alerts.ts` + `push.ts`, landed 2026-11-01 in #3676 under the #1254 push design) is the one PM-stack system whose entire value is that Drew can believe it — and within hours of landing, three filings, one per trust boundary, showed its claims about itself going unchecked:\n\n- **#3685** — `runAlertTick` marked incidents delivered (and escalated) even when every push send failed: a transient VAPID/bws outage permanently swallowed critical incidents, never retried, with the ledger asserting delivery that never happened. **Landed during this design's audit** (PR #3690, merge `a3acf3b0`): both marks now gate on `sent > 0`, with an injectable `PushSender` seam and a warning on all-failed ticks. It is Rule 1's embodiment — cited here, not adopted as a phase (the #2787/#2789 precedent).\n- **#3693** — `GET /api/push/subscriptions` returns every subscription's full store row — `endpoint`, `p256dh`, and the RFC 8291 `auth` secret — unauthenticated, while the /alerts page for the same data projects the keys away and no client uses the GET.\n- **#3686** — `mergeQuiet` validates quiet times by shape (`/^\\d{2}:\\d{2}$/`) only, so `99:99` / `24:60` are stored and silently reinterpreted as a different suppression window, in the one parser whose established contract is reject-to-default.\n\nFull design doc: `files/designs/code-aggregator-alert-throat-contract.md` in the keep-the-four-repos-healthy goal workspace.\n\n## The contract (stated once, in the alerts.ts module header)\n\n> The alert throat's records and responses tell the truth and keep its secrets. A state transition is recorded only when the event it names happened (delivered / escalated require at least one accepted send; `gone` is not a send). Subscription key material (`p256dh`, `auth`) never leaves the server: store rows are internal, and any HTTP surface projects — the page's projection is the only read shape. Subscription preferences are validated as values, not shapes, and an invalid value falls back per-field to the default — never stored, never reinterpreted.\n\n## Recorded decisions\n\n1. **The unused subscriptions GET is removed, not projected** (#3693 allows either). No in-repo client calls it (push-client.js POST/DELETE only; /alerts is server-rendered; the engine reads in-process), and even a projected GET would enumerate every subscription endpoint — the input the unauthenticated DELETE needs. A future consumer re-adds a read returning the page's projected shape; the projection rule is the standing requirement for that day.\n2. **Fixes stay on their own side of the store seam.** `listSubscriptions()` has two consumers with opposite needs (engine: full rows, in-process; HTTP: no secrets, ever). #3693's fix removes the HTTP surface, never narrows the store read — projecting the store query would break `deliverToAll`.\n3. **Quiet validation is per-field value validation at merge time** (hour 00–23, minute 00–59, else that field's default) — the parser's existing reject-to-default contract extended to digit-shaped input. Already-stored out-of-range rows are not silently rewritten; their disposition is a required output of Phase 3.\n\n## Phased breakdown\n\n- **Phase 1 — subscription secrets never leave the server (adopted: #3693).** Remove the GET handler on `/api/push/subscriptions`; engine reads unchanged; sentinel-row test pins that no subscriptions response contains `p256dh`/`auth`; /alerts rendering unchanged.\n- **Phase 2 — quiet prefs validated as clock values (adopted: #3686).** `mergeQuiet` range validation + per-field fallback, tests per the origin's acceptance. Independent of Phase 1.\n- **Phase 3 — closing audit + contract statement (new issue, gated on Phases 1–2).** Contract into the `alerts.ts` header; seam check (no HTTP route returns a store row verbatim); required dispositions recorded here with reasons: stored out-of-range quiet rows, the unauthenticated DELETE + ack/close posture (aggregator-wide stance), `mergeQuiet` tz acceptance (fails open on unknown zones), `mergeClasses` unbounded class keys; closing evidence incl. Rule 1 as-built (PR #3690) and a note to #3317/#3319 that quiet semantics and delivery state are now contractual.\n\nOpen questions stay in the design doc (an aggregator-wide auth model; digest-class state following Rule 1; delivery backoff/dead-letter on operational evidence; sends-ledger retention).\n\nRelated: #3676 (the throat build), #1254 (push design), #3317 / #3319 (consumers of quiet + delivery truth), #1260 (pm-stack SLOs — the layer above, not this contract). Not this design: #3681 (chargesAttention shape — #3068/#3161's module), the feed gates (#2576's family).\n\n🤖 Design architect pass 32 (2026-11-01), audit at origin/main `a3acf3b0`.\n\n## Acceptance criteria\n\n- The design names the alert throat's truth contract: what 'delivered' (and each sibling claim) means, which evidence backs it, and what happens when that evidence is absent.\n- Every phase of the design is filed as its own implementation issue (or explicitly marked no-action with rationale) and linked from this epic — the design does not sit without an implementation path (protocol §11).\n- The already-landed #3685 fix is cited as Rule 1's embodiment, not re-adopted as a phase.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-11-01T13:33:25Z","url":"https://github.com/developing-today/code/issues/3702"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:bc77a8d4-b879-8e5b-e4b7-5ec4722bb7dd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B2A0:1E80BA:7AE95A:A59191:6B063438 |
| html-safe-nonce | f448ad376f7bcbf9a75b89fe7aef5e85eae4295946dc0ff1cfef7c88944f8bac |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMkEwOjFFODBCQTo3QUU5NUE6QTU5MTkxOjZCMDYzNDM4IiwidmlzaXRvcl9pZCI6Ijc3NjU1MDA5MzI1NDAyMTYzNzYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e55f84e807934ef03a92e62ef6b45d1877d82a48e7bd51b1975336ea005917d0 |
| hovercard-subject-tag | issue:6147481680 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/3702/issue_layout |
| twitter:image | https://opengraph.githubassets.com/52f65499e75d770a0410a438d1da3f585ba93c27c9777544e9ba61a9e3537f55/developing-today/code/issues/3702 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/52f65499e75d770a0410a438d1da3f585ba93c27c9777544e9ba61a9e3537f55/developing-today/code/issues/3702 |
| og:image:alt | Summary The alert throat (pm-stack/aggregator/src/alerts.ts + push.ts, landed 2026-11-01 in #3676 under the #1254 push design) is the one PM-stack system whose entire value is that Drew can believe... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | c3584c853cd39700ecff6e2cf8364295ffdb5313e571046c41cd2479270f7df0 |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9eb3bb1597d09170a5f282cd38ae376dee1a5ec1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width