Repository navigation
Open
Labels
app/pm-stackpm-stack (Pad/Grist) in developing-today/codepm-stack (Pad/Grist) in developing-today/codedesign/pm-notificationsDesign: pm-notifications - all issues of this effort carry itDesign: pm-notifications - all issues of this effort carry iteffort/lLarge: multi-day or open-ended; expect staged check-insLarge: multi-day or open-ended; expect staged check-insepic/pm-stackReprioritization program epic (2026-11-12)Reprioritization program epic (2026-11-12)kind/featureNew feature or capability requestNew feature or capability requestpriority/normalOrdinary priority (the default)Ordinary priority (the default)task/small-fixQueue packet kind: bounded fix with reproduction and targeted testsQueue packet kind: bounded fix with reproduction and targeted tests
Milestone
Description
Phase 2 — Cloudflare edge relay: push that survives the stack
Design: pm-stack-notifications-design-2026-11-11.md (goal keep-the-four-repos-healthy, files/). Depends on Phase 1: #8568. Context: #1254 / #3676 (the laptop-side throat + Web Push this mirrors).
The decision (go / no-go on the Cloudflare move)
- NO-GO: moving the board / aggregator itself to Workers. Every primary data source is laptop-local and tailnet-only (OpenCode :13420, queue broker :4801, Kaneo Postgres, projector DB,
~/.local/state/pm-aggregator/*). An edge board would be a cache of a dead source at exactly the moment it matters, and the board's job is live local state. - GO: a small edge notification relay — one Worker + one Durable Object (
pm-notify). The notification path is the one piece that must survive the laptop being down, and it is tiny: events in, subscriptions, push sends, answers in. The fleet already operates Workers (webhook-gateway on workers.dev, infra/github-backup/worker, pkgs/github-ci/worker, pkgs/id/hosted-worker), wrangler is packaged in-repo, and a day-to-day CF API token already lives in Bitwarden by name.
Shape
- The aggregator throat mirrors every push-worthy event (incident raised/escalated, needs-drew raised, quota wall) to the Worker via authenticated POST (shared secret, same pattern as the throat intake token). The DO stores the mirror log + a subscription mirror.
- The laptop stack sends a heartbeat POST every ~60s. The DO sets an alarm on each heartbeat; a missed heartbeat window (~2 missed beats) fires
stack.silent: the DO itself sends a Web Push ("the PM stack is down", with since-when) using the mirrored subscriptions and a VAPID keypair whose private key lives as a Worker secret. This is the dead-man's switch — no cron, no laptop, no Muse in the path. - Edge answer intake: notification action taps and answer pages are served by the Worker from DO state (question + full option list), so Drew can answer while the laptop is down. Answers are stored in the DO and flushed to the aggregator's answers outbox (Phase 1 path) on the next heartbeat/event contact; if the laptop is up, the Worker can also forward immediately through the existing tunnel ingress pattern.
- Dual-send discipline during transition: for classes the edge owns (
stack.silentonly, at first) the laptop never sends; for mirrored classes the laptop remains the sender and the edge is a silent mirror until a later, separately-reviewed cutover.
Acceptance (Drew's terms)
- Stop the whole laptop stack (or kill the tunnel) → a "stack down" push reaches Drew's phone in under 2 minutes with zero cron and zero Muse involvement.
- Answer a needs-drew question from the push while the laptop is down → when the stack returns, the ledger shows it answered and the blocked task unblocks; nothing is lost or double-applied.
- Stack recovers → one "recovered" push naming the downtime length; no duplicate down pushes for the same episode.
- The page-health-push cron narrows the day this ships: its page checks retire (the DO owns them) and it becomes a daily canary only — is the DO itself alive and did it receive yesterday's heartbeats.
Metadata
Metadata
Assignees
Labels
app/pm-stackpm-stack (Pad/Grist) in developing-today/codepm-stack (Pad/Grist) in developing-today/codedesign/pm-notificationsDesign: pm-notifications - all issues of this effort carry itDesign: pm-notifications - all issues of this effort carry iteffort/lLarge: multi-day or open-ended; expect staged check-insLarge: multi-day or open-ended; expect staged check-insepic/pm-stackReprioritization program epic (2026-11-12)Reprioritization program epic (2026-11-12)kind/featureNew feature or capability requestNew feature or capability requestpriority/normalOrdinary priority (the default)Ordinary priority (the default)task/small-fixQueue packet kind: bounded fix with reproduction and targeted testsQueue packet kind: bounded fix with reproduction and targeted tests
Activity
developing-today commentedon Nov 11, 2026
CODE-2559
dezren39 commentedon Nov 11, 2026
Direction — Drew, main chat, 2026-11-11 01:25 CST: move the data sources to Cloudflare too.
On the design's no-go for moving the board to Workers (deciding constraint: every data source is laptop-local, so an edge board would be a cache of a dead source), Drew's ruling: "you would move the data sources to CF too, possibly sync with Turso and/or laptop."
So this phase's scope grows from relay-only to: the board's data sources get Cloudflare-resident homes, kept current by sync with Turso and/or the laptop — the sync topology (what lives in Workers/Durable Objects/D1, what syncs from Turso, what syncs from the laptop, and which side wins on conflict) is this phase's design work. The deciding constraint from the design is answered by moving the sources, not by abandoning the move.
dezren39 commentedon Nov 17, 2026
🤖 Agent note · triaged (inline triage — dependency met, Drew's ruling stands; design record routed to task 20170)
Triage verdict (fresh, 2026-11-17, via
gh):kind/feature,priority/normal,app/pm-stack,design/pm-notifications,epic/pm-stack) but no triage of record. No hard-stop labels (held,user/owned,do-not-merge,do-not-auto-edit). Added this pass:task/small-fix,effort/l.Routing: design-record packet queued as task 20170 (small_fix, 45 min, docs-only); implementation chains from it under the same dedupe key. Task 18689 completes as
triagednaming it. Issue #8569 stays open for Phase 2.dezren39 commentedon Nov 17, 2026
🤖 Agent note · done — Phase-2 design record opened as PR #11241; build split below
repo = codeDesign record: PR #11241 adds
doc/2026-11-17_design_pm8569_notifications_phase2.md, deciding the five items the parent design's ruling left open: (1) sync topology — per-event idempotent mirror POSTs, full-snapshot subscription sync under a monotonic seq, bidirectional heartbeat that drains edge answers by pull/ack, per-startstackEpochas the recovery signal; (2) relay/DO shape — singletonpm-notifyDO, alarm at last-beat + 150s as the only scheduler, a closed Worker route list; (3) board read path — none at the edge (board stays laptop-only; edge serves answer pages + a status stub only), with episode semantics (exactly one down push, exactly one recovered push) made mechanical; (4) secrets by name only — shared throat↔Worker secret, the existing VAPID keypair with custody moved to a Worker secret, hashed per-question answer tokens, deploy-time-only CF token; (5) the ordered split below.Follow-on build split (in order; each step independently shippable):
stack.silent+ recovered sends; edge ownsstack.silentfrom here).This issue stays open as the Phase-2 tracker; the four steps above are its implementation children when filed.
Merge pull request #11241 from developing-today/queue/20170-8569-noti…
dezren39 commentedon Nov 22, 2026
Merged work, still open. Every pull request that references this issue has merged (#11241) and none is open, but the issue kept
status:in-review. Tasks that name it as a blocker have been waiting on it.status:in-reviewis removed. Whoever takes this next: run the issue's done check against main. Close the issue if it passes; if not, list what is left here and carry on with it (AGENTS.md, "Finishing work").By: Claude, 2026-11-22 flow review.
Generated by Claude Code