Files
buzz/crates
Will Pfleger 7edc3cf7f6 test(search): add behavioral coverage for 0012 legacy-blocklist rewrite
The brownfield migration path — where 0012 DROP + re-ADDs search_tsv
on populated production databases still on the pre-#1771 negative
blocklist — was exercised by zero tests. The fresh-install (allowlist)
path always no-oped via setup(), and migration.rs only string-matched
the SQL text.

Add two integration tests:

- migration_0012_rewrites_legacy_blocklist_to_exclude_drafts:
  constructs the legacy state (0001–0007 → seed row → 0008 skips →
  0009–0011), seeds kind:9 control + kind:31234 draft, applies 0012,
  and asserts the rewrite took effect: expression contains 31234, GIN
  index rebuilt, control row searchable, draft row's search_tsv NULL,
  discriminator correctly classifies the post-rewrite expression as
  blocklist-shaped.

- migration_0012_noops_on_fresh_install_allowlist: verifies the
  fresh-install expression has the ELSE NULL shape that 0012's
  discriminator detects.

Also applies migrations 0009–0011 in setup() so the test chain
matches production exactly (previously omitted).
2026-07-14 09:12:34 -04:00
..