fix: resolve Live catalog projection failure during Analyze again in Laya mode (#17)

Fix the regression introduced by the weighted Laya signal (#16):
rebuild now merges exact fingerprints in every engine mode after
evaluating hard blockers, compares candidates against all variants
of a group, falls back to deterministic scoring when Laya is
unavailable, and reports transaction errors safely. Non-regression
tests cover the Laya-mode rebuild path; verified against a real
catalog copy (39,341 streams rebuilt successfully).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
blomios
2026-10-02 16:57:20 +02:00
parent 325b505df9
commit 6b16d2527d
3 changed files with 56 additions and 11 deletions

View File

@ -90,7 +90,7 @@ function scoreCandidate(left, right, options = {}) {
const laya = exact ? 0 : layaSignal(options.layaHint, leftIdentity, rightIdentity);
const total = algorithm * weights.algorithm + structure * weights.structure +
metadata * weights.metadata + laya * weights.laya;
return { matched: total >= MERGE_THRESHOLD, blocker: null, total, signals: { algorithm, structure, metadata, laya } };
return { matched: exact || total >= MERGE_THRESHOLD, blocker: null, total, signals: { algorithm, structure, metadata, laya } };
}
module.exports = {