chore(memory): V1-2.2 root visibility evidence, A6 decision, BDR-089/090, LRN-102

This commit is contained in:
bchanot committed 2026-10-30 18:56:49 +01:00
1 parent a095ea0e1b
commit 958228a9de
8 files changed
+140 -9

No files matched your search

@@ -1,5 +1,5 @@
# V1-2.2 reserved ids (owner brief 2026-10-30), mutation run (evidence
# .claude/audits/2026-10-30-v1-2-2-reserved-ids-evidence.md §4): each mutant is applied to its source
# V1-2.2 reserved ids and root visibility (owner briefs 2026-10-30), mutation run (evidence
# .claude/audits/2026-10-30-v1-2-2-reserved-ids-evidence.md §4 and §7; K = reserved ids, V = root visibility): each mutant is applied to its source
# file, its cargo suite runs (`features` set when the suite needs them), the file is restored. Run
# from the repo root.
import subprocess
@@ -17,6 +17,15 @@ muts=[
(' if !append_to_first_defs(root) {',' if holds_reserved_id(root) {\n return;\n }\n if !append_to_first_defs(root) {')),
('K10 halo not written','crates/core/src/anatomy/compose.rs',' add_halo_filter(&mut asset);','','pdf_session',PDF),
('K11 reason renamed','crates/core/src/anatomy/svg/tree.rs','Self::ReservedId => "reserved_id"','Self::ReservedId => "dangling_reference"','svg_reserved_ids',''),
('V1 reader skips the root visibility check','crates/core/src/anatomy/svg/mod.rs',' sanitize::check_root_visibility(&sanitized.root)?;\n','','svg_root_visibility',''),
('V2 cleaning skips the root visibility check','crates/core/src/anatomy/svg/clean.rs','\n .and_then(|()| check_root_visibility(&read.root))','','svg_root_visibility',''),
('V3 exact case only','crates/core/src/anatomy/svg/sanitize.rs',' .eq_ignore_ascii_case("visible")',' .eq("visible")','svg_root_visibility',''),
('V4 whitespace not trimmed','crates/core/src/anatomy/svg/sanitize.rs',' .trim_matches(is_css_space)\n','','svg_root_visibility',''),
('V5 denylist of hidden only','crates/core/src/anatomy/svg/sanitize.rs',' .eq_ignore_ascii_case("visible")',' .ne("hidden")','svg_root_visibility',''),
('V6 canvas composes a hidden root','crates/core/src/anatomy/compose.rs',' if check_root_visibility(asset).is_err() {\n return Err(ComposeError::RootVisibility);\n }\n','','svg_root_visibility',''),
('V7 highlight composes a hidden root','crates/core/src/anatomy/compose.rs',' if check_root_visibility(&asset).is_err() {\n return Err(ComposeError::RootVisibility);\n }\n','','svg_root_visibility',''),
('V8 PDF gate accepts a hidden root','crates/core/src/anatomy/svg/mod.rs',' sanitize::check_root_visibility(&sanitized.root)?;\n','','pdf_session',PDF),
('V9 reason renamed','crates/core/src/anatomy/svg/tree.rs','Self::RootVisibility => "root_visibility"','Self::RootVisibility => "reserved_id"','svg_root_visibility',''),
]
for name,path,old,new,suite,features,*more in muts:
src=open(path).read()
@@ -62,3 +62,30 @@ id ») survived: no tested drawing has a root id, a mutant with no meaning for t
inherits `hidden`: 0 highlight pixels in the PDF, markers gone in the canvas too); LOW root `stroke*` inheritance onto
the point hitbox; LOW the drawing chooses which `<defs>` receives the halo (sRGB vs linearRGB, cosmetic); LOW intended
behaviour change (re-export of an archive or a logo holding the id refused).
## 7. Root visibility (brief « V1-2.2 : arbitrage définitif A6 et correction visibility », on `81f7639`)
- Red first: error names added, no check wired: `svg_root_visibility` 2 of 6 failed (reader accepted `hidden`,
composers composed it), `pdf_session` 1 failed (export accepted it); a third failure was a fixture of mine (a literal
tab is not the stored form) and the test now checks the cleaned stored form. Green once the check is wired.
- Browser proof: RUST.md §12.10 table. Composed SVG by the core at `81f7639` (stash) and with the fix, throwaway
integration test never committed; measured with Playwright Chromium 156, Firefox 157, WebKit 27.2 from the local cache
(no install, every request outside about:/blob:/data: aborted). The accepted variants' SVG are byte-identical before
and after; the three hiding roots are refused after.
- Mutations: same script, V1 to V9 added; 20 of 20 killed (K rerun, so the reserved-id protections stay effective).
- Gates on the working tree: `pnpm check:all` green (cargo 2065 passed / 0 failed summed over the feature passes, ts-rs
types unchanged, wasm, core-wasm 65, supabase 128, app 566, lint, build, e2e:ui PASSED, app image, worker sandbox
tests and runtime image; e2e:shell not run). First run stopped on an unused import in the new suite (clippy
`-D warnings`), fixed. Fixtures: cairo, Figma, Inkscape, ImageMagick and owner-folder tests green.
- Module: 560 015 → 560 377 B gzip -9 (+362 B); Node's gzip 569 817 B (budget 600 000).
- Independent reviews of the working tree (fresh, Opus). Verifier ECARTS(3), all LOW: R3 the stroke properties no
marker sets were argued harmless without proof (docs corrected, now an open finding); R7 TODO J / J6 still waited on
Illustrator (closed by BDR-090); floor guard: assertions moved into `common/sheet_readers.rs` (clarification added to
the contract). R1, R2, R4-R6, R8, R9 met. Security PASS (semgrep 352 rules, 0 findings), no regression, `osteo-halo`
protections intact; three pre-existing MEDIUM marker-hiding vectors reported for the owner: root `viewBox` framing a
view without `view_box` (all 19 equine main-view markers out of frame, horse pixel-identical, accepted Clean);
inherited `stroke-opacity` / `stroke-dasharray` (canvas outlines gone, detail trigger 0 px in the three engines);
inherited `stroke-width` on the point hitbox (13 of 19 equine markers send their click to the last hitbox in
Chromium and WebKit). LOW: halo placement in a drawing-chosen `<defs>` (Firefox, WebKit lose the halo), root
`systemLanguage` / `display` canvas-PDF divergence (whole view), colour camouflage (inherent). Not built: the class fix
changes the R3 highlight oracle and the R4 digests (owner brief: stop before such a change).