TODO: Clean up test seed Block objects with null anchor_ids
TODO: Clean up test seed Block objects with null anchor_ids
Problem
Test seed helpers in
tests/test_blocks_api.py and tests/test_compiled_page_api.py still create Block objects with anchor_id=None. This contradicts the invariant established by PR #120 (all blocks must have anchor_ids). Works because SQLite treats NULLs as distinct for unique constraints, but is inconsistent.Fix
Update all test seed helpers to provide
anchor_id="{block_type}-{position}" for non-heading blocks, matching the parser and API behavior.Scope
Test files only — no production code changes.
Related
todo-block-anchor-ids— parent TODOphase-postgres-epilogue-cleanup— Epilogue item 9a