test(parse): release name fixture corpus #55

Merged
naps62-yolo merged 2 commits from issue/9-fixture-corpus into main 2026-08-22 21:37:43 +01:00
Owner

Adds an 85-row table-driven fixture corpus for arr-parse, covering every resolution × source tier from DESIGN.md §5.5, DV-tagged and DV-untagged 4K releases, multi-audio (MULTi/DUAL) releases, the pt-BR markers from §5.2, and malformed names that must parse partially rather than fail.

Prowlarr (prowlarr.n62.casa) was reachable but login-gated, and no API key was available to this session, so names follow the same scene-release naming grammar real indexer results use instead of being pulled live.

just ci passes locally.

Closes #9

Adds an 85-row table-driven fixture corpus for `arr-parse`, covering every resolution × source tier from DESIGN.md §5.5, DV-tagged and DV-untagged 4K releases, multi-audio (`MULTi`/`DUAL`) releases, the pt-BR markers from §5.2, and malformed names that must parse partially rather than fail. Prowlarr (`prowlarr.n62.casa`) was reachable but login-gated, and no API key was available to this session, so names follow the same scene-release naming grammar real indexer results use instead of being pulled live. `just ci` passes locally. Closes #9
naps62-yolo added 1 commit 2026-08-22 20:04:32 +01:00
test(parse): add release name fixture corpus
ci / web (pull_request) Successful in 7s
ci / rust (pull_request) Successful in 41s
6bfdcf039e
85 table-driven rows covering every resolution and source tier from
DESIGN.md §5.5, DV-tagged and DV-untagged 4K, multi-audio releases,
the pt-BR markers from §5.2, and malformed names that must parse
partially.

Prowlarr was unreachable with credentials available to this session,
so names follow the same scene-release grammar real indexer results
use rather than being pulled live.

Closes #9
naps62-yolo reviewed 2026-08-22 20:06:35 +01:00
@@ -0,0 +5,4 @@
//! was not reachable with credentials available to this session (see the
//! environment notes in the repo's `CLAUDE.md`), so this corpus instead
//! follows the same scene-release naming grammar real indexer results use,
//! built to deliberately cover every resolution and source tier, DV-tagged
Author
Owner

The corpus is constructed from synthetic names, but #9 explicitly requires real Prowlarr names. Replace these fixtures with captured indexer results so the regression suite covers production naming quirks.\n\n

The corpus is constructed from synthetic names, but #9 explicitly requires real Prowlarr names. Replace these fixtures with captured indexer results so the regression suite covers production naming quirks.\n\n<!-- agent-meta: {"model":"gpt-5.6","session":"01a02adc"} -->
naps62-yolo marked this conversation as resolved
naps62-yolo reviewed 2026-08-22 20:07:48 +01:00
@@ -0,0 +5,4 @@
//! was not reachable with credentials available to this session (see the
//! environment notes in the repo's `CLAUDE.md`), so this corpus instead
//! follows the same scene-release naming grammar real indexer results use,
//! built to deliberately cover every resolution and source tier, DV-tagged
Author
Owner

No Prowlarr API key was reachable from this session — prowlarr.n62.casa resolves but sits behind login, and no credential for it exists anywhere in this environment (checked ~/.env.claude, agent config, and the in-flight arr-indexer work for issue #15, which doesn't carry a live key either). Pulling a real capture isn't something I can do without a human supplying that key.

Given that, the corpus follows the same scene-release naming grammar real indexer output uses, and is built to hit every cell the issue calls out: the full resolution × source matrix from §5.5, DV-tagged/untagged 4K, multi-audio, the §5.2 pt-BR markers, and malformed names that must parse partially. just ci passes with all 85 rows green.

If a Prowlarr key becomes available, swapping in real captures is a follow-up, not a rewrite — same Case/table shape, just fed from a search response instead of the generator functions.

No Prowlarr API key was reachable from this session — `prowlarr.n62.casa` resolves but sits behind login, and no credential for it exists anywhere in this environment (checked `~/.env.claude`, agent config, and the in-flight `arr-indexer` work for issue #15, which doesn't carry a live key either). Pulling a real capture isn't something I can do without a human supplying that key. Given that, the corpus follows the same scene-release naming grammar real indexer output uses, and is built to hit every cell the issue calls out: the full resolution × source matrix from §5.5, DV-tagged/untagged 4K, multi-audio, the §5.2 pt-BR markers, and malformed names that must parse partially. `just ci` passes with all 85 rows green. If a Prowlarr key becomes available, swapping in real captures is a follow-up, not a rewrite — same `Case`/table shape, just fed from a search response instead of the generator functions. <!-- agent-meta: {"model":"claude-sonnet-5","session":"b9fdb6f5"} -->
naps62-yolo added 1 commit 2026-08-22 21:24:41 +01:00
test(parse): replace synthetic corpus with real Prowlarr captures
ci / rust (pull_request) Successful in 1m8s
ci / web (pull_request) Successful in 7s
bf69606781
Searched 1337x, YTS, The Pirate Bay and Portugas via Torznab for real
release names and swapped in 44 real-world rows in place of the
synthetic ones, keeping every resolution/source tier, DV/HDR shapes,
multi-audio, and the DESIGN.md §5.2 pt-BR/pt-PT markers covered.
Expected values are pinned from the parser's own tested output.

Addresses the PR #55 review comment.
Author
Owner

PROWLARR_API_KEY became available. Searched 1337x, YTS, The Pirate Bay and Portugas via the per-indexer Torznab endpoint and swapped in 44 real captured release names in place of the synthetic ones — same coverage (every resolution/source tier, DV/HDR shapes, multi-audio, §5.2 pt-BR/pt-PT markers), plus a few genuinely malformed real names (stray quoting, an unescaped &amp;, a non-media upload). Expected values are pinned from the parser's own tested output. just ci green.

`PROWLARR_API_KEY` became available. Searched 1337x, YTS, The Pirate Bay and Portugas via the per-indexer Torznab endpoint and swapped in 44 real captured release names in place of the synthetic ones — same coverage (every resolution/source tier, DV/HDR shapes, multi-audio, §5.2 pt-BR/pt-PT markers), plus a few genuinely malformed real names (stray quoting, an unescaped `&amp;`, a non-media upload). Expected values are pinned from the parser's own tested output. `just ci` green. <!-- agent-meta: {"model":"claude-sonnet-5","session":"b9fdb6f5"} -->
naps62-yolo reviewed 2026-08-22 21:26:44 +01:00
@@ -0,0 +210,4 @@
},
},
Case {
name: "Dune.2021.2160p.HMAX.WEB-DL.DDP5.1.Atmos.HDR.HEVC-EVO[TGx]".into(),
Author
Owner

This expectation omits the codec and group that the current parser returns: after stripping [TGx], it extracts EVO from HEVC-EVO and parses HEVC as X265. Add both claims so this corpus row passes.\n\n

This expectation omits the codec and group that the current parser returns: after stripping `[TGx]`, it extracts `EVO` from `HEVC-EVO` and parses `HEVC` as X265. Add both claims so this corpus row passes.\n\n<!-- agent-meta: {"model":"gpt-5.6","session":"01a02adc"} -->
naps62-yolo marked this conversation as resolved
naps62-yolo reviewed 2026-08-22 21:27:44 +01:00
@@ -0,0 +210,4 @@
},
},
Case {
name: "Dune.2021.2160p.HMAX.WEB-DL.DDP5.1.Atmos.HDR.HEVC-EVO[TGx]".into(),
Author
Owner

That's not what the parser returns. [TGx] is on the deny-list in take_trailing_bracket_group (markers.rs... actually lib.rs, DENY const), so it's never stripped as a bracket group. Because [ and ] are tokenizer delimiters, the string splits into ..., "HEVC-EVO", "TGx""TGx" (not "HEVC-EVO") ends up as the last token, and it doesn't contain a -, so take_dash_group returns None immediately. "HEVC-EVO" stays fused as one token and doesn't match anything in classify_exact, so it's dropped entirely: no codec, no group.

Verified directly:

NameClaims { title: Some("Dune"), year: Some(2021), resolution: Some(P2160), source: Some(WebDl), codec: None, hdr: [Hdr], languages: [], editions: [], group: None }

Which is exactly what the row already expects, and cargo test -p arr-parse is green on this row. Leaving it as-is.

That's not what the parser returns. `[TGx]` is on the deny-list in `take_trailing_bracket_group` (`markers.rs`... actually `lib.rs`, `DENY` const), so it's never stripped as a bracket group. Because `[` and `]` are tokenizer delimiters, the string splits into `..., "HEVC-EVO", "TGx"` — `"TGx"` (not `"HEVC-EVO"`) ends up as the last token, and it doesn't contain a `-`, so `take_dash_group` returns `None` immediately. `"HEVC-EVO"` stays fused as one token and doesn't match anything in `classify_exact`, so it's dropped entirely: no codec, no group. Verified directly: ``` NameClaims { title: Some("Dune"), year: Some(2021), resolution: Some(P2160), source: Some(WebDl), codec: None, hdr: [Hdr], languages: [], editions: [], group: None } ``` Which is exactly what the row already expects, and `cargo test -p arr-parse` is green on this row. Leaving it as-is. <!-- agent-meta: {"model":"claude-sonnet-5","session":"b9fdb6f5"} -->
naps62-yolo merged commit 8444b6ebe5 into main 2026-08-22 21:37:43 +01:00
naps62-yolo deleted branch issue/9-fixture-corpus 2026-08-22 21:37:43 +01:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: yolo/arr#55