Skip to content

CF-10 (#14866): pm-notify relay — deploy and prove the dead-man's switch #14950

Backlog

Description

@developing-today-fleet

CF-10 — pm-notify relay: deploy and prove.

pm-stack/notify-relay is designed (Worker + PmNotify Durable Object, /mirror + /heartbeat) and listed in workers.json as not deployed. Deploy it under the versions standard (CF-1 pattern; by hand in that shape until CF-1 lands), wire the aggregator heartbeat/mirror calls, and prove the dead-man's switch: silence the laptop aggregator in a drill and receive one real Web Push; restore it and receive the recovery push. Secrets by name only (the VAPID private key resolves from Bitwarden by name at send time).

Acceptance: pm-notify in service; the drill record (silence → push → recovery → push) is on this issue; workers.json updated by the deploy.

Child of #14866 (Cloudflare-first migration programme). Design of record: doc/2026-11-25_design_cloudflare-first-migration.md (PR #14940). Secrets by name only. Deploys follow the versions standard in design §4 unless this issue says otherwise.

{
  "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-25T08:49:01Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": null,
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": null,
    "auth_subject": "felix",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Acceptance criteria

  • pm-notify (Worker + PmNotify Durable Object, /mirror + /heartbeat) is deployed under the CF-1 versions standard and listed as deployed in workers.json, with the aggregator heartbeat/mirror calls wired.
  • The dead-man's switch is proven in a drill: silencing the laptop aggregator produces one real Web Push, and restoring it produces the recovery push; the full drill record is posted on this issue.
  • Secrets stay by name only (the VAPID private key resolves from Bitwarden by name at send time); no secret value appears in the repo, logs or this issue.

Activity

  1. added
    priority/high
    kind/infrastructure
    on Nov 25, 2026
  2. developing-today commented on Nov 25, 2026

    @developing-today
    Contributor
  3. added
    app/pm-stack
    effort/m
    meta/enriched
    status/needs-triage
    on Nov 25, 2026
  4. developing-today-fleet commented on Nov 25, 2026

    @developing-today-fleet
    ContributorAuthor

    Intake review

    Related: programme issue #14866; deploy shape follows the CF-1 versions standard (issue #14941 family).

    Notes: Issue verified still open and live at intake (no merged PR found in the body evidence resolving it; the body scope stands). Acceptance criteria appended to the body by the fleet monitor (original body preserved verbatim above the new section); labels normalised per the taxonomy.

    Risks: Scope creep beyond the slice as written; dependencies named in the body (parent/design/gate issues) may gate the start. For claimed slices, the holding lane's own plan governs sequencing.

    Suggested approach: Work the slice exactly as scoped in the body, prove each acceptance bullet with a test, drill record or live read-back as its wording requires, and post the evidence on the issue before closing.

    🤖 Agent note · filed

    • Agent: fleet monitor
    • Session / ID: repo-fleet-monitor run 2026-11-25 05:14 CST
    • Found via: monitor reconciliation (intake enrichment, protocol §5)
    • Task: intake pass — acceptance criteria, label normalisation, related links
    • Expectation: enriched item is ready for triage/queue routing
    • Links: this issue
  5. added
    queue/claimed
    work/assigned
    status/in-progress
    and removed
    status/needs-triage
    on Nov 25, 2026
  6. dezren39 commented on Nov 26, 2026

    @dezren39
    Member

    Lane any-n (task 23742) CF-10 prep note: pm-stack/platform/workers.json still lists pm-notify as not deployed (deploy: none) — deploy leg genuinely pending. Dispatched notify-relay suite remotely (bun test pm-stack/notify-relay/test/, handle fp_cbb4def8d13eb947ecd2c14230921369); no runner free yet, job queued in repo-queue as system of record. The dead-man's switch drill (silencing the laptop aggregator for a real push + recovery push) needs a dedicated window and is not started in this run. Resume: collect the test dispatch result, run wrangler deploy under the versions standard, wire aggregator heartbeat/mirror, update workers.json, then drill.

  7. developing-today-fleet commented on Nov 26, 2026

    @developing-today-fleet
    ContributorAuthor

    🤖 Agent note · CF-10 deploy — rollback note recorded BEFORE the deploy (felix lane, 2026-11-26)

    Owner ruling in force: #14866 comment 7189808145 — everything to Cloudflare, finish migrations/deploys end to end.

    Ground truth found this run:

    • pm-stack/platform/workers.json on current main (59a48f5) still lists pm-notify as state: not deployed, deploy: none, address: null. The deploy leg is genuinely pending.
    • The relay code is complete in repo: Worker + PmNotify DO, /mirror/*, /heartbeat, /status, event mirror (step 2) and edge answer intake (step 3) all landed. Aggregator-side wiring also already exists (pm-stack/aggregator/src/notify-relay.ts: 60s heartbeat + subscription mirror, started from server.ts when PM_AGG_NOTIFY_RELAY_URL is set; secret resolved by name at send time).
    • The Bitwarden secret pm-aggregator.notify-relay-shared-secret does not exist yet (verified by name lookup this run — unresolved in every source). It must be created (new random value, stored in Bitwarden under that exact name, same project as pm-aggregator.vapid-private-key) and set on the Worker as RELAY_SHARED_SECRET. pm-aggregator.vapid-private-key exists and will be set on the Worker as VAPID_PRIVATE_KEY. No secret value will appear in any log, comment, or commit.

    Deploy about to run: wrangler deploy of pm-stack/notify-relay (account 234b866b99ce2b142d7963d8d139cbfa) via the sanctioned pkgs/cf/wrangler-authed.py pattern (token by name cloudflare.api-token-account-wide, stdin only), then the two Worker secrets above, then live verification against GET /status, then a controlled dead-man's-switch drill.

    Rollback: pm-notify is not in service today and nothing routes to it, so rollback is subtraction, not restoration: (1) unset PM_AGG_NOTIFY_RELAY_URL on the aggregator if it was set (aggregator returns to its pre-relay behaviour — it is inert without the URL); (2) wrangler delete pm-notify (or leave the Worker undeployed-traffic: workers.dev URL with no aggregator pointing at it sends nothing — the DO opens no episode without a first heartbeat/mirror); (3) revert the workers.json entry to not deployed. The newly created Bitwarden secret can be deleted if the relay is abandoned. No data plane is touched by this deploy; DO state is created empty.

  8. developing-today-fleet commented on Nov 26, 2026

    @developing-today-fleet
    ContributorAuthor

    🤖 Agent note · CF-10: pm-notify DEPLOYED and live-verified; drill staged on one named blocker (felix lane, 2026-11-26)

    Rollback note was recorded before the deploy: comment 7189997735 on this issue.

    Deploy (done, live-verified, not from deploy output alone):

    • Created the missing vault secret: pm-aggregator.notify-relay-shared-secret did not exist in any source (verified by name lookup). A new random value was generated, stored in Bitwarden under that exact name (same project as pm-aggregator.vapid-private-key, secret id 34b09be3-0e6f-47d6-a8e2-b50e00b3d29a), and confirmed resolvable via fleet secrets get (by name; value never printed/logged/committed).
    • Deployed pm-stack/notify-relay via the sanctioned pattern (pkgs/cf/wrangler-authed.py, token by name cloudflare.api-token-account-wide on stdin): Worker pm-notify, version 45db0876-46f9-4a80-85ef-9bf3836a6ca5, https://pm-notify.developing-today.workers.dev, PmNotify DO bound.
    • Worker secrets set from Bitwarden by name (piped stdin, never printed): RELAY_SHARED_SECRET ← pm-aggregator.notify-relay-shared-secret; VAPID_PRIVATE_KEY ← pm-aggregator.vapid-private-key. Both wrangler secret put calls exited 0.
    • Live verification: GET https://pm-notify.developing-today.workers.dev/status → {"up":false,"silent":false,"silentSince":null,"lastBeatAt":null,"stackEpoch":null,"snapshotSeq":null,"subscriptions":0,"lastDelivery":null} — the DO answers; the all-null liveness is correct for a relay that has not yet seen a heartbeat or mirror.
    • workers.json updated in PR CF-3/CF-9/CF-10 (#14866): D1 queue backup retarget, laptop follow-main timer, pm-notify deployed record #15564 (unmerged): pm-notify now in service, address + deployed commit 59a48f5e17718904f72b3ceabd0231e904bf31e0 recorded.
    • Aggregator wiring already exists in repo (pm-stack/aggregator/src/notify-relay.ts, started from server.ts when PM_AGG_NOTIFY_RELAY_URL is set; secret resolved by name at send time) — no aggregator code change was needed.

    Dead-man's-switch drill — STAGED, one blocker, exact remaining steps:

    • A controlled drill was prepared and attempted from this seat (mirror a drill subscription → heartbeat → silence past the 150s alarm → observe the silent episode + delivery record on /status → heartbeat → recovery record → mirror an empty snapshot to clear the drill subscription). Every POST from this sandbox seat to *.workers.dev hangs with zero bytes returned: the seat's egress proxy raises a per-destination approval for the POST flow, and the approval cards timed out unanswered three times (Drewry away; per standing record an approval timeout is absence, not refusal — but the gate does not open without the tap). GETs to the same host answer instantly, and the Worker returns 401 pre-DO for a bad secret, so this is the seat's egress gate, not the relay. The drill process was stopped; the relay's DO state is untouched (still the pristine /status above).
    • Remaining step 1 (one tap): approve the egress POST flow to pm-notify.developing-today.workers.dev from the Felix seat — then the staged drill runs as scripted in ~4 minutes.
    • Remaining step 2 (the real-device proof, laptop window): set PM_AGG_NOTIFY_RELAY_URL=https://pm-notify.developing-today.workers.dev in the amd-6 aggregator's environment and restart it; confirm /status shows up:true and the real subscription count; stop the aggregator (or its heartbeat) → one real stack.silent Web Push on Drewry's phone within ~2.5 min; restart → exactly one recovered push naming the downtime. Record both timestamps here. amd-6 is flapping today, so this is staged for a stable window rather than forced.
    • This also discharges the pm-stack notifications Phase 2: Cloudflare edge relay + Durable Object dead-man's switch — push that survives the stack being down #8569 notify-relay deploy leg: the relay is deployed; only the drill evidence above remains.

    Status: deploy acceptance met; drill acceptance staged on the two steps above — neither needs Drewry personally except the one egress tap in step 1 (step 2's phone observation is his device, but the push record is also visible on /status lastDelivery).

  9. dezren39 commented on Nov 26, 2026

    @dezren39
    Member

    oc-code-08 scheduled run — CF-10 verification (2026-11-26)

    • Current origin/main includes the merged CF-3/CF-9/CF-10 (#14866): D1 queue backup retarget, laptop follow-main timer, pm-notify deployed record #15564 deployment record: pm-notify is listed in service, with address and deployed commit recorded. This corrects the stale root-checkout view; no registry edit was needed.
    • Live GET https://pm-notify.developing-today.workers.dev/status returned up:false, silent:false, subscriptions:0, lastBeatAt:null, lastDelivery:null. The Worker answers, but the DO is pristine.
    • Aggregator client wiring exists in pm-stack/aggregator/src/notify-relay.ts and server.ts; runtime heartbeat/mirror is conditional on PM_AGG_NOTIFY_RELAY_URL being set. fleet shell targets reports laptop and Codespace unreachable, so I could not verify or activate the laptop runtime.
    • A harmless POST to an unsupported route returned 404, but I did not mutate the DO or synthesize a push. A real drill needs the live aggregator heartbeat and a real mirrored subscription; without those, a synthetic test cannot meet the requested real-device acceptance.

    Disposition: relay deploy and code wiring are present; real silence → push → recovery → push evidence remains outstanding. This run did not claim acceptance or change live state. Resume when the laptop target is reachable and aggregator has PM_AGG_NOTIFY_RELAY_URL set; run the real-device drill and record both deliveries.

  10. dezren39 commented on Nov 26, 2026

    @dezren39
    Member

    Fresh CF-10 runtime recheck (agent-next-23-local, 2026-11-26): the local pm-aggregator service now has PM_AGG_NOTIFY_RELAY_URL configured and was restarted; the service is active. The installed Nix package is still the pre-relay build and does not contain startNotifyRelay, so no heartbeat reached the Worker: /status remains up:false, with lastBeatAt:null and subscriptions:0. The local alerts preferences endpoint is available but reports zero stored Web Push subscriptions. The merged deploy record (#15564) and main-branch relay client are present; runtime package activation and a real subscription are still needed before the silence → push → recovery → push drill. The existing relay unit-test dispatch fp_cbb4def8d13eb947ecd2c14230921369 remains queued with no runner assigned. No synthetic push was sent. Resume after the relay-enabled aggregator package is active and the local alert store has a real subscription; then run and record the full drill.

  11. dezren39 commented on Nov 26, 2026

    @dezren39
    Member

    Readiness recheck (agent-next-25-local, 2026-11-26 17:21 UTC): Worker /status still reports up:false, no heartbeat, and 0 subscriptions; local alerts preferences also show 0 subscriptions. The active pm-aggregator ExecStart points to an older Nix store package without the relay client. The canonical agent-rebuild-switch path builds reviewed main; its last attempt failed on unrelated OpenCode package dependencies. I am retrying that normal main switch; the drill remains gated on an active relay-enabled package and a real mirrored browser subscription.

  12. dezren39 commented on Nov 26, 2026

    @dezren39
    Member

    CF-10 readiness update (agent-next-25-local, 2026-11-26 17:53 UTC):

    Next: recheck after #2231 or a newer main build allows the official NixOS switch to succeed, and after a browser is connected and the Worker reflects a real subscription. No synthetic push was sent.

  13. dezren39 commented on Nov 26, 2026

    @dezren39
    Member

    CF-10 recheck (agent-next-25-local, 2026-11-26 17:58 UTC):

    Next: retry the approved main-only NixOS switch after #2231 or an equivalent main fix is merged, then connect a browser, enable push, and perform the silence → push → recovery → push drill.

  14. removed
    queue/claimed
    on Nov 28, 2026
  15. dezren39 commented on Nov 29, 2026

    @dezren39
    Member

    🤖 Census — lane CEN-C15, 2026-11-29 (full-census pass: body + all comments re-read firsthand; this comment is the current-state record for a cold pickup).

    Verdict: blocked. The failed deploy attempt is recorded with its owning issue, avoiding duplicate fixes. Drill acceptance is a real end-to-end proof (silence → push → recovery → push), no synthetic push.

    Ordered pickup: (1) darwin-nix #2229 / open PR #2231 — the mcpx build failure that killed the NixOS switch; (2) then a real browser connection to create the push subscription. Current state: worker up:false, 0 subscriptions.

    Labels/priorities were verified correct in the census — no label changes were needed. (priority high confirmed.)

  16. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    ContributorAuthor

    Census 2026-11-29 (Felix): rechecked in full (body, labels, comments, edges).

    STRENGTHS: The acceptance is a proof, not a deployment claim: silence the laptop aggregator in a drill, receive one real Web Push, restore, receive the recovery push — with the drill record on this issue. Secrets by name only (VAPID key from Bitwarden at send time). kind/infrastructure + priority/high already set.

    GAPS: The deploy half is DONE and live-verified: pm-notify is deployed (version 45db0876) at pm-notify.developing-today.workers.dev, the shared secret is in Bitwarden (pm-aggregator.notify-relay-shared-secret), and GET /status verified live (recorded 2026-11-26). What remains is only the drill, and it is doubly gated: the controlled POSTs to *.workers.dev from this seat need an egress approval that has timed out three times (standing instruction: do not retry unless Drewry asks), and the real-device proof needs a stable amd-6 window.

    FIXES I APPLIED: None — labels and priority verified correct.

    REMAINS: Drewry: one egress approval tap when at the screen (or run the drill from the laptop side). Nothing else blocks.

  17. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    ContributorAuthor

    Issue census — 2026-11-29

    Gaps found

    • None in metadata: kind/infrastructure, priority/high, effort/m, app/pm-stack, status/in-progress + work/assigned present; acceptance stated inline and in the ## Acceptance criteria section.

    Strengths

    • Body names the designed state (Worker + Durable Object, /mirror + /heartbeat), the deploy standard, and a concrete proof: silence the aggregator in a drill and receive a real Web Push, then the recovery push. Secrets by name only.

    Actions taken by this census

    • Verified complete — no changes needed.
  18. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    ContributorAuthor

    Live failure evidence — the dead-man's switch fired into an empty room (2026-11-29)

    CF-10's acceptance (deploy + prove the dead-man's switch) is still open, and today produced an unplanned live test — which failed on the delivery side:

    • The daily pm-notify canary (page-health-push, pm-stack notifications Phase 2 step 4: cron narrowing to the daily DO canary (#8569) #13470) read GET https://pm-notify.developing-today.workers.dev/status at ~06:47 CST: HTTP 200, but up: false, silent: true since 2026-11-29T12:40:32.147Z, snapshotSeq stuck at 16.
    • The silence alert generated at 12:43:02Z was delivered to 0 subscriptions (sent: 0). The switch detected the silence; nobody was reachable by it.
    • The Worker itself is deployed and answering (created/deployed 2026-11-26, verified again today via the cf CLI account list). What failed is the chain behind it: pm-notify's data source is the laptop aggregator, the laptop leg was down, and the alert's subscription set was empty.

    So the remaining CF-10 work is precisely: (1) a subscription set that actually reaches Drew, and (2) a feed path that does not die with the laptop — under Drew's 2026-11-29 ruling (migrate the rest into Cloudflare; laptop as fallback), pm-notify's feed comes from the hosted tier (hosted aggregator store / decision-events), with the laptop aggregator as the D2 read fallback. The drill acceptance on this issue (silence → push → recovery → push, with a real recipient) stands as the proof criterion.

    Programme record: kickoff comment on #14866 (2026-11-29).

    — Archer, 2026-11-29

  19. developing-today-fleet commented on Dec 1, 2026

    @developing-today-fleet
    ContributorAuthor

    🤖 Agent note · stale-claim takeover — lane 2007-G (charlie ADVANCE 2026-11-30 20:07 CST)

    Claim-scan firsthand this lane: body + all 14 comments re-read live. Last activity 2026-11-29T16:04:37Z (>24h, no PR open for the remaining work, no live lane on this issue — checked against the live 2007/1952/1937 rosters). The previous claim is stale; lane 2007-G takes over ownership of the record.

    State confirmed: deploy half is DONE and live-verified (pm-notify deployed 2026-11-26, PR #15564 record on main, /status answering). What remains is only the dead-man's-switch drill (silence → real Web Push → recovery → push), and it is not landable from this seat: (1) the laptop aggregator still runs the pre-relay package (no heartbeat reaching the Worker; /status up:false, 0 subscriptions at last live check 2026-11-29), (2) a real browser push subscription does not exist yet, (3) controlled POSTs to *.workers.dev from this seat previously hit an egress approval that timed out three times (standing note on this issue: do not retry unless Drew asks).

    Wake (machine-checkable): laptop pm-aggregator active on a relay-enabled package AND GET https://pm-notify.developing-today.workers.dev/status shows lastBeatAt non-null with ≥1 subscription — then the drill runs and its record closes this issue. Until that wake fires, this issue is parked under 2007-G's takeover, not claimed by any live lane.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/pm-stackeffort/mkind/infrastructuremeta/enrichedpriority/highstatus/in-progresswork/assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions