Skip to content

fix(validation): add ForcedFlagConsistencyRule for audio and subtitle tracks#68

Merged
TimGels merged 3 commits intomainfrom
fix/issue-67-forced-flag-validation
Feb 8, 2026
Merged

fix(validation): add ForcedFlagConsistencyRule for audio and subtitle tracks#68
TimGels merged 3 commits intomainfrom
fix/issue-67-forced-flag-validation

Conversation

@TimGels
Copy link
Owner

@TimGels TimGels commented Feb 8, 2026

Implements missing validation rule to check forced flag consistency across audio and subtitle tracks in batch files.

  • Add ForcedFlagConsistencyRule with validation logic
  • Add comprehensive unit tests (13 test cases)
  • Register rule in ServiceCollectionExtensions

Resolves #67

… tracks

Implements missing validation rule to check forced flag consistency
across audio and subtitle tracks in batch files.

- Add ForcedFlagConsistencyRule with validation logic
- Add comprehensive unit tests (13 test cases)
- Register rule in ServiceCollectionExtensions

Resolves #67
@TimGels TimGels requested a review from Copilot February 8, 2026 17:29
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new file-validation rule to detect inconsistent Forced flags across audio and subtitle tracks in a batch, wires it into DI, and provides unit test coverage.

Changes:

  • Introduced ForcedFlagConsistencyRule to compare forced-flag values across files for audio/text tracks
  • Registered the rule in the Uno DI container
  • Added a dedicated unit test suite covering key mismatch and skip scenarios

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
tests/MatroskaBatchFlow.Core.UnitTests/Services/FileValidation/ForcedFlagConsistencyRuleTests.cs Adds unit tests for the new forced-flag consistency validation behavior
src/MatroskaBatchFlow.Uno/Extensions/ServiceCollectionExtensions.cs Registers the new validation rule in the app’s DI setup
src/MatroskaBatchFlow.Core/Services/FileValidation/ForcedFlagConsistencyRule.cs Implements the new validation rule and its forced-flag comparison logic

…first

Check track count before SequenceEqual to avoid expensive comparison
when counts differ. Applied to both ForcedFlagConsistencyRule and
DefaultFlagConsistencyRule for consistency.
Pass resolved track settings directly to comparison methods instead of
re-deriving them. This avoids building expensive flag matrices when
validation is disabled (null or Off severity).

Applied to both DefaultFlagConsistencyRule and ForcedFlagConsistencyRule.
@TimGels TimGels merged commit 431c880 into main Feb 8, 2026
6 checks passed
@TimGels TimGels deleted the fix/issue-67-forced-flag-validation branch February 8, 2026 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement ForcedFlagConsistencyRule validation

1 participant