fix(ci): Governance Quarantine Visibility builds hostless (fix CS0234 LidarrNative) - #319
Merged
Merged
Conversation
The "Restore and build" step built the full plugin WITHOUT -p:SkipHostBridge, yet the job prepares only STUB host assemblies. Stub mode excludes LidarrNative/** while TidalModule still references it -> CS0234, which has failed the Governance run (Quarantined Test Visibility) since at least 2026-05-25. The job only runs State=Quarantined unit tests (no host-bridge needed), so build hostless to match the test-project step (-p:SkipHostBridge=true -p:ExcludeHostBridge=true). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The "Quarantined Test Visibility" job prepared STUB host assemblies, which trip Directory.Build.props auto-detect into SkipHostBridge mode (no Lidarr.dll present) and exclude LidarrNative/**. TidalModule.cs imports the Tidalarr.Integration.LidarrNative namespace unconditionally, so stub mode fails with CS0234 — the plugin cannot build hostless. My prior attempt added -p:SkipHostBridge=true -p:ExcludeHostBridge=true, which excludes the folder while the dangling reference remained: still CS0234. Mirror the established real-host-assembly approach used by ci.yml, test-and-coverage.yml, and nightly.yml (and the fix/nightly-real-host-assemblies fix): replace the stub-prep step with the Docker-extract of ghcr.io/hotio/lidarr:pr-plugins-3.1.2.4913 into ext/Lidarr/_output/net8.0, then build the FULL plugin and test project (incl. the LidarrNative host-bridge) with no SkipHostBridge/ExcludeHostBridge. Drop -p:SkipHostBridge from the test-run step so build and run stay internally consistent (run is --no-build). Validated locally: full plugin + test project build with 0 errors against the extracted assemblies; `dotnet test --no-build --filter State=Quarantined` discovers cleanly (0 matches, exit 0). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
RicherTunes
added a commit
that referenced
this pull request
Sep 7, 2026
* ci: migrate to unified test runner Replace raw `dotnet test` calls with the unified test runner from Common (ext/Lidarr.Plugin.Common/scripts/test.ps1) to ensure consistent category exclusions and CI annotations. Changes: - test-and-coverage.yml: Use unified runner with coverage - scripts/ci.ps1: Use unified runner with splatted parameters The unified runner handles: - Category exclusions (Integration, Packaging, LibraryLinking, etc.) - State=Quarantined exclusion - TRX parsing and CI annotations Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * ci: generate host stubs before format check The format check was failing because NzbDrone types couldn't be resolved without the Lidarr host stub assemblies. This caused false positives for IDE0005 (unnecessary using directive) warnings. Add prepare-host-stub step before format check in: - ci.yml - packaging-closure.yml Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * ci: exclude LidarrNative from format check The LidarrNative files reference NzbDrone types from Lidarr host assemblies that aren't available in a clean CI checkout. Exclude these files from dotnet format --verify-no-changes. This follows the existing pattern of excluding ext/ and temp/. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: align manifest verification with current host version - Add missing minimumVersion field to plugin.json (legacy clients need it) - Update verify-plugin.ps1 hostVersionTarget to 3.0.0.4855 (matches plugin.json) These are pre-existing issues that surfaced when CI started running. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * ci: fix packaging-closure build without host assemblies - Add SkipHostBridge=true to packaging-closure build step - This excludes LidarrNative files that require Lidarr host assemblies - Remove unnecessary stub generation steps (format check excludes LidarrNative) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * ci: add SkipHostBridge support to build scripts - Add -SkipHostBridge parameter to build.ps1 - Update ci.ps1 to use SkipHostBridge (excludes LidarrNative files) LidarrNative files require Lidarr host assemblies which aren't available in CI. SkipHostBridge excludes these files from the build. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * ci: add SkipHostBridge to unified runner properties The unified runner builds the test project which references the main plugin project. Add SkipHostBridge to the Properties so the main project is also built without LidarrNative files. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * ci: build tests separately with SkipHostBridge The unified test runner's build step doesn't pass Properties to the build command. Build the test project separately with SkipHostBridge, then run the unified runner with -NoBuild. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * ci: exclude HostBridge-dependent tests in CI Add TidalDownloadClientHostSettingsParityTests.cs and TidalQualityEnumParityTests.cs to the ExcludeHostBridge exclusion list since they reference Tidalarr.HostBridge types that are not available when building with ExcludeHostBridge=true. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: use forward slashes in glob patterns for cross-platform CI The SkipHostBridge glob patterns used Windows-style backslashes which don't work on Linux CI. Forward slashes work on both platforms. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(build): robust LidarrNative exclusion for cross-platform CI - Use DefaultItemExcludes for file exclusion (evaluated before implicit includes, more reliable than Compile Remove on Linux) - Include NuGet NLog when SkipHostBridge=true (fixes missing NLog when Lidarr assemblies exist locally but are excluded) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(build): move LidarrNative exclusion to Directory.Build.props DefaultItemExcludes must be set before SDK implicit includes are evaluated. Directory.Build.props is imported before the SDK, making it the correct place for this setting. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(build): use Target for reliable LidarrNative exclusion Add RemoveLidarrNativeFiles target that runs before compilation to explicitly remove the files. This is more reliable than DefaultItemExcludes for conditional exclusion scenarios. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(build): try multiple glob patterns for LidarrNative removal Try various glob patterns (forward slashes, backslashes, wildcards) to find which one works on Linux CI. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(build): correct DefaultItemExcludes pattern for project-relative paths The DefaultItemExcludes pattern must be relative to each project's directory, not to the Directory.Build.props location. Use 'Integration/LidarrNative/**' instead of 'src/Tidalarr/Integration/...'. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(ci): pass SkipHostBridge to TidalCLI build TidalCLI has a ProjectReference to Tidalarr.csproj. Building TidalCLI without SkipHostBridge causes Tidalarr to be rebuilt with LidarrNative files included, undoing the exclusion from the first build. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(ci): correct output path for dependency closure verification Tidalarr uses AppendTargetFrameworkToOutputPath=false, so output is at bin/Release/ not bin/Release/net8.0/. Update verification and artifact paths accordingly. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(ci): use correct output path (bin/ not bin/Release/) Tidalarr uses OutputPath=bin\ without configuration subdirectory, so output goes to bin/ not bin/Release/. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * ci: exclude platform-specific PathValidation tests in CI PathValidationExtensionsTests have platform-specific expectations that fail on Linux CI. Exclude them when ExcludeHostBridge=true. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(ci): correct output path in ci.ps1 packaging Tidalarr uses OutputPath=bin\ without configuration subdirectory, so packaging should look in bin/ not bin/Release/net8.0/. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(ci): update packaging-gates to newer Common SHA and CROSS_REPO_PAT - Pin reusable workflow to 4839b415 (merged Common SHA) - Use CROSS_REPO_PAT (recently updated) instead of SUBMODULES_TOKEN (stale) to fix cross-repo auth issue Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(ci): bump Common submodule to 75ce86e (Import-Module fix + CI improvements) - Update packaging-gates.yml SHA pin to Common 75ce86e - Bump ext/Lidarr.Plugin.Common submodule to latest main - Update ext-common-sha.txt Common PR #318 includes: - Import-Module Resolve-Path fix for Linux pwsh - Quarantine flaky LiveDashboard and FileStateService tests - CI hang detection with TRX-based result parsing - Test step timeout and quarantine filter Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(ci): auto-detect SkipHostBridge when host stubs are missing PluginPack (packaging-gates) runs `dotnet build` without generating host stub assemblies or passing -p:SkipHostBridge=true. This caused the build to fail on LidarrNative files that reference Lidarr host types. Add auto-detection in Directory.Build.props: when host stubs at ext/Lidarr/_output/net8.0/Lidarr.dll don't exist, SkipHostBridge defaults to true automatically. Explicit -p:SkipHostBridge=true/false still takes precedence. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(ci): bump Common to 64b458a (GH_TOKEN + gh CLI fallback) Common PR #319 fixes: - packaging-gates.yml: set GH_TOKEN for canonical Abstractions download - Get-CanonicalAbstractions.ps1: fall through to HTTP when gh fails - Quarantine MemoryQueueServiceTests broken concurrent enqueue test Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(ci): bump Common to d48e617 (cached path fix for canonical Abstractions) Common PR #320 fixes Install-CanonicalAbstractions: after downloading to temp dir and caching, $canonicalDll now points to the cached path instead of the deleted temp dir. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(ci): exclude HostBridge test files from formatting check Test files that reference LidarrNative types (excluded via ExcludeHostBridge in CI) were still checked by dotnet format, causing IDE0005 errors for using directives that appear unnecessary without host assemblies. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(ci): bump Common to 73122ea (ManifestCheck strict mode fix) Common PR #321 fixes ManifestCheck.ps1 PropertyNotFoundException for optional manifest.targets under Set-StrictMode -Version Latest. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(ci): bump Common to 8344b04 (strict mode .Count fix) + closure format fix - Bump Common submodule to 8344b04 which fixes Verify-CanonicalAbstractions.ps1 Where-Object results wrapped in @() for strict mode safe .Count access - Fix packaging-closure.yml formatting check to exclude HostBridge test files (same fix as ci.yml - tests reference LidarrNative types unavailable in CI) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <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.
Fixes the long-standing (since ≥2026-05-25) failing Governance run on Tidalarr.
Root cause
The
Quarantined Test Visibilityjob prepared stub host assemblies (prepare-host-stub.ps1). With no realLidarr.dllpresent,Directory.Build.propsauto-detect setsSkipHostBridge=trueand excludesIntegration/LidarrNative/**. Butsrc/Tidalarr/Integration/TidalModule.cs:25imports theTidalarr.Integration.LidarrNativenamespace unconditionally, so the build fails withCS0234. tidal cannot build hostless.(My first attempt added
-p:SkipHostBridge=true -p:ExcludeHostBridge=trueto the build step — that was wrong: it excludes the folder while the danglingusingremains, so CS0234 persisted. That change has been reverted in this PR.)Fix — build against REAL host assemblies (mirrors ci.yml / test-and-coverage.yml / nightly.yml)
The plugin only compiles when
LidarrNativeis included, which requires real Lidarr host assemblies. This PR brings the QTV job in line with the rest of the pipeline (and thefix/nightly-real-host-assembliesprecedent):ghcr.io/hotio/lidarr:pr-plugins-3.1.2.4913intoext/Lidarr/_output/net8.0(byte-for-byte the same step ci.yml/test-and-coverage.yml/nightly.yml use).-p:SkipHostBridge=true -p:ExcludeHostBridge=trueon "Restore and build" so the full plugin (incl. the LidarrNative host-bridge) compiles against the real assemblies.-p:SkipHostBridge=truefrom "Run quarantined tests" so build + (--no-build) run stay internally consistent.The QTV job only needs to build then run
State=Quarantinedtests (the test step iscontinue-on-error: true); success = build + test-discovery succeed.Verification
Validated locally (Docker extract →
dotnet buildplugin + test project = 0 errors;dotnet test --no-build --filter State=Quarantineddiscovers cleanly). Then dispatched Governance on this branch:26759111342— success (overall). Quarantined Test Visibility: success, Allowlist Expiration Check: success.26757007199on the wrong-fix commitd071571: failure.)Scope:
.github/workflows/governance.ymlonly. Nosrcchanges.