Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit 796b4c59cb30b8f8b826a48cd876e95d9b65bb31
parent 416a90a723c02e9a72b84486d1e1e912998c7597
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Sun, 18 Oct 2026 23:42:02 -0400

common: a covered twin hit's alternate goes to the twin hit that says it best (release 35 O1, slice 1)

Whether another channel's hit is covered by a preferred-channel twin is
release 34's rule (any twin hit >= SAME_HIT_MIN_SCORE); the alternate it
becomes is now attached to the best-scoring of those hits rather than the
first, since the phrase's own words alone clear the bar for every twin of the
day (two Rumble streams a day apart, one YouTube upload). Instances, hits and
dropped are unchanged (the r34 snapshot test still holds).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Diffstat:
Mcommon/lib/montage/phraseScan.mjs | 13+++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/common/lib/montage/phraseScan.mjs b/common/lib/montage/phraseScan.mjs @@ -289,10 +289,19 @@ async function foldHits({ hits, prefer, preferred, recordOf, ex, availability }) } const ctx = words(h.context); // Its twin already has the hit: nothing to add. + // Covered when any twin's hit says it (as release 34 decided); the + // alternate goes to the twin hit that says it BEST, since the phrase's + // own words alone clear the bar for every twin of the day. let covered = null; + let coveredScore = -1; for (const id of twins) { - covered = (preferredHits.get(id) ?? []).find((p) => locateInCues([{ text: p.context }], ctx).score >= SAME_HIT_MIN_SCORE) ?? null; - if (covered) break; + for (const p of preferredHits.get(id) ?? []) { + const score = locateInCues([{ text: p.context }], ctx).score; + if (score >= SAME_HIT_MIN_SCORE && score > coveredScore) { + covered = p; + coveredScore = score; + } + } } if (covered) { altsOf.get(placedOf.get(covered))?.push(alternateOf(h));