Repository navigation
Description
CF-5b — M4 ledger surfaces hosted (child of #14945, programme #14866).
Serve /alerts and /notifications over the alerts/unified ledgers, plus /dns and /comments, hosted at pm.security.cab. Data planes follow design §2: alerts/push ledgers stay fleet-platform Turso. Each surface shows its data-plane freshness (the #14065 rule: no tier renders invented data to fill a gap).
The preferences redirect is part of this wave but is blocked on #14084 S4 (push unification — the redirect target's shape is S4's output); only that one surface waits, the rest of this wave proceeds.
#14865 gate: record the write-amplification check for the alerts/notifications path on this issue before cutover; an open finding in this path is carried as this slice's first step or waits, saying which.
Acceptance: /alerts, /notifications, /dns, /comments serve hosted at pm.security.cab with freshness visible; preferences redirect live once #14084 S4 lands; per-surface records on this issue (what moved, what stayed, deploy/rollback via versions + route flip per design §4). Secrets by name only.
Design of record: doc/2026-11-25_design_cloudflare-first-migration.md (PR #14940). Premise evidence: #14945 comment 7157705797.
{
"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:58:38Z",
"session_id": null,
"lane": null,
"host": "htch-runtime",
"worktree": "/home/hatch",
"model": null,
"lane_start_issues": [],
"workspace_ref": {
"kind": "worktree",
"id": "/home/hatch",
"repo": "developing-today/code",
"branch": "main",
"sha": "c11f41086f57d626be7eb582763b721f8f557408"
},
"auth_subject": "felix",
"stamped_by": "fleet 0.1.0 (native)"
}
}Acceptance criteria
- M4 ledger surfaces (/alerts, /notifications, /dns, /comms) are hosted and reachable as specified in the issue body
- Each surface returns data from the hosted plane, verified live (not just deployed)
- Evidence (URLs, commands, outputs, or PR link) recorded on this issue before closure
Activity
developing-today commentedon Nov 25, 2026
CODE-5451
developing-today-fleet commentedon Nov 25, 2026
Intake review
🤖 Agent note · filed
Live check: no merged PR or commit referencing this issue was found in this run's merged-PR pull, and the issue is open with no resolving PR — it reads as still live, not solved.
Related: parent programme context named in the title/body (see issue body).
Notes: Filed this morning as part of a coordinated slice wave; several sibling slices are already claimed by lanes — this one was unclaimed at intake time.
Risks: Scope is programme-sized; the acceptance criteria are the monitor's reading of the slice spec in the body — the claiming lane should re-validate them against the parent design before implementing.
Suggested approach: claim through the pilot queue, work the body's spec in order, and check off the acceptance criteria with evidence as each lands.
developing-today-fleet commentedon Nov 25, 2026
Claim: lane IW-339 (Archer item lane) taking #14968 — CF-5b M4 ledger surfaces hosted. Plan, in the body's order: (1) the #14865 write-amplification check for the alerts/notifications path, recorded here; (2) hosted read routes for /alerts, /notifications, /dns, /comments on the pm-service substrate landed by #14969 (async adapter + parity tests + versions-standard deploy), each surface carrying its data-plane freshness per the #14065 rule; (3) live verification where the ledger credentials exist by name, with any remainder named explicitly. The preferences redirect stays blocked on #14084 S4 per the body. Worktree on the laptop off the primary clone.
developing-today-fleet commentedon Nov 25, 2026
#14865 gate check — alerts/notifications path (recorded before cutover, per this issue's gate)
Checked the full alerts/notifications write path in
pm-stack/aggregator/srcon current main (lane IW-339, 2026-11-25):alerts.ts(AlertsStore — the only writer of the alerts + push ledgers): every write is a single-row statement —alerts.incident_eventsinsert per event,alerts.incidentsinsert-or-dedupe-update per incident,alerts.notification_sendsinsert per send attempt,push_endpoints/push_preferencesupserts per subscription. No whole-set rewrite, no saveAll, no delete-all-reinsert anywhere in the file.notifications.ts: the /notifications roll-up is a pure derivation over ledger rows — it writes nothing.notification-history.ts: append-only JSONL (appendFileper entry, serialized through a write chain) — appends, never rewrites.saveAllremotes are comments and actions (both already fixed by the sweep: eliminate write amplification (whole-table rewrites) in PM Stack, queues, bridge #14865 sweep, PR pm-aggregator: ship only changed actions/comments rows to Turso (#14865) #14975) and prompt-attachments (uploads — not this path).Verdict: no open #14865 finding in the alerts/notifications path. The gate is clear for this slice; nothing is carried as a first step.
Data-plane note for the surfaces below: the alerts ledgers and
shared_commentslive in the fleet-platform Turso DB (the store client inaggregator/src/turso-stores.ts, refturso:fleet-platform), with SQLite table namesalerts_incidents,alerts_incident_events,alerts_notification_sends,shared_comments.Merge pull request #15086 from developing-today/iw339/14968-cf5b-ledg…
dezren39 commentedon Nov 25, 2026
CF-5b slice staged: PR #15087 (branch code-h/14968-cf5b-hosted-read-surfaces @ bfff94c). Owner-gated /comments from public.shared_comments, HOSTED_COMMENTS=off default. Fleet verification fp_450f5be11b7fad706911719e063d7d6b running: https://github.com/dezren39/fleet/actions/runs/45613689915. Production stays disabled until live verified-owner request succeeds. Refs #14968
developing-today-fleet commentedon Nov 25, 2026
CF-5b slice landed — hosted /alerts, /notifications, /comments in the console edge (PR #15086, merged
4556f52c44d6)Lane IW-339 completion record. The #14865 gate verdict for the alerts/notifications path is recorded above (comment 7161913552): clean, nothing carried.
What moved (staged, default-off — the #14967 pattern):
pm-stack/console/edge/src/ledger-pages.ts: serves GET/alerts,/notifications,/commentsand their/api/*.jsontwins from the fleet-platform Turso ledger (HTTP pipeline protocol ported fromaggregator/src/turso-stores.ts; tablesalerts_incidents,alerts_incident_events,alerts_notification_sends,shared_comments— the same reads the laptop aggregator's AlertsStore/comments store make). Owner is verified by the caller before the handler runs. Fixed SQL only.EdgeOptions.ledgerPages+ route block after owner identification (edge.ts), opt-in env inworker.ts:LEDGER_PAGES=on+PM_LEDGER_DB_URL/PM_LEDGER_DB_TOKENWorker secrets. Flag off = the paths stay the host's exactly as before. The laptop aggregator keeps serving production; nothing was flipped.Live probe (read-only; the credential was resolved and used on the laptop only, never printed): the module's exact queries against the real ledger returned 100 incidents (41 open; newest 2026-11-25T12:05:35Z), 100 events with
detaildecoded to objects, 271 sends, 2 comments — row shapes match the aggregator's interfaces field for field.Finding from the probe — the aggregator's own roll-up dates zero live sends:
logSendinserts no timestamp column; the live table's defaulted send-time column is namedat(all 271 rows carry it; none carrysent_at/created_at), whilesendTimestampinaggregator/src/notifications.tsreads onlysent_at ?? created_at. Against this ledger the laptop /notifications roll-up counts 269/269 sent rows as undated and renders empty. The hosted port falls back toatafter those two (dates all 271: 9 classes, 0 undated). The aggregator-side fix is filed as its own issue (number appended in a follow-up note once confirmed filed — the first filing attempt timed out and is being verified, not blindly retried).Tests (laptop worktree, bun — named fallback; console suites are bun): new
test/ledger-pages.test.ts10/10;test/edge.test.ts184/184;test/timed.test.tsgreen (its Worker-wide scan caught a rawAbortSignal.timeoutin the first draft — the module now uses the housesrc/timed.tshelper). Full console suite on the branch: 688 pass / 2 fail → after the timer fix, the only remaining failure isplatform.test.ts's workers-list read through the fleet binary, which fails identically on a pristine-main control worktree (pre-existing, live-state dependent).What remains on this issue:
DnsSection), not a ledger. Hosting it needs a register-publication decision (where register.json is published for the edge to read), which is a design call above this slice. The hosted /dns page must not be built on the Turso ledger.PM_LEDGER_DB_URL(the fleet-platform Turso address) +PM_LEDGER_DB_TOKEN(from the vault nameturso.fleet-platform-rw-token) as Worker secrets andLEDGER_PAGES=onvia scripts/expose.py, deploy the console edge, then record the four routes' live reads at pm.security.cab here (the CF-5c (#14945): pm-service serving substrate — async tenant store + Worker entry #14969 pattern: substrate merged → secrets → live reads recorded → rollback-by-flag-off noted).developing-today-fleet commentedon Nov 25, 2026
Follow-up to the completion record above: the aggregator-side roll-up defect is filed as #15090 (notifications roll-up dates zero sends against the live ledger — the send time lives in the sends table's
atcolumn). The hosted port in PR #15086 already carries the fallback; #15090 is the laptop aggregator's own fix.dezren39 commentedon Nov 25, 2026
Progress: PR #15087 now includes follow-up commit 31810b5. Remote run dezren39/fleet#45613689915 failed two test assertions: stored timestamp formatting and a JWKS cache collision between independently generated test worlds. Both fixture defects are fixed; the four targeted tests pass in a local diagnostic check, but remote confirmation is pending. Read-only review found no severe issue. No production enablement or authenticated live-data proof is claimed; the remaining surfaces and preferences redirect are still outstanding.
developing-today-fleet commentedon Nov 25, 2026
CF-5b consolidated state (felix lane, task 23781, 2026-11-25T13:55Z):
Built and merged: PR #15086 (lane IW-339) — hosted /alerts, /notifications, /comments in the console edge via ledger-pages.ts, staged default-off (LEDGER_PAGES flag + PM_LEDGER_DB_URL/PM_LEDGER_DB_TOKEN secrets), freshness on every answer, fail-closed 503 on read failure. The #14865 gate for the alerts/notifications path was checked and is clear (recorded above). A live read-only probe from the laptop against the real fleet-platform ledger returned 100 incidents / 271 sends / 2 comments with shapes matching the aggregator.
Duplicate PR: #15087 (oc-code-05 lane) implements a second, parallel /comments surface in the same edge files; it is CONFLICTING since #15086 merged. Duplication notice posted on the PR (comment 7164360744) recommending Felix close it as superseded and optionally port its expired-JWT negative test onto the ledger-pages tests.
What remains on this issue:
Task 23781 is being checkpointed and parked on a 24h time recheck with this state; the woken holder should first check whether #15087 was dispositioned and whether the flip's authenticated verification became possible. Refs #14968
12 remaining items
code-f: configure pm-aggregator DNS snapshot D1 publication (#14968)
developing-today-fleet commentedon Nov 27, 2026
agent-note:v1 — lane code-f (CF-5b #14968 DNS publication config slice).
PR open: #16139 (branch code-f/14968-dns-publication-config, head 4dd4c66) — NixOS pm-aggregator Environment adds CLOUDFLARE_ACCOUNT_ID + PM_AGG_D1_DATABASE_ID only. No backend change (PM_AGG_STORE_BACKEND stays turso), no timer resurrection, no DNS_PAGES flip, no deploy. Rollback: remove the two lines, nixos-rebuild switch.
CI: pm-aggregator tests run 45994119489 completed failure — 4050 pass / 11 fail (resolveBrokerAnswer radio/checklist, GitHub metadata webhook, loadConfig HOME-defaults). None touch the nix change; treating as pre-existing/main until a baseline says otherwise.
Claim 23781 parked after PR open (not_before 2026-11-27T12:15:29Z); no dangling claim. Live pre-change state verified: D1 dns_snapshots absent, pm-aggregator lacked both D1 identifiers, deployed Access allows owner email only.
developing-today-fleet commentedon Nov 27, 2026
agent-note:v1 — lane any-o recheck (task 23781, 2026-11-27T12:49Z).
PR #16139 still OPEN at unchanged head 4dd4c66 (code-f branch, no takeover by any-o). Branch run 45994119489 = failure, 4050 pass / 11 fail, all 11 in unrelated suites (resolveBrokerAnswer, webhook listener, loadConfig HOME) = base drift, not slice regression. Main pm-aggregator tests still failing (latest main run 45984323925, 10:42Z). #14084 still OPEN (preferences blocker). verify-disposition = merged_verified but issue OPEN with acceptance boxes unchecked; DNS_PAGES off; live auth verify still needs owner session. Must not merge while suite red. Re-parking with event/time condition.
developing-today-fleet commentedon Nov 27, 2026
code-g recheck 15:10Z (task 23781, attempt 3): PR #16139 still OPEN at head
4dd4c66on code-f branch, no new runs; branch CI red is the same 11 base-drift failures as the main baseline (broker-answer #14149, webhook listener, HOME loadConfig #8220 — none in the slice's edge area). Main aggregator suite still red, and pm-console-edge-deploy failed twice on main today (14:57Z, 15:04Z). #14084 still OPEN, so the preferences redirect stays blocked. No takeover of code-f's branch; nothing mergeable, so re-parking with resume on base-green/branch-green or time backstop 16:30Z.developing-today-fleet commentedon Nov 28, 2026
oc-code-06 shortlist recheck (2026-11-28) — no unblocked code slice; first green execution of the slice suite recorded
Read the issue + all comments and re-verified every gate live. Prior lanes (2122-H, any-o, code-g) stand confirmed: no lane-sized code slice remains for a fresh lane. No code changed in this pass; no takeover of code-f's branch.
Gates re-checked just now:
4dd4c66; branch CI red is the same base-drift set, main pm-stack-tests red too (latest main run 46042145564: aggregator resolveBrokerAnswer + schedule-registry failures). No takeover per lane ownership.bun teststep is skipped after the aggregator failure, sodns-snapshot.test.tsstill has no green CI execution.New measurement — first recorded green execution of the slice suite, laptop at
origin/main bc12e038b58:bun test ./test/dns-snapshot.test.ts ./test/ledger-pages.test.ts(pm-stack/console): 26 pass, 0 failbun test ./test/dns-publisher.test.ts(pm-stack/aggregator): 12 pass, 0 failNext slice (same shape as before, for whoever holds the env): after PR #16139 merges AND the laptop collector env names the D1 account/database so
dns_snapshotspublish, enableDNS_PAGES=onand live-verify pm.security.cab/dns; authenticated /alerts, /notifications, /comments verification still needs the owner Access session.gh issue view 14968 --json comments --jq '.comments[-1]'shows this note is newest; nothing else outstanding from a sandbox seat.developing-today-fleet commentedon Nov 28, 2026
🤖 Agent note · queue-slice re-verify — lane oc-code-04, task 23781, 2026-11-28 ~02:36Z (no slice taken, no PR, no takeover).
Fresh verification, not trusted from prior notes:
ledger-pages.tsserves /alerts, /notifications, /comments from D1 (PRs CF-5b (#14968): hosted ledger surfaces read D1 fleet-platform #15544 + pm console edge: flip ledger pages to D1 (CF-5, #14968) #15559 merged);dns-pages.tsserves /dns with 15-min freshness 503 rule (PR feat(pm): publish the #902 DNS register snapshot to D1 and serve hosted /dns (#14968 slice 2) #15657 merged 2026-11-26). verify-disposition = merged_verified, issue still OPEN with boxes unchecked.nixos/services/pm-stack/default.nix) still OPEN at head4dd4c66, updated 2026-11-27T17:36Z — owned branch, no takeover.Per feature-slice (one PR that moves one criterion with its test): nothing landable without duplicating code-f or performing a supervised production action, so standing down. Re-pick when #16139 merges/closes, #14084 S4 lands, or the supervised live verify is scheduled.
Merge pull request #16139 from developing-today/code-f/14968-dns-publ…
developing-today-fleet commentedon Nov 28, 2026
CF-5b DNS publication config landed — PR #16139 merged (a56c5ed)
What moved: refreshed the parked code-f branch onto current main (merge 2deee6e, no conflicts — the 3-line slice intact at nixos/services/pm-stack/default.nix:411-413) and dispatched verification. Remote run 46102777961 (pm-aggregator tests, workflow_dispatch on the exact new head): SUCCESS — all 5 jobs green (aggregator tests+typecheck, notify-relay, contract corpus, projector tests, browser acceptance). The one failure-level annotation on the aggregator job is the problem-matcher echoing a passing test's intentional stderr (the PM_AGG_SOURCE fixture-refusal guard asserting), not a test failure. A sibling lane merged the PR off this green run at 2026-11-28T03:31Z.
After this PR: the pm-aggregator NixOS unit names CLOUDFLARE_ACCOUNT_ID + PM_AGG_D1_DATABASE_ID — the same env names pm-stack/aggregator/scripts/collect-fleet-feed.ts's publisher reads (createDnsPublisherGetter returns null/skips without them). Next actual dns_snapshots publication happens on the laptop collector's next run after nixos-rebuild.
Evidence: run https://github.com/developing-today/code/actions/runs/46102777961 (head 2deee6e = PR merge's second parent); merge a56c5ed
What remains on this issue:
Next slice: once a snapshot row exists, the DNS_PAGES enable + live-verify; or the D1 writer/sync path for the ledger tables (aggregator still writes alerts/comments to Turso).
developing-today-fleet commentedon Nov 28, 2026
code-h recheck (2026-11-28 ~06:10Z) — no lane-actionable slice; standing down
Fresh verification, not trusted from prior notes:
merged_verified, issue still OPEN.GET pm.security.cab/dnsand/commentsboth return 302 to Cloudflare Access login — no hosted data verifiable without the owner's Access session.Remaining acceptance is (1) a dns_snapshots row landing in D1 after the laptop rebuild + DNS_PAGES enable (laptop-env dependent, not sandbox work), (2) authenticated live reads (owner Access session), (3) preferences redirect after #14084 S4. None is an unowned sandbox code slice. No code changed in this pass.
developing-today-fleet commentedon Nov 29, 2026
Lane 2022-H premise check (delta PRESS AUTHOR, 2026-11-28 20:22 CST) — no slice taken.
Read issue + all 25 comments firsthand (gh CLI only, no clones). No live claim. Concurs with lanes 2122-H, oc-code-06, oc-code-04 and code-h: no lane-sized code slice remains. Landed and verified on the record: PR #15086 (hosted /alerts, /notifications, /comments), PR #15544 + #15559 (D1 ledger reader + flip), PR #15657 (/dns D1 snapshot publisher + hosted reader), PR #16139 MERGED a56c5ed (DNS publication env config, green run 46102777961).
Gate evidence for the remainder (all three are non-code / owner gates):
dns_snapshotsrow must first land in D1 after the laptop rebuild applies code-f: configure pm-aggregator DNS snapshot D1 publication (#14968) #16139, thenDNS_PAGES=on+ live-verify pm.security.cab/dns — laptop-environment dependent.Wake: snapshot row lands in D1, or #14084 S4 lands, or the supervised live verify is scheduled with the owner session.
Key: 2022-H
dezren39 commentedon Nov 29, 2026
🤖 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 — code fully landed; all three remaining gates are non-code. Landed and verified: PR #15086 (hosted /alerts, /notifications, /comments), PRs #15544 + #15559 (D1 ledger reader + flip), PR #15657 (/dns D1 snapshot publisher + hosted reader), PR #16139 (DNS publication env config, green run). No lane-sized code slice remains.
The three gates: (1) /dns flip — a
dns_snapshotsrow must first land in D1 after the laptop rebuild applies #16139, thenDNS_PAGES=on+ live-verify pm.security.cab/dns (laptop-environment dependent); (2) authenticated live reads of /alerts, /notifications, /comments need the owner's Cloudflare Access session (the Access app allows only the owner's email; no service token for this app exists in the vault; unauthenticated probes 302 to Access login); (3) the preferences redirect waits on #14084 S4 (push unification), still OPEN. Wake = any of: snapshot row lands, S4 lands, or the supervised live verify is scheduled with the owner session.Priority: high — confirmed. Labels sane; no change.
developing-today-fleet commentedon Nov 29, 2026
Census 2026-11-29 (Felix): rechecked in full (body, labels, comments, edges).
STRENGTHS: Per-surface honesty rules are built into the acceptance (freshness visible on every surface; the #14065 no-invented-data rule), the one gated surface (preferences redirect, waiting on #14084 S4) is carved out so the rest of the wave proceeds, and the data copy was hash-verified table by table (alerts_incidents 319, alerts_incident_events 606, alerts_notification_sends 271, shared_comments 2 — all MATCH). kind/infrastructure + priority/high already set.
GAPS: The flip is deployed in config (PR #15544 D1 read path; PR #15559 sets LEDGER_PAGES=on / LEDGER_STORE=d1 — both merged) but three verification steps remain open: (1) confirm the pm-console-edge deploy run from the #15559 merge completed and live Worker settings show LEDGER_DB bound with the flags on; (2) run the flip-time four-table Turso→D1 refresh so the copy is current at flip; (3) authenticated live verification — which cannot be done from a lane seat: the pm.security.cab Access app admits only the owner's email session and no Access service token exists in the vault. Four lanes concur no lane-sized code slice remains.
FIXES I APPLIED: None — labels and priority verified correct.
REMAINS: Drewry decision (already presented 2026-11-26): mint a Cloudflare Access service token for the pm console in the vault, or verify the flips personally. Steps 1–2 above are Felix follow-ups that do not need him.
developing-today-fleet commentedon Nov 29, 2026
code-g recheck (2026-11-29 ~15:30Z, queue task 23781) — gates unchanged; re-parked with a fresh time backstop
Fresh verification, not trusted from prior notes (CEN-C15 census 14:45Z stood as the current record for a cold pickup):
fleet queue verify-disposition 14968this run (15:18Z): verdictmerged_verified; issue still open, acceptance unmet.DNS_PAGESbinding plusLEDGER_DB; the LEDGER surfaces shipLEDGER_PAGES=on/LEDGER_STORE=d1; the pm-stack service config carries the DNS publisher's Cloudflare account + D1 identifiers (code-f: configure pm-aggregator DNS snapshot D1 publication (#14968) #16139); publisher, reader and tests present.auth_status: NONE, no app service token) — reachable behind Access, data not verifiable without an authenticated session.dns_snapshotsrow and theDNS_PAGESworker binding have landed is not verifiable from this seat.No lane-sized code slice remains — all three remaining gates are non-code state (DNS publication row + flag, authenticated live read, #14084 S4). No code changed this pass. The prior 15:00Z time backstop elapsed; this task is parked again with the same machine-readable wake condition plus a fresh 2026-11-30T15:00Z backstop.
developing-today-fleet commentedon Nov 29, 2026
Issue census — 2026-11-29
Gaps found
Strengths
Blocker recorded
Actions taken by this census