From aecc4602342fc2ce1738fc47de7db9ec30ee79c9 Mon Sep 17 00:00:00 2001 From: JSONbored <49853598+JSONbored@users.noreply.github.com> Date: Mon, 27 Jul 2026 14:54:03 -0700 Subject: [PATCH] chore(infra): cut the Cloudflare Worker's D1 binding over to a fresh loopover database The previous database (b2c79dd6-7771-4b1f-aa6b-085d5f3e9528, internally still named "gittensory" from before the 2026-07-14 rename) had grown to 8.96 GB of its 10 GB cap. D1 never runs VACUUM (cloudflare/workerd#1618), so the batch of now-pruned contributor-decision-pack rows (#9459 -- 18,336 rows / ~6.3 GB deleted) freed pages that get reused, not returned: the file was never going to shrink back down on its own. Cuts DB over to a freshly created, correctly-named "loopover" database (da7537cc-ab54-4dc1-8c38-2713f03f1130), populated from a verified export of the pruned source database: - Every table's row count matches the source exactly, except ordinary live-write drift on actively-written tables (webhook/audit/usage logs, which never stop changing between an export and a later comparison) -- confirmed via a full 103-table sweep. - d1_migrations matches exactly (202/202 rows, same max id). - signal_snapshots' contributor-decision-pack (the table #9459 fixed) is 213/213, exactly one row per contributor, confirming the dedup carried over correctly. - 206 rows whose payload_json exceeded D1's ~100KB single-statement text limit (SQLITE_TOOBIG) were re-imported via a chunked INSERT + payload_json ||= UPDATE sequence, verified byte-identical against the source before import. No other file in the repo references the old database_id. cf-typegen is unaffected (binding name/shape unchanged, only the id). Refs #9435 --- wrangler.jsonc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/wrangler.jsonc b/wrangler.jsonc index b0c67be631..f71d473f19 100644 --- a/wrangler.jsonc +++ b/wrangler.jsonc @@ -290,9 +290,18 @@ ], "d1_databases": [ { + // #9435/#9459 cutover (2026-07-27): the previous database_id (b2c79dd6-7771-4b1f-aa6b-085d5f3e9528, + // internally named "gittensory" pre-rename) had grown to 8.96 GB of its 10 GB cap -- D1 never runs + // VACUUM (cloudflare/workerd#1618), so a large batch of now-pruned rows (contributor-decision-pack, + // #9459) left the file bloated with reusable-but-never-reclaimed free pages that would only grow back. + // This id (da7537cc-ab54-4dc1-8c38-2713f03f1130) is a fresh database, correctly named "loopover" + // throughout (matching the 2026-07-14 repo/app rename), populated from a verified export of the old + // database taken AFTER the decision-pack prune: every table's row count matched exactly except for + // ordinary live-write drift on actively-written tables (webhook/audit/usage logs), confirmed against + // d1_migrations (202/202) and the retention-pruned signal type (213/213 rows). "binding": "DB", "database_name": "loopover", - "database_id": "b2c79dd6-7771-4b1f-aa6b-085d5f3e9528", + "database_id": "da7537cc-ab54-4dc1-8c38-2713f03f1130", "migrations_dir": "migrations", }, ],