Skip to content

Enforce a Minimum Version for Every Media Tool Family - #1118

Merged
ptr727 merged 8 commits into
developfrom
feature/1104-tool-minimum-versions
Oct 31, 2026
Merged

ptr727 merged 8 commits into
developfrom
feature/1104-tool-minimum-versions

Conversation

@ptr727

@ptr727 ptr727 commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Summary

Every media tool family now has a minimum version in MediaTool.MinimumVersion, enforced by the existing startup gate in Tools.VerifyToolVersions(). Per the maintainer decision on the issue, each minimum is the tool's release from around FFmpeg 8.0's release (2025-08-22), not a per-option audit.

Family Minimum Source (upstream release date) Ubuntu rolling (stonking) apt
FFmpeg, FFprobe 8.0 unchanged, FFmpeg 8.0 release 2025-08-22 8.1.2
HandBrake 1.10.0 GitHub release 1.10.0, 2025-08-09 (1.10.1 followed 2025-08-23) 1.11.2
MediaInfo 25.07 MediaInfo and MediaInfoLib release v25.07, 2025-07-29 (v25.09 followed 2025-09-30) 26.05
MKVToolNix 94.0 NEWS: 94.0 "Initiate" 2025-07-27 (95.0 followed 2025-09-14) 100.0
7-Zip 25.01 ip7z/7zip release 25.01, 2025-08-03 26.02

Each pick is the newest release of its tool at or before FFmpeg 8.0's release date. Apt versions were read from the Launchpad archive API and apt-cache policy in ubuntu:rolling.

  • Unparsable versions follow the maintainer decision on the issue. MediaTool.CheckVersion returns Supported, Unsupported, or Unknown. A release version, or a release prefix such as 93.0-12-g1a2b3c4, compares directly. A HandBrake nightly such as 20230223192356-5c2b5d2d0-1.6.x compares by its branch (1.6, so it is refused), and a build timestamp or a leading yyyy-MM-dd build date (a gyan.dev FFmpeg git build) compares to the floor's release date. Anything else (an FFmpeg N-121061-g... build) is Unknown, passes, and VerifyToolVersions logs a warning. Ubuntu's HandBrakeCLI prints a clean HandBrake 1.11.2 (the +ds1 is only in the package version).
  • The floor's release date lives beside its version in MediaTool.GetMinimum(), so each family still has one minimum entry.
  • FfMpegTool.GetVersion keeps the whole build string for a git build instead of recording an empty version, so SidecarUpdateOnToolChange sees a tool version change once for a git-build user after upgrading, and on each new nightly.
  • Each parser's Debug.Assert now asserts only that the regex matched, so a nightly build no longer aborts a Debug run.
  • A master or git build made after a release branch split but before the floor's release date is refused (a window of a few weeks).
  • Docker/Dockerfile: p7zip-full has no candidate on ubuntu:rolling, so the image could not install a 7-Zip at all. It now installs 7zip, which ships 7z and meets the minimum.
  • README lists the minimum per tool. No Windows download change: it fetches the latest release.
  • Tests: MinimumVersionTests covers every tool, a refused older version and an accepted minimum per family through each family's real version parser, and the development build and Unknown cases.

Review notes

  • CodeRabbit's overview named a warning-coverage point and an unknown-family fallback without a thread. The warning is now limited to tools that have a minimum. ToolFamily.None has no minimum by design, and MinimumVersion_EveryTool_HasMinimum fails if any listed tool lacks one.

Distribution packages dropped by the raise: none on ubuntu:rolling. Older distributions with HandBrake before 1.10, MediaInfo before 25.07, MKVToolNix before 94, or 7-Zip before 25.01 now fail the startup gate.

ARCHITECTURE.md and HISTORY.md are not edited here by the maintainer's choice. Every doc update, HISTORY lines included, is deferred to one final docs pull request, so review findings asking for those edits are declined for that reason.

Closes on promotion: #1104

🤖 Generated with Claude Code

ptr727 and others added 4 commits October 30, 2026 20:18
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings October 31, 2026 03:28
@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 28 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 48af8fa6-927f-4eb5-a617-88c507e0693e
Commits

Reviewing files that changed from the base of the PR and between 0fe509c and 93513d4.

Files selected for processing: 10
  • Docker/Dockerfile
  • PlexCleaner/FfMpegTool.cs
  • PlexCleaner/HandBrakeTool.cs
  • PlexCleaner/MediaInfoTool.cs
  • PlexCleaner/MediaTool.cs
  • PlexCleaner/MkvMergeTool.cs
  • PlexCleaner/SevenZipTool.cs
  • PlexCleaner/Tools.cs
  • PlexCleanerTests/MinimumVersionTests.cs
  • README.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@ptr727

ptr727 commented Oct 31, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 772ac9b6b1a3fb55c015370f50d9e00b23467c0a, the content this pull request carries at that commit against develop, and it recorded 1 finding.

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Enforce minimum versions for every media tool family

✨ Enhancement 🐞 Bug fix 🧪 Tests 📝 Documentation ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Enforce release-aligned minimum versions for every media tool family at startup.
• Accept non-comparable versions with a warning, including nightly builds, without Debug assertion
 failures.
• Install a compatible Docker 7-Zip package and document and test the minimums.
Diagram

graph TD
  B["Media tools"] --> P["Version parsers"] --> G{"Comparable version?"} -->|Yes| C{"Meets minimum?"} -->|No| R["Startup blocked"]
  G -->|No| W["Warn and allow"] --> S["Startup continues"]
  C -->|Yes| S
  M["Family minimums"] --> C
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Audit individual tool options
  • ➕ Could set more precise minimums and avoid excluding otherwise compatible older releases.
  • ➖ Requires substantially more compatibility research and ongoing maintenance across tool families.

