docs(docs): R5.4 fourth gate round declared, guarantee restated exactly, audits
This commit is contained in:
1 parent
dcef2eb79c
commit
aff3a96d55
3 files changed
+196
-17
No files matched your search
+25
-17
@@ -3157,24 +3157,30 @@ also rewrites Markdown in authored text (escapes, emphasis, whitespace, links);
|
||||
reproduces only the table alignment. After a denylist that leaked round after round, the guard of
|
||||
the draft's two reports (`curation/report_guard.rs`, `format_report`; the R5.2 import report keeps
|
||||
`format_markdown`, verified at R5.2) is an allowlist: outside code spans, letters and digits,
|
||||
single spaces (none at a line end), the punctuation `.,;:!?'"«»()[]{}/-–—…%°≠=+#&<>’‘“”±→×≤≥|`, an
|
||||
underscore between two ASCII letters or digits and not glued to a URL (`http://`, `https://`,
|
||||
`www.`), a backslash before `"` or `|` (a JSON quote, the cell escape), `**word**` with one run of
|
||||
letters between spaces or line edges (the import report's form), and no inline construct (an
|
||||
inline link, image or reference `](`, `][`; a `[[ … ]]` padded inside; `<` before a letter, `/`,
|
||||
`!` or `?`: an HTML tag or an autolink; a character reference `&name;`, `&#n;`); inside code spans
|
||||
(generated ids and targets), 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, rationale, question, citation, URL, DOI, vet-flag value) are refused too. Everything else
|
||||
is refused with `UnsupportedMarkdown`, so an unknown form is refused by default.
|
||||
single spaces (none at a line end), the punctuation `.,;:!?'"«»()[]{}/-–—…%°≠=+#<>’‘“”±→×≤≥|`, an
|
||||
`&` before a space or as a URL's query separator (`&name=` in a bare URL, the name not starting
|
||||
with one of HTML's 106 legacy references, which Prettier decodes without a `;`), an underscore
|
||||
between two ASCII letters or digits and not glued to a URL (`http://`, `https://`, `www.`), a
|
||||
backslash before `"` or `|` (a JSON quote, the cell escape), `**word**` with one run of letters
|
||||
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
|
||||
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
|
||||
targets), 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,
|
||||
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
|
||||
built from admitted characters are ruled one by one, so a form no rule names and no probe covers
|
||||
could still pass.
|
||||
|
||||
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`,
|
||||
digests of the raw and formatted reports) holds 762 probes: 48 characters in six positions,
|
||||
whitespace patterns, Markdown constructs, the families each gate round found, and 400 strings from a
|
||||
seeded generator, each placed in a title, a rationale, a question, a citation, a label after a
|
||||
digests of the raw and formatted reports) holds 782 probes: 48 characters in six positions,
|
||||
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
|
||||
seeded generator over an alphabet that includes `&#`, `&`, `<`, `![`, `[[` 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`):
|
||||
304 probes byte for byte with the TypeScript, 458 refused, 0 silent difference; a probe made only
|
||||
279 probes byte for byte with the TypeScript, 503 refused, 0 silent difference; a probe made only
|
||||
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
|
||||
pass the guard unchanged.
|
||||
@@ -3210,9 +3216,11 @@ Residual risks: the reports admit an allowlist of characters and forms and refus
|
||||
including text Prettier would have kept (links, HTML, character references, symbols, combining
|
||||
marks, non-ASCII spaces, most uses of `*` and `_`): a future changeset using them stops the
|
||||
pipeline, visibly, until the allowlist is widened from new TypeScript probes or the port grows a
|
||||
Markdown printer; the allowlist itself is proven by probes, not by a model of Prettier, so a
|
||||
combination of admitted characters no probe covered could still differ (the sweep's random part
|
||||
and the three gate differentials found none in their last rounds); the comparison of the application's drawings accepts
|
||||
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
|
||||
URLs, then non-terminated references, image references and nested padded wiki links), each now
|
||||
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
|
||||
exactly the trigger-name rule, byte for byte; the frozen
|
||||
`horse.svg` is read, never regenerated, so a future change of the drawing needs its own
|
||||
decision; the residual risks of §11.13 stand.
|
||||
|
||||
Reference in new issue
Block a user