Two complementary live tests (both skipped without TEST_DATABASE_URL):
- TestResolveOrgSheets_LiveSchemaSnapshot — runs the schema probe + SQL
composer the way the backup runner does at the start of every run,
then executes each resolved SELECT against the live DB (wrapped in
LIMIT 1 to keep table reads cheap). A future column rename in a
table our spec still names triggers this test and surfaces in CI
before /admin/backups breaks.
- TestWriteOrg_LiveSmoke — end-to-end pipeline against a real DB:
schema probe, REPEATABLE READ tx, every sheet query, xlsx + JSON +
per-sheet CSV assembly, outer zip framing. Spot-checks meta.RowCounts
and the zip magic bytes; doesn't materialise the full bundle to
disk.
Both tests exercise the exact failure mode m/paliad#140 reproduced
(hardcoded ORDER BY against a renamed column) so CI catches regressions
once TEST_DATABASE_URL is wired.
m/paliad#140