docs(docs): R5.4 first gate round declared (Markdown guard, strict comparison), audits
This commit is contained in:
1 parent
94f8b35105
commit
68dec25e5e
3 files changed
+285
-4
No files matched your search
@@ -3151,8 +3151,41 @@ existing citations is hashed; the stale test comment fixed; the §11.12 nits (th
|
||||
covers a later removal; the 200,000-value row; the line count at the close; the
|
||||
set-without-value case counted among the schema refusals).
|
||||
|
||||
Tests: `cargo test -p faunosteo-core --features curation` (review 6, draft 16, importer 5,
|
||||
binary 3, formatting 6, plus the crate's suites); anatomy 143 (the generator added).
|
||||
Markdown beyond the table alignment (found by the first R5.4 gates: the fresh verifier's
|
||||
differential of 10,500 changesets showed that Prettier also rewrites Markdown in authored text,
|
||||
the security gate that it could break the reports' structure). The port reproduces only the
|
||||
table alignment, so it refuses, with the closed kind `UnsupportedMarkdown`, every text Prettier
|
||||
would rewrite, never writing a report that differs silently. The rules come from a sweep written
|
||||
by the TypeScript (`oracles/r5/markdown-sweep.json`, generator
|
||||
`packages/anatomy/tests/r5.markdown-sweep-oracles.test.ts`: 31 characters in six positions,
|
||||
whitespace patterns and Markdown constructs, each placed in a title, a rationale, a question, a
|
||||
citation and a changed label; 220 probes): outside code spans, `*` outside a well-formed
|
||||
`**strong**` span, an underscore not between two letters or digits, a backslash before a space or
|
||||
at the end or an authored one before the cell escape `\|`, two spaces in a row, a tab, a carriage
|
||||
return, an odd number of backticks, an empty code span or one with an outer space; a table row
|
||||
whose cell count differs from its header; a control character (a line break included) in a
|
||||
title, rationale, question, citation, URL, DOI or vet-flag value written in a list item. Result
|
||||
(test `every_probe_is_formatted_as_the_typescript_or_refused`): 187 probes byte for byte with the
|
||||
TypeScript, 33 refused, 0 silent difference; a probe made only of what the equine reports use is
|
||||
never refused. The equine reports and the R5.2 import report pass the guard unchanged.
|
||||
|
||||
| Input | TypeScript | Rust |
|
||||
|---|---|---|
|
||||
| authored text with Markdown Prettier rewrites (`*x*`, `_x`, `a b`, a tab, a line break in a list item, `` `` ``, `a\|b`…) | written, then rewritten by Prettier (escapes, `_emphasis_`, collapsed spaces, indented continuation lines; a row with an extra cell) | refused (`UnsupportedMarkdown`) |
|
||||
| a pictograph in a table cell (an emoji, and ©, ®, ™, ✓, ★, ⚠ and the other characters `text::is_emoji_candidate` lists) | measured with Prettier's tables | refused (`UnsupportedWidth`, R5.2): the set is wider than the emoji, the refusal stays loud |
|
||||
| a label, id or path holding a code point XML 1.0 refuses, or a carriage return, in a review drawing | written (a non-well-formed file; a raw CR read back as a line feed) | refused: the drawing is not written |
|
||||
|
||||
The drawing comparison hides nothing (security gate, MEDIUM): the rule fallback of `--check`
|
||||
requires the committed file to rebuild byte for byte from its tree (so no comment, processing
|
||||
instruction, encoding or entity form can escape the comparison), the rule to change that tree,
|
||||
and the rebuilt text after the rule to equal the produced one byte for byte; `declared:` is
|
||||
printed only then (test `the_rule_fallback_refuses_what_the_tree_does_not_carry`: a stylesheet
|
||||
processing instruction, comments, a trailing comment and another declared encoding refused).
|
||||
The renderers are indexed (citation counts in one walk, previous markers and kept ids hashed,
|
||||
subjects grouped per change).
|
||||
|
||||
Tests: `cargo test -p faunosteo-core --features curation` (review 8, Markdown 1, draft 16,
|
||||
importer 5, binary 3, formatting 6, plus the crate's suites); anatomy 144 (two generators added).
|
||||
|
||||
### 11.15 Checkpoint R5.4
|
||||
|
||||
@@ -3160,8 +3193,12 @@ Graphic differences for the owner's validation: none in shapes, colours, positio
|
||||
one text difference in `app-main.svg` (the trigger's English name and tooltip), already decided
|
||||
at R3 and identical to the editor canvas.
|
||||
|
||||
Residual risks: the Markdown alignment refuses an emoji (declared since R5.2); the comparison of
|
||||
the application's drawings accepts exactly the trigger-name rule and nothing else; the frozen
|
||||
Residual risks: the reports refuse what Prettier would rewrite (emphasis, escapes, whitespace
|
||||
runs, line breaks in list items) and the pictographs the width table does not reproduce: a
|
||||
future changeset using them stops the pipeline, visibly, until the port grows a Markdown printer
|
||||
or the text changes; raw HTML and links in authored text are kept as the TypeScript kept them
|
||||
(GFM renders them; Gitea strips raw HTML); 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