fix(logger): #630 escape Spectre markup on all console paths + non-throwing render fallback - #655
Merged
Merged
Conversation
…rowing render fallback A message containing square brackets (e.g. the [HARVEST-FAILURE] marker emitted by the #614 per-set resilience path) was fed unescaped to AnsiConsole markup rendering on the Problem, Title and Panel paths. Spectre's StyleParser threw InvalidOperationException from inside the resilience catch block, killing the whole run instead of degrading gracefully. - Markup.Escape(message) on Problem, Title (Rule) and Instructions/Explanations (Panel) paths, matching the already-escaped Info/Warning/Success path. - Escape ex.Message/LogFile in the logger's internal error handlers too. - Belt: wrap console rendering in try/catch with a plain-text fallback so no rendering failure can ever propagate out of Logger.Log (the #614 resilience guarantee). ArgumentOutOfRangeException guard preserved via exception filter. - Regression tests (LoggerMarkupSafetyTests, 10 tests): verified 5/10 fail against the old code (the 5 unescaped paths), 10/10 pass with the fix. Full suite: 566 pass / 1 known-fail (OWLSharp #133) / 5 skip. Closes #630. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 3, 2026
jsboige
added a commit
that referenced
this pull request
Jul 3, 2026
…EN+FR) (#659) Consolidated release-notes draft for the v0.9.0 GitHub Release, building on the po-2023 draft (docs/RELEASE-NOTES-v0.9.0.md) and reflecting the post-bundle-v3 work not yet captured there: Highlights: - 8 languages x 10 documents, print-ready (bundle v3, 80 PDFs, PNG-300-lossless) - Print & Play free + complete: Standard (full game) + Light (sample + Virtues families overview, depth<=2, #645/#648-650) - Print-ready CMYK + SWOP OutputIntent via --pdf-cmyk Ghostscript post-pass (#632/#652) - Rules i18n cleanup (#633->#640), 0 HIGH residual + committed anti-FP scanner Notable fixes since dossier #591: harvest deadlock (#651), Logger hardening (#630/#655), Scenarii 6.1.3 title (#653), GSheet Rules sync (#642). Known limitations: SVG mind maps potentially stale (#636), OWL round-trip #133, DNN CVEs (separate ops milestone). EN + FR (impersonal). NOT published - draft docs only, jsboige validates and pastes into the GitHub Release. Test count flagged as dashboard-baseline (reported, not empirically re-verified) per [[test-counter-empirical-dotnet-test]]. Base ca5db81. Co-authored-by: Your <your.email@example.com> Co-authored-by: Claude-Code <noreply@anthropic.com>
This was referenced Jul 4, 2026
jsboige
added a commit
that referenced
this pull request
Jul 4, 2026
…tability fixes) (#134) (#689) The v0.9.0 entry predating bundle v3 missed the print-production and late-cycle stability work. This refresh brings it in line with master `21e2c666`, cross-checked against the release-validation dossier v4 (docs/RELEASE-VALIDATION-v0.9.0.md §3.3) and dashboard decisions #26-69. Added: - "Print Production (CMYK & Print&Play)" section: Ghostscript post-process (#632), `--pdf-cmyk` entry-point (#652), bundle v3 = 80 PDFs DeviceCMYK + SWOP OutputIntent (6.18 GB RGB -> 5.30 GB CMYK), P&P Standard/Light (#645/#648-650, 64 -> 80 PDFs), GS timeout 180->900s (#670) - "OWL Ontology (Bilingual EN/FR)" section: Fallacies OWL 5.07 MB (#634 regen), Virtues OWL (#592/#499 Phase 2), honest scope note (EN+FR only, not 8-lang) - "Fixed - Pipeline Stability (Jun-Jul 2026)" section: harvest deadlock #651, serial retry #613/#676, logger Spectre #630/#655, CMYK oxymore, Johnny 6.1.3 #653, Rules i18n refonte #640, CSV hygiene #579/#581/#584, OWL staleness #634 Corrected (code=truth): - Magick.NET 14.13.1 -> 14.14.0 (verified in .csproj) - Test count 548 -> 578 pass / 1 known-fail #133 / 5 skip / 584 total (empirical `dotnet test` on Argumentum.AssetConverter.Tests, 2026-07-04, .NET 9). Previous counts in docs (548/549/570) were all stale No existing content regressed; all prior sections preserved. Co-authored-by: Your <your.email@example.com> Co-authored-by: Claude-Code <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problème (#630)
Quand un harvest set échoue, le marqueur
[HARVEST-FAILURE]injecté par la résilience per-set #614 est rendu parLogger.Log(..., MessageType.Problem). Ce chemin passait le message non-escapé àAnsiConsole.MarkupLine→ le StyleParser de Spectre interprète[HARVEST-FAILURE]comme un token de style →InvalidOperationExceptionlevée depuis le catch de la résilience → le run entier meurt au lieu de dégrader gracieusement. Le filet #614 était donc court-circuité par son propre message d'échec.L'audit du Logger a montré que le bug est une asymétrie : le chemin
Info/Warning/Successescape déjà (Markup.Escape), maisProblem,Title(Rule) etInstructions/Explanations(Panel — le ctorPanel(string)parse aussi le markup) ne le faisaient pas. Les handlers internes du logger interpolaient aussiex.Message/LogFilesans escape.Fix (les deux options du body de l'issue, complémentaires)
Markup.Escape(message)sur les 3 chemins manquants + surex.Message/LogFiledes handlers internes. Le marqueur[HARVEST-FAILURE]s'affiche désormais littéralement (greppable).AnsiConsole.WriteLine, sans parsing markup) — aucun échec de rendu ne peut plus se propager hors deLogger.Log, quelle que soit une future régression d'escape. Le garde-fouArgumentOutOfRangeException(enum invalide) est préservé via un exception filter.Le fichier log (
File.AppendAllText) écrivait déjà le texte brut — non affecté.Tests
LoggerMarkupSafetyTests(10 tests, console routée vers unStringWriterviaIAnsiConsolecustom) :[HARVEST-FAILURE] Card set ... failed and was skippedenProblem→ ne throw plus et rend le marqueur littéralement.MessageTypeavec contenu à crochets/moustaches/pseudo-styles.ArgumentOutOfRangeException(la ceinture ne l'avale pas).LogExceptionavec crochets dans les messages d'exception.Contre-vérification : contre l'ancien code (stash du fix), 5/10 échouent — exactement les 5 chemins non-escapés ; les chemins déjà sûrs passent. Les tests pinnent donc réellement le fix.
Suite complète : 566 pass / 1 known-fail (OWLSharp round-trip #133, pré-existant) / 5 skip. 0 warning introduit.
Impact
Closes #630. Relates #613, #614.
🤖 Coordinator ai-01