Skip to content

build: eliminate all CS compiler warnings (zero-warning build for v0.9.0) - #587

Merged
jsboige merged 1 commit into
masterfrom
fix/build-warnings-cleanup
Jun 23, 2026
Merged

build: eliminate all CS compiler warnings (zero-warning build for v0.9.0)#587
jsboige merged 1 commit into
masterfrom
fix/build-warnings-cleanup

Conversation

@jsboige

@jsboige jsboige commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Contexte

Décision jsboige (interactif, 2026-06-23) : « les 4 warnings risqués laissés intacts — On corrige tout ». Le build solution exposait en réalité 6 sites de warnings CS distincts (au-delà des 4 cités). Cette PR vise un build zéro-warning CS comme gate de la release v0.9.0. Seul reste NU1903 (CVE AutoMapper 14.0.0), traité dans la lane de bump de dépendance (po-2024).

Changements (6 sites)

Warning Fichier Résolution
CS0618 QuestPDF Grid obsolète WebBasedGenerator/CardGridComponent.cs Suppression #pragma documentée — PAS de migration
CS0618 ColorProfile.USWebCoatedSWOP obsolète ImageHelper.cs Renommé ColorProfiles.USWebCoatedSWOP (même profil)
CS8632 annotation nullable hors contexte #nullable DatasetUpdater/DatasetUpdaterConfig.cs #nullable enable annotations
CS0414 champ mort PdfManager.MmToPointsFactor (+ consts InchTo* orphelins) WebBasedGenerator/PdfManager.cs Supprimés
CS0105 using System.Xml.Xsl dupliqué Mindmapper/FallacyMindMapDocumentConfig.cs Doublon retiré
CS8600 ×2 imageFile VisualTests/FallacyCardTests.cs Déclaré string?

Pourquoi Grid est suppressed et non migré vers Table

QuestPDF déprécie Grid (depuis 2022.11) au profit de Table, mais ce projet pin volontairement QuestPDF à 2022.12.12 (thread-safety — cf CLAUDE.md) et ne l'upgrade PAS pour v0.9.0. Une tentative de migration GridTable a causé une régression (OutOfMemoryException dans PdfAssemblerTests) : Grid(N) = « N colonnes fixes indépendamment du nombre d'items », stockant N comme simple paramètre et tolérant les comptes dégénérés que ComputePageGeometry peut produire ; matérialiser N RelativeColumn() explicites OOM sur ces entrées. Conformément à No-Pendulum, on soustrait (suppress + justifie) plutôt que réécrire du layout éprouvé dans une zone fragile.

Validation

  • ✅ Build solution : 0 warning CS (seul NU1903 AutoMapper subsiste, hors scope)
  • ✅ Tests unitaires : 533 passed / 0 failed / 5 skipped (baseline préservée)
  • ✅ Contrats PDF re-vérifiés après revert du Grid : PdfAssemblyTests + PrintAndPlay* = 23/23

Hors scope (signalés séparément)

  • NU1903 AutoMapper CVE → lane po-2024
  • MSB3073/SGEN (Microsoft.XmlSerializer.Generator) = warning outillage MSBuild préexistant, non lié au code

🤖 Generated with Claude Code

…9.0)

Clears every CS warning from the solution build, leaving only NU1903
(AutoMapper CVE, handled separately in the dependency-bump lane).

- CS0618 (QuestPDF Grid deprecated, CardGridComponent): suppressed with a
  documented #pragma rather than migrated. QuestPDF is deliberately pinned at
  2022.12.12 (thread-safety) and is NOT upgraded for v0.9.0, so the "use Table"
  advice is moot. A faithful Table migration is impossible without a layout
  regression: Grid(N) means "N fixed-width columns regardless of item count"
  and stores N cheaply, tolerating the large/degenerate column counts
  ComputePageGeometry can yield; materialising N explicit RelativeColumn()
  definitions OOMs on those same inputs (regression caught by PdfAssemblerTests).
