Repository navigation
voice-line: point the ledger at D1 via d1-gateway (#16852) — DO NOT MERGE until the gateway token arrangement lands - #16878
Open
developing-today-fleet[bot] wants to merge 3 commits into
Open
developing-today-fleet[bot] wants to merge 3 commits into
developing-today-fleet[bot] wants to merge 3 commits into
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
This was referenced Nov 29, 2026
program: move PM Stack, queues, and all unblocked services to Workers + D1 (Cloudflare-first)
#14866
Open
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What this is
The #16852 voice-line-ledger flip, prepared under the #14866 Cloudflare migration programme (Drew's proceed order, 2026-11-29). The change is exactly one line in each of three files: the ledger client's
TURSO_URLmoves from the Turso database to the d1-gateway route for the D1 namesake —pm-stack/voice-line-worker/wrangler.toml(the[vars]value)pm-stack/voice-line-worker/cloudflare.config.ts(the text binding)pm-stack/voice-line-worker/ci/deployment-config.check.mjs(the deployment contract assertion)https://voice-line-ledger-dezren39.aws-us-east-1.turso.io→https://d1-gateway.developing-today.workers.dev/db/voice-line-ledgerNo ledger code changes: the d1-gateway serves the Turso pipeline protocol over D1 (the #15611 pattern).
State of the migration (evidence on #16852)
ensureSchemadefinitions (kickoff, 2026-11-29).delta_to_d1.pyfrom the laptop seat):sessions3 rows,status_snapshots1 row; D1 read-back via thecfCLI matches the Turso source counts exactly.voice-line-ledger; an unknown token is refused (Unauthorized), as expected pre-arrangement.DO NOT MERGE / DEPLOY until the token arrangement lands
The gateway accepts a client token only when its SHA-256 is listed for the database in
pkgs/d1-gateway/worker/wrangler.jsonc(TOKEN_SHA256), and thevoice-line-ledgerlist is currently empty. The voice-line Worker's currentTURSO_TOKENis not retrievable from any seat (Worker/GitHub-environment secret, write-only), so its hash cannot be computed from here. Deploying this URL change before the arrangement would break ledger writes.Completion sequence, in order:
TURSO_TOKENsecret, escrowed in the fleet secrets broker by name (turso.voice-line-ledger-token), and add its SHA-256 toTOKEN_SHA256["voice-line-ledger"]in the gateway config; the gateway deploy workflow ships that on merge.delta_to_d1.py(the Worker keeps writing to Turso until the promote).prevent_self_review), so the deploy steps are Drew-approved in GitHub.cf d1 query; then retire the Turso database and record final counts on small live Turso stores to D1: voice-line-ledger and notes-submissions (#14866) #16852.Rollback at any point before step 3: the Turso database is untouched by every step above; after a promote, rollback is promoting the previous version.
Refs #16852, #14866. Prepared by Archer, 2026-11-29.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.