chore(memory): V1-2.2 finalisation, A6 scope, BDR-088, LRN-101, floor wording

This commit is contained in:
bchanot committed 2026-10-30 15:05:56 +01:00
1 parent 7d9ab8cf2f
commit f976f33307
5 files changed
+47 -1

No files matched your search

@@ -222,7 +222,7 @@ REPORT_WRITTEN: .claude/audits/2026-10-29-v1-2-2-arbitrations-security.md
| MEDIUM scope key | Recorded as a requirement (contract §10, RUST.md §12.7). Open as a rule, see the reported list. |
| LOW colour function not whole value | Closed: `colour_function_end` now requires end of text, CSS space, `;`, `,` or `!` after the `)`. `rgb(1,2,3)rgb(4,5,6)` is removed, `url(#a rgb(1,2,3))` is refused at the `url(`. |
| LOW test oracle shares the blind spot | Closed in the core: `browser_references` (svg_scope.rs) reads `href="…"` and every `url(…)` on its own, trims quotes and CSS space, strips tab and newline, percent-decodes. The TS helper is carried, see above. |
| LOW lint allow | Nothing new: no added `allow`, `nosemgrep`, `nosec`, `eslint-disable` or `ts-ignore` line in the delta (grep on the added lines). |
| LOW lint allow | Nothing new: the delta adds no lint attribute and no scanner, linter or type-checker silencing comment of any kind (grep on the added lines). |
| LOW mutation script | Carried. |
### 5.2 What the delta reads like
+8
View File
@@ -651,3 +651,11 @@ Also kept by owner: per-document-instance prefix required on top of per-view pre
**Rationale**: validated bytes = stored bytes = rendered bytes; no gap between what check saw and what browser reads.
**Alternatives**: store original bytes after validation (rejected: validation and storage could diverge); re-serialise historical drawings (rejected: breaks approved fingerprints, archive reproduction).
## BDR-088 — V1-2.2 A6 scope (Figma + real Illustrator, Affinity optional) and mask/clip units allowed (2026-10-30)
- **Status**: accepted
**Decision** (owner, 2026-10-30, contract §17.5): A6 = Inkscape (met) + Figma (required; owner's two raw exports `owner/figma-web-20261030-{default,ids}.svg`, permanent fixtures) + real Adobe Illustrator (required; VectorCraft not equivalent). Affinity optional. V1-2.2 not VERIFIED until Illustrator exports committed and pass. Allowlist gains `maskUnits`, `maskContentUnits`, `clipPathUnits`, values `userSpaceOnUse`/`objectBoundingBox` only, else removed.
**Rationale**: Figma writes `<mask maskUnits="userSpaceOnUse">` for frame clipping. Removal re-reads mask x/y/width/height in bounding-box units: Chromium 156 cut half stroke at (10,100), 208 px diff at ×8; mask off origin could hide content (deduced, untested). With keywords allowed: stored forms pixel-identical to raw files. Enumerated keywords carry no function, no reference.
**Alternatives**: keep removal, document 1 px loss (rejected: silent fidelity loss, worse off-origin); allow `maskUnits` only (rejected: same risk class for the two siblings); allow any value (rejected: free text where keyword suffices).
+11
View File
@@ -691,3 +691,14 @@ Also: the tree drops processing instructions and comments, so "read with no remo
**Future application**: new SVG/CSS consumer reuses grammar. Hostile tests written apart from reader, asserting browser behaviour; every fail-closed branch gets a test reaching it.
Supersedes [[LRN-099]].
- **Status (2026-10-30)**: superseded by LRN-101
## LRN-101 — SVG local references: one strict grammar, reader and composer agree by construction (2026-10-30)
**Context**: V1-2.2 security round 17d9199: `url(#%61)`, Chromium `url('#<TAB>a')` passed dangling check, per-view scoping, expansion budget; browsers resolved them. Fixed a678faa (`sanitize::local_url_target`), f1ef6a4 (entity spellings, composer coarse `url(` count). Final review 2026-10-30: composer count also saw glued `xurl(#a)` reader kept in `class`/`result`/`values` → verdict passed, canvas refused `unscoped_reference`, PDF drew. Fixed by `sanitize::urls_unglued` (reader removes any attribute holding a `url(` `url_openings` does not read). Supersedes LRN-100.
**Pattern**: one strict grammar for local references (`href`, `xlink:href`, `url(#id)`), same reading in cleaning, validation (reader, verdict, preview, PDF snapshot gate), composition, browsers. Non-strict `url(` (`%XX`, entity, tab/space/unbalanced quote inside, empty or non-ASCII id, backslash) = active content, file refused. `url(` glued to longer name = attribute removed, any attribute. Reader keeps only values whose every `url(` is a strict reference → composer check true by construction.
**Trap**: independent defence-in-depth check must agree with reader on what reader keeps; else fail-closed check becomes availability bug. Every fail-closed branch needs a test reaching it (tree built outside reader).
**Future application**: new SVG/CSS consumer reuses `url_openings`/`local_url_target`, never own parser. Hostile tests written apart from reader, assert browser behaviour.
Supersedes [[LRN-100]].
+7
View File
@@ -580,6 +580,13 @@ Order (BDR-071): P0 docs + decisions → V1-1 clients and animals → V1-2 sheet
- [x] I5 A6 inventory: Inkscape / Illustrator / Figma (version, drawing, steps, file name, folder, tests, status); Inkscape not installed → owner go 2026-10-29 to download it; inkscape.org answered 504 / timed out, so the Ubuntu archive package 1.4.3 (sha256 = signed index) + 22 libs fetched with `apt-get download`, unpacked in the scratchpad (no install, no sudo); 3 real exports + generator committed; Illustrator / Figma owner procedure; A6 stays open
- [x] I6 wasm size: contributors measured, optimisation options for later steps; cap and test kept; owner go 2026-10-29: `--remove-name-section` in scripts/wasm-build.sh (debug `name` section, 279 KB raw, −30 691 B gzip measured)
- [x] I7 gates: check:all green on 5281337 and a678faa (final rerun on the last commit); mutations 16 killed + 1 equivalent; fresh reviews (Sonnet: Fable out of credits, Opus alias 404): security BLOCK(1) HIGH url(#%61) → fixed a678faa → PASS; verifier ECARTS → LOWs fixed, A6 open; evidence §7; commit + push. Open: A6 owner exports, MEDIUM per-document prefix before any two-document page
- [ ] J finalisation and A6 Figma (brief « V1-2.2 : finalisation et intégration A6 Figma », 2026-10-30, on 98060d7)
- [ ] J1 Figma fixtures (`owner/figma-web-20261030-{default,ids}.svg`, owner files, never edited): both Cleanable; `mask@maskUnits` removal cuts 208 px (×8) in Chromium 156 → owner go 2026-10-30: allowlist `maskUnits`, `maskContentUnits`, `clipPathUnits`, values `userSpaceOnUse` | `objectBoundingBox` only; fixed expectations in `svg_clean`; pixel proof; constructs documented in exports README
- [ ] J2 glued `url(` (final review LOW, f1ef6a4): the reader removes any attribute holding a `url(` that `url_openings` does not read (same helper, no second parser); composer comment fixed; tests (glued in class/result/values, valid, absent, encoded/escaped, no reference, composer vs PDF on one drawing, fail-closed branch reached)
- [ ] J3 Affinity optional in A6 (owner 2026-10-30), Figma required, Illustrator expected (real Adobe Illustrator, VectorCraft not equivalent): contract, V1-2 contract §17.4, RUST.md §12, READMEs
- [ ] J4 FLOOR false positive: reword `.claude/audits/2026-10-29-v1-2-2-arbitrations-security.md:225`, guard kept
- [ ] J5 memory: BDR-087 checked, LRN-100 superseded after J2; per-document prefix requirement kept
- [ ] J6 gates: full cargo, svg suites, mutations, wasm + ts-rs, size < 600 000, check:all (DEV-isolated steps only), fresh independent review; commit + push; STOP (A6 open: Illustrator)
- [ ] V1-2.3 drawings and worker verification (M6) · V1-2.4 wireframes (editor, review, admin entry) · V1-2.5 catalogue, admin space, rights, species, MFA · V1-2.6 editor level 1 · V1-2.7 preview, review, publication UI · V1-2.8 equine working copy and review preparation · V1-2.9 FR/EN acceptance and closure (owner checkpoints V1-2.3, V1-2.4, V1-2.6, V1-2.7, V1-2.8, V1-2.9 + each DEV operation of contract §16.11)
## Release readiness track (owner 2026-10-25, distinct from the functional roadmap; nothing here authorises a release or exposure)
@@ -105,3 +105,23 @@ Delta under review: `5281337..HEAD`.
(`svg_clean::every_url_spelling_but_the_strict_one_is_refused`, `svg_scope::every_reference_a_browser_reads_stays_in_its_view`).
- B10 The verifier's doc drift fixed (RUST.md §12.1, §12.4, §12.5, §12.6; exports README); the MEDIUM (scope unique per
document only) recorded as a requirement for any page inlining two documents (contract §10, RUST.md §12.7).
## Owner decisions at finalisation (2026-10-30, contract §17.5)
Brief « V1-2.2 : finalisation et intégration A6 Figma » after the final review of `05de816` (verifier ECARTS(3),
security PASS). Delta under review: `98060d7..HEAD`. The criteria above still hold; these are added, and C1 amends D1
and B6.
- C1 A6 requires Inkscape (met, B6), Figma and Illustrator; Affinity is optional. Figma: the owner's two raw exports
`owner/figma-web-20261030-default.svg` and `-ids.svg`, never edited, committed as permanent fixtures with fixed
expectations. Illustrator: the real Adobe Illustrator only (VectorCraft is not equivalent). A6 stays open, and V1-2.2
is not VERIFIED, until the Illustrator exports are committed and pass.
- C2 `maskUnits`, `maskContentUnits`, `clipPathUnits` allowed with `userSpaceOnUse` / `objectBoundingBox` only, any
other value removed (owner go after the proposal); the Figma stored forms render pixel-identical to the raw files.
- C3 A `url(` glued to a longer name is removed from every attribute (`sanitize::urls_unglued`, built on
`url_openings`, no second parser); the composer comment says when `unscoped_reference` can happen; tests: glued in
ordinary attributes, valid, absent, encoded and escaped spellings, attributes with no reference, canvas, preview and
PDF composition of the same drawings, the fail-closed branch reached.
- C4 The audit sentence the floor guard read as a suppression is reworded; the guard is not disabled or waived.
- C5 Still: no SQL change, no protected reader (A13), N-1 copies, frozen oracles or equine historical data modified;
no DEV operation, no merge, no deployment, no V1-2.3.