GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — CF-5e (#14945): move the push registry tables from fleet-platform Turso to D1 fleet-platform · Issue #15561 · developing-today/code

CF-5e (#14945): move the push registry tables from fleet-platform Turso to D1 fleet-platform #15561

New issue
Copy link
New issue
Copy link
Backlog
Backlog
CF-5e (#14945): move the push registry tables from fleet-platform Turso to D1 fleet-platform#15561
Copy link
Labels
app/pm-stackpm-stack (Pad/Grist) in developing-today/codeepic/turso-cloudflareEpic: epic/turso-cloudflare (fleet reprioritization 2026-11-12)kind/infrastructureInfrastructure / host-portability workmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedprimary-parent/turso-cloudflarePrimary parent epic turso-cloudflare (design §3)priority/highImportant and time-sensitivestray-workStray work: not tied to a design or roadmap item (AUDIT-7 Lane 7)

Description

@developing-today-fleet
developing-today-fleet
bot
opened on Nov 26, 2026
Issue body actions

What this is

A follow-on slice of CF-5 (#14945) under the #14866 Cloudflare-first programme, filed by the programme coordinator on the evidence of the CF-5 ledgers lane.

Owner ruling 2026-11-26 (#14866 comment 7189808145): everything moves to Cloudflare with D1 as the database. The four CF-5 ledger tables have been copied into D1 fleet-platform and hash-verified (record on #14968; read path in PR #15544, merged; flip in PR #15559). The ledgers lane found that the push registry tables (push_endpoints and its sibling registry tables in the fleet-platform Turso store, owned by the #14084 push unification) are still Turso-only and absent from D1 fleet-platform. Under the ruling they need their own D1 move — this issue is that move.

Scope

  1. Enumerate the exact push registry table set in the fleet-platform Turso store (start from push_endpoints; include every table the push registry/sender reads or writes, and record the list on this issue before copying anything).
  2. Create the tables in D1 fleet-platform with matching schema and indexes.
  3. Copy the data and hash-verify it, following the procedure the ledgers lane recorded on CF-5b (#14945): M4 ledger surfaces hosted — /alerts, /notifications, /dns, /comments #14968 (comment 7190724486) — counts plus hashes, evidence recorded on this issue.
  4. Retarget the push registry read/write path (registry readers and the one sender, per PM push unification: one registry, one sender, the Android app as a first-class endpoint #14084) to D1 behind the same store-switch pattern the ledger move used, so the flip is a config change with a recorded rollback.
  5. Record a rollback note on this issue BEFORE the flip. At flip time, re-run the refresh once (any Turso writes since the copy drift D1 until writers retarget), then flip and verify live: a real registration lookup and a test send through the D1-backed registry.
  6. The Turso copy is retired only after the D1 side is verified live. Laptop sync for these tables is turned off only after that verification, per the ruling's order of operations.

Acceptance

  • Table set enumerated and recorded on this issue.
  • D1 fleet-platform holds the tables; copy evidence (counts + hashes) recorded.
  • Push registry reads and the sender run against D1 in production, verified live with a real lookup and a test send.
  • Rollback note recorded before the flip; refresh-at-flip re-run recorded.
  • PM push unification: one registry, one sender, the Android app as a first-class endpoint #14084 cross-linked (its registry is the thing moving); CF-5b (#14945): M4 ledger surfaces hosted — /alerts, /notifications, /dns, /comments #14968's ledger pattern followed, not reinvented.

Coordination

  • Parent: CF-5 CF-5 (#14866): PM hosted read surfaces (M4+M5) #14945; programme: program: move PM Stack, queues, and all unblocked services to Workers + D1 (Cloudflare-first) #14866.
  • Independent of the ledger flip (PR pm console edge: flip ledger pages to D1 (CF-5, #14968) #15559) — the copy phase can start now; only the writer retarget shares the store-switch pattern.
  • agent-note:v1 — state: filed; Found via: CF-5 ledgers lane finding, via programme coordination.
{
  "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-26T11:30:36Z",
    "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": "4291c7d25d6699e6d0378dcce687f1935ec39c09"
    },
    "auth_subject": "felix",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Activity

Next
  1. developing-today-fleet
    added
    priority/highImportant and time-sensitive
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    kind/infrastructureInfrastructure / host-portability work
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    on Nov 26, 2026
  2. developing-today-fleet
    added a parent issue on Nov 26, 2026
    • CF-5 (#14866): PM hosted read surfaces (M4+M5) #14945
  3. dezren39 commented on Nov 26, 2026

    @dezren39
    dezren39
    on Nov 26, 2026
    Member
    More actions

    Triage — CF-5e push registry Turso → D1 (#15561)

    Verdict: validated, real work — not a small fix. This is a production data migration + writer retarget + live flip, well beyond a triage-sized edit. Returning it to the queue for a dedicated implementation lane; step 1 (enumeration) is done below from current main so that lane can start at the copy.

    Claim check (2026-11-26, xaltha lane): no comments on this issue, no open PR references #15561, and no lane claim found. Sibling ledger work: PR #15544 (merged, D1 read path for the hosted ledger surfaces) and PR #15559 (ledger flip config) — neither touches the push registry.

    Step 1 — push registry table set (enumerated from pm-stack/aggregator/src/push-registry.ts on current main)

    The registry is exactly the five tables in PUSH_REGISTRY_TABLES / PUSH_REGISTRY_DDL:

    Table Key Indexes
    push_endpoints id push_endpoints_transport_client (transport, client); UNIQUE on endpoint
    push_preferences endpoint_id —
    push_item_stages item_ref push_item_stages_stage (stage, priority, blocked_by_count)
    push_item_stage_events id push_item_stage_events_item (item_ref, id)
    push_registry_meta key —

    Adjacent, not in the move set: alerts_push_subscriptions (legacy seed source only — read once by ensurePushRegistry behind the push_registry_meta marker; it is not a registry table) and alerts_notification_sends (the sender's send ledger in alerts.ts — a CF-5 ledger table, not registry; the implementation lane should confirm with the CF-5 coordinator whether its aggregator writes stay on Turso).

    Readers/writers to retarget (step 4): push-registry.ts (all registry CRUD + stage pipeline) and alerts.ts (subscription upsert/delete, gone_count updates, the endpoint+preferences lookup at the sender path, and the one sender in push.ts/alerts.ts).

    Key implementation fact the next lane needs

    The ledger move's store-switch pattern does not transfer directly: the ledger D1 read path (PR #15544) lives in the pm-console edge Worker, where D1 is a native binding (LEDGER_DB). The push registry lives in the aggregator, a non-Worker service whose store client is the Turso transport in turso-stores.ts. Retargeting the aggregator therefore needs a D1-over-HTTP-API SqlClient (Cloudflare API) or an equivalent bridge — that client is the first build item, before the copy/flip steps 2–5 can run. The DDL is already SQLite-shaped and literal-free, so the schema copy itself should be mechanical once the client exists.

    Remaining scope (unchanged from the body)

    Steps 2–6: create tables in D1 fleet-platform, copy + hash-verify per the #14968 procedure (comment 7190724486), retarget behind a store switch with the rollback note recorded before the flip, refresh-at-flip, live verification (real registration lookup + test send), and only then retire the Turso copy / turn off laptop sync.

    Refs #14945, #14866, #14084.

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

    @developing-today-fleet
    developing-today-fleetBot
    on Nov 26, 2026 – with developing.today fleet
    ContributorAuthor
    More actions

    agent-note:v1 — graph hygiene audit slice N2 under #14863 (queue-lane-SC, 2026-11-26)

    State correction (comment-only): no status/ and no effort/ label.** A triage verdict was already recorded on this issue (2026-11-26T11:44Z: validated, real work, returned to the queue for a dedicated implementation lane), but the label set (priority/high, meta/enriched, kind/infrastructure, app/pm-stack) has no status label and no effort label, so the issue is invisible to status-driven triage/queue views — the same class as #9378 (slice 10) and #15022 (slice N1). Flagged for the owning lane; the audit made no label change. Refs #14863

  5. developing-today-fleet
    added
    stray-workStray work: not tied to a design or roadmap item (AUDIT-7 Lane 7)
    epic/id-programReprioritization program epic (2026-11-12)
    primary-parent/id-programPrimary parent epic id-program (design §3)
    epic/pm-stackReprioritization program epic (2026-11-12)
    primary-parent/pm-stackPrimary parent epic pm-stack (design §3)
    and removed
    epic/id-programReprioritization program epic (2026-11-12)
    epic/pm-stackReprioritization program epic (2026-11-12)
    primary-parent/id-programPrimary parent epic id-program (design §3)
    on Nov 26, 2026
  6. 3 remaining items

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

    @developing-today-fleet
    developing-today-fleetBot
    on Nov 27, 2026 – with developing.today fleet
    ContributorAuthor
    More actions

    Triage — CF-5e push registry Turso → D1 (2026-11-27)

    Verdict: confirmed real migration work, not a small fix; returned to the queue as feature slice 1 (task 26001). The prior triage comment #7191106693 already completed table enumeration and identified the D1 HTTP SqlClient as a prerequisite. Fresh check against origin/main shows that prerequisite now exists (pm-stack/aggregator/src/d1-stores.ts and tests), but the push-registry path still uses getTursoStoreClient; no D1 wiring exists there. The issue remains OPEN and has no hold labels. No linked open PR or other live #15561 implementation task was found.

    Queued follow-up: task 26001 — “CF-5e #15561 slice 1: wire push registry to D1 behind a Turso rollback switch.” It routes the five enumerated registry tables and sender lookups to the existing D1 client behind explicit opt-in, keeps Turso as the default, and tests fail-closed behavior. It excludes production data copy, live flip, Turso retirement and laptop-sync changes; those require a later task with recorded rollback and live verification.

    This supersedes the earlier stale prerequisite note that a D1 HTTP client must first be built. No production data or backend was changed.

  8. developing-today-fleet
    added a commit that references this issue on Nov 27, 2026

    CF-5e #15561 slice 1: push registry reads/writes switchable to D1 beh…

    1fabce0
  9. developing-today-fleet commented on Nov 27, 2026

    @developing-today-fleet
    developing-today-fleetBot
    on Nov 27, 2026 – with developing.today fleet
    ContributorAuthor
    More actions

    Slice 1 PR open: #16147 — push registry switchable to D1 behind Turso default

    After this PR: PM_PUSH_REGISTRY_BACKEND=d1 routes the five registry tables (push_endpoints, push_preferences, push_item_stages, push_item_stage_events, push_registry_meta) and the stage pipeline to the D1 client; unset keeps Turso for both registry and ledger. Verified: new test fails pre-change / passes post-change, 68 registry+alerts tests green, typecheck clean.

    Rollback note (recorded BEFORE any flip, per the issue): rollback is unsetting PM_PUSH_REGISTRY_BACKEND. The flag is not set in any deployment by this PR, so production is unchanged. No copy/flip has happened — do not set the flag in production until the copy + hash-verify, refresh-at-flip and live verification slices land.

    Next slice (same "after this PR" form): after #16147 merges, create the five tables in D1 fleet-platform and copy + hash-verify per the #14968 procedure, evidence recorded here.

  10. developing-today-fleet
    added a commit that references this issue on Nov 27, 2026

    Merge pull request #16147 from developing-today/oc-code-04/15561-push…

    e19d30b
  11. developing-today-fleet commented on Nov 27, 2026

    @developing-today-fleet
    developing-today-fleetBot
    on Nov 27, 2026 – with developing.today fleet
    ContributorAuthor
    More actions

    Slice 1 landed: #16147 merged — push registry switchable to D1 behind Turso default

    After this PR: PM_PUSH_REGISTRY_BACKEND=d1 routes the five registry tables (push_endpoints, push_preferences, push_item_stages, push_item_stage_events, push_registry_meta) and the stage pipeline to the D1 client; unset keeps Turso. Fail-closed: D1 requested but unavailable rejects instead of silent Turso fallback. Merge e19d30b (2026-11-27).

    Evidence (lane any-o verification on PR head 1fabce0, before merge): new push-registry-d1-15561.test.ts fails on origin/main (0 pass / 2 fail — silent single-connection fallback) and passes with the fix (2 pass); focused set of 6 push/alerts/registry files green (76 pass / 0 fail); bunx tsc --noEmit clean. Production unchanged: the flag is set nowhere, so no copy/flip has happened.

    Rollback note (before any flip, per the issue): rollback is unsetting PM_PUSH_REGISTRY_BACKEND. Do not set it in production until the copy + hash-verify, refresh-at-flip and live verification slices land.

    Next slice (same "after this PR" form): after this merge, create the five tables in D1 fleet-platform and copy + hash-verify per the #14968 procedure, with counts + hashes recorded on this issue.

  12. developing-today-fleet
    added a commit that references this issue on Nov 28, 2026

    CF-5e #15561 slice 2: push registry Turso -> D1 copy + hash-verify to…

    51fd6a8
  13. developing-today-fleet commented on Nov 28, 2026

    @developing-today-fleet
    developing-today-fleetBot
    on Nov 28, 2026 – with developing.today fleet
    ContributorAuthor
    More actions

    Slice 2 PR open: #16444 — push registry copy + hash-verify tooling

    After this PR: the five registry tables (push_endpoints, push_preferences, push_item_stages, push_item_stage_events, push_registry_meta) have scripted copy + verify: copyPushRegistry (DDL-apply + delete+insert refresh), hashPushRegistry (canonical SHA-256), verifyPushRegistryCopy (fail-closed compare), and the scripts/copy-push-registry-to-d1.ts operator command (--copy / --verify-only) for the refresh-at-flip.

    Live evidence (2026-11-28): D1 fleet-platform holds all five tables with byte-identical table DDL; --verify-only Turso → D1 reports MATCH on all five (four tables 0 rows, push_registry_meta 1 row with the identical seed-marker row); --copy re-ran clean with VERIFY MATCH.

    Rollback note (unchanged, before any flip): rollback is unsetting PM_PUSH_REGISTRY_BACKEND; the flag is set nowhere, so production is unchanged. Do not flip until the refresh-at-flip re-run + live verification slices land.

    Next slice (same 'after this PR' form): after this merges, flip PM_PUSH_REGISTRY_BACKEND=d1 in production with a refresh-at-flip re-run, then verify live with a real registration lookup and a test send; retire the Turso copy and turn off laptop sync only after that verification.

  14. developing-today-fleet
    added a commit that references this issue on Nov 28, 2026

    Merge pull request #16444 from developing-today/oc-code-01/15561-push…

    1f8c118
  15. developing-today-fleet commented on Nov 28, 2026

    @developing-today-fleet
    developing-today-fleetBot
    on Nov 28, 2026 – with developing.today fleet
    ContributorAuthor
    More actions

    Slice 2 landed: PR #16444 merged — push registry copy + hash-verify tooling

    Merge commit 1f8c11849493072607c81439bd42573fa4f69889 (2026-11-28T06:19:45Z), head 51fd6a82c9e7c5cd0efd4f799edb0447356ef9cc.

    After this merge: the five registry tables have scripted copy + verify on main: copyPushRegistry (DDL-apply + delete+insert refresh), hashPushRegistry (canonical SHA-256), verifyPushRegistryCopy (fail-closed compare), and the scripts/copy-push-registry-to-d1.ts operator command (--copy / --verify-only) for the refresh-at-flip. Verification (lane 2352-E): fleet-command run 46114510525 on the exact head — bun test on the two 15561 test files, 7 pass / 0 fail, Target HEAD exact; PR CLEAN/MERGEABLE pre-merge. The author's live D1 evidence stands as recorded on the PR (all five tables MATCH Turso → D1; --copy re-ran clean).

    Rollback note (unchanged): rollback is unsetting PM_PUSH_REGISTRY_BACKEND; the flag is set nowhere, so production is unchanged.

    Next slice (unchanged from the slice-2 note): flip PM_PUSH_REGISTRY_BACKEND=d1 in production with a refresh-at-flip re-run, then verify live with a real registration lookup and a test send; retire the Turso copy and turn off laptop sync only after that verification.

  16. dezren39
    added 6 commits that reference this issue on Nov 28, 2026

    fix(pm-stack): reconcile sends-ledger neighbours with #14084 S2 + #15561

    966d1ff

    fix(pm-stack): reconcile sends-ledger neighbours with #14084 S2 + #15561

    2302034

    fix(pm-stack): reconcile sends-ledger neighbours with #14084 S2 + #15561

    6e101d6

    fix(pm-stack): reconcile sends-ledger neighbours with #14084 S2 + #15561

    5e92880

    fix(pm-stack): reconcile sends-ledger neighbours with #14084 S2 + #15561

    7569f83

    fix(pm-stack): reconcile sends-ledger neighbours with #14084 S2 + #15561

    a0e24c7
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-stackpm-stack (Pad/Grist) in developing-today/codeepic/turso-cloudflareEpic: epic/turso-cloudflare (fleet reprioritization 2026-11-12)kind/infrastructureInfrastructure / host-portability workmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedprimary-parent/turso-cloudflarePrimary parent epic turso-cloudflare (design §3)priority/highImportant and time-sensitivestray-workStray work: not tied to a design or roadmap item (AUDIT-7 Lane 7)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.