IO SPEC — acceptance & selftest (v1.0, PS 5.1) But - Figer la ligne de sortie, l’ordre, la casse, les séparateurs, et les messages d’état. - Garantir l’interop parfaite entre outils (diff, grep, parsers, comparateurs). Encodage & EOL - Fichiers/console: UTF-8 sans BOM; EOL CRLF recommandé (LF accepté). - Booléens: True / False (majuscules). - SHA256: 64 hex MAJUSCULES (comparaison case-insensitive). Ligne METRICS (OBLIGATOIRE, ordre figé, sans espaces) entries={int}|blocking={int}|ptr_exists={True|False}|ptr_sha_match={True|False}|ptr_entries_note={int}|json_entries={int} Règles METRICS - Aucun espace autour des « | » ou « = ». - Toujours exactement 6 paires key=value dans cet ordre. - Affichée par acceptance ET selftest en 1ère ligne. Ligne STATUS (OPTIONNELLE, si applicable) - acceptance: - PASS: [PASS] BootPack acceptance OK. - BLOCK: [GATE-BLOCK] ou [GATE-BLOCK] blocking ids: - selftest: pas de [PASS]; peut émettre [GATE-BLOCK] si lecture pointer/KB KO. - Une seule ligne STATUS max, immédiatement après METRICS. Lignes DIAG (OPTIONNELLES — selftest UNIQUEMENT) Format: chaque ligne commence par « diag: » puis une clé et sa valeur. Clés canoniques (une par ligne): - diag: First3=XX-YY-ZZ - diag: BootPackPathLength=N - diag: PtrPathRaw="" - diag: TestPathRaw=True|False - diag: TestPathDequoted=True|False - diag: TestPathLong=True|False - diag: OpenReadOK=True|False - diag: KbSha=HEX64 - diag: PtrSha=HEX64 - diag: PtrEntriesNote=N ABNF (RFC5234-ish, simplifiée) LINE = METRICS CRLF [STATUS CRLF] *(DIAG CRLF) METRICS = "entries=" INT "|" "blocking=" INT "|" "ptr_exists=" BOOL "|" "ptr_sha_match=" BOOL "|" "ptr_entries_note=" INT "|" "json_entries=" INT STATUS = "[PASS] BootPack acceptance OK." / "[GATE-BLOCK" 1*VCHAR "]" *(SP VCHAR) DIAG = "diag:" SP 1*(VCHAR / SP) BOOL = "True" / "False" INT = 1*DIGIT HEX64 = 64HEXDIG CRLF = %x0D.0A Sémantique (rappel) - acceptance lit le SNAPSHOT embarqué ([BUG_KB_JSON]) uniquement. - selftest lit la KB EXTERNE via [BUG_KB_JSON_POINTER] et émet les DIAG. Exemples 1) Système à jour (acceptance) entries=48|blocking=22|ptr_exists=True|ptr_sha_match=True|ptr_entries_note=48|json_entries=48 [PASS] BootPack acceptance OK. 2) Ingest récent sans rebuild (acceptance) entries=47|blocking=22|ptr_exists=True|ptr_sha_match=False|ptr_entries_note=47|json_entries=47 [GATE-BLOCK] blocking ids: KB-A,KB-B,... 3) Selftest OK (KB pointée) entries=48|blocking=22|ptr_exists=True|ptr_sha_match=True|ptr_entries_note=48|json_entries=48 diag: First3=5B-42-55 diag: PtrPathRaw="\\DS-918\chatgpt\ChatGPT-Gouvernance-Projets\_registry\bug_kb\BUG_KB.json.txt" diag: TestPathRaw=True diag: TestPathDequoted=False diag: TestPathLong=True diag: OpenReadOK=True diag: KbSha=70B6BDED66122A0A0BF16F065351A43B8ED3C918DC04E8254BC8F715EBC89C77 diag: PtrSha=70B6BDED66122A0A0BF16F065351A43B8ED3C918DC04E8254BC8F715EBC89C77 diag: PtrEntriesNote=48 Version: 1.0 — 2025-11-02