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-5b (#14968): hosted ledger surfaces read D1 fleet-platform by developing-today-fleet[bot] · Pull Request #15544 · developing-today/code

Conversation

@developing-today-fleet

@developing-today-fleet developing-today-fleet Bot commented Nov 26, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

What

Retargets the hosted M4 ledger surfaces (/alerts, /notifications, /comments + /api twins) from the fleet-platform Turso to the D1 database named fleet-platform, per the owner ruling of 2026-11-26 on #14866 (D1 is the ledgers' home now; design §2's Turso placement is superseded).

  • ledger-pages.ts: createD1LedgerQuery beside the Turso pipeline client, satisfying the same LedgerPagesIo["query"] contract with the same decoding rules — JSON text columns (detail/author/linked_identity) parsed, numbers finite and safe-integer-checked, any other cell shape fails the read (503, never a dressed-up page). Header comment records the ruling.
  • edge-shared.ts / edge.ts: the ledgerPages option becomes a store union (turso | d1); the call site picks the query factory by store.
  • worker.ts: LEDGER_STORE selects the store when LEDGER_PAGES=on — d1 reads the LEDGER_DB binding, anything else the Turso URL/token path, which stays as the rollback (the same var flipped back).
  • wrangler.jsonc + cloudflare.config.ts: LEDGER_DB binding to the existing fleet-platform D1 database (57d15925-b0b8-4466-a92c-c200a6af4c45), kept in sync as the parity check requires.
  • Tests: D1 decoding (JSON columns, passthrough), handler parity from D1-shaped rows, missing binding / blob cell / unsafe integer / malformed result all fail the read.

Data

The D1 fleet-platform database already held the full fleet-platform schema (byte-identical CREATE TABLEs) with a stale snapshot. The four ledger tables were refreshed from live Turso on 2026-11-26 and verified by canonical hash over the full row sets — incidents 319, events 606, sends 271, comments 2, all MATCH (record on #14968).

Flip (staged, after this merges)

  1. Merge → pm-console-edge-deploy auto-deploys (adds the LEDGER_DB binding).
  2. Add plain_text vars LEDGER_PAGES=on and LEDGER_STORE=d1 to the pm-console-edge Worker settings.
  3. Authenticated reads at pm.security.cab (/api/alerts.json, /api/notifications.json, /api/comments.json) return 200 with D1-matching freshness. The Access app for pm.security.cab allows only the owner's email session — no service token exists in the vault — so step 3 needs the owner session or a service-token policy added to that app (the atlas-search/mcpx-link pattern).

Refs #14968, #14945, #14866. Left unmerged for Felix.

{
  "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-26T10:59:28Z",
    "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)"
  }
}

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Felix
CF-5b (#14968): read the hosted ledger surfaces from D1 fleet-platform
b3d0c91
Owner ruling 2026-11-26 on #14866 supersedes design §2 for the
ledgers: D1 is their home now. Adds createD1LedgerQuery beside the
Turso pipeline client in ledger-pages.ts (same decoding rules: JSON
text columns parsed, finite/safe numbers only, anything else fails
the read), a store union on the ledgerPages edge option, LEDGER_STORE
selection in worker.ts (d1 = the LEDGER_DB binding; anything else =
the Turso path, which stays as the rollback), and the LEDGER_DB
binding to the existing fleet-platform D1 database in both
wrangler.jsonc and cloudflare.config.ts (parity-checked pair).
Tests pin the D1 decoding and handler parity.

Refs #14968, #14945, #14866
@coderabbitai

coderabbitai Bot commented Nov 26, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 51131146-0e2a-429e-8fb5-cfc5398508f1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@developing-today-fleet developing-today-fleet Bot mentioned this pull request Nov 26, 2026
CF-5c (#14945): pm-service serving substrate — async tenant store + Worker entry #14969
Open
@dezren39

dezren39 commented Nov 26, 2026

Copy link
Copy Markdown
Member

Shepherd lane BX (direct no-queue loop, 2026-11-26 ~05:10–05:16 CST): premise + review done, verification dispatched but stuck queued — standing down WITHOUT merging; next loop should pick this up from the run below.

  • Premise: PR OPEN, base main (not stacked), single commit, no labels, no reviews, only comment is CodeRabbit skip. Linked CF-5b (#14945): M4 ledger surfaces hosted — /alerts, /notifications, /dns, /comments #14968 has no agent-note claiming a live author lane for this PR and no queued author dispatch for it (the queued felix-cf4-flip-verify run 45806464283 is CF-4, a different item). No held/user label, no Drew gate found. PR body says "Left unmerged for Felix" — no conflicting claim located.
  • Head: b3d0c913ecd94c80232d28cac89f71a736b8a850, mergeable CLEAN at check time.
  • Diff review (7 files, +168/-18): scope matches the PR body / CF-5b exactly — createD1LedgerQuery in ledger-pages.ts with fail-closed decoding (missing binding, malformed result, blob cell, unsafe integer all throw → 503), ledgerPages store union in edge-shared.ts/edge.ts, LEDGER_STORE selection in worker.ts (Turso path retained as rollback), LEDGER_DB D1 binding (fleet-platform, 57d15925-b0b8-4466-a92c-c200a6af4c45) added in both wrangler.jsonc and cloudflare.config.ts, plus D1 tests in ledger-pages.test.ts. No secrets in the diff (the D1 database_id is a public identifier; the Turso token path is unchanged). No obvious defects found.
  • Verification: no existing run covers this head (PR checks are only CodeRabbit SKIPPED and codesmith Proof SKIPPED). Dispatched fleet-command in developing-today/fleet: run 45808177004 — https://github.com/developing-today/fleet/actions/runs/45808177004 — command bun test pm-stack/console/test/ledger-pages.test.ts at ref b3d0c91, dispatch_id lane-bx-15544-verify. It stayed queued across three checks over ~3 minutes (fleet-command placement is stalling this hour; many sibling runs likewise queued). A queued run is not verification, so this PR was NOT merged.
  • Next loop: check run 45808177004; if it completes success AND its log shows the ledger-pages test output for this head, merge with a merge commit under the standing merge authority. Do not re-dispatch a duplicate while 45808177004 is queued/running.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Nov 26, 2026
CF-5b (#14945): M4 ledger surfaces hosted — /alerts, /notifications, /dns, /comments #14968
Open
CF-5 (#14866): PM hosted read surfaces (M4+M5) #14945
Open
@developing-today-fleet

developing-today-fleet Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Verification (remote, fleet-command on developing-today/fleet), for the merge review:

  • Run 45805945543 — bun test test/ledger-pages.test.ts test/edge.test.ts: 217 pass / 0 fail; the six new D1 tests pass by name (JSON-column decoding, handler parity from D1-shaped rows, missing binding, blob cell, unsafe integer, malformed result).
  • Run 45805997120 — npm ci && node build.mjs && wrangler deploy --dry-run: success; dry-run bindings include env.LEDGER_DB (fleet-platform) D1 Database.
    Data-copy evidence and the staged flip steps are recorded on CF-5b (#14945): M4 ledger surfaces hosted — /alerts, /notifications, /dns, /comments #14968 (comment 7190724486).
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@developing-today-fleet
developing-today-fleet Bot merged commit 5e40ce9 into main Nov 26, 2026
2 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@developing-today-fleet
developing-today-fleet Bot deleted the felix/14945-cf5-d1-ledgers branch November 26, 2026 11:26
This was referenced Nov 26, 2026
pm console edge: flip ledger pages to D1 (CF-5, #14968) #15559
Merged
CF-5e (#14945): move the push registry tables from fleet-platform Turso to D1 fleet-platform #15561
Open
program: move PM Stack, queues, and all unblocked services to Workers + D1 (Cloudflare-first) #14866
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.