summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-10-24 09:17:21 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-10-24 09:17:21 +0000
commit868d182ebe0979f0293b8e3b8bf068354b3eb698 (patch)
tree45017ed92812f07cee3ddd6146b79ca5e9febe70 /tools
parent34e50c04b18313d92e3b3a565965675fd8b50b8a (diff)
Store signatures, and age the ones that stop mattering
The spike proved landmark hashing separates a real repeat from a coincidence; this is the library it unlocks. Rebuilt test-first rather than lifted from the throwaway harness, against a fixture whose partials shift several times a second -- a steady tone has only a handful of peaks repeated endlessly and collides with itself far more than any recording does, so it would have flattered the design. Two kinds, which behave nothing alike. A cue is a show's own furniture, belongs to one feed, and never expires: a break stinger is not a campaign, and a show that goes quiet for a year comes back using the same one. It goes when the subscription does. A copy is one advertisement, belongs to nobody, and is forgotten six months after it was last heard. Confidence is a count of separate occasions, and a whole batch of episodes mirrored in one minute is one occasion however many of them carried the audio. That is the same independence problem that made eight agreeing episodes prove nothing about an intro -- they all ran whatever campaign was running that minute. Nothing is matched against until it has been seen twice. Signatures merge by matching rather than by identity, because the same advertisement re-encoded by another CDN is not byte-identical and would otherwise pile up as a new signature every week. Stored as packed base64 rather than JSON arrays: three thousand hashes per signature is 30KB as numbers and a quarter of that packed, and this file gets parsed on every start. The index is deliberately not stored, and is rebuilt on load -- skip that and every signature silently stops matching after a restart. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018AwnALZL6bD4VBtATDVv3B
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions