Files
buzz/desktop/src-tauri
DuncanandWill Pfleger 0da7b4e424 fix(archive): validate scope-age index collation and direction in M4
pragma_index_info reports key column names but not per-key collation or
sort direction, so a named non-partial index with the exact ordered
columns but COLLATE NOCASE on a key was certified by M4's shape check
even though the binary-equality prune-age query cannot use it (the plan
falls back to the PK autoindex plus a temp B-tree sort). Switch key-shape
validation to pragma_index_xinfo as the single source of key semantics,
asserting name + BINARY collation + ascending direction; index_list stays
only for ownership and partiality. A wrong-collation index is dropped and
rebuilt inside M4's BEGIN IMMEDIATE like any other wrong shape.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
2026-08-14 10:38:07 -04:00
..