From 350afa5827c50e7f9a30f6a2ab69a675c5f70fab Mon Sep 17 00:00:00 2001 From: Drewry Pope Date: Sun, 22 Nov 2026 23:57:38 -0600 Subject: [PATCH] cold-store: log dump size and checksum for reconstruction diagnostics --- pkgs/cold-store-reaper/scripts/export-turso.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/cold-store-reaper/scripts/export-turso.sh b/pkgs/cold-store-reaper/scripts/export-turso.sh index bdc4d55eeb..88b399c765 100755 --- a/pkgs/cold-store-reaper/scripts/export-turso.sh +++ b/pkgs/cold-store-reaper/scripts/export-turso.sh @@ -318,6 +318,14 @@ PY fi unset jwt + # Non-sensitive provenance for failed reconstructions. The dump itself + # remains in the private scratch directory and is never printed. + local dump_bytes dump_sha256 + dump_bytes="$(stat -c %s "${dump_sql}")" || return 1 + dump_sha256="$(sha256sum "${dump_sql}")" || return 1 + dump_sha256="${dump_sha256%% *}" + echo "turso export: ${name}: downloaded dump bytes=${dump_bytes} sha256=${dump_sha256}" + # Repair pass (#1391): libsql registers virtual tables with an # INSERT INTO sqlite_schema whose embedded SQL is emitted verbatim # — single quotes inside it (an FTS5 content='...' table is the