Phase 7c-1: Fix backfill QA nits
Goal: Address QA nits from PR #101 before running the backfill against production.
Owner: Dev agent
Repo: pal-e-docs
Parent: Phase 7c (Backfill Migration)
Nit Fixes
1. Empty content hash sentinel
When
compiled_html is empty, _content_hash returns "" instead of None (column is nullable). Use None for empty content — it's the honest answer: "no content, no hash."2. sys.exit(1) in run_backfill
Replace
sys.exit(1) with raise RuntimeError("DATABASE_URL not set"). Let __main__ handle the exit. Makes the function importable and testable.Not Fixing
Nit 3 (client fixture pattern) — inherited codebase convention. Not attributable to this PR. Would be a broader test infrastructure refactor.
Related
phase-postgres-7c-backfill-migration— parent phase