- CS0618 (Magick.NET ColorProfile.USWebCoatedSWOP, ImageHelper): renamed to the
  non-obsolete ColorProfiles.USWebCoatedSWOP (same profile, per the deprecation).
- CS8632 (nullable annotation outside #nullable, DatasetUpdaterConfig): added
  `#nullable enable annotations` (annotation-only, introduces no null-state warnings).
- CS0414 (dead PdfManager.MmToPointsFactor + its now-orphan InchTo* consts): removed.
- CS0105 (duplicate `using System.Xml.Xsl`, FallacyMindMapDocumentConfig): removed.
- CS8600 x2 (FallacyCardTests imageFile): declared `string?`.

Tests: 533 passed / 0 failed / 5 skipped (baseline preserved; PdfAssembly +
PrintAndPlay grid contracts verified after the Grid-migration revert).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jsboige
jsboige merged commit b19bf18 into master Jun 23, 2026
3 checks passed
@jsboige
jsboige deleted the fix/build-warnings-cleanup branch June 23, 2026 09:50

@clusterManager-Myia clusterManager-Myia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[NanoClaw]

Reviewed PR #587 (build: eliminate all CS compiler warnings). 6 files, +15/-8. Each warning is addressed at the root cause, with one legitimate scoped suppression and one noise diff.

Genuine fixes (root cause addressed):

  • PdfManager.cs:22-24 — three private members (InchToCentimetre, InchToPoints, MmToPointsFactor) deleted. Verified truly dead: PrintAndPlayDocument.cs:23-25 holds byte-identical private copies and is the only consumer of MmToPointsFactor (lines 60-63). Resolves CS0414 ("field assigned but never used") with no other caller affected. Correct.
  • ImageHelper.cs:176ColorProfile.USWebCoatedSWOPColorProfiles.USWebCoatedSWOP. Canonical deprecation fix for Magick.NET 14.x (csproj pins Magick.NET-Q16-AnyCPU 14.13.1); behavior-preserving (same underlying ICC profile), only call site in the repo. Correct.
  • FallacyMindMapDocumentConfig.cs:25 — removed using System.Xml.Xsl; (CS8019 / IDE0005). Trivial.
  • FallacyCardTests.cs:61string imageFile = null;string? imageFile = null;. Correct minimal nullable annotation: null-init, reassigned via Directory.EnumerateFiles(...).FirstOrDefault() in the try, then explicitly null-checked before use with an Assert.Fail path. The ? reflects actual flow rather than silencing it. Correct.

Scoped suppression (legitimate, called out as such):

  • CardGridComponent.cs:22#pragma warning disable CS0618 around container.Grid(...), matching restore at line 49, with a thorough justification comment (QuestPDF Grid deprecated 2022.11; project pins QuestPDF 2022.12.12; Table migration OOMs on degenerate column counts caught by PdfAssemblerTests). Textbook-correct form: rule-named, locally scoped (~24 lines), justified. Not over-broad.

Over-broad suppression / assembly-level [SuppressMessage] / project-wide <NoWarn>: none. Good.

Noise diff (minor):

  • DatasetUpdaterConfig.cs:1 — patch shows +#nullable enable annotations as added, but the directive is byte-identical at base and head (verified #nullable enable annotations on line 1 in both). CRLF/LF normalization artifact, not a content change. Inflates the diff for zero benefit and can cause spurious merge conflicts.

Masked bug / sneaked behavioral change: none. No secrets/keys in any patch (scanned).

Disposition: COMMENT_WITH_CONCERNS

Suggestions:

  1. Drop the DatasetUpdaterConfig.cs hunk — it's CRLF noise (directive already present at base). Keeps the PR at a true 5-file warning-elimination set.
  2. Surface the QuestPDF pin rationale in the PR description (not only the inline comment) so reviewers skimming the file list see why CS0618 is suppressed rather than fixed.
  3. The CS0618 suppression is well-justified today, but QuestPDF deprecations tend to hard-error on major-version bumps — add a one-line TODO referencing the stable-versions table so it's revisited at the next QuestPDF upgrade rather than forgotten.

jsboige added a commit that referenced this pull request Jul 2, 2026
…pConfigFile, chemins) #635 (#643)

