test(mindmap): characterize Virtues FR-frozen .content.svg (golden master, #601 guardrail) - #604
Conversation
…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
left a comment
There was a problem hiding this comment.
[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-literalVertusonly/4 langues/no ar-fa-zh, (3) Layer A entity lacksTitleAr/TitleFa/TitleZh+Textdélègue àTitleFr. La piqûre négative (Text.Should().Be("Échange enrichissant")même aprèsTitleEn="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]
Summary
Adds a Golden-Master (characterization) test suite that pins the current behaviour of the Virtues mind map localization — which is that Virtues
.content.svgare FR-frozen across all 8 release languages, in contrast to Fallacies (localized 8-lang, pinned byMindMapLocalizationRegressionTests).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."What the test pins (3 guardrail sections, 9 assertions — all GREEN)
The FR-frozen gap is 2-layer (traced in #601):
AssetConverterConfig.csentry Nouveau design #3 (the only Virtue-targetingMindMapLocalizationentry) is a stale stub: it rewrites only the tree-root literal"Vertus", for 4 of 7 target languages (en/ru/pt/es;ar/fa/zhabsent). It cannot rewrite{item.Text}because"Vertus"is not a substring of it.Virtue.csexposes onlyTitleFr/En/Ru/Pt/Es; noTitleAr/TitleFa/TitleZh(the CSV columns from feat(csv): #499 Phase 1 — add 12 relational/AIF columns to Virtues prod CSV #590/fix(i18n): #192 passe 2 — harmonize 24 Virtues term-structure cells (RTL/CJK consistency) #595 are invisible to the mind map). AndVirtue.Texthard-delegates toTitleFr.TitleExpressionstays{item.Text}for all 7 non-FR langs{item.TitleFr}) + 3 (conversion table) land"Vertus"conversion, 4 langs, no ar/fa/zhTitleFr→TitleZh) landsVirtuehas noTitleAr/Fa/Zh;TextreturnsTitleFreven withTitleEnsetTextlanguage-aware) landWhen 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 thatnameof(VirtueMindMapDocumentConfig.TitleExpression)returns the bare"TitleExpression", shared with the Fallacy text entry (#1) — so aTargetProperties.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
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
Cards/(release freeze respected — test C# only, underTests/)VirtueMindMapFRFrozenCharacterizationTests.cs)c20d5d2cRelates to #601 (mechanism traced). Does not close it — the fix is post-release/gated.