Skip to content

test(tests): nullable-cleanup Slice C-5 — FallacyLinkFallback SetLink null (#710, x0ykyn) - #733

Merged
jsboige merged 1 commit into
masterfrom
fix/tests-nullable-slice-c5
Jul 6, 2026
Merged

test(tests): nullable-cleanup Slice C-5 — FallacyLinkFallback SetLink null (#710, x0ykyn)#733
jsboige merged 1 commit into
masterfrom
fix/tests-nullable-slice-c5

Conversation

@jsboige

@jsboige jsboige commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Slice C-5 of #710 nullable-cleanup — FallacyLinkFallback SetLink null (3 warnings)

Fifth sub-lot of Slice C (CS86xx nullable-flow). Follows Slice A (#727), B (#728), C-1 (#729), C-2 (#730), C-3 (#731), C-4 (#732).

Single-signature fix — 3 CS8625 (L115/135/152) all from one helper

All three stem from SetLink(f, linkProp, null) where the helper was declared:

private static void SetLink(Fallacy f, string propName, string value)
    => typeof(Fallacy).GetProperty(propName)!.SetValue(f, value);

The null is intentional — the FallacyLinkFallback suite deliberately clears a non-source language link to exercise the mind-map link fallback cascade (non-source null → EN → FR source-floor → null floor). string? value is the honest param type; the body SetValue(f, value) accepts object so null is runtime-legal.

This is the fragile-area link-fallback contract pinned by this suite (CLAUDE.md mind-map localization). The annotation changes nothing about the cascade behavior — only the declared parameter type. Direct confirmation: all 29 FallacyLinkFallback tests pass unchanged.

DoD (measured on this branch, base master 240511c8)

CsvHelper safety (#710 §3)

NOT IN SCOPE. FallacyLinkFallback exercises the link-fallback cascade via reflection on Fallacy entities, not the CsvHelper CSV load path.

Slice C remaining (~5 distinct CS86xx, final lot)

5 singletons across 5 files: CsvGridConversion, OwlE2E, LoggerMarkup, UtilityExtensions, PKHierarchical — to be bundled into a final C-final lot.

Non-goals

  • 0 write under Cards/. 0 production / card-rendering code changed. Tests-only.
  • 0 CsvHelper-mapped type changed. 0 cascade-logic change (annotation-only).

Base 240511c8. Dispatch x0ykyn PRIMARY (Slice C-5). Independent of #727/#728/#729/#730/#731/#732 (different files; this branch off master).

🤖 Generated with Claude Code

Co-authored-by: Claude-Code noreply@anthropic.com

… null (3 warnings)

Fifth sub-lot of Slice C (CS86xx nullable-flow) of the #710 nullable-cleanup plan
(dispatch x0ykyn PRIMARY; follows Slice A #727, B #728, C-1 #729, C-2 #730, C-3 #731, C-4 #732).

Single-signature fix: 3 CS8625 (L115/135/152) all stem from `SetLink(f, linkProp, null)` where the
helper was declared `SetLink(Fallacy f, string propName, string value)`. The null is INTENTIONAL —
the FallacyLinkFallback test suite deliberately clears a non-source language link to exercise the
mind-map link fallback cascade (non-source null → EN → FR source-floor → null floor). `string? value`
is the honest param type; the body `SetValue(f, value)` accepts object so null is runtime-legal.

This is the fragile-area link-fallback contract pinned by this suite (CLAUDE.md mind-map
localization) — the annotation changes nothing about the cascade behavior, only the declared
parameter type. Direct confirmation: all 29 FallacyLinkFallback tests pass unchanged.

DoD (measured on this branch, base master 240511c):
- dotnet build Tests.csproj --no-incremental: FallacyLinkFallback emits 0 CS86xx (3→0). 0 errors.
- dotnet test --filter FallacyLinkFallback: 29/29 pass.
- dotnet test (full): 587 pass / 1 fail (OWL #133 permanent) / 5 skip (#719). 0 regression.

CsvHelper safety (#710 §3): NOT IN SCOPE — FallacyLinkFallback exercises the link-fallback cascade
via reflection on Fallacy entities, not the CsvHelper CSV load path.

Slice C remaining: 5 distinct CS86xx across 5 files (CsvGridConversion, OwlE2E, LoggerMarkup,
UtilityExtensions, PKHierarchical) — singletons, bundle into a final C-final lot.

Base 240511c. 0 Cards/ write, 0 rendering code change.

Dispatch x0ykyn (PRIMARY, Slice C-5). Base 240511c.

Co-authored-by: Claude-Code <noreply@anthropic.com>
@jsboige
jsboige merged commit 3cd8b2c into master Jul 6, 2026
3 checks passed
@jsboige
jsboige deleted the fix/tests-nullable-slice-c5 branch July 6, 2026 17:10
jsboige added a commit that referenced this pull request Jul 6, 2026
…omplete (#710) (#734)

Final sub-lot of Slice C (CS86xx nullable-flow) of the #710 nullable-cleanup plan
(dispatch x0ykyn PRIMARY; follows Slice A #727, B #728, C-1 #729, C-2 #730, C-3 #731, C-4 #732,
C-5 #733). This completes Slice C: all 32 distinct CS86xx in Tests/ are addressed across the
7 sub-lots C-1..C-final (merged set), leaving 0 CS86xx once all slice PRs are merged.

The 5 singletons (one warning per file, 5 different areas):

- CsvGridConversionContractTests.cs L176 (CS8625): `new List<object> { "a", null!, "c" }` — the null
  cell is INTENTIONAL (test name "GridToCsv_NullCells_BecomeEmptyStrings", pins the `cell?.ToString()
  ?? ""` guard). `null!` is the honest suppression (runtime-legal null cell, annotation-strict).
- OwlE2EGenerationValidationTests.cs L60 (CS8603): `private static string? ResolveRepoFile(...)` —
  path-finder helper legitimately returns null when the ontology file isn't found walking up from
  the bin dir (same idiom as #715 FindRepoVirtuesCsv). The sole caller (L47) already null-checks and
  throws FileNotFoundException (L48-54); the throw guarantees `path` non-null at L55 FromFile, so no
  caller `!` needed.
- LoggerMarkupSafetyTests.cs L58 (CS8600): `string output = null!;` — closure-capture pattern
  (assigned in the lambda at L59, asserted at L62). `null!` is the honest initializer.
- UtilityExtensionsLayoutTests.cs L142 (CS8600): `((string)null!).PathIsUrl()` — the null is
  INTENTIONAL (test name "PathIsUrl_Returns_False_For_Null", pins the null-guard so a regression
  that dropped it would NRE). The `null!` documents that intent.
- PKHierarchicalGroupingTests.cs L25 (CS8619): `.Select(record => record["path"].ToString()!)` —
  the path key is always set by BuildRecords (L22), so ToString on the boxed string is non-null;
  `!` documents that invariant for the ToHashSet<string>() return type.

DoD (measured on this branch, base master 240511c):
- dotnet build Tests.csproj --no-incremental: the 5 target files emit 0 CS86xx (5→0). 0 errors.
- dotnet test (targeted GSheetSync+Ontology+Utility+PKHierarchical): 52 pass / 1 fail
  (OWL #133 permanent known-fail, pre-existing — not a regression; the 3 OTHER OwlE2E tests pass).
- dotnet test (full): 587 pass / 1 fail (OWL #133) / 5 skip (#719). 0 regression.

CsvHelper safety (#710 §3): NOT IN SCOPE — none of these 5 files is a CsvHelper-mapped entity or
exercises the CSV load path (GSheet grid round-trip, OWL ontology load via OwlAdapter, Logger
markup, path utility, PK grouping reflection).

#710 plan status once all 8 PR (#727-733 + this) merged: Tests/ CS86xx from 98 raw (49 distinct)
to 0. Slice A (6 raw CS0108/CS0219) + Slice B (20 raw CS8618) + Slice C (32 distinct CS86xx) = the
full 98-raw baseline. The #715 drift (CS8603, 96→98) closed at C-2.

Base 240511c. 0 Cards/ write, 0 rendering code change.

Dispatch x0ykyn (PRIMARY, Slice C-final — Slice C complete). Base 240511c.

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.

1 participant