# Delta 0.0.5-alpha.3.fix.1 — couverture des tables dans les exemples Markdown fenced ## Baseline et version Baseline attendue : commit opérateur de `0.0.5-alpha.3`, réalisé après application de `history/0.0.5/alpha.3.md` avec statut `FAIL`. Le hash de ce commit n'est pas anticipé. Version avant application : ```text 0.0.5-alpha.3 ``` Version après application : ```text 0.0.5-alpha.3.fix.1 ``` ## Objet Corriger le faux négatif découvert pendant la gate opérateur de `alpha.3` : `audit_markdown_tables.py` ignorait toutes les tables placées dans des blocs fenced, y compris les exemples explicitement `markdown` du template `004-FILE_FAMILY_CONTRACTS.md`. Le fix étend uniquement le contrat de l'audit de tables. Il ne transforme pas l'audit en analyseur général des blocs de code et n'introduit aucun contenu de la tranche Rust `alpha.4`. ## Scope REPLACE : ```text VERSION scripts/audit_markdown_tables.py docs/templates/004-FILE_FAMILY_CONTRACTS.md docs/validation/001-VALIDATION_MATRIX.md ``` ADD : ```text tests/test_markdown_tables.py deltas/0.0.5/alpha.3.fix.1.md ``` DELETE : aucun. Le history `history/0.0.5/alpha.3.md` appartient au commit baseline du FAIL et n'est pas inclus dans l'archive du fix. ## Correction `scripts/audit_markdown_tables.py` passe en révision interne `2`. L'audit continue de contrôler les tables Markdown ordinaires. Dans un bloc fenced : - une fence explicitement `markdown` est auditée ; - une fence explicitement `md` est auditée ; - une fence d'un autre langage ou sans langage reste ignorée. Cette frontière évite les faux positifs sur les sorties terminal, extraits de code ou tableaux ASCII qui utilisent éventuellement des pipes sans être du Markdown à gouverner. `tests/test_markdown_tables.py` verrouille quatre cas : 1. table ordinaire et table fenced Markdown valides toutes deux comptées ; 2. table mal alignée dans une fence `markdown` rejetée ; 3. alias `md` audité ; 4. fence non Markdown conservée hors scope. `docs/templates/004-FILE_FAMILY_CONTRACTS.md` passe en révision `2` et réaligne les deux tables fenced révélées par le nouvel audit. `docs/validation/001-VALIDATION_MATRIX.md` passe en révision `10` et explicite la frontière de `PGR-MD-TABLE-001`. ## Validation opérateur Après application du history `FAIL`, commit de `alpha.3`, puis application du présent delta : ```bash test "$(cat VERSION)" = '0.0.5-alpha.3.fix.1' test -f history/0.0.5/alpha.3.md test -f deltas/0.0.5/alpha.3.md test -f deltas/0.0.5/alpha.3.fix.1.md test -f tests/test_markdown_tables.py test ! -e history/0.0.5/alpha.3.fix.1.md grep -A2 '^## Statut$' history/0.0.5/alpha.3.md | grep -Fx 'FAIL' grep -Fx '# version: 2' scripts/audit_markdown_tables.py grep -Fx '' docs/templates/004-FILE_FAMILY_CONTRACTS.md grep -Fx '' docs/validation/001-VALIDATION_MATRIX.md grep -Fx '# version: 1' tests/test_markdown_tables.py python3 -B -m unittest discover -s tests -p 'test_markdown_tables.py' -v python3 -B -m unittest discover -s tests -v python3 -B scripts/audit_markdown_headers.py \ README.md RULES.md ROADMAP.md CHANGELOG.md docs deltas history prompts python3 -B scripts/audit_markdown_tables.py \ README.md RULES.md ROADMAP.md CHANGELOG.md docs deltas history prompts python3 -B scripts/audit_markdown_links.py \ README.md RULES.md ROADMAP.md CHANGELOG.md docs deltas history prompts python3 -B scripts/audit_markdown_tables.py docs/templates/004-FILE_FAMILY_CONTRACTS.md python3 -B - <<'PY' from pathlib import Path import re history = Path('history/0.0.5/alpha.3.md').read_text(encoding='utf-8') assert re.search(r'## Statut\s+FAIL\s', history) script = Path('scripts/audit_markdown_tables.py').read_text(encoding='utf-8') assert '_MARKDOWN_FENCE_LANGUAGES = frozenset({"markdown", "md"})' in script assert 'audit_fenced_markdown' in script template = Path('docs/templates/004-FILE_FAMILY_CONTRACTS.md').read_text(encoding='utf-8') assert template.count('```markdown') == 2 matrix = Path('docs/validation/001-VALIDATION_MATRIX.md').read_text(encoding='utf-8') assert 'fences explicitement `markdown` ou `md`' in matrix assert 'sorties terminal' in matrix print('0.0.5 alpha.3.fix.1 fenced Markdown table audit: clean (regression covered, two template examples governed)') PY git diff --check git add VERSION scripts/audit_markdown_tables.py tests/test_markdown_tables.py \ docs/templates/004-FILE_FAMILY_CONTRACTS.md \ docs/validation/001-VALIDATION_MATRIX.md \ deltas/0.0.5/alpha.3.fix.1.md git diff --cached --check git status --short ``` La sortie Git attendue avant ajout du history du fix est exactement : ```text M VERSION A deltas/0.0.5/alpha.3.fix.1.md M docs/templates/004-FILE_FAMILY_CONTRACTS.md M docs/validation/001-VALIDATION_MATRIX.md M scripts/audit_markdown_tables.py A tests/test_markdown_tables.py ``` Le contrôle ciblé du template doit désormais compter ses deux exemples : ```text Markdown table audit: clean (2 table(s), 1 file(s)) ``` La suite Python doit compter `19` tests si aucun autre test n'est ajouté localement avant exécution. ## Transition ### PASS Créer et appliquer séparément `history/0.0.5/alpha.3.fix.1.md`, committer et pousser le fix, puis reprendre le plan `0.0.5` à `alpha.4`. ### FAIL Rester dans `0.0.5-alpha.3.fix.M`. Le scope MUST rester limité au contrat de `PGR-MD-TABLE-001` et aux tables révélées par ce contrôle tant qu'aucun défaut plus large ne justifie un REPLAN.