Files
david f63792417a
build / image (push) Successful in 57s
build / test (push) Successful in 5m58s
fix: dedupe compares bytes to characters, so every Unicode body appended a duplicate
RecordObservation decided "unchanged" by comparing len(o.Content) — bytes in
Go — against SQLite's LENGTH(content), which counts characters for TEXT. Any
body with an em dash or a curly quote therefore looked changed on every sweep
and appended a second observation with an identical content hash.

The log shows it: obsidian holds 8520 rows for 1180 distinct versions, gitea
358 for 104, karakeep 329 for 195. That is most of the duplication #43 is
about, and it grows every tick.

CAST the column to BLOB so SQLite counts bytes too. Regression tests cover both
halves: identical multibyte content must dedupe, and a changed body must still
append a version.
2026-11-08 14:53:24 -08:00
..