#3290

Cross-seed: compare version labels when one name has Cut and the other has Edition

Opengithub-actions[bot]opened 12d ago

This was generated by AI during triage.

Agent Brief

Category: bug Summary: Cross-seed accepts a different movie cut as a match when one name has its version label in Edition and the other has it in Cut.

Current behavior: matcher.validateMetadataFlags compares Cut with Cut and Edition with Edition. Each check runs only when both releases have a value in that field. A pair like Sample.Movie.2019.Special.Edition.2160p.UHD.BluRay.x265-GRP and Sample.Movie.2019.Theatrical.Cut.2160p.UHD.BluRay.x265-GRP parses to Edition on one side and Cut on the other. Neither check runs, so the candidate passes the release checks and the search shows it as a pre-selected match, even when the total size differs.

Desired behavior: When both releases carry a version label (Cut or Edition) but share no field, compare the labels. Reject a pair whose labels name different versions (Special.Edition vs Theatrical.Cut) with a reason that the exact-size fallback can still relax. Keep these cases as they are:

  • A label on one side only is unknown, not a mismatch.
  • The same version spelled with a different suffix (Extended.Cut vs Extended.Edition) still matches.
  • An exact total size still lets the pair through the existing relaxed-difference path.

Key interfaces:

  • matcher.validateMetadataFlags(): today it returns true for a pair with Cut on one side and Edition on the other. It must return a mismatch reason when the two labels name different versions.
  • exactSizeRelaxedDifferenceForReason() / withRelaxedDifferenceNeutralized(): the new reason must map to a difference that these neutralize, so an exact-size pair still matches.

Acceptance criteria:

  • A Special Edition source and a Theatrical Cut candidate of the same title, group, and specs are rejected when sizes differ.
  • An Extended Cut source and an Extended Edition candidate still match.
  • A source with a version label and a candidate with none still match.
  • An exact-size pair with cross-field labels still matches through the relaxed path.
  • New rows in the match corpus cover each case above. No existing corpus row changes its verdict, or the PR body names each verdict that changes and why.

Out of scope:

  • Parser changes in pkg/releases or rls that move labels between Cut and Edition.
  • Audio, language, or other metadata checks.

Domain:

  • Glossary terms: none. Gap: GLOSSARY.md has no term for a version label that spans Cut and Edition.
  • ADRs: ADR 0008 (matching rules read releases and file lists only); the fix stays inside the matcher.
  • Owner: matcher in the cross-seed service.

Logs:

  • None

Why a human: Design: how should Cut and Edition labels compare when they sit in different fields? Which suffixes (cut, edition, version) count as noise, and is it acceptable to reject a pair where two different label words name the same cut (for example, a film whose Special Edition is its extended cut), or should a size check decide those pairs?

From discussion #3289

Activity

0

No activity yet.