docs(docs): R5.4 fifth gate round declared, audits

This commit is contained in:
bchanot committed 2026-10-23 13:21:29 +02:00
1 parent bc5d0ad038
commit 1b12d90325
2 files changed
+19 -6

No files matched your search

@@ -36,3 +36,9 @@ Fresh verifier and security on the fixed commit: below.
- Security (`.claude/audits/2026-10-23-rust-r5-review-security-4.md`): HIGH non-terminated / long character references (`&#42 b` → `\*`, `&lt x &` → `&lt x <`), HIGH image references `![…]` (alt reprinted decoded), HIGH nested padded wiki links (`[[ a [[b]]`); MEDIUM §11.14/§11.15 overstated ("unknown form refused by default", "refused whole", "found none"); LOW quadratic underscore check. Control: 3,000 random strings without `&`, `![`, `[[`: 0 silent. - Security (`.claude/audits/2026-10-23-rust-r5-review-security-4.md`): HIGH non-terminated / long character references (`&#42 b` → `\*`, `&lt x &` → `&lt x <`), HIGH image references `![…]` (alt reprinted decoded), HIGH nested padded wiki links (`[[ a [[b]]`); MEDIUM §11.14/§11.15 overstated ("unknown form refused by default", "refused whole", "found none"); LOW quadratic underscore check. Control: 3,000 random strings without `&`, `![`, `[[`: 0 silent.
- Fixed: `&` admitted only before a space or as a URL query separator `&name=` (name not a legacy-reference prefix, the 106 HTML legacy names); `![` refused; padded `[[`/`]]` refused when the matching half exists; URL checks without allocation; sweep 782 probes (new families, random alphabet with `&#`, `&amp`, `&lt`, `![`, `[[`, `]]`): 279 identical, 503 refused, 0 silent; docs restated exactly. - Fixed: `&` admitted only before a space or as a URL query separator `&name=` (name not a legacy-reference prefix, the 106 HTML legacy names); `![` refused; padded `[[`/`]]` refused when the matching half exists; URL checks without allocation; sweep 782 probes (new families, random alphabet with `&#`, `&amp`, `&lt`, `![`, `[[`, `]]`): 279 identical, 503 refused, 0 silent; docs restated exactly.
- Verifier round 4 (on 6d4fdd6, arrived after the security fixes): C2 cross-code-span families: a plain `_` paired by remark with a closing `_` in a later code span (`to_do … \`ref_\``, `a_b \`c_\``; reachable without authored backticks through a reference id `ref_`), a link bracket and a bare URL running into an authored code span; C9 docs (code spans "generated", "refused by default"); floor `.skip(1)` hit in a test. 555,646 Prettier context docs: all pairs and triples of admitted characters 0 silent; 1,080 silent with authored code spans.
- Fixed: authored backticks refused in every authored field (`report_guard::assert_authored`, CHANGELOG cells and review list items); a plain `_` followed by a closing `_` in a later code span refused (the equine `{"min_x":…,"min_y":…}` stays admitted); sweep: reference `probe_ref`, three probes citing `probe_ref_`, five cross-span probes: 790 probes, 279 identical, 511 refused, 0 silent; floor hit rewritten (`match_indices`); CLAUDE.md folder line; docs and module header restated.
## Round 5
Fresh verifier and security on the fixed commit: below.
+13 -6
View File
@@ -3165,8 +3165,12 @@ backslash before `"` or `|` (a JSON quote, the cell escape), `**word**` with one
between spaces or line edges (the import report's form), and no inline construct (an inline link, between spaces or line edges (the import report's form), and no inline construct (an inline link,
image or reference `](`, `][`; an image reference `![`; a `[[` before a space with a `]]` after image or reference `](`, `][`; an image reference `![`; a `[[` before a space with a `]]` after
it, or a `]]` after a space with a `[[` before it; `<` before a letter, `/`, `!` or `?`: an HTML it, or a `]]` after a space with a `[[` before it; `<` before a letter, `/`, `!` or `?`: an HTML
tag or an autolink; a character reference `&name;`, `&#n;`); inside code spans (generated ids and tag or an autolink; a character reference `&name;`, `&#n;`); no plain underscore followed later on
targets), anything but a carriage return or a tab, never empty, no outer space; a table row with its line by one that can close an emphasis (inside a later code span, before anything but an ASCII
letter or digit: Prettier's parser paired `to_do … \`ref_\`` across the span); an authored text
holds no backtick (titles, rationales, questions, citations, URLs, DOIs, values), so code spans are
the generator's alone (ids, targets, field names); inside them, anything but a carriage return or
a tab, never empty, no outer space; a table row with
another cell count than its header and a control character in a list-item field (title, another cell count than its header and a control character in a list-item field (title,
rationale, question, citation, URL, DOI, vet-flag value) are refused too. Everything else is rationale, question, citation, URL, DOI, vet-flag value) are refused too. Everything else is
refused with `UnsupportedMarkdown`: a character outside the set is refused by default; the forms refused with `UnsupportedMarkdown`: a character outside the set is refused by default; the forms
@@ -3175,12 +3179,14 @@ could still pass.
The guarantee is empirical, not a proof of Prettier's behaviour: the TypeScript sweep The guarantee is empirical, not a proof of Prettier's behaviour: the TypeScript sweep
(`oracles/r5/markdown-sweep.json`, generator `packages/anatomy/tests/r5.markdown-sweep-oracles.test.ts`, (`oracles/r5/markdown-sweep.json`, generator `packages/anatomy/tests/r5.markdown-sweep-oracles.test.ts`,
digests of the raw and formatted reports) holds 782 probes: 48 characters in six positions, digests of the raw and formatted reports) holds 790 probes: 48 characters in six positions,
whitespace patterns, Markdown constructs, the families each gate round found (strong pairs, URLs, whitespace patterns, Markdown constructs, the families each gate round found (strong pairs, URLs,
non-terminated references, image references, nested padded wiki links), and 400 strings from a non-terminated references, image references, nested padded wiki links, authored code spans and
underscores paired across them, with the cited reference named `probe_ref` and, for three probes,
`probe_ref_`), and 400 strings from a
seeded generator over an alphabet that includes `&#`, `&amp`, `&lt`, `![`, `[[` and `]]`, each placed in a title, a rationale, a question, a citation, a label after a seeded generator over an alphabet that includes `&#`, `&amp`, `&lt`, `![`, `[[` and `]]`, each placed in a title, a rationale, a question, a citation, a label after a
word and a label alone (a cell start). Result (test `every_probe_is_formatted_as_the_typescript_or_refused`): word and a label alone (a cell start). Result (test `every_probe_is_formatted_as_the_typescript_or_refused`):
279 probes byte for byte with the TypeScript, 503 refused, 0 silent difference; a probe made only 279 probes byte for byte with the TypeScript, 511 refused, 0 silent difference; a probe made only
of what the equine reports use, outside the constructs, is never refused (a polygon's of what the equine reports use, outside the constructs, is never refused (a polygon's
`[[10,10],…]`, the DOI's `<0697:toih>` and the URLs' inner underscores pass). The equine reports `[[10,10],…]`, the DOI's `<0697:toih>` and the URLs' inner underscores pass). The equine reports
pass the guard unchanged. pass the guard unchanged.
@@ -3218,7 +3224,8 @@ marks, non-ASCII spaces, most uses of `*` and `_`): a future changeset using the
pipeline, visibly, until the allowlist is widened from new TypeScript probes or the port grows a pipeline, visibly, until the allowlist is widened from new TypeScript probes or the port grows a
Markdown printer; the allowlist is proven by probes, not by a model of Prettier: each gate round Markdown printer; the allowlist is proven by probes, not by a model of Prettier: each gate round
of R5.4 found a family the previous rules missed (Markdown syntax, constructs, strong pairs and of R5.4 found a family the previous rules missed (Markdown syntax, constructs, strong pairs and
URLs, then non-terminated references, image references and nested padded wiki links), each now URLs, then non-terminated references, image references and nested padded wiki links, then
authored code spans and underscores paired across code spans), each now
ruled and frozen in the sweep, so a combination of admitted characters no probe covers could still ruled and frozen in the sweep, so a combination of admitted characters no probe covers could still
differ; the comparison of the application's drawings accepts differ; the comparison of the application's drawings accepts
exactly the trigger-name rule, byte for byte; the frozen exactly the trigger-name rule, byte for byte; the frozen