* docs(release): unifier docs pré-tag v0.9.0 — compteurs tests, langues, SkipConfigFile, chemins (#635)

Corrige les incohérences factuelles entre docs publiées identifiées par l'audit
ai-01 (2026-07-02), à unifier AVANT le tag. DoD : 0 compteur divergent entre
docs publiées.

Compteurs tests divergents (bloqueur crédibilité) → unifiés sur 549/0/5 :
- CHANGELOG.md l.70 : « 159 tests » + skips contradictoires (1 vs 5) → 549/0/5
- docs/RELEASE-NOTES-v0.9.0.md l.44 : « 533 tests » → 549/0/5
- CLAUDE.md l.448 : « 77 tests, 1 skip » → 549/0/5

Dates placeholders :
- CHANGELOG.md l.8 : `2026-06-XX` → `2026-07-XX`
- RELEASE-NOTES l.3 : « WE 27/06 » → « pré-tag juillet 2026 »
- RELEASE-NOTES l.22 : régén 2026-06-25/bef3bc6c → 2026-07-01/3e2fa0c0 (post-#640)

README.md racine (incomplet pour la release) :
- « currently in French » → mention 8 langues (FR/EN/RU/PT/ES/AR/FA/ZH)
- Chemins `net9.0/` → `net9.0-windows/` (TF réel du csproj, 2 occ.)
- Ajout section Downloads (snippet §5 release-dossier, adapté : Ontologie FR·EN,
  Mind Maps 8 langues) — résout demande #134

News FR (#135) :
- Téléchargements : Ontologie « FR » → « FR·EN » (réalité bilingue #637)
- Cartes mentales : nuance ajoutée (Fallacies 8 langues ; Vertus FR-frozen,
  localisation différée — cf audit Virtues mindmap FR-figé)
- Scope MindMap tranché : placeholder « 4 ou 8 langues » → 8
- Checklist : retrait item placeholder scope MindMap résolu

CLAUDE.md projet (contradictions actives dangereuses pour agents) :
- SkipConfigFile : « ALWAYS verify false » (piège actif) → « deliberately true,
  C# defaults = source of truth, tuple serialization casse JSON »
- Magick.NET 13.5.0 → 14.14.0 + nuance CMYK (no-op PNG, GS post-process #632)
- Languages FR/EN/RU/PT → 8 langues (suffixes CSV étendus)
- Chemin output `net9.0/Target` → `net9.0-windows/Target`
- « 20 SVGs 4 langues » → 8 langues (PR #565)
- Tests 77 → 549 (July 2026, zero-warning #587)
- Table CMYK Debug/Release : nuance #632 (per-image no-op PNG, autorité GS PDF)

Vérification DoD : grep 159/533/77 + 2026-06-XX + « false » dangereux = 0
résiduel (le seul match « false » = mention contextuelle « Do not fix to
false », correct).

Co-Authored-By: Claude-Code <noreply@anthropic.com>

* docs(release): corriger compteur tests — 548/1/5 (fail OWL #133), pas 549/0/5 (#643 review ai-01)

Contre-vérification empirique ai-01 + re-vérification po-2024 (dotnet test sur
f2852ab) : le compteur réel est 548 pass / 1 fail / 5 skip / 554 total, PAS
549/0/5 (claim reprise du body #635, non vérifiée en amont).

Le FAIL = OwlE2EGenerationValidationTests.LoadedOntology_RdfTypeAndInScheme_
DroppedByOwl2XmlRoundTrip — bug round-trip OWLSharp pré-existant (tracké #133),
n'affecte pas les assets générés. Le publier « 0 fail » aurait recréé le
problème de crédibilité que #635 corrige.

Formulation honnête (CHANGELOG + RELEASE-NOTES + CLAUDE.md) :
  548 tests pass, 5 skips (GUI/infra), 1 known-fail (OWLSharp rdf:type/inScheme
  round-trip, pre-existing, tracked #133 — does not affect generated assets)

Vérifié empiriquement : échec 1, réussite 548, ignorées 5, total 554.

Co-Authored-By: Claude-Code <noreply@anthropic.com>

---------

Co-authored-by: Your <your.email@example.com>
Co-authored-by: Claude-Code <noreply@anthropic.com>
jsboige added a commit that referenced this pull request Jul 5, 2026
… zéro-warning résiduel (#706)

TranslationCoverageReport.LoadTaxonomyData used `new System.Net.WebClient()` +
DownloadStringTaskAsync to fetch the taxonomy CSV from an http URL. WebClient is obsolete
since .NET 6 (SYSLIB0014: use HttpClient). This was the only source-level CS warning left in
the converter project — the build is otherwise zero-warning (#587), but this one SYSLIB0014
had survived.

Fix: static readonly HttpClient field (the recommended pattern — HttpClient is meant to be
instantiated once and reused; per-use instantiation risks socket exhaustion under load) +
GetStringAsync. The enclosing method is already async Task<List<Fallacy>>, so the swap is a
1:1 behavioral equivalent (download a string from a URL, then ParseCsvContent).

Behavior: unchanged. The http branch still downloads then parses; the local-file branch is
untouched.

Scope: non-Cards (release freeze is on Cards/ only). One file, one method.

REMAINING warning (NOT fixed here, out of scope):
  MSB3073 + SGEN "Failed to generate the serializer for Argumentum.AssetConverter.dll"
  from Microsoft.XmlSerializer.Generator. This is a build-time tooling warning (sgen config /
  XmlSerializer generation), not a source-level CS warning, and fixing it is build-config
  territory — riskier during release freeze. Flagged for a post-release tooling pass.

Verified: dotnet build (no SYSLIB0014 remains), dotnet test = 578 pass / 1 fail (pre-existing
OWL #133 known-fail, unrelated) / 5 skip / 584 total — baseline preserved.

Dispatch ka7vl5 (TERTIAIRE — zéro-warning résiduel lane). Base 70bd160.

Co-authored-by: Your <your.email@example.com>
Co-authored-by: Claude-Code <noreply@anthropic.com>
jsboige added a commit that referenced this pull request Jul 6, 2026
… CS8603 in MmGeneratorTests) (#726)

Re-verification of the #710 nullable-cleanup baseline on master 9f52446 (dispatch h2utyb idle-de-
secours: "CS warnings beyond #710's 96"). Found +2 raw warnings = 1 new DISTINCT nullable-flow
warning introduced by PR #715 (fix #665 Virtue ar/fa/zh localization, commit 699580a).

Drift: MmGeneratorTests.cs:281 CS8603 (possible-null return). #715 added a CSV path-finder helper
(walks 12 parent dirs for Argumentum Virtues - Taxonomy.csv, returns null at line 281 if not found);
method returns non-nullable string → CS8603. Confirmed by git blame (lines 274-282 all = 699580a)
and diff vs 34c7702 (helper absent at #710 base — those lines held a FamilleExpression assertion).

MmGeneratorTests.cs: was 6 warnings (#710 top-8), now 7 raw (3 pre-existing CS8602 + 1 new CS8603).
Main converter project stays 0 CS (zero-warning, #587). Distinct-warnings on 9f52446 = 49; raw/echo
factor consistent across both measurements (96→98 = apples-to-apples raw-line count).

Impact on the plan: negligible — new warning is in Slice C scope (CS86xx nullable-flow),
MmGeneratorTests.cs already in §1 top-8. Post-tag Slice C file-by-file pass picks it up; no slice
re-scoping. Fix is low-risk: helper legitimately returns null → string? return type is the honest
annotation.

Read-only: 0 code change, 0 Cards/ write, 0 build mutation. Reproducible via dotnet build Tests.csproj
--no-incremental on 9f52446. Keeps the #710 baseline current so the post-tag lane runs against an
accurate inventory (96→98, +1 distinct).

Dispatch h2utyb (idle-de-secours). Base 9f52446.

Co-authored-by: Your <your.email@example.com>
Co-authored-by: Claude-Code <noreply@anthropic.com>
jsboige added a commit that referenced this pull request Jul 6, 2026
…nings (#736)

Follow-on to the #710 nullable-cleanup (plan complete, 8 PR #727-734 merged). Dispatch `5czj9v`
[2] SECONDAIRE. Clears the 3 residual xUnit-analyzer warnings in Tests/ (the nullable family hit 0
in #710; these are the remaining non-CS analyzer warnings the build emits).

Fixes (3 distinct warnings, all additive annotation or async — no logic change):

- HarvestManagerExpectedImageCountTests.cs L56 (xUnit1012): `string rsstyle` → `string? rsstyle`.
  The Theory has `[InlineData(10, 3, null, 10)]` (L52) deliberately passing null rsstyle to pin the
  "null rsstyle = no grouping" branch of ComputeExpectedImageCount (mirrors CardPen). The null is
  INTENTIONAL test input; `string?` is the honest param type.
- LocalizedFileNameContractTests.cs L30 (xUnit1012): `string fileName` → `string? fileName`. The
  Theory has `[InlineData(null)]` (L28) pinning the GetLocalizedFileName guard clause (null/empty
  returned as-is). Same intentional-null-test-input idiom.
- OwlAdapterRegressionTests.cs L306+L319 (xUnit1031): `public void` → `public async Task` +
  `adapter.ToFileAsync(...).Wait()` → `await adapter.ToFileAsync(...)`. xUnit1031 flags blocking
  Task.Wait() in test methods; the fix is the canonical async/await. The method tests OWL2XML
  serialization to a temp file (no sync-context → no deadlock risk either way); async is the clean
  fix the analyzer asks for. Test name unchanged (ToFileAsync_...).

DoD (measured on this branch, base master 9ed2e78):
- dotnet build Tests.csproj --no-incremental: xUnit warnings 3→0. 0 errors.
- dotnet test --filter (HarvestManagerExpected|LocalizedFileName|OwlAdapterRegression): 41/41 pass.
- dotnet test (full): 587 pass / 1 fail (OWL #133 permanent) / 5 skip (#719). 0 regression.

Residual (irréductible-infra, hors-scope Tests/ DoD): MSB3073 ×1 distinct on the MAIN project
(Argumentum.AssetConverter.csproj, not Tests) — the Microsoft.XmlSerializer.Generator PackageReference
(L25) sgen target exits code 1 at build. This is a main-project build-infra warning, not a Tests/
code warning; the DoD scope is "dotnet build Tests → 0 warning (ou irréductible documenté)". It
appears in the Tests build log only via the Tests→main project dependency. Suppressing it would
require touching the main csproj (out of scope for this tests-only lane; main project is
zero-CS-warning stable per #587 and the SGEN package may be load-bearing for ExtendedXmlSerializer).
Follow-up: separate main-project investigation to decide suppress (`<XmlSerializerGenerator...>` off)
vs document as irréductible-infra.

Base 9ed2e78. 0 Cards/ write, 0 rendering code change.

Dispatch 5czj9v [2] SECONDAIRE. Base 9ed2e78.

Co-authored-by: Your <your.email@example.com>
Co-authored-by: Claude-Code <noreply@anthropic.com>
jsboige added a commit that referenced this pull request Jul 25, 2026
…nce pin (#871, #887) (#902)

- Magick.NET-Q16-AnyCPU 14.14.0 -> 14.15.0 (#871 merged): 14.15.0 is the
  declared first-patched version for 5 advisories (4 medium + 1 low) that
  accumulated against 14.14.0. Licence unchanged (Apache-2.0).
- NEW AutoMapper row documenting the 14.0.0 licence pin. The rationale
  previously existed only as a comment in the .csproj, which is not where an
  agent looks before approving a dependency bump — #887 (Dependabot 15.1.3)
  would have silently reverted the ratified decision jsboige 2026-06-23 and
  pulled the repo from MIT into RPL-1.5/commercial.
- Note that NuGet audit warnings surface on `restore`, not incremental
  `build` — an incremental build reports 0 while a forced restore reported 28
  NU1901/NU1902 lines. This is how the #587 zero-warning invariant went red
  without any code change (advisory drift against a pinned version).

Docs only; 0 code, 0 config, 0 prod CSV.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
jsboige added a commit that referenced this pull request Jul 25, 2026
…1.14 (#906) (#908)

The shipping project (Argumentum.AssetConverter) took a direct dependency on
UglyToad.PdfPig 1.7.0-custom-5, which declares NO licence (neither expression
nor URL) and is a third-party republish under a confusable ID — owner `grinay`,
invented `1.7.0` version, `dotnet pack` placeholder description. This was the
single item blocking the release licence gate from reading as PASS (#905).

Swap to the official `PdfPig` 0.1.14 package — the same version
Argumentum.AssetConverter.VisualTests already builds against in this solution.
The official package uses the identical `UglyToad.PdfPig` namespace, so no
`using` lines change; it carries a declared Apache-2.0 licence as an SPDX
expression (`<license type="expression">Apache-2.0</license>` in the nuspec,
projectUrl https://github.com/UglyToad/PdfPig). Official PdfPig has no stable
≥1.0 release (0.1.16-alpha is the newest), so 0.1.14 is the proven-in-solution
choice rather than chasing a non-existent "newer stable".

Verification (#906 DoD):
- `restore --force` + solution build: 0 warning, 0 error (invariant #587).
- `dotnet test` AssetConverter.Tests: 638 pass / 0 fail / 5 skip — no regression
  vs the 637/0/5 baseline (+1 from the new guard below).
- `dotnet list package --vulnerable`: only the known, deliberately-suppressed
  AutoMapper 14.0.0 advisory (GHSA-rvv3-g6hj-g44x, NuGetAuditSuppress +
  MaxDepth(1)); 0 advisory on PdfPig.
- PdfAuditor run on a real generated PDF (not just compiled): new regression
  test AuditPdf_WithGeneratedPdf_ShouldReadEmbeddedImagesViaPdfPig generates a
  Print&Play PDF and exercises PdfDocument.Open → GetPages → GetImages →
  RawBytes on official 0.1.14 — passes, proving the read path did not diverge.

The old `UglyToad.PdfPig` package is no longer referenced anywhere in the
solution; no dangling transitive remains (both consumers — AssetConverter and
the Tests project via project ref — now resolve to official PdfPig 0.1.14,
matching VisualTests).

Co-authored-by: Your <your.email@example.com>
Co-authored-by: Claude-Code <noreply@anthropic.com>
jsboige added a commit that referenced this pull request Jul 26, 2026
… missing from the .sln) (#911)

* fix(ci): #909 make the Test step actually run tests (Tests.csproj was missing from the .sln)

The CI `Test` step has never executed a single test in this repo. Proof: run 30171875373 finished
in 0.59 s with "Build succeeded", zero tests discovered, zero executed, exit 0. Locally the same
suite runs in ~10 s and reports 638 passed.

Root cause (two parts):
  1. Argumentum.AssetConverter.Tests.csproj was NOT in Argumentum Converters.sln (VisualTests was;
     Tests was not). So `dotnet restore`/`build` of the .sln never touched the Tests project.
  2. The Test step used `--no-build`, so `dotnet test Tests.csproj` found no built assembly and
     exited 0 having run nothing — a silent no-op, not a failure.

Consequences (beyond "no test signal"):
  - The #587 NuGet audit did not cover test dependencies. FluentAssertions 8.5.0 (commercial Xceed,
    jsboige arbitration pending), Microsoft.Playwright, xunit were in no scan.
  - Every "CI green" check on prior PRs certified build only, never tests — including #908's
    "638/0/5 verified" claim, which was local-only (correct, but not CI-validated).

Fix:
  - `dotnet sln add` Tests.csproj to Argumentum Converters.sln. Restore/Build now cover it, and the
    #587 NuGet audit now scans test deps too.
  - Drop `--no-build` from the Test step so it is self-sufficient: if Tests is ever not built
    upstream, `dotnet test` builds it (loud failure on error) instead of silently no-op'ing. This
    removes the silent-regression mode entirely.

Verification (local, the proof ai-01 asked for — the summary line, not the check colour):
  - `dotnet build "Argumentum Converters.sln" -c Debug` → 0 warning, 0 error (Tests now builds).
  - `dotnet test Tests.csproj -c Debug` → "échec: 0, réussite: 638, ignorée(s): 5, total: 643"
    (baseline 638/0/5 confirmed, +0 regression).

Environment-dependent tests (Playwright) — documented for arbitration, NOT disabled:
  - Two test classes launch real browsers: HtmlToPngConverterTests and PdfAssemblerTests. Both
    self-install chromium in-test via Microsoft.Playwright.Program.Main(new[] { "install",
    "chromium" }) and assert the install exit code is 0. No separate CI install step is added
    because the in-test install handles it in the correct output-directory context.
  - The 5 skipped tests are explicitly [Fact(Skip=...)]: 4 GSheetSync (OAuth + network) and 1
    SvgConversion (Magick crash, Trait Integration). They do not run locally or in CI.
  - Per #909 DoD: no test that passes locally is disabled here; no continue-on-error / || true. If
    CI goes red on a Playwright browser download/dependency, this is the expected escalation
    surface — surface it rather than silencing.

DoD #909 checklist:
  - [x] Tests.csproj added to Argumentum Converters.sln
  - [x] Test step no longer a silent no-op (verified 638/0/5 summary line locally)
  - [x] No test disabled; no continue-on-error / || true — the step can fail
  - [x] Baseline 638/0/5 reproduced locally
  - [x] NuGet audit (#587) now covers test deps (Tests is in the restored/built .sln)

Co-Authored-By: Claude-Code <noreply@anthropic.com>

* fix(tests): make GetEnabled_is_release_only_by_default deterministic under both build configs (#909)

Surfaced by #911's first real CI test run: the Release matrix leg failed exactly ONE test —
PdfCmykPostProcessTests.GetEnabled_is_release_only_by_default — while Debug passed 638/0/5.

Root cause: the test constructed `var debugConfig = new AssetConverterConfig();` and asserted it
behaves as Debug mode. But AssetConverterConfig.isInDebugMode is a `#if DEBUG` compile-time flag
(AssetConverterConfig.cs:447), so under a Release-built test assembly `isInDebugMode=false` and the
default config resolves to Release mode — the assertion held only when the test host happened to be
compiled Debug. This is a build-config-dependent test, not a real product bug, and it was hidden
for the entire history of the repo because the CI Test step was a silent no-op (#909).

Fix: drive the build mode via the explicit ForceDebugParams / ForceReleaseParams toggles instead of
relying on the compiled #if DEBUG flag. The contract under test is unchanged — the DEFAULT pair
(EnabledDebug=false, EnabledRelease=true → OFF in Debug, ON in Release) — but the assertion is now
deterministic under both matrix configurations. No test disabled, no contract weakened.

Verified locally under the Release matrix (the failing leg):
  dotnet test Tests.csproj -c Release --no-build  →  échec: 0, réussite: 638, ignorée(s): 5, total: 643

Also observed (not fixed, per ai-01's guidance — self-install handles it in the right context):
the CI logs showed a transient Chromium CDN 400 from playwright.azureedge.net that self-recovered
via the akamai mirror. All Playwright browser tests (637 of them) passed in both Debug and Release;
the CDN blip is built-in resilience, not a failure. No separate install step added.

Co-Authored-By: Claude-Code <noreply@anthropic.com>

---------

Co-authored-by: Your <your.email@example.com>
Co-authored-by: Claude-Code <noreply@anthropic.com>
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.

2 participants