Repository navigation
Commit 6154cc3
Meli
fix(db): exclude kind:30179 ciphertext from brownfield FTS
Kind 30179 (NIP-PMA private managed agent) joined AUTHOR_ONLY_KINDS in
block#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>1 parent f249710 commit 6154cc3
4 files changed
Lines changed: 78 additions & 9 deletions
File tree
- crates
- buzz-db/src
- buzz-search/tests
- migrations
- schema
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
645 | 645 | | |
646 | 646 | | |
647 | 647 | | |
648 | | - | |
| 648 | + | |
649 | 649 | | |
650 | 650 | | |
651 | 651 | | |
| |||
844 | 844 | | |
845 | 845 | | |
846 | 846 | | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
847 | 857 | | |
848 | 858 | | |
849 | 859 | | |
| |||
1915 | 1925 | | |
1916 | 1926 | | |
1917 | 1927 | | |
1918 | | - | |
| 1928 | + | |
1919 | 1929 | | |
1920 | 1930 | | |
1921 | 1931 | | |
| |||
1931 | 1941 | | |
1932 | 1942 | | |
1933 | 1943 | | |
1934 | | - | |
| 1944 | + | |
1935 | 1945 | | |
1936 | 1946 | | |
1937 | 1947 | | |
| |||
1958 | 1968 | | |
1959 | 1969 | | |
1960 | 1970 | | |
1961 | | - | |
| 1971 | + | |
| 1972 | + | |
| 1973 | + | |
| 1974 | + | |
| 1975 | + | |
| 1976 | + | |
| 1977 | + | |
| 1978 | + | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
1962 | 1990 | | |
1963 | 1991 | | |
1964 | 1992 | | |
1965 | | - | |
| 1993 | + | |
1966 | 1994 | | |
1967 | 1995 | | |
1968 | 1996 | | |
1969 | 1997 | | |
1970 | 1998 | | |
1971 | 1999 | | |
1972 | | - | |
1973 | | - | |
| 2000 | + | |
| 2001 | + | |
1974 | 2002 | | |
1975 | 2003 | | |
1976 | 2004 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
81 | 83 | | |
82 | 84 | | |
83 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
84 | 89 | | |
85 | 90 | | |
86 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
| 222 | + | |
223 | 223 | | |
224 | | - | |
| 224 | + | |
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| |||
0 commit comments