Stop reporting an uncrackable CSS disc as N empty titles

Same shape as the mkv:// conflation fixed earlier in this round, found by
looking for it deliberately. E7023 carried two conditions with opposite
correct responses: one title on a multi-VTS DVD failing its own re-crack,
where skipping it and finishing the rest is right, and the main feature's
crack failing outright, which is disc-wide and dooms every title
identically. Because both raised the same code and that code is in
is_skippable_title_stub, an uncrackable disc walked all N titles printing
"title skipped, it was empty" and exited 0.

The disc-wide condition gets E7027 CssNoDiscKey, mirroring the AACS-side
E7022 NoDiscKey it is the analogue of, and joins is_disc_level_no_key.
The per-title raise keeps E7023 and stays skippable. Because the engine's
classifier already tests is_disc_level_no_key before the skippable
branch, this reaches the right outcome downstream with no change there:
such a disc now stops on the first title and reports no-key instead of
returning success with nothing written.

Disc::css_error deliberately still stores CssKeyMissing — autorip matches
that variant on the field to pick the CSS rather than AACS message, and
what consumers classify on is the gate's returned verdict, which is the
only thing that changed.

Two neighbouring CSS raises were examined and deliberately left alone:
the no-key branch in the same function is genuinely unreachable via
ensure_decryptable and documented as defensive, and resolve_dvd_title_key
is per-title on both of its call paths.

Verified by removing the new code from is_disc_level_no_key, which fails
both new tests; each pins both directions so neither can silently flip.
Not proven end to end against a real uncrackable disc — none available.
This commit is contained in:
Matthew Jackson
2026-07-29 22:29:51 -07:00
parent 5c6a6d0785
commit dc5b67ed46
4 changed files with 200 additions and 16 deletions
+11
View File
@@ -41,6 +41,17 @@
### Fixed
- **An undecryptable CSS disc no longer exits successfully.**
`Error::CssKeyMissing` (E7023) carried two conditions needing opposite
responses: one title of a multi-VTS DVD failing its own re-crack — correctly
skippable, the rest of the disc still rips — and the *whole disc* failing its
crack (`Disc::css_error`), where every title fails identically. Both raised
E7023, which `is_skippable_title_stub` classifies, so an uncrackable disc
iterated all N titles logging "title skipped" and exited 0. The disc-wide gate
(`Disc::ensure_decryptable[_keys]`) now raises `Error::CssNoDiscKey`
(**E7027**) — the CSS analogue of `NoDiscKey` (E7022), classified by
`is_disc_level_no_key`, so a rip loop fails fast. The per-title raise keeps
E7023 and stays skippable.
- **A corrupt `mkv://` input is no longer reported as a title worth silently
skipping.** `Error::MkvInvalid` (E6008) carried two unrelated meanings: the
genuine "this title produced no muxable frames" stub — which