Files
buzz/schema
Meli 6154cc33d1 fix(db): exclude kind:30179 ciphertext from brownfield FTS
Kind 30179 (NIP-PMA private managed agent) joined AUTHOR_ONLY_KINDS in
#4593, but only fresh installs stopped indexing it: migration 0008's
positive allowlist never touches populated databases, and 0014 wrapped
the retained brownfield expression for 30350 alone. A relay upgraded in
place still tokenizes the NIP-44 ciphertext into events.search_tsv.

Add migration 0033 in the 0014 shape: capture the current generated
expression and re-add search_tsv wrapped with kind = 30179 -> NULL, so
every other kind keeps whatever policy the database already had. Mirror
the exclusion in schema/schema.sql.

Tests: extend the populated-upgrade migration test with a 30179 row and
a pre-0033 checkpoint (fails without the new file); assert 0033's shape
in the embedded-migrator test; apply 0033 in the buzz-search FTS setup.

Co-authored-by: Meli <5aaa86bce934fc3445fc254aab560a40923f10252f92107e665073dede0e04d3@buzz.block.builderlab.xyz>
Signed-off-by: Meli <5aaa86bce934fc3445fc254aab560a40923f10252f92107e665073dede0e04d3@buzz.block.builderlab.xyz>
2026-08-25 16:13:07 -04:00
..