From 98b56330d0133dc48076d989112cb5ce681a6fd5 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Sun, 30 Aug 2026 14:35:02 -0400 Subject: [PATCH] ci: emit the chain schema dump for local reconciliation work (#3275) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reconciling the models against the deployed schema needs the actual pg_dump, not an inference from the unified diff. Parsing table context out of diff hunks drops every table whose CREATE TABLE line falls outside a hunk — it under-reported 81 columns across 13 tables when the real figure spans more, missing artist, gpu_job, download_event and external_link entirely. Same checksummed-base64 transport as the candidate baseline, for the same reason: a plain cat of a file this size was silently truncated mid-line by the runner on run 4964. --- .forgejo/workflows/baseline.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.forgejo/workflows/baseline.yml b/.forgejo/workflows/baseline.yml index d7b4b66..e7df685 100644 --- a/.forgejo/workflows/baseline.yml +++ b/.forgejo/workflows/baseline.yml @@ -107,6 +107,23 @@ jobs: docker exec "$PG_CONTAINER" pg_dump -U fabledcurator --schema-only \ --no-owner --no-privileges -d fc_chain > chain.sql wc -l chain.sql + # Emit the dump itself, checksummed, for local analysis. Reconciling + # the models against the deployed schema (#3275) needs the ACTUAL + # schema, not an inference from a diff — parsing table context out of + # unified-diff hunks drops every table whose CREATE TABLE line falls + # outside a hunk, which silently under-reports. + # + # base64 + sha256 for the same reason as the candidate: a plain cat + # of a file this size was truncated mid-line by the runner with the + # step still green (run 4964). + set +x + B64=$(base64 -w 120 chain.sql) + echo "===== BEGIN CHAIN SCHEMA (base64) =====" + echo "$B64" + echo "===== END CHAIN SCHEMA =====" + echo "chain-sha256: $(sha256sum chain.sql | cut -d' ' -f1)" + echo "chain-bytes: $(wc -c < chain.sql)" + set -x # A candidate baseline, autogenerated from the models against an EMPTY # database so every table shows up as a create. Printed for a human to