docs(docs): V1-2.2 final A6 perimeter, root visibility, open findings
This commit is contained in:
1 parent
d8562f60f5
commit
a095ea0e1b
3 files changed
+92
-8
No files matched your search
@@ -111,6 +111,16 @@ view keeps the drawing's ids, so `osteo-halo` is reserved (V1-2.2, owner brief
|
||||
(`reserved_id`) and both composers refuse such a tree, so the halo the markers
|
||||
name is always the engine's.
|
||||
|
||||
Both forms append the layer as the root's last child, so it inherits the
|
||||
root's `visibility`. A root `visibility` other than `visible` is refused by
|
||||
the reader (`root_visibility`) and by both composers: a drawing could
|
||||
otherwise hide every marker while its own children set `visible` back. The
|
||||
root's `class`, `style`, `transform`, `filter`, `mask` and `clip-path` are
|
||||
removed by the reader; `opacity` and `display` on the root act on the drawing
|
||||
and the markers alike. Still open (RUST.md §12.10): `stroke-opacity`,
|
||||
`stroke-dasharray` and `stroke-width` on the root reach the markers, which do
|
||||
not set them, and a view without `view_box` takes its frame from the drawing.
|
||||
|
||||
## Checking the look
|
||||
|
||||
`pnpm import:equine` writes `draft/review/app-main.svg` and `app-head.svg`
|
||||
|
||||
@@ -3972,8 +3972,9 @@ with a PI shown `rejected` by the preview as the verdict refuses it.
|
||||
- The module's margin under its budget is about 30.8 KB by the test's measure since §12.8 (31.3 KB at §12.7) (3.3 KB before): the V1-2.5 and V1-2.6 pages must not grow the
|
||||
core's browser surface without measuring.
|
||||
- cairo colours: closed at the checkpoint (§12.7), strict numeric `rgb()` / `rgba()` kept.
|
||||
- Editor exports: Inkscape 1.4.3 covered at the checkpoint (§12.7), Figma at the finalisation (§12.8); the real Adobe
|
||||
Illustrator pending from the owner, its output untested until then (A6 open); Affinity optional. Figma's text
|
||||
- Editor exports: Inkscape 1.4.3 covered at the checkpoint (§12.7), Figma at the finalisation (§12.8); A6's final
|
||||
perimeter (owner, 2026-10-30, §12.10) is Figma, Inkscape, cairo and ImageMagick; Adobe Illustrator and Affinity are
|
||||
optional and untested, never claimed without a real export. Figma's text
|
||||
handling is untested: neither owner file carries the source's live text.
|
||||
- A verdict whose document does not read strictly carries no group and no drawing: M6's structure check
|
||||
(`complete_sheet_verification`) must accept a failed verdict without them, or the round would wait for its attempt limit.
|
||||
@@ -4104,3 +4105,60 @@ drawing and every committed SVG); `pdf_session` (`the_pdf_refuses_a_reserved_id_
|
||||
snapshots refused at the gate, the demo export's halo is the engine's filter byte for byte and every marker names it);
|
||||
`packages/core-wasm/tests/preview.test.ts` (three spellings on the shipped module). Mutations
|
||||
(`.claude/audits/2026-10-30-v1-2-2-mutations-reserved-ids.py`): 11 killed of 11.
|
||||
|
||||
### 12.10 Root visibility and the final A6 perimeter (owner, 2026-10-30)
|
||||
|
||||
Brief « V1-2.2 : arbitrage définitif A6 et correction visibility » on `81f7639`, after the MEDIUM of the security review
|
||||
of §12.9: both composers append the marker layer as the root's last child (the PDF view keeps the drawing's root, the
|
||||
canvas copies its attributes), so the layer inherits the root's `visibility`, which no marker sets. A drawing
|
||||
`<svg visibility="hidden">` whose children set `visible` back read clean (no removal) and drew without a marker.
|
||||
|
||||
| Point | Built | Where |
|
||||
|---|---|---|
|
||||
| Reader | `SvgRejection::RootVisibility` (`root_visibility`): `sanitize::check_root_visibility` accepts no `visibility` on the root or `visible` (CSS whitespace and letter case aside); `hidden`, `collapse`, CSS-wide keywords and any other value are refused. In `read_svg` after the reserved ids, so the verdict (`svg_rejected`), the preview (`rejected`), the loaded sheet, the upload tool and the PDF snapshot gate (`asset root_visibility`) answer it; `clean_svg` after active content, the targets and the reserved ids | `anatomy/svg/{sanitize,mod,clean,tree}.rs` |
|
||||
| Composers | `compose_canvas` and `compose_highlight` refuse such a root (`ComposeError::RootVisibility`, `svg_rejected` / `root_visibility` in `view.canvas`) | `anatomy/compose.rs`, `ops.rs` |
|
||||
| A6 | final perimeter Figma, Inkscape, cairo, ImageMagick; Illustrator and Affinity optional, never claimed without a real export; `owner/` and its procedure kept | contract core E1, V1-2 contract §17.6, export READMEs |
|
||||
|
||||
Why the root attribute only: the root's `class`, `style`, `transform`, `filter`, `mask` and `clip-path` were already
|
||||
removed by the reader (so `style="visibility:hidden"` on the root is a removal and the cleaned drawing shows its
|
||||
markers), `<style>` elements are removed, and a descendant's `visibility` stays in the drawing, never on the layer's
|
||||
ancestors. Root `opacity` and `display` act on the drawing and the markers alike; `fill`, `fill-opacity` and the
|
||||
stroke colour are set on every marker, so the root's never reach them.
|
||||
|
||||
Open after the independent security review of this step (pre-existing, owner decision, not built): the same
|
||||
inheritance through properties no marker sets, and the view's frame. (1) Root `stroke-opacity="0"` (or
|
||||
`stroke-dasharray="0.001 100000"`) with the drawing's groups setting it back removes every marker outline in the canvas;
|
||||
the detail trigger, filled at 0.06, then shows 0 pixels in Chromium, Firefox and WebKit; the PDF highlight keeps its
|
||||
0.85 fill. (2) Root `stroke-width="100000"` reaches the point hitboxes (`pointer-events="all"`, no stroke set): in
|
||||
Chromium and WebKit 13 of the 19 equine markers send their click to the last hitbox. (3) A view without `view_box`
|
||||
(the equine main view) is framed by the drawing's root `viewBox`: shifting it and translating the drawing back leaves
|
||||
the horse pixel-identical and every marker outside the frame. The class fix for (1) and (2) is the engine's: the layer
|
||||
`<g>` resets the inherited properties (`visibility`, `stroke-opacity`, `stroke-dasharray`, …) and the hitbox gets
|
||||
`stroke="none"`; it changes the R3 highlight oracle and the R4 digests. (3) needs a document rule (annotations inside
|
||||
their view's frame, in the verdict and the preview) or the document owning the main view's frame.
|
||||
|
||||
Browser proof (equine main view, `hip` selected, halo on; pixels that differ from the same SVG without its layer, so 0
|
||||
means no marker shows; composed by the core at `81f7639`, then by the fix):
|
||||
|
||||
| Root | Chromium 156 PDF / canvas | Firefox 157 PDF / canvas | WebKit 27.2 PDF / canvas | Fix |
|
||||
|---|---|---|---|---|
|
||||
| none (equine) | 3 920 / 43 685 | 3 918 / 43 779 | 3 930 / 43 687 | unchanged, SVG byte-identical |
|
||||
| `visibility="hidden"`, children `visible` | **0 / 0**, drawing drawn | **0 / 0**, drawing drawn | 0 / 0, nothing drawn | `root_visibility` |
|
||||
| `visibility="collapse"`, children `visible` | 0 / 0, drawing drawn | 0 / 0, drawing drawn | 0 / 0, nothing drawn | `root_visibility` |
|
||||
| `style="visibility:hidden"` | removed by the reader: 3 920 / 43 685 | 3 918 / 43 779 | 3 930 / 43 687 | unchanged (cleanable) |
|
||||
| `opacity="0"` | 0 / 0, nothing drawn | 0 / 0, nothing drawn | 0 / 0, nothing drawn | kept: whole view |
|
||||
| `display="none"` | 3 920 / 0 (nothing drawn) | 0 / 0 (nothing drawn) | 3 930 / 0 (nothing drawn) | kept: whole view |
|
||||
| `stroke`, `stroke-width="40"` | 5 052 / 64 175 | 5 065 / 64 332 | 5 055 / 64 351 | kept: markers drawn |
|
||||
|
||||
No frozen oracle, R3/R4 digest, step6 golden, N-1 copy, historical drawing or equine fingerprint changed: no committed
|
||||
SVG carries a root `visibility`, `opacity`, `display` or `stroke`.
|
||||
|
||||
Tests: `svg_root_visibility` (6: visible and absent roots read, clean, verified, previewed and composed with the layer
|
||||
showing; 16 values × 4 bodies refused by the reader, the cleaning, the preview, the canvas and the verdict; both
|
||||
composers fail-closed; root `style` / `class` and `<style>` forms removed, their stored forms fixpoints, descendants
|
||||
harmless; other root properties removed or whole-view; the equine drawing); `pdf_session`
|
||||
(`the_pdf_refuses_a_drawing_whose_root_hides_the_markers`); core-wasm `preview.test.ts` (three values on the shipped
|
||||
module). The reader suites share `tests/common/sheet_readers.rs`. Red first: with the error names added and no check
|
||||
wired, the reader, composer and PDF tests failed (3 of 14), then passed with the check. Mutations: V1 to V9 killed, and
|
||||
K1 to K11 of §12.9 rerun, all killed (20 of 20).
|
||||
Module: 560 015 → 560 377 B gzip -9 (+362 B), 1 513 968 → 1 515 246 B raw; Node's gzip 569 817 B (budget 600 000).
|
||||
@@ -1322,7 +1322,7 @@ The page reads the file with the core SVG reader before anything is stored.
|
||||
|
||||
| Reader outcome | Treatment |
|
||||
|---|---|
|
||||
| Hard rejection (`too_large`, `doctype`, `malformed`, `not_svg`, `too_many_elements`, `too_deep`, `too_many_uses`, `too_complex`, `reference_cycle`, `dangling_reference`, `reserved_id`) | refused, with the reason in FR or EN; no cleaning offered |
|
||||
| Hard rejection (`too_large`, `doctype`, `malformed`, `not_svg`, `too_many_elements`, `too_deep`, `too_many_uses`, `too_complex`, `reference_cycle`, `dangling_reference`, `reserved_id`, `root_visibility`) | refused, with the reason in FR or EN; no cleaning offered |
|
||||
| Any removal of active or external content: `script`, `foreignObject`, event-handler attributes, `image`, animation elements, a reference that does not point inside the document (`href` or `url(…)` not starting with `#`), `@import` or `javascript:` values | refused (`svg_active_content`): such a file is hostile or incompatible; no cleaning offered |
|
||||
| Any other removal (editor metadata and namespaces, `data-*` attributes, `<style>` elements, `class` or `style` on the root, ids outside the grammar, unsupported elements such as `symbol`, oversized `title` or `desc`) | cleaning offered: « Nettoyer et utiliser cette version », after the composed preview of the cleaned drawing and one confirmation; a removed `<style>` element is named, since the `class` attributes it styled then render unstyled |
|
||||
| No removal | used, in the stored form (below) |
|
||||
@@ -1381,6 +1381,13 @@ The page reads the file with the core SVG reader before anything is stored.
|
||||
(`reserved_id`) for the same readers and for the PDF snapshot gate; both
|
||||
composers refuse such a tree. Exact names only: the historical drawings keep
|
||||
`osteo-overlays` (RUST.md §12.9).
|
||||
- Root visibility (owner brief 2026-10-30): the marker layer is the root's last
|
||||
child, so a root `visibility` other than `visible` (any letter case, CSS-wide
|
||||
keywords and unreadable values included) is a hard rejection
|
||||
(`root_visibility`) for the same readers and the PDF snapshot gate; a root
|
||||
`style` or `class` and `<style>` elements are already removed, and `opacity`
|
||||
or `display` on the root act on the drawing and the markers alike
|
||||
(RUST.md §12.10).
|
||||
- Colours (owner decision 2026-10-29): presentation attributes and `style`
|
||||
keep the strict colour functions cairo writes, lowercase `rgb(` with three
|
||||
and `rgba(` with four components, all bare numbers up to 255 or all
|
||||
@@ -1419,8 +1426,8 @@ The page reads the file with the core SVG reader before anything is stored.
|
||||
bytes do not hash to its key, writes an audit row, and lets the editor
|
||||
upload again. It is the one Storage deletion of V1-2.
|
||||
6. Closed codes shown to the editor: `size_mismatch`, `hash_mismatch`,
|
||||
`svg_rejected` (with the reader's reason, `dangling_reference` and
|
||||
`reserved_id` included),
|
||||
`svg_rejected` (with the reader's reason, `dangling_reference`,
|
||||
`reserved_id` and `root_visibility` included),
|
||||
`svg_active_content`, `svg_not_canonical`, `too_large`, `upload_missing`,
|
||||
`object_conflict`.
|
||||
|
||||
@@ -2382,14 +2389,14 @@ Asked before the code of V1-2.2, on the brief « Autorisation de démarrer V1-2.
|
||||
|
||||
| Item | Decision | Where |
|
||||
|---|---|---|
|
||||
| Vector-tool exports | The owner supplies the editors' exports (Inkscape, Illustrator, Figma, Affinity) under `crates/core/tests/fixtures/svg/exports/owner/`; the cairo and ImageMagick exports of the development machine are committed meanwhile, tool and version in the file name | §9.2, §15 |
|
||||
| Vector-tool exports | The owner supplies the editors' exports (Inkscape, Illustrator, Figma, Affinity) under `crates/core/tests/fixtures/svg/exports/owner/` (scope amended in §17.6); the cairo and ImageMagick exports of the development machine are committed meanwhile, tool and version in the file name | §9.2, §15 |
|
||||
| Strict-parse code | `verification.integrity.document` (and `.base` for the base), as §6.5 files it; the 19 rule errors are `verification.validation.rules` | §6.5, §6.7 |
|
||||
| Draft load | caps excess and missing drawings reported for a draft, refused for a published or deprecated version | §10 |
|
||||
| SVG references | a local reference to an id the drawing does not define is refused (`dangling_reference`); the composed canvas scopes every id and reference to its view (`fv.<view>.`), at composition only, stored bytes and fingerprints untouched; implemented in V1-2.2, not deferred to V1-2.6; the PDF halo's id `osteo-halo` is reserved (`reserved_id`, owner brief 2026-10-30) | §9.2, §10 |
|
||||
| SVG serialisation | one stored form for every uploaded drawing (declaration + core serialisation), « clean = original bytes » withdrawn; verdict and preview refuse another form (`verification.integrity.svg_not_canonical`); no stored object rewritten, the equine object already in that form | §6.5, §6.7, §9.2, §9.3 |
|
||||
| cairo colours | strict numeric `rgb()` / `rgba()` kept in presentation attributes and `style`; every other function, external `url(`, `expression(`, scripts and active CSS still removed or refused | §9.2 |
|
||||
| Edit commands | strict command validation confirmed; `remove` refused atomically (`has_dependents`) while another element names the element; descendants of a finding go with it; no cascade in level 1 | §8.1 |
|
||||
| Inkscape exports | the Ubuntu archive package of Inkscape 1.4.3 unpacked in the session scratch folder (no install) produces real exports, committed with their generator; Illustrator and Figma stay owner-supplied, A6 open until they arrive | §9.2, §15 |
|
||||
| Inkscape exports | the Ubuntu archive package of Inkscape 1.4.3 unpacked in the session scratch folder (no install) produces real exports, committed with their generator; Illustrator and Figma stay owner-supplied (A6 scope final in §17.6) | §9.2, §15 |
|
||||
| Module size | the shipped module drops wasm-bindgen's debug `name` section (`--remove-name-section`); the 600 000-byte cap and its test are kept | RUST.md §12 |
|
||||
|
||||
### 17.5 V1-2.2 finalisation (owner, 2026-10-30)
|
||||
@@ -2398,11 +2405,20 @@ Brief « V1-2.2 : finalisation et intégration A6 Figma », after the final inde
|
||||
|
||||
| Item | Decision | Where |
|
||||
|---|---|---|
|
||||
| Editor exports required for A6 | Inkscape (covered, §17.4), Figma (required: the owner's two raw exports `owner/figma-web-20261030-{default,ids}.svg`) and Illustrator (required: the real Adobe Illustrator; VectorCraft or any look-alike is not equivalent). Affinity is optional. A6 stays open until the Illustrator exports are committed and pass | §9.2, §15 |
|
||||
| Editor exports required for A6 | Inkscape (covered, §17.4), Figma (required: the owner's two raw exports `owner/figma-web-20261030-{default,ids}.svg`) and Illustrator (required: the real Adobe Illustrator; VectorCraft or any look-alike is not equivalent). Affinity is optional. Superseded by §17.6: Illustrator is optional too | §9.2, §15 |
|
||||
| Mask and clip units | `maskUnits`, `maskContentUnits` and `clipPathUnits` kept with the keywords `userSpaceOnUse` and `objectBoundingBox` only, any other value removed: removing Figma's `maskUnits="userSpaceOnUse"` re-read the mask region in bounding-box units and cut the drawing's edge | §9.2 |
|
||||
| Glued `url(` | a `url(` glued to a longer name (`xurl(#a)`) is removed from any attribute, not only from presentation attributes and `style`, so the reader, the cleaning, the verdict, the preview, the canvas and the PDF view accept the same drawings | §9.2, §10 |
|
||||
| Document instances | the per-document prefix (§10) stays a requirement before any page draws two documents at once | §10 |
|
||||
|
||||
### 17.6 V1-2.2 final arbitration (owner, 2026-10-30)
|
||||
|
||||
Brief « V1-2.2 : arbitrage définitif A6 et correction visibility », on `81f7639`:
|
||||
|
||||
| Item | Decision | Where |
|
||||
|---|---|---|
|
||||
| A6 tested perimeter | Figma (two raw exports), Inkscape 1.4.3, cairo 1.18.4 and ImageMagick 7.1.2-18, all real exports read by the suite. Adobe Illustrator and Affinity are optional: never declared compatible or validated without a real export; their absence does not block V1-2.2. The `owner/` folder and its procedure stay for a later test | §9.2, §15 |
|
||||
| Root visibility | a drawing whose root carries a `visibility` other than `visible` is a hard rejection (`root_visibility`): the marker layer, appended as the root's last child, inherits it while the drawing's children can set `visible` back. Refused by the reader before verification or publication, by the cleaning, the verdict, the preview, the canvas and the PDF snapshot gate; both composers refuse such a root | §9.2, §10 |
|
||||
|
||||
---
|
||||
|
||||
## 18. Documents touched by V1-2.0
|
||||
|
||||
Reference in new issue
Block a user