docs(docs): V1-2.2 reserved ids in RUST.md 12.9, contract, Illustrator steps

This commit is contained in:
bchanot committed 2026-10-30 17:31:00 +01:00
1 parent 08efd9a792
commit 6ed4d21eb3
4 files changed
+87 -16

No files matched your search

+37 -12
View File
@@ -15,21 +15,46 @@ as `2026-10-30`. Example: `illustrator-29.3-2026-10-30-presentation.svg`.
The menu labels below are the English ones; the French interface words them
differently, and I could not check them here.
## Illustrator (Fichier › Ouvrir… `inkscape-source.svg`)
## Illustrator (Fichier › Ouvrir… a copy of `inkscape-source.svg`)
Required for A6 (owner, 2026-10-30), and only from the real Adobe Illustrator:
VectorCraft or another look-alike is not equivalent.
VectorCraft or another look-alike is not equivalent. Two files are still needed,
`…-presentation.svg` and `…-internal-css.svg`; until both are committed and read
by the suite, A6 stays open.
1. File › Export › Export As… › format SVG, « Use Artboards » ticked.
2. SVG Options, two exports of the same drawing:
- `…-presentation.svg`: Styling « Presentation Attributes », Font « SVG »
(text kept as text), Images « Embed », Object IDs « Layer Names »,
Decimal 2, Minify off, Responsive on;
- `…-internal-css.svg`: the same with Styling « Internal CSS » and Font
« Convert to Outlines » (the export most users keep).
3. Optional: File › Save As… › SVG with the dialog's defaults
(`…-save-as.svg`). This older path may keep Illustrator data that the
core refuses as active content; a refusal is a valid result, tell me.
1. Copy `../inkscape-source.svg` outside the repository and open the copy
(File › Open…): a Save in Illustrator would overwrite the file it opened, and
the source must stay as committed.
2. If Illustrator reports a missing font (DejaVu Sans), close that dialog without
replacing the font. Do not select, move, ungroup or edit anything.
3. Read the version in Help › About Illustrator (macOS: Illustrator › About
Illustrator), for example `29.3`; it goes in both file names.
4. First export, `illustrator-<version>-<date>-presentation.svg`:
File › Export › Export As…, format SVG (svg), « Use Artboards » ticked,
Export. In the SVG Options dialog: Styling « Presentation Attributes », Font
« SVG » (text kept as text), Images « Embed », Object IDs « Layer Names »,
Decimal 2, Minify off, Responsive on; OK.
5. Second export, `illustrator-<version>-<date>-internal-css.svg`: the same
steps on the same open document; in SVG Options change only Styling to
« Internal CSS » and Font to « Convert to Outlines » (the export most users
keep), every other option as in step 4.
6. With « Use Artboards » ticked Illustrator adds the artboard to the file name
(a suffix such as `-01`): rename each file to the exact name above. Renaming
is allowed; editing the content is not.
7. Close the document without saving.
What the suite then shows, as far as I can predict without the files: the
`presentation` file should come out cleanable, the live text « Garrot » removed
with its `text` element (the reader keeps no text outside `title` / `desc`);
the `internal-css` file should come out cleanable with its `<style>` element
removed and named (`style_removed`), so the `class` attributes it styled render
unstyled in the stored form. That second result, if confirmed, is the evidence
the owner needs to judge Illustrator compatibility: it is a reading of the
current rules (contract §9.2), not a fix in this step.
Optional: File › Save As… › SVG with the dialog's defaults (`…-save-as.svg`).
This older path may keep Illustrator data that the core refuses as active
content; a refusal is a valid result, tell me.
## Figma (import `inkscape-source.svg` into a file, or drag it onto the canvas)
+5 -1
View File
@@ -105,7 +105,11 @@ The engine composes the observation's zones of one view: the markers of the
other annotations are dropped (not hidden), every `data-*` attribute is
removed, the kept elements get fill `#b85a3f` at 0.85 and, on the main view,
the `osteo-halo` filter (two Gaussian blurs merged with the source), added to
the first `<defs>` of the drawing or to a new `<defs>` placed first.
the first `<defs>` of the drawing or to a new `<defs>` placed first. The PDF
view keeps the drawing's ids, so `osteo-halo` is reserved (V1-2.2, owner brief
2026-10-30): the reader refuses a drawing holding it in any letter case
(`reserved_id`) and both composers refuse such a tree, so the halo the markers
name is always the engine's.
## Checking the look
+35
View File
@@ -4069,3 +4069,38 @@ five non-strict or escaped spellings refused, an absent target refused, six valu
which reaches the fail-closed branch on a tree built outside the reader). Mutations: dropping `urls_unglued`, the
keyword check or the `maskUnits` entry each fails the new tests. No frozen oracle, N-1 copy, protected reader or equine
file changed.
### 12.9 Reserved ids (owner, 2026-10-30)
Brief « V1-2.2 : correction de sécurité PDF et poursuite A6 » on `2f1f076`, after the MEDIUM of the final security
review: the PDF view keeps the drawing's ids and `compose_highlight` writes its halo filter `osteo-halo` next to them.
A drawing defining `filter#osteo-halo` replaced the engine's filter (the composer skipped its own when one existed: a
filter of transparent pixels erased the marker, 0 highlight pixels in Chromium 156 against 1602 for the plain drawing);
a non-filter element holding the id before the first `<defs>` won its resolution (the halo was lost, 825 pixels).
| Point | Built | Where |
|---|---|---|
| Reserved set | `refs::RESERVED_IDS` = [`HALO_FILTER_ID`] (`osteo-halo`), compared without ASCII case (the reader keeps ASCII ids only, `is_reference_name`); exact names, never a prefix: the historical drawings, the DEV equine object included, carry `osteo-overlays` | `anatomy/svg/refs.rs` |
| Reader | `SvgRejection::ReservedId` (`reserved_id`): `refs::check_reserved_ids` in `read_svg` after the targets, so the verdict (`svg_rejected`), the preview (`rejected`), the loaded sheet, the upload tool and the PDF snapshot gate (`snapshot_invalid`, `asset reserved_id`) answer it; `clean_svg` checks it after active content and the targets | `anatomy/svg/{refs,mod,clean,tree}.rs` |
| Composers | `compose_highlight` and `compose_canvas` refuse a tree holding a reserved id (`ComposeError::ReservedId`, `svg_rejected` / `reserved_id` in `view.canvas`); the highlight always writes its own filter (`has_halo_filter` removed) | `anatomy/compose.rs`, `ops.rs` |
Audit of the other ids the composition writes: none. The canvas scopes every drawing id (`fv.<view>.`) and no page id
starts with `fv.`; the annotation layer writes no `id` (its `data-*` cannot be forged: the reader removes `data-*`); the
filter's `result` names (`haloWide`, `haloTight`) resolve inside their own filter only. Spellings: character references
are decoded by the XML parser and refused; spaces, look-alikes outside ASCII, invisible characters, `xml:id`, prefixed
attributes or SVG elements are removed by the existing rules, so no tree reaching a composer holds the id; a CSS escape
or a percent-encoded `url(` target is active content.
Declared changes: `oracles/r3/sanitiser.json` `osteo-halo-id.svg` → `reserved_id` (the test applies it, the file stays
frozen); `svg_clean` corpus line `osteo-halo-id.svg` rejected; the R5.7 test "never duplicates the filter" now checks one
filter per composition and the refusal of a composed root given back. The R3 highlight oracle, the R4 digests, the equine
sha256 `0ea5202f…` and every committed drawing but that fixture are unchanged (`the_historical_drawings_read_as_before`
reads all of them). Module: 559 360 → 560 015 B gzip -9 (+655 B).
Tests: `svg_reserved_ids` (9: the set, a valid drawing with the engine's halo once, a filter of its own, the id on 23
element forms and the root, 11 reference spellings dangling alone and refused with the id defined, adversarial spellings,
512 letter cases + 30 character references refused and 90 look-alikes removed, both composers fail-closed, the equine
drawing and every committed SVG); `pdf_session` (`the_pdf_refuses_a_reserved_id_and_keeps_its_own_halo`: three hostile
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.
+10 -3
View File
@@ -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`) | 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`) | 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) |
@@ -1375,6 +1375,12 @@ The page reads the file with the core SVG reader before anything is stored.
(`dangling_reference`) for the reader of stored drawings, the cleaning
(after active content is classified, so a hostile file is still named as
such), the verdict and the preview. Valid internal references keep working.
- Reserved ids (owner brief 2026-10-30): the PDF view keeps the drawing's ids
and the engine writes its halo filter `osteo-halo` next to them, so a drawing
holding that id, on any element and in any letter case, is a hard rejection
(`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).
- 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
@@ -1413,7 +1419,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` included),
`svg_rejected` (with the reader's reason, `dangling_reference` and
`reserved_id` included),
`svg_active_content`, `svg_not_canonical`, `too_large`, `upload_missing`,
`object_conflict`.
@@ -2378,7 +2385,7 @@ Asked before the code of V1-2.2, on the brief « Autorisation de démarrer V1-2.
| 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 |
| 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 | §9.2, §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 |