Skip to content

test(mindmap): characterize Virtues FR-frozen .content.svg (golden master, #601 guardrail) - #604

Merged
jsboige merged 1 commit into
masterfrom
test/virtues-mindmap-fr-frozen-characterization
Jun 28, 2026
Merged

test(mindmap): characterize Virtues FR-frozen .content.svg (golden master, #601 guardrail)#604
jsboige merged 1 commit into
masterfrom
test/virtues-mindmap-fr-frozen-characterization

Conversation

@jsboige

@jsboige jsboige commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a Golden-Master (characterization) test suite that pins the current behaviour of the Virtues mind map localization — which is that Virtues .content.svg are FR-frozen across all 8 release languages, in contrast to Fallacies (localized 8-lang, pinned by MindMapLocalizationRegressionTests).

This is the characterization test recommended at the end of investigation #601 (merged 71033f8c), and closes the test-gap noted there: "Without a Virtues test, a future regression here is silent."

Not a fix. This PR asserts the behaviour that exists today. It does not touch production code, the CSV, or Cards/. The fix itself is gated on jsboige (post-release, No-Pendulum) and tracked in #601's 3-step fix path.

What the test pins (3 guardrail sections, 9 assertions — all GREEN)

The FR-frozen gap is 2-layer (traced in #601):

Section Asserts (GREEN today) Fails when #601 fix step…
§1 FR-frozen headline TitleExpression stays {item.Text} for all 7 non-FR langs …2 ({item.TitleFr}) + 3 (conversion table) land
§2 Layer B stub Virtue entry = single "Vertus" conversion, 4 langs, no ar/fa/zh …3 (table mirrored to TitleFr→TitleZh) lands
§3 Layer A entity Virtue has no TitleAr/Fa/Zh; Text returns TitleFr even with TitleEn set …1 (ar/fa/zh props) / 2 (Text language-aware) land

When the fix lands, the failing assertions should be flipped to the localized expectation (mirroring MindMapLocalizationRegressionTests) — not deleted. The failure is the signal that the gap closed.

Precision surfaced by writing the test

The investigation #601 said entry #3 targets VirtueMindMapDocumentConfig.TitleExpression. Writing the test revealed that nameof(VirtueMindMapDocumentConfig.TitleExpression) returns the bare "TitleExpression", shared with the Fallacy text entry (#1) — so a TargetProperties.Contains(nameof(...TitleExpression)) lookup returns entry #1, not #3. The entry is instead located unambiguously by its unique "Vertus" conversion. Documented in the helper's XML doc so the next reader doesn't repeat the mistake.

Verification

dotnet test ... --filter VirtueMindMapFRFrozenCharacterizationTests
Réussi!  - échec: 0, réussite: 9, ignorée(s): 0, total: 9

No new compiler/analyser warnings introduced (warnings shown in CI output are pre-existing on other files). No production code or existing test modified.

Scope / constraints

  • 0 write under Cards/ (release freeze respected — test C# only, under Tests/)
  • ✅ Additive only (new file VirtueMindMapFRFrozenCharacterizationTests.cs)
  • ✅ Base c20d5d2c
  • Dispatch ai-01 2026-06-27, primary task (characterization test, GO)

Relates to #601 (mechanism traced). Does not close it — the fix is post-release/gated.

…ster, #601 guardrail)

Add VirtueMindMapFRFrozenCharacterizationTests — a Golden-Master suite pinning
the CURRENT behaviour that Virtues mind map node text renders French for all 8
release languages (Fallacies are localized 8-lang, pinned by
MindMapLocalizationRegressionTests).

This is an executable snapshot of the 2-layer gap traced in investigation #601
(merged 71033f8), NOT a regression test of desired behaviour:

- Layer B (config): the single Virtue-targeting MindMapLocalization entry is a
  stale stub that only rewrites the tree-root literal "Vertus", for 4 of 7
  target languages (en/ru/pt/es; ar/fa/zh absent).
- Layer A (entity): Virtue exposes no TitleAr/TitleFa/TitleZh (CSV columns from
  #590/#595 exist but are invisible to the mind map), and Virtue.Text hard-
  delegates to TitleFr.

Three guardrail sections, each GREEN today and expected to FAIL when the 3-step
fix documented in #601 lands (entity ar/fa/zh props + {item.TitleFr} expression
+ mirrored config table). At that point flip the assertions to the localized
expectation rather than deleting them — the failure is the signal the gap closed.

The test-writing process surfaced a precision my investigation missed:
nameof(VirtueMindMapDocumentConfig.TitleExpression) returns the bare "TitleExpression",
which is SHARED with the Fallacy text entry — so the entry must be located by its
unique "Vertus" conversion, not by nameof (documented in the helper XML doc).

Additive only: no production code or existing test modified. 0 write under Cards/
(release freeze). Dispatch ai-01 2026-06-27 primary (characterization test, GO).

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

@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]

Characterization test (golden-master) relu en profondeur (193 lignes, 1 nouveau fichier C#, additif only — vérifié : exactement 1 fichier touché, 0 write sous Cards/, release freeze respecté).

Pattern golden-master sain et exceptionnellement documenté : les tests pinent le comportement actuel (Virtues mind map FR-frozen pour les 8 langues de release) comme un GUARDRAIL, pas une assertion de comportement désiré. Chaque test documente explicitement qu'il est attendu à FAIL quand le fix #601 arrive (entity ar/fa/zh props + {item.TitleFr} expression + config table mirror), avec instruction de flip les assertions plutôt que de les supprimer. C'est exactement la bonne discipline pour un characterization test.

Vérifications :

  • Les 3 couches de root-cause sont couvertes : (1) headline no-op {item.Text} unchanged pour 7 langues non-FR, (2) Layer B config stub root-literal Vertus only/4 langues/no ar-fa-zh, (3) Layer A entity lacks TitleAr/TitleFa/TitleZh + Text délègue à TitleFr. La piqûre négative (Text.Should().Be("Échange enrichissant") même après TitleEn="Enriching exchange") capture précisément le bug central.
  • Référence #601 vérifiée : merged à 71033f8c (claim exacte). Scope additive confirmé.

Note mineure (non bloquante) : le commentaire du test référence le doc d'investigation comme docs/investigations/2025-06-25-virtues-...md, mais le vrai fichier est docs/investigations/2026-06-25-virtues-mindmap-fr-frozen-mechanism.md (2026, pas 2025). Inexactitude de chemin dans un commentaire seulement — n'affecte ni la compilation ni le comportement du test. À corriger pour la traçabilité si facile.

LGTM-with-artifact. Bon exemple de characterization test bien fait.

[COMMENT only — validation humaine]

@jsboige
jsboige merged commit 5c23e3d into master Jun 28, 2026
3 checks passed
@jsboige
jsboige deleted the test/virtues-mindmap-fr-frozen-characterization branch June 28, 2026 11:53
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