fix(anatomy): R5.4 drawings projection charges each drawing's fixed parts
This commit is contained in:
1 parent
411e1058c0
commit
c4e717da86
5 files changed
+193
-8
No files matched your search
@@ -3101,7 +3101,7 @@ Owner go « Validation R5.3 et autorisation conditionnelle R5.4 » (2026-10-23),
|
||||
fresh verification of the final R5.3 state: met on c6e0d85 (CONFORME 13/13, security PASS with
|
||||
LOWs only, §11.12). Contract `.claude/tasks/contracts/2026-10-23-rust-r5-review.md`.
|
||||
|
||||
`crates/core/src/curation/draft` gains 1,692 lines (4,600 in all), plus `curation/report_guard.rs` (258):
|
||||
`crates/core/src/curation/draft` gains 1,698 lines (4,606 in all), plus `curation/report_guard.rs` (258):
|
||||
|
||||
| Module | Ports |
|
||||
|---|---|
|
||||
@@ -3116,7 +3116,7 @@ LOWs only, §11.12). Contract `.claude/tasks/contracts/2026-10-23-rust-r5-review
|
||||
| `pipeline.rs` | `render_draft_artifacts` complete, in the TypeScript order: document, assets, sheet-ref, migration map, the overlays and the application's drawings per view, CHANGELOG, REVIEW-REPORT, seed SQL |
|
||||
| `bin/import_equine.rs` | `--check` compares the 6 + 12 files with explicit criteria (byte identity; the application's drawings may fall back on parsed trees under the declared rule, printed as `declared:`); a file missing, not produced or different fails; the pending list and its `shortcut:` are gone; `--out` writes the 18 files |
|
||||
|
||||
Parity, every expectation written by the TypeScript (`tests/curation_review.rs`, 11 tests):
|
||||
Parity, every expectation written by the TypeScript (`tests/curation_review.rs`, 12 tests):
|
||||
|
||||
- `CHANGELOG.md` (1,114,533 bytes) and `REVIEW-REPORT.md` of the committed draft byte for byte;
|
||||
their raw texts equal the ledger's pre-Prettier digests, the aligned texts its digests;
|
||||
@@ -3205,7 +3205,7 @@ pass the guard unchanged.
|
||||
| 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 |
|
||||
| aligned report tables past 32 Mi display columns in all (rows × padded row width, the CHANGELOG's three level tables summed; the equine CHANGELOG's widest table is about 0.5 MB): one long authored cell pads every row of its level, so an 80 KB rationale over 14,000 records asked for 1 GB (security gate R5.4 round 6) | Prettier aligned it (the same amplification) | refused (`Guard`): the CHANGELOG's tables are projected from their cells (bytes bound the display width) before the raw table is joined (test `a_changelog_whose_alignment_would_explode_is_refused_before_it_is_built`, through the pipeline), every other table in the aligner before any padded row is built (test `an_aligned_table_past_the_bound_is_refused_before_it_is_built`), import report included |
|
||||
| records weighing more than 16 Mi units in all (`records::record_weight`, about the bytes in memory: 64 per JSON value and per string, plus one per byte of text, for the values, the change and the op, which each record clones; the equine records weigh 1,966,163; an add or a move also clones its position anchor): a rename or a remove records the whole item and one op, or the B/C marking, records once per item it reaches, so 400 renames of a 5,000-child item asked for 4.3 GB (round 7), a level B add of 10,000 children with a 128 KiB rationale 1.37 GB inside one marking, a 64 KiB value set over a subtree 2.0 GB (round 8), 200,000 one-character reference ids cloned into each record 948 MB at one unit per byte (round 9) | recorded (the same copies) | refused at the record that passes the bound, charged before the change and the op are cloned into it (`records::charge`, tests `the_records_cannot_outgrow_their_bound`, `the_records_bound_holds_inside_one_op_and_the_marking`); the raw report rows, built from the records, are bounded with them; the 200,000-value document bound now holds the baseline (test from a padded baseline) |
|
||||
| review drawings past 64 MiB in all, projected as an upper bound before any is rendered (`pipeline::review_drawings_bytes`: per view, the cleaned drawing twice, plus for each annotation of the view in the overlay's two documents and in the application's drawing 1,024 bytes and 24 times its JSON text and the longest view name, four copies escaped up to six times longer; the equine draft projects 1,390,428 bytes for about 0.56 MB written): 2,000 views asked for 547 MB (security gate R5.4 round 8), unnamed triggers repeating a long opened view's names 131 MB from a 485 KB changeset (round 10) | written | refused before rendering (`pipeline::MAX_REVIEW_DRAWINGS_BYTES`, tests `review_drawings_past_their_bound_are_refused_before_rendering`, `unnamed_triggers_repeating_a_long_view_name_are_refused_before_rendering`) |
|
||||
| review drawings past 64 MiB in all, projected as an upper bound before any is rendered (`pipeline::review_drawings_bytes`: per view, the cleaned drawing twice with 4,096 bytes each for the drawing's fixed parts (layer group, overlay group and legend), plus for each annotation of the view in the overlay's two documents and in the application's drawing 1,024 bytes and 24 times its JSON text and the longest view name, four copies escaped up to six times longer; the equine draft projects 1,406,812 bytes for 564,239 written): 2,000 views asked for 547 MB (security gate R5.4 round 8), unnamed triggers repeating a long opened view's names 131 MB from a 485 KB changeset (round 10) | written | refused before rendering (`pipeline::MAX_REVIEW_DRAWINGS_BYTES`, tests `review_drawings_past_their_bound_are_refused_before_rendering`, `unnamed_triggers_repeating_a_long_view_name_are_refused_before_rendering`; the projection bounds what is written, a draft without annotations included: test `the_drawings_projection_bounds_what_is_written`) |
|
||||
| an id an `add` writes (the item's, and those nested in its `children` or `categories`) or a `rename` id that is not a stable id (a region code for a region), or a field segment outside `[A-Za-z0-9_-]` (a control character, NUL included, a backtick, a `]`, a space, a non-ASCII letter) | accepted when a later op removed or renamed the item: the raw id stayed in the records and reached the reports' code spans (a line break there forged a section, security gate R5.4 round 2) | refused at the op, the check the final document applies anyway (test `ids_and_field_segments_that_could_forge_report_structure_are_refused`) |
|
||||
| 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 |
|
||||
|
||||
@@ -3220,7 +3220,7 @@ holds (a 100,000-level file is refused, never a stack overflow). The overlay pri
|
||||
that overflowed as `Infinity`, as `String(number)` did. 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 11, Markdown 2, draft 18,
|
||||
Tests: `cargo test -p faunosteo-core --features curation` (review 12, Markdown 2, draft 18,
|
||||
importer 5, binary 3, formatting 7, plus the crate's suites); anatomy 144 (two generators added).
|
||||
|
||||
### 11.15 Checkpoint R5.4
|
||||
|
||||
Reference in new issue
Block a user