Recommendation: Use the PR's release-aligned family minimums and existing centralized startup gate, consistent with the stated maintainer policy. An option-level audit would be more precise but is a substantially larger undertaking.

Files changed (10) +166 / -13

Enhancement (2) +21 / -2
MediaTool.csDefine minimum versions for all media tool families +10/-2

Define minimum versions for all media tool families

• Extends MinimumVersion beyond FFmpeg to HandBrake, MediaInfo, MKVToolNix, and 7-Zip. Existing version comparison uses these family-level minimums.

PlexCleaner/MediaTool.cs

Tools.csWarn when installed versions cannot be compared +11/-0

Warn when installed versions cannot be compared

• Startup verification now logs a warning for non-comparable tool versions while continuing to reject comparable versions below their minimum.

PlexCleaner/Tools.cs

Bug fix (5) +5 / -5
FfMpegTool.csPermit non-numeric FFmpeg version strings in Debug builds +1/-1

Permit non-numeric FFmpeg version strings in Debug builds

• The version parser now asserts that its regex matched without requiring the captured version to parse as System.Version.

PlexCleaner/FfMpegTool.cs

HandBrakeTool.csPermit HandBrake nightly versions in Debug builds +1/-1

Permit HandBrake nightly versions in Debug builds

• Removes the numeric-version assertion while retaining the regex-match assertion, allowing nightly version strings through the parser.

PlexCleaner/HandBrakeTool.cs

MediaInfoTool.csRelax MediaInfo parser assertion +1/-1

Relax MediaInfo parser assertion

• Asserts that the version regex matched without requiring its captured value to parse as System.Version.

PlexCleaner/MediaInfoTool.cs

MkvMergeTool.csRelax MKVToolNix parser assertion +1/-1

Relax MKVToolNix parser assertion

• Keeps the regex-match assertion but no longer requires the captured version to parse as System.Version.

PlexCleaner/MkvMergeTool.cs

SevenZipTool.csRelax 7-Zip parser assertion +1/-1

Relax 7-Zip parser assertion

• Keeps the regex-match assertion but no longer requires the captured version to parse as System.Version.

PlexCleaner/SevenZipTool.cs

Tests (1) +124 / -0
MinimumVersionTests.csTest family minimums and version-parser boundaries +124/-0

Test family minimums and version-parser boundaries

• Covers every registered tool's minimum, acceptance at the minimum, and rejection below it. Parser-backed cases exercise several families, including acceptance of non-comparable versions.

PlexCleanerTests/MinimumVersionTests.cs

Documentation (1) +11 / -1
README.mdDocument media tool minimum versions +11/-1

Document media tool minimum versions

• Adds a minimum-version table and explains startup rejection, the warning for non-comparable versions, and installation expectations.

README.md

Other (1) +5 / -5
DockerfileInstall 7zip from the rolling Ubuntu repository +5/-5

Install 7zip from the rolling Ubuntu repository

• Replaces unavailable p7zip-full with 7zip so the image can install the required executable. Updates media-package links to the rolling release.

Docker/Dockerfile

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can keep summaries lean with Findings visible per group, which tucks the rest behind a View link

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

A critical test issue remains because non-serializable MediaTool theory arguments trigger xUnit1045 under the repository’s zero-warning build.

1 open issue
What changed in this PR

This pull request extends startup version enforcement from FFmpeg to every supported media-tool family while preserving support for unparsable nightly and development builds.

Changes:

  • Adds minimum versions for HandBrake, MediaInfo, MKVToolNix, and 7-Zip.
  • Adds version-gate and parser tests, updates related assertions, and logs warnings for unparsable versions.
  • Replaces p7zip-full with 7zip in Docker and documents requirements in the README.
  • Review findings remain for non-serializable xUnit theory arguments, incomplete warning coverage, and the fallback for unknown tool families.

This pull request requires changes.

File Description
README.md Documents minimum versions and unparsable-version handling.
PlexCleanerTests/​MinimumVersionTests.cs Adds minimum-version, parser, and compatibility tests.
PlexCleaner/​Tools.cs Logs warnings for unparsable versions during startup validation.
PlexCleaner/​SevenZipTool.cs Relaxes version assertions to support non-standard version strings.
PlexCleaner/​MkvMergeTool.cs Relaxes version assertions to validate matching patterns.
PlexCleaner/​MediaTool.cs Defines minimum versions for each media-tool family.
PlexCleaner/​MediaInfoTool.cs Relaxes version assertions for non-comparable versions.
PlexCleaner/​HandBrakeTool.cs Supports unparsable HandBrake nightly versions.
PlexCleaner/​FfMpegTool.cs Relaxes the version assertion for updated gate behavior.
Docker/​Dockerfile Installs the available 7zip package and updates package references.

Review effort: Lite

Comment thread PlexCleanerTests/MinimumVersionTests.cs Resolved
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ptr727

ptr727 commented Oct 31, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head f32d67358559cb7001364742412e4fb483be5b96, the content this pull request carries at that commit against develop, and it recorded 0 findings.

ptr727 and others added 3 commits October 30, 2026 20:42
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ptr727 ptr727 added the comments Permits the comment lines the pull request adds or edits, which the prose gate otherwise refuses label Oct 31, 2026
@ptr727

ptr727 commented Oct 31, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 93513d48267f615be0ac6ae86bd33724e81edc18, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@ptr727
ptr727 merged commit 175652f into develop Oct 31, 2026
23 checks passed
@ptr727
ptr727 deleted the feature/1104-tool-minimum-versions branch October 31, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comments Permits the comment lines the pull request adds or edits, which the prose gate otherwise refuses

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants