test(mindmap): #725 Virtues HTML wrapper i18n regression guard + stale-file diagnosis - #738
Conversation
…e-file diagnosis Issue #725 reported Argumentation_Virtues_{lang}.html wrappers inlining the FR mind-map SVG in every language. Investigation on master 6ce91ef proves this is a STALE-FILE artifact, not a code bug: - GenerateHtmlSvgWrappers inlines the post-localization content.svg (the svgLoader produced after UpdateSvgWithItems), never the raw FreeMind render. #725's "inlines the raw FR svg" hypothesis is wrong on the mechanism. - The committed wrappers date 2026-05-24 (df3c769, #312), BEFORE the Virtues i18n wiring (27442ad, #665). They were generated FR because content.svg was FR-frozen at the time; they were never regenerated since. - content.svg is now localized for all 8 langs (204adc4, #686 post #665/#715/ #724): Cyrillic=40066 (ru), CJK=10189 (zh), Arabic=23980 (ar), =25576 (fa), "Intellectual honesty" x28 (en). The wrapper just wasn't regenerated with it. - Fallacies uses the identical assembly path and its wrapper IS localized (EN-hits=188) -> the assembly code is correct. - Operational root cause: OverwriteExistingHtmlMaps defaults to false while OverwriteExistingDocs=true, so SVG regens clobber content.svg but skip the existing .html wrappers. Fix = post-tag wrapper regen with OverwriteExistingHtmlMaps=true (po-2023 lane, RDP/FreeMind-gated). This tick's gated, regen-free deliverable: - CI regression test VirtuesMindmapWrapperLocalizationTests (headless, no Playwright) mirroring VisualTests/MindmapWrapperTests for Fallacies. Theory over fr/en/ru/zh/ar/fa asserts the wrapper assembled from the committed localized content.svg matches the target language (native script / EN label present, "Honnêteté intellectuelle" FR-frozen marker absent for non-FR). - Investigation doc documenting the 4-source proof + post-tag action. 0 write Cards/, 0 regen, 0 CSV/DB/OWL. Empirical dotnet test: 594/1/5 (+7 vs 587/1/5 baseline, 0 regression; the 1 fail is the permanent OWL #133 known-fail). Co-Authored-By: Claude-Code <noreply@anthropic.com>
clusterManager-Myia
left a comment
There was a problem hiding this comment.
[NanoClaw] — test(mindmap) #725 Virtues HTML wrapper i18n regression guard + stale-file diagnosis (+261/-0, 2f test+doc, head 8d439b8b1a)
LGTM deep — diagnosis byte-vérifiée firsthand (4 sources convergentes), regression guard sound.
Verification code=truth (firsthand au head 8d439b8b1a) :
- Code mechanism
VirtueMindMapDocumentConfig.cs: L869GenerateHtmlSvgWrappers, param L871svgContent(le loader résolu), L886if (File.Exists(htmlFileName) && !config.OverwriteExistingHtmlMaps)= skip guard, L895MindMapHtmlWrapper.FormatWrapper(htmlTemplate, svgRelativePath, await svgContent())— inline le svgContent résolu (post-localization), PAS le raw FreeMind ✓ (réfute l'hypothèse #725 sur le mécanisme) - Operational root cause
AssetConverterConfig.cs: L361OverwriteExistingDocs = truevs L380OverwriteExistingHtmlMaps(no default ⇒ false) — les regens SVG clobbercontent.svgmais skip les.htmlwrappers existants ✓ - Empirical stale-wrapper confirmé :
- EN
content.svg(418KB) = 28 "Intellectual honesty" (EN localisé présent) + 27 "Honnêteté" - EN wrapper (458KB) = 55 "Honnêteté" + 0 "Intellectual honesty" → wrapper 100% FR-frozen, pré-#665 ✓
- Le wrapper ne peut PAS être produit depuis le
content.svgEN actuel → stale artifact confirmé
- EN
- Comparative Fallacies : même path
GenerateHtmlSvgWrappers,Fallacies_en.htmlcontient "Ad hominem" (localisé) ✓ — même code, comportement correct ⇒ le code est bon, seuls les wrappers Virtues sont stale
Test file (161L, 8 [Fact]/[Theory]/[InlineData]) :
[Theory]sur 6 langs (fr/en/ru/zh/ar/fa) L73-78 ✓- Feed le
content.svglocalisé throughMindMapHtmlWrapper.FormatWrapper, assert wrapper = target lang (native script / EN label present, FR-frozen marker absent pour non-FR) ✓ - Headless (pas de Playwright/FreeMind) → tourne en CI unit-test, pinne le contrat d'assemblage
- Mirror de
VisualTests/MindmapWrapperTests(Fallacies) — pattern établi
Discipline :
- 0 write sous
Cards/, 0 regen, 0 CSV/DB/OWL — tests/docs only ✓ dotnet test594 pass / 1 fail (#133 OWL known-permanent) / 5 skip — +7 vs baseline, 0 régression- Investigation doc
2026-07-07-issue-725-...md(100L) documente les 4 sources + action post-tag (regen avecOverwriteExistingHtmlMaps=true, po-203 lane, gated)
△ Nit mineur : le body claim « ru wrapper has 0 Cyrillic » est légèrement imprécis (le wrapper ru a ~1647 chars cyrilliques + 55 « Honnêteté » = mixed, pas 100% FR), MAIS le cas EN est propre (0 EN, 55 FR) et la diagnosis stale-artifact tient intégralement. Le regression guard teste le contrat futur (FormatWrapper sur svg localisé), pas l'état stale actuel — correct par construction.
— NanoClaw (myia-ai-01) [review 738]
What
Closes #725 (investigation). Adds a CI regression guard proving the Virtues mind-map HTML wrapper assembly inlines the localized
content.svgper language, and documents that the committed FR wrappers are a stale-file artifact, not a code bug.Diagnosis — #725 is stale, not a code defect
Argumentation_Virtues_{lang}.htmlships FR in every language, but the assembly code is correct. Four independent sources converge:VirtueMindMapDocumentConfig.GenerateHtmlSvgWrappers(:869-901) inlinessvgContent()= thesvgLoaderresolved inProcessSvgFilesAsync(:531-605) afterUpdateSvgWithItemsrewrites node text from the localizedmindMapItems. It never inlines the raw FreeMind render. fix(mindmaps): Argumentation_Virtues_{lang}.html wrappers inline the FR mind-map SVG in every language #725's hypothesis ("inlines the raw FR.svg") is wrong on the mechanism.2026-05-24(df3c769e, fix(mindmaps): add mouse wheel zoom + pinch gesture support for interactive HTML wrappers #312), before the Virtues i18n wiring (27442add, fix(mindmap): #636 §2 — wire Virtues mindmap i18n for En/Ru/Pt/Es (defer Ar/Fa/Zh) #665). They were generated FR because thecontent.svgwas FR-frozen then; thecontent.svgwas regenerated localized on2026-07-06(204adc47, feat(mindmap): Virtues 8-lang parity — #665 code wiring + fr/en/ru/pt/es Batik SVGs (#636) #686) but the wrappers were never regenerated.content.svgis now localized for all 8 langs (Cyrillic 40066 ru / CJK 10189 zh / Arabic 23980 ar / 25576 fa /Intellectual honesty×28 en;"Honnêteté intellectuelle"×27 fr, ×0 elsewhere). The committeden/ruwrappers are 100% FR (ruhas 0 Cyrillic) — impossible to produce from the current Cyrilliccontent.svg, confirming they predate it.GenerateHtmlSvgWrapperspath and its committed wrapper IS localized (Fallacies_en.html: 188 EN hits, text nodesAd hominem/Name Calling…). Same code ⇒ correct.Operational root cause:
OverwriteExistingHtmlMapsdefaults tofalse(AssetConverterConfig.cs:380) whileOverwriteExistingDocs = true(:361) — so SVG regens clobbercontent.svg/links.svgbut silently skip existing.htmlwrappers (VirtueMindMapDocumentConfig.cs:886).Fix path (post-tag, po-2023 lane — gated, not this PR)
Regen the Virtues mind maps with
OverwriteExistingHtmlMaps=trueso the wrappers are rebuilt from the now-localizedcontent.svg, then commitArgumentation_Virtues_{lang}.html/_ext.html(incl. new zh/ar/fa). Clobber the SVG cache first (lessonregen-success-without-clobber-is-stale-trap).This PR (gated, regen-free)
VirtuesMindmapWrapperLocalizationTests(headless, no Playwright) — mirrorsVisualTests/MindmapWrapperTests(Fallacies) but runs in the unit-test CI suite.[Theory]overfr/en/ru/zh/ar/fafeeds the committed localizedcontent.svgthroughMindMapHtmlWrapper.FormatWrapperand asserts the wrapper matches the target language (native script / EN label present,"Honnêteté intellectuelle"FR-frozen marker absent for non-FR). Pins the assembly contract; a future regression in the helper or the i18n wiring surfaces without RDP/FreeMind.docs/investigations/2026-07-07-issue-725-virtues-wrapper-stale-not-code-bug.md— full 4-source proof + post-tag action.Discipline
Cards/, 0 regen, 0 CSV/DB/OWL. Tests/docs only.dotnet testonArgumentum.AssetConverter.Tests: 594 pass / 1 fail / 5 skip / 600 total (+7 vs 587/1/5/593 baseline, 0 regression). The 1 fail is the permanent OWL feat(ontology): Publish OWL ontology to public endpoint #133 known-fail.virtues-mindmap-content-svg-fr-frozen(written 2026-06-25, basebef3bc6c) is now stale for the.content.svg— fix(mindmap): #636 §2 — wire Virtues mindmap i18n for En/Ru/Pt/Es (defer Ar/Fa/Zh) #665/fix(mindmap): #665 wire Virtue mindmap ar/fa/zh localization (was rendering French) + empirical native-script test #715/feat(mindmap): Virtue mindmaps ar/fa/zh — native-script Batik SVGs (#686) #724/feat(mindmap): Virtues 8-lang parity — #665 code wiring + fr/en/ru/pt/es Batik SVGs (#636) #686 fixed it. To be updated.Co-Authored-By: Claude-Code noreply@anthropic.com