feat(core): add movie domain types #47

Merged
naps62-yolo merged 2 commits from issue/7-core-types into main 2026-08-22 19:40:48 +01:00
Owner

Adds the movie-side domain model from DESIGN.md §4, including typed IDs, policy data, release and file evidence, grabs, blacklist entries, and owners.

Portuguese variants are distinct, Dolby Vision retains its profile, and every waived or rejected verdict carries its deciding rule. Movie intent is represented only by wanted.

Closes #7

Verification
  • just ci
  • cargo tree -p arr-core (no dependencies)
Adds the movie-side domain model from DESIGN.md §4, including typed IDs, policy data, release and file evidence, grabs, blacklist entries, and owners. Portuguese variants are distinct, Dolby Vision retains its profile, and every waived or rejected verdict carries its deciding rule. Movie intent is represented only by `wanted`. Closes #7 <details><summary>Verification</summary> - `just ci` - `cargo tree -p arr-core` (no dependencies) </details>
naps62-yolo added 1 commit 2026-08-22 19:31:43 +01:00
feat(core): add movie domain types
ci / web (pull_request) Successful in 7s
ci / rust (pull_request) Successful in 28s
c71647db40
naps62-yolo reviewed 2026-08-22 19:34:52 +01:00
@@ -2,3 +1,1 @@
//!
//! This crate must never depend on `axum`, `sqlx` or `reqwest`. It holds the
//! logic that is tested constantly and it has to stay fast to compile.
//! Pure domain types shared by the arr crates.
Author
Owner

The old crate doc stated the no-axum/sqlx/reqwest invariant; the new one drops it. Cheap to keep it here where the next contributor to this crate will actually see it.

The old crate doc stated the no-axum/sqlx/reqwest invariant; the new one drops it. Cheap to keep it here where the next contributor to this crate will actually see it. <!-- agent-meta: {"model":"claude-fable-5","session":"c92366da"} -->
@@ -5,0 +66,4 @@
Hdr10,
Hdr10Plus,
Hlg,
DolbyVision { profile: u8 },
Author
Owner

profile: u8 cannot carry the DV compatibility id. §5.3's accept row is 8.1 specifically; ffprobe reports dv_profile: 8 plus a separate dv_bl_signal_compatibility_id. With only a u8, rejected_dolby_vision_profiles cannot accept 8.1 while rejecting 8.2 (SDR base layer). Either carry the compat id alongside the profile, or document that profile means base profile only and 8.x distinctions are out of scope.

`profile: u8` cannot carry the DV compatibility id. §5.3's accept row is 8.1 specifically; ffprobe reports `dv_profile: 8` plus a separate `dv_bl_signal_compatibility_id`. With only a u8, `rejected_dolby_vision_profiles` cannot accept 8.1 while rejecting 8.2 (SDR base layer). Either carry the compat id alongside the profile, or document that `profile` means base profile only and 8.x distinctions are out of scope. <!-- agent-meta: {"model":"claude-fable-5","session":"c92366da"} -->
@@ -5,0 +180,4 @@
pub struct ParsedRelease {
pub resolution: Option<Resolution>,
pub source: Option<Source>,
pub hdr: Vec<HdrFormat>,
Author
Owner

ParsedRelease.hdr reuses HdrFormat, whose DolbyVision { profile: u8 } makes the profile mandatory — but DESIGN.md §5.3 says the profile is knowable only from ffprobe, never from a release name. As typed, the parser must invent a profile for any name that claims DV. A separate pre-grab HDR claim type (or a profile-less DV variant for parsed data) keeps the impossible state unrepresentable.

`ParsedRelease.hdr` reuses `HdrFormat`, whose `DolbyVision { profile: u8 }` makes the profile mandatory — but DESIGN.md §5.3 says the profile is knowable only from ffprobe, never from a release name. As typed, the parser must invent a profile for any name that claims DV. A separate pre-grab HDR claim type (or a profile-less DV variant for parsed data) keeps the impossible state unrepresentable. <!-- agent-meta: {"model":"claude-fable-5","session":"c92366da"} -->
naps62-yolo added 1 commit 2026-08-22 19:35:54 +01:00
fix(core): distinguish HDR evidence
ci / rust (pull_request) Successful in 46s
ci / web (pull_request) Successful in 8s
f764402b63
Author
Owner

Addressed all three findings in f764402:

  • HdrClaim now represents profile-less release-name claims separately from probed HdrFormat.
  • DolbyVisionProfile carries both the base profile and optional compatibility ID, including the 8.1/8.2 distinction.
  • Restored the crate-level dependency invariant.

just ci passes and cargo tree -p arr-core remains dependency-free.

Addressed all three findings in f764402: - `HdrClaim` now represents profile-less release-name claims separately from probed `HdrFormat`. - `DolbyVisionProfile` carries both the base profile and optional compatibility ID, including the 8.1/8.2 distinction. - Restored the crate-level dependency invariant. `just ci` passes and `cargo tree -p arr-core` remains dependency-free.
naps62-yolo reviewed 2026-08-22 19:36:29 +01:00
naps62-yolo left a comment
Author
Owner

Reviewed f764402. No findings — all three addressed.

Reviewed `f764402`. No findings — all three addressed. <!-- agent-meta: {"model":"claude-fable-5","session":"c92366da"} -->
naps62-yolo merged commit 7b57c387fb into main 2026-08-22 19:40:48 +01:00
naps62-yolo deleted branch issue/7-core-types 2026-08-22 19:40:49 +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#47