build: add FluentValidation host guard to prevent type-identity issues#347
Closed
RicherTunes wants to merge 2 commits intomainfrom
Closed
build: add FluentValidation host guard to prevent type-identity issues#347RicherTunes wants to merge 2 commits intomainfrom
RicherTunes wants to merge 2 commits intomainfrom
Conversation
Adds build-time validation that FluentValidation.dll exists in the Lidarr host assemblies path. This prevents accidental builds where Directory.Packages.props pulls FV 11.x from NuGet instead of using the host's FluentValidation. The guard fails fast with a clear error message explaining: - Why host FV is required (type-identity for Test override) - How to fix it (extract assemblies or use complete installation) - Link to PR #346 for context This closes the "contributor footgun" risk identified during the FluentValidation exclusion fix review. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Owner
Author
|
Stale — superseded by packaging-gates adoption (#397) and ecosystem standardization. |
RicherTunes
added a commit
that referenced
this pull request
Feb 13, 2026
Bumps ext/Lidarr.Plugin.Common from da58f3e to 805af9f (7 commits): - fix(ci): include JSON files in Docker host assembly extraction (#350) - feat(scripts): ext-common-sha.txt format guard + bulk repin tool (#349) - fix(scripts): improve stale workflow pin warnings (#348) - docs(scripts): mark --update-pins as manual-only (#347) - fix(tests): replace Progress<T> with synchronous IProgress<T> (#346) - fix(scripts): prevent ((UPDATED++)) exit under set -e (#345) - feat(scripts): single source of truth for Common SHA pins (#344) Also updates packaging-gates.yml SHA pin to 805af9f — this includes the JSON extraction fix that should unblock the packaging-gates CI job. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
4 tasks
RicherTunes
added a commit
that referenced
this pull request
Feb 13, 2026
Bumps ext/Lidarr.Plugin.Common from da58f3e to 805af9f (7 commits): - fix(ci): include JSON files in Docker host assembly extraction (#350) - feat(scripts): ext-common-sha.txt format guard + bulk repin tool (#349) - fix(scripts): improve stale workflow pin warnings (#348) - docs(scripts): mark --update-pins as manual-only (#347) - fix(tests): replace Progress<T> with synchronous IProgress<T> (#346) - fix(scripts): prevent ((UPDATED++)) exit under set -e (#345) - feat(scripts): single source of truth for Common SHA pins (#344) Also updates packaging-gates.yml SHA pin to 805af9f — this includes the JSON extraction fix that should unblock the packaging-gates CI job. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
RicherTunes
added a commit
that referenced
this pull request
Feb 13, 2026
Bumps ext/Lidarr.Plugin.Common from da58f3e to 805af9f (7 commits): - fix(ci): include JSON files in Docker host assembly extraction (#350) - feat(scripts): ext-common-sha.txt format guard + bulk repin tool (#349) - fix(scripts): improve stale workflow pin warnings (#348) - docs(scripts): mark --update-pins as manual-only (#347) - fix(tests): replace Progress<T> with synchronous IProgress<T> (#346) - fix(scripts): prevent ((UPDATED++)) exit under set -e (#345) - feat(scripts): single source of truth for Common SHA pins (#344) Also updates packaging-gates.yml SHA pin to 805af9f — this includes the JSON extraction fix that should unblock the packaging-gates CI job. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds build-time validation that
FluentValidation.dllexists in the Lidarr host assemblies path. This prevents accidental builds whereDirectory.Packages.propspulls FV 11.x from NuGet instead of using the host's FluentValidation.Problem (Contributor Footgun)
The current csproj has a conditional PackageReference:
If someone builds without proper host assemblies, NuGet silently provides FluentValidation 11.x. The build succeeds but the plugin fails at runtime with:
Solution
New MSBuild target
ValidateFluentValidationFromHost:$(LidarrPath)\FluentValidation.dlldoesn't existBuild Error Example
Related
🤖 Generated with Claude Code