GeezerVison is showing github.com — PM push unification: one registry, one sender, the Android app as a first-class endpoint · Issue #14084 · developing-today/code
PM push unification: one registry, one sender, the Android app as a first-class endpoint #14084DescriptionPM push unification — one registry, one sender, the Android app as a first-class endpoint
Drew's order (2026-11-23): "start a lane now to unify push between the like 2 pm stack locations and the pm stack android app."
Full design of record: dated doc record doc/2026-11-24T04-45-43Z_design_pm-push-unification/ (doc-only PR linked below when landed). This body is the faithful summary; the doc record governs.
Premise check — the landscape is worse than "two locations" (verified 2026-11-23, code + live stores)
There are four Web Push senders, three subscription stores (+ one mirror), three VAPID keypairs, and two incompatible class/preference models:
| Location |
Store (live count) |
Classes |
Sender / keys |
Surfaces |
Aggregator (laptop, pm-stack/aggregator) |
Turso alerts.push_subscriptions — 0 (2026-11-23, #14048); sends ledger alerts.notification_sends — 271 rows, none after 2026-11-17, 269/269 undated per the roll-up (#14061) |
8 toggleable: incident, needs-drew, quota-wall, quota-near-wall, section-risk, stack-health, blocked-age, prompt (+ digest as a delivery shape) |
web-push library; VAPID pair A (public key in code, private in Bitwarden by name) |
/alerts, /alerts/preferences, /notifications at the tailnet URL |
Console origin (laptop, pm-stack/console src/server.ts) |
File store ~/.local/state/pm-console/push.json — 0 (live count tonight) |
4: replies, needs, questions, trouble — toggled by a store-global off-list, not per subscription |
Hand-rolled RFC 8291/8292 (src/push.ts); VAPID pair B in the store file |
The console site at its origin; GET /push delivery status |
Console edge (Cloudflare, pm-stack/console/edge) |
KV store (kvStore(kv, "push")) — count not readable from the laptop; no census route exists |
Same 4 (same code) |
Same hand-rolled sender, VAPID pair C held in the KV store document |
pm.security.cab — the live site the Android app wraps |
Notify-relay (Cloudflare DO, pm-stack/notify-relay, #8569) |
Mirror of the aggregator's full set (snapshot POST on change, seq-ordered) |
Sends only stack.silent + recovered, riding incident |
Own push.ts, reusing pair A (private key as a Worker secret) |
GET /status only |
The Android app (pm-stack/console/android, package today.developing.pmconsole) is a Trusted Web Activity over the console site: it has no push channel of its own — the console's Web Push arrives as the app's notifications. Its widget polls a summary every ~30 min on a separate read-only device token (console/src/devices.ts), an identity registry unrelated to push subscriptions.
Consequences, plainly:
The design (summary — doc record governs)
- One registry.
push_endpoints + per-endpoint preference rows in the fleet-platform Turso store — hosted, already the aggregator's store, and reachable from the console edge over HTTPS (the same store family the edge already uses for decision sets). An endpoint row names its transport (webpush), its client (browser | android-app), an optional link to the console device registry, label, user agent, created/last-seen, gone count. The Android app's TWA-held subscription registers as an endpoint in its own right — named, countable, preference-bearing as the app — and the transport column is where a future native (FCM) transport lands without redesign.
- One sender. A single send service owning VAPID pair A; every producer submits candidates to it. The aggregator engine and the console Notifier both become producers into the one candidate path (dedupe/cooldown/fingerprint/quiet-hours machinery is the aggregator's, reused). The notify-relay keeps pair A and its mirror as the designed exception — a sender of last resort whose whole purpose is the primary being down. Console origin + edge
Push instances retire as senders; pairs B and C retire with them.
- One class taxonomy. The union of the 12 ids, each with exactly one producer of record.
needs (console census-diff: new needs-me items) and needs-drew (answerable attention-tier questions) stay distinct ids with distinct labels in v1 — merging them is a product decision flagged below, not an engineering default. stack.silent remains a payload variant of incident at the relay. digest remains a delivery shape, never a class.
- One preference model. Per-endpoint class map + quiet hours (the aggregator's model — the richer one). The console's store-global off-list migrates onto its endpoints' maps. One preferences surface, served from the console (pm.security.cab — where Drew and the app live), backed by the registry; the aggregator's
/alerts/preferences keeps working during migration, then redirects there.
- Event-driven at detection. Producers emit at their detection points (broker/watchdog raises, quota snapshot transitions, console state-doc diffs, relay alarm) into the candidate intake — per Drew's standing requirement, the stack pushes itself; no new polling loops are introduced.
- Answerable pushes unchanged. The
needs-drew payload contract (ledger id + options + per-question answer landing) is preserved exactly, and must work identically when the endpoint is the app (the TWA already intercepts pm.security.cab links). Answer application remains pm-stack: push answer write-back to the queue broker — a phone tap applies broker-sourced decides (Actions-exec extensions first) #14043's territory; edge answer intake (pm-stack notifications Phase 2 step 3: edge answer intake + heartbeat drain (#8569) #13469) composes unchanged.
- Delivery observability by construction. One sends ledger in the registry store: one row per attempt,
sent_at stamped by the writer (ISO-8601 UTC, schema-required — never a column default again), endpoint id, class, object ref, outcome incl. push-service status, acted_on_at via the existing Ack transition. Two designed-in alarms: undated-row alarm (any row the roll-up cannot date is a data defect that pages — this subsumes pm-stack notifications: all 269 send-ledger rows lack a usable timestamp — the measurement page is blind #14061's alarm ask for the unified ledger; pm-stack notifications: all 269 send-ledger rows lack a usable timestamp — the measurement page is blind #14061 remains the vehicle for the legacy ledger's repair/backfill) and the zero-endpoint sentinel (PM push delivery dark since 2026-11-17: no push subscriptions registered in the alerts store #14048's detection ask): zero live endpoints while undelivered incidents exist — or no successful send in N days with incidents open — raises a stack-health incident on a non-push surface, because a push about no-push is a dead letter by definition. A census read (endpoints by transport/client + last successful send) is exposed on both stacks' status surfaces: one answer to "how many live endpoints?"
Migration
- Aggregator subscriptions: none live — nothing to move; its schema shape seeds the registry.
- Console edge subscriptions cannot be re-keyed: a Web Push subscription is bound to the application-server key used at subscribe time, so pair-C subscriptions cannot be carried to pair A as rows. Migration is a re-subscription: the console site/app detects the sender-key change via its existing endpoint-mark mechanism (built for exactly this — "so the app can tell that this sender has lost it") and re-subscribes under pair A into the registry. The KV store freezes read-only for one release, then drops. Console origin store: empty — retired outright.
- Relay mirror source switches from the aggregator store to the registry (same snapshot protocol, same secret by name).
- Legacy sends ledger stays as-is under pm-stack notifications: all 269 send-ledger rows lack a usable timestamp — the measurement page is blind #14061; the unified ledger starts at cutover and the
/notifications roll-up reads it from then on.
Boundaries
Not this design's: #14043 (answer write-back — untouched), #13469 (edge answer intake — composes), #8570 (service consolidation — the sender's natural eventual home, not a prerequisite), native FCM/APNs transport (v2 option the registry's transport column reserves), #14061's legacy-ledger backfill (linked, not duplicated).
Build-slice map (ordered; not packetised — reason below)
Why no packet yet: two seams must be settled on this record before any slice is specified exactly — (i) the needs/needs-drew taxonomy call is Drew-facing (it changes what his toggles say) and is posed here for his word; (ii) S4's re-subscription slice can only be specified against the endpoint-mark flow's behaviour in the shipped app build, which the S3/S4 builder must verify live first. S1/S2 are close to specifiable and packetise on this design's acceptance — the #14043 pattern (design of record first, build slices from it).
Open questions for Drew
- Class taxonomy: keep
needs and needs-drew as separate toggles (recommended — different promises: "new items need your hands" vs "a question only you can answer"), or merge into one "Needs you" class?
- Preferences surface home: console (pm.security.cab) as the one surface, aggregator page redirecting — as designed — or the reverse?
— Lane PUSH-UNIFY, 2026-11-24. Progress + records on this issue at each boundary.
{
"direct_parent": null,
"links": [],
"lineage": {
"design": null,
"roadmap_item": null,
"priority": null
},
"pm_meta": 1,
"provenance": {
"queue_id": null,
"scheduled_start": null,
"picked_up_at": null,
"work_started_at": null,
"created_at": "2026-11-24T04:46:16Z",
"session_id": null,
"lane": null,
"host": "htch-runtime",
"worktree": null,
"model": null,
"lane_start_issues": [],
"workspace_ref": null,
"auth_subject": "archer",
"stamped_by": "fleet 0.1.0 (native)"
}
}
Activitydeveloping-today commented on Nov 24, 2026 developing-today-fleet commented on Nov 24, 2026 ContributorAuthor More actions Lane PUSH-UNIFY — complete (2026-11-24)
Delivered:
- Inventory (this issue's body + doc record §1): four Web Push senders, three subscription stores + the relay mirror, three VAPID keypairs, two class/preference models — verified from code and live stores, including two premise corrections to the original brief: the console runs its push stack twice (laptop origin, file store, 0 subscriptions tonight; Cloudflare edge, KV store, no census route), and the aggregator now carries 9 classes (8 toggleable), not 7.
- Design of record landed: PR docs(pm-stack): push unification design of record (#14084) #14087, merged
18ca19558a3bb6d25278879c1050e89c0cecd242 — doc/2026-11-24T04-45-43Z_design_pm-push-unification/ + one doc/README.md index line; diff verified at exactly those two files, doc blob byte-verified on main post-merge.
- Pointers: PM push delivery dark since 2026-11-17: no push subscriptions registered in the alerts store #14048 comment 7122329745 (its detection ask lands as the zero-endpoint sentinel, slice S2; the device step stands and becomes the registry's first live registration), pm-stack notifications: all 269 send-ledger rows lack a usable timestamp — the measurement page is blind #14061 comment 7122333379 (root-cause shape confirmed in code —
logSend names no timestamp column; the unified ledger subsumes the alarm ask by construction, legacy repair stays on pm-stack notifications: all 269 send-ledger rows lack a usable timestamp — the measurement page is blind #14061).
- Build-slice map S1–S5 at the end of the design (doc §7), dependency-ordered: registry + aggregator adoption → unified ledger + observability → sender consolidation → edge cutover + app endpoint → relay re-point + close-out.
Packetisation: deliberately none yet. Two seams are posed on this issue for settlement first — (i) the needs/needs-drew taxonomy call is Drew-facing (it changes what his toggles say); (ii) S4's re-subscription slice can only be specified against the endpoint-mark flow's behaviour in the shipped app build, which must be verified live first. S1/S2 packetise on this design's acceptance, the #14043 pattern.
Open questions for Drew (also at the end of this issue's body): (1) keep needs and needs-drew as separate toggles (recommended) or merge into one "Needs you" class? (2) the one preferences surface on the console (pm.security.cab) with the aggregator page redirecting — as designed — or the reverse?
No platform flags fired during this lane. No code was changed; this lane was design + filing only, per its brief. developing-today-fleet commented on Nov 24, 2026 ContributorAuthor More actions Ruling recorded — one push system, responses handled centrally (Drew, 2026-11-24 00:28 CST)
Drew confirms this design's core and adds the response half:
One system, every endpoint. Push is a single system no matter where it lands: the same push goes out to website push AND to the Android app, as endpoints of the one registry. That is what this design already builds — one registry, one sender, the app a first-class endpoint (client=android-app) — and it is recorded here as Drew's confirmation of that shape, including that the app receives through its registered endpoint rather than through a channel of its own. A native (FCM) transport remains the reserved v2 column in the registry, untouched by this ruling.
Responses return and are handled centrally. A response given on any endpoint — a notification action tap, the Android app, a browser — is sent back and handled by the same single path: the answer capture and write-back owned by #14043. The endpoint of origin is never a fork in how an answer is handled. This design's boundary ("#14043 (answer write-back — untouched)") stands; the join is that this sender's payloads must carry what that handling needs:
Notification response payloads. Pushes carry standard AND custom responses. The standard options ride as notification action buttons in the payload; the notification also clicks through to a detail view that gathers more detail and builds the appropriate context for answering — custom free-text lives there, since it cannot be typed into a notification action. So the unified sender's payload contract gains two things: the question's standard options as actions, and a click-through target carrying the question's identity. The rich question schema itself — checkboxes, radio, always a custom option, per-question or per-set answering, lossless radio→checklist conversion — is recorded on #14043, which owns the question/answer model; this design only carries a question's standard options into the payload.
Not decided by this ruling: the class-taxonomy question posed in this design (keep needs and needs-drew as separate toggles, or merge into one "Needs you" class) is still open. Drew's "single system" words are about delivery unification — one registry, one sender, every endpoint — not about merging classes. It stays posed for his word, exactly as the design left it.
Slice note: S1–S5 remain unpacketised, as this design directs, so no queued work changes. The payload-contract point above belongs in S3/S4 when they are specified.
— Lane PM-OFFLINE-PUSH-AMEND, 2026-11-24. developing-today-fleet commented on Nov 24, 2026 ContributorAuthor More actions Taxonomy settled — the staged pipeline: needs-review first, needs-user only when it has to be (Drew, 2026-11-24 00:37 CST)
Drew ruled on this design's open question 1. The answer is neither of the two options posed (separate toggles, or one merged "Needs you" class). It is a staged pipeline:
1. The class is needs-user, not needs-drew. Rename it wherever this design names it — the aggregator's answerable class id, the unified taxonomy, the payload contract, the census, the preferences labels. (The answer path's existing /api/needs-drew/… naming is an implementation surface the build slices rename or alias as they touch it; the class of record is needs-user.)
2. Everything goes to needs-review first. Every item that would have been an answerable push lands in a needs-review stage first. The AI works that stage: it handles items and makes decisions itself whenever possible — Drew's standing decision posture applied to this queue. Only items that absolutely need Drew escalate to needs-user and are pushed to him. The console's needs class (new needs-me items from the census diff) feeds this same pipeline at the review stage.
3. "Send back" is a standard answer option on every needs-user item. One of the options on every escalated item is send back: it returns the item to the needs-review stage, to be decided there by the AI. It is recorded and handled like any other answer (see #14043, where the answer-flow half of this ruling is recorded).
4. Push delivery is user-configurable on the one preferences surface (the console surface this design already names). Pushes send immediately by default. The user can set:
- a rate cap — a maximum number of pushes per unit of time;
- grouping — issues grouped into grouped pushes rather than one push each;
- reminders for groups — reminder pushes for outstanding groups.
These settings join the per-endpoint preference model (design point 4) as first-class settings, not sender-local behaviour.
5. The needs-user list carries triage metadata. The list Drew answers from supports setting priority on items, and each item shows the number of issues blocked by its answer — so the highest-unblock answers get answered first.
What this settles: open question 1 is closed by this ruling — the taxonomy is the staged needs-review → needs-user pipeline with needs-user as the escalation class. Open question 2 (the one preferences surface lives on the console, pm.security.cab) stands as previously ratified. This ruling also confirms the direction recorded at comment 7124013638 (one system, responses handled centrally) and gives that handling its front door: the review stage is where the AI handles responses first.
Build slices S1 and S2 are packetised from this design with this ruling folded in (task IDs in the following comment). S3–S5 are not packetised: S4 still depends on verifying the endpoint-mark flow against the shipped app build.
— Lane PUSH-UNIFY-PACKETS, 2026-11-24. developing-today-fleet commented on Nov 24, 2026 ContributorAuthor More actions Slices S1 + S2 packetised — tasks 21692 and 21693
Per Drew's taxonomy ruling recorded above (comment 7124146989), the first two build slices of this design are now queued on repo-health-code-pilot, both priority 40, kind feature_slice, each validated and verified by read-back after enqueue:
- Task 21692 — S1: unified registry + aggregator adoption. Dedupe key
repo-health:v1:slice:developing-today/code:issue:14084:slice-1. The push_endpoints / push_preferences tables in fleet-platform Turso; AlertsStore reads/writes them; /alerts/preferences unchanged externally. The ruling is folded in: the class is needs-user (no needs-drew in the touched paths); item stage is modelled (needs-review entry → needs-user escalation, send-back returns an item to review); the per-endpoint preference model carries the delivery settings (send immediately by default, rate cap = max pushes per unit of time, grouping, reminders for groups); the needs-user list supports priority setting and shows each item's blocked-by count. Proof in-packet: aggregator notification test suite + live subscribe → test-send on the laptop. Read-back at enqueue: status queued; since claimed once and parked by a fleet lane (attempts 1) — in the fleet's flow.
- Task 21693 — S2: unified sends ledger + observability. Dedupe key
repo-health:v1:slice:developing-today/code:issue:14084:slice-2. One sends ledger in the registry store with writer-stamped sent_at (ISO-8601 UTC, schema-required — never a column default again); the /notifications roll-up reads it; undated-row alarm; zero-endpoint sentinel into stack-health (lands PM push delivery dark since 2026-11-17: no push subscriptions registered in the alerts store #14048's detection ask); census read on both stacks' status surfaces, including the needs-user backlog with blocked-by totals. Grouped sends and group reminders are recorded as their own ledger attempts. Hard prerequisite in-packet: task 21692 must be terminal-done first — a lane claiming 21693 earlier parks behind it. Read-back at enqueue: status queued.
Not packetised: S3 (sender consolidation), S4 (edge cutover + app endpoint), S5 (relay re-point + close-out) — as directed. S4 still depends on verifying the endpoint-mark flow against the shipped app build.
— Lane PUSH-UNIFY-PACKETS, 2026-11-24. dezren39 commented on Nov 24, 2026 xaltha hourly lane (2026-11-24 ~12:52 CST): claimed S2 queue task 21693 and re-verified its hard prerequisite — S1 task 21692 is not terminal-done and no S1 PR is open. Per the S2 packet rule, parked task 21693 behind 21692 (queue status: parked) and did not start the ledger/census work, since it reads the registry S1 builds. Resume condition: 21692 terminal-done. dezren39 commented on Nov 25, 2026 Claimed by lane 11, 2026-11-25T01:22Z — queue task 21692 (S1: unified registry + aggregator adoption). Working on branch claude/project-thread-ozbjg5; builds and tests dispatched remotely.
Generated by Claude Code developing-today-fleet commented on Nov 25, 2026 ContributorAuthor More actions 🤖 Agent note · escalated
- Agent: fleet monitor
- Session / ID: task 21692, repo-fleet-monitor run 2026-11-24 19:14 CST
- Found via: monitor reconciliation
- Task: Protocol gap (Duty 4): this issue is held by a live queue claim (task 21692, worker claude-lane-11, lease to 2026-11-25T03:09:44Z) but has ZERO comments containing
agent-note:v1 — the holding agent did not leave the required agent note. The monitor synced the labels to the claim truth this run (queue/claimed + work/assigned + status/in-progress). This gap itself needs a human/Muse review of why the protocol was not followed.
- Expectation: holder posts a standard agent note at its next transition; reviewer checks why no pickup note was left.
- Links: task 21692
dezren39 commented on Nov 25, 2026 S1 slice 1 merged in #14698 (lane 11).
- One push registry (
push_endpoints, push_preferences, push_item_stages, push_item_stage_events, push_registry_meta), seeded once from alerts_push_subscriptions; a deleted endpoint is never brought back by the seed.
- Endpoints carry transport, client (
browser or android-app), device id, label and delivery settings: send immediately by default, optional rate cap, grouping, group reminders. Delivery is stored only; the sender enforces it in S3.
- The answerable class is
needs-user per the ruling above; stored needs-drew preferences read as needs-user. Attention tier ids and /api/needs-drew routes are unchanged.
- Stage store: needs-review then needs-user, send back, resolve, reopen, priority and blocked-by count, ordered for answering.
- Turso export, backup manifest and
pm-stack/platform/stores.json cover the new tables.
Checks: bunx tsc --noEmit and bun test (3653 tests) pass on a remote fleet runner. pm-dashboard-backup-manifest.test.sh fails on that runner image on main as well, so it was not a signal here.
Next (S1 slice 2): stage API routes, the needs-user list with priority and blocked-by count, and send back as an answer option.
Generated by Claude Code dezren39 commented on Nov 25, 2026 S1 slice 2 merged in #14764 (lane 11).
- Every ledger question now offers "Send back". It returns the item to needs-review; any other answer resolves it. Questions raised before this change offer it too.
- A raise enters the question at needs-user in the stage store.
/needs-user (and /api/needs-user) lists open questions by the priority you set, then by how many issues wait on the answer, then by age, with a priority picker per row. It is in the Pages dropdown under Overview. Answer tokens are not in the list.
POST /api/needs-user/<id>/priority sets 1 to 5 or clears it. POST /api/needs-user/<id>/blocked-by takes the intake bearer, for the fleet to report the count.
- Push notification action buttons are unchanged; Send back is on the answer page.
Checks: bunx tsc --noEmit and bun test (3678 tests) pass on a remote fleet runner.
Still open from the S1 acceptance: the live subscribe and test-send on the laptop. It needs the pm-aggregator package redeployed; the running build predates both PRs (see #14059). Queue task 21692 is completed with that noted.
Generated by Claude Code developing-today-fleet commented on Nov 26, 2026 ContributorAuthor More actions D1 move filed for this programme's push registry tables: #15561 (CF-5e, under CF-5 #14945) moves push_endpoints and the sibling registry tables from fleet-platform Turso to D1 fleet-platform under the #14866 owner ruling, following the CF-5 ledger move's copy → hash-verify → refresh-at-flip → retarget pattern. The table-set enumeration lands on #15561 before any copy. — agent-note:v1, programme coordination developing-today-fleet commented on Nov 28, 2026 ContributorAuthor More actions Lane code-f premise note — S2 task 21693 (2026-11-28)
Gate cleared: S1 task 21692 is terminal-done. S2 (unified sends ledger + observability) is ready for implementation per the packet; this lane did not start it (feature_slice scale exceeds the triage-loop window). Task 21693 parked with resume noting S1-done. Part of #14084.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|