From e190dfc794d4574047b7105dd8897d287e33e2df Mon Sep 17 00:00:00 2001 From: bchanot Date: Sun, 1 Nov 2026 13:40:57 +0100 Subject: [PATCH] chore(memory): V1-2.2 interior rule evidence, tools, LRN-105..107 --- .../2026-11-01-v1-2-2-interior-evidence.md | 51 ++++++++++++++++ .../touch-grid-results.txt | 20 ++++++ .../touch-grid.spec.ts.txt | 38 ++++++++++++ .../2026-11-01-v1-2-2-mutations-interior.py | 61 +++++++++++++++++++ .claude/memory/journal.md | 1 + .claude/memory/learnings.md | 21 +++++++ .claude/tasks/TODO.md | 6 ++ .../contracts/2026-11-01-v1-2-2-interior.md | 35 +++++++++++ 8 files changed, 233 insertions(+) create mode 100644 .claude/audits/2026-11-01-v1-2-2-interior-evidence.md create mode 100644 .claude/audits/2026-11-01-v1-2-2-interior-tools/touch-grid-results.txt create mode 100644 .claude/audits/2026-11-01-v1-2-2-interior-tools/touch-grid.spec.ts.txt create mode 100644 .claude/audits/2026-11-01-v1-2-2-mutations-interior.py create mode 100644 .claude/tasks/contracts/2026-11-01-v1-2-2-interior.md diff --git a/.claude/audits/2026-11-01-v1-2-2-interior-evidence.md b/.claude/audits/2026-11-01-v1-2-2-interior-evidence.md new file mode 100644 index 00000000..69d495b3 --- /dev/null +++ b/.claude/audits/2026-11-01-v1-2-2-interior-evidence.md @@ -0,0 +1,51 @@ +# V1-2.2 last MEDIUM, zone without interior: evidence + +Owner brief « V1-2.2 : fermeture du dernier MEDIUM » (2026-11-01) on `de2dfb3`. Contract +`.claude/tasks/contracts/2026-11-01-v1-2-2-interior.md`. Commits `8dd2d78` (rule), `03be75b` (review 1: tiny arc radius), `86dce16` (review 2: f32 endpoints, arc spread), +`c73415a` (review 3 LOW: sampling skipped where unused). Final code HEAD `c73415a`. +Details RUST.md §12.14. Tools `.claude/audits/2026-11-01-v1-2-2-interior-tools/` (touch tap grid and its results). + +## Rule + +Polygon or path zone/trigger must fill a disc of 4 CSS px on the 320 × 568 preview (main 286 × 310, detail 254 × 191), +nonzero (the layer's rule), stroke out. Conservative widest-disc search (disc crossing no edge, chord deviation taken +off, arcs add an f32 drift bound), refuses in doubt (0.03 px band measured). Caps: 4 096 vertices, 4 096 cells, 2²⁵ edge +distances per sheet, over them refused. Arcs as browsers store them: nonzero radius below 2⁻²⁰ unreadable, endpoints equal in f32 draw no arc, the spread of +one-ulp variants added to the deviation and their extremes to the bounds. Codes +`annotation.geometry.interior_too_small` / `verification.validation.marker_interior_too_small` (proposal). + +## Threshold + +Equine at 320 widest disc: caudal 4.951 px, sacral 11.30, thoracic 11.47, cervical 12.17, lumbar 14.15, trigger 29.13. +4 px = the approved point threshold; equine accepted; caudal falls first past × 1.2378. + +## Proofs + +- cargo: `sheet_marker_visibility` (hostile refused, small legit accepted, threshold edge, projection, transforms, caps, + equine), `interior_probe` (fixture drift), interior and path unit tests (random polygons both rules, 300 random curves + within deviation, tiny and large arc radii). +- Browsers, 6 projects: `interior-clicks.spec.ts` 102 passed, `canvas-clicks.spec.ts` 99 passed. 16 probes: core never + over the browser's fill; 10 refused fill no 4 px disc; 6 accepted take real presses at the core's centre and the hit + test on a 90 % ring, fill only and as shipped; equine zones take a real press. +- Chromium touch adjustment: a tap up to ~10 px around a point's disc goes to the point (chromium-320/375, not + webkit-375); every equine zone keeps a tappable interior (320: caudal 18/21 … cervical 195/195). +- Mutations: 29 killed, 2 equivalent (Z22 prune, Z25 unreachable). +- References: no frozen oracle, golden, N-1 copy, seed or PDF digest touched; app 566 incl. PDF suites pass. +- Ignored cargo tests: one timing test (`pdf_serialize::l_report_with_real_rasters_costs_what_it_costs`) × 3 feature + runs; passed in release (5.2 s). + +## Reviews + +- Verifier on `8dd2d78`: ECARTS(3), all documentation, fixed in `03be75b`; I1–I4, I6 met; I5/I7 gates run here. +- Security on `8dd2d78`: PASS, MEDIUM sub-f32 arc radius (fixed `03be75b`), LOWs fixed (arc f32 drift, trace past cap, + fail-open default) or informational (libm ulp native/wasm at the exact threshold). +- Security on `03be75b`: PASS, two sibling MEDIUMs (f32-equal endpoints, ill-conditioned arc), fixed `86dce16`. +- Security on `86dce16`: PASS, no MEDIUM; LOW sampling cost fixed `c73415a`; LOWs open: arc tangent to a frame edge + refused (spread in bounds), spread an estimate (≤ 0.13 units measured on a model), refused needle hairline past the + frame, arc cost bounded by document size only (~1.8 s worst native). + +## Gates on `c73415a` + +check:all passed: cargo 2 350 passed, 0 failed, 3 ignored (one timing test × 3 runs); core-wasm 65, supabase 128, app 566; +e2e:ui 227 (incl. canvas-clicks 99 and interior-clicks 102, six projects); Docker app image, worker test and image. +e2e:shell 86 on the isolated sandbox. WASM 580 428 B gzip -9 native, 580 522 in the app image (margin 19 478 B). diff --git a/.claude/audits/2026-11-01-v1-2-2-interior-tools/touch-grid-results.txt b/.claude/audits/2026-11-01-v1-2-2-interior-tools/touch-grid-results.txt new file mode 100644 index 00000000..e7a3817c --- /dev/null +++ b/.claude/audits/2026-11-01-v1-2-2-interior-tools/touch-grid-results.txt @@ -0,0 +1,20 @@ +chromium-320 caudal: 21 geometric hits, taps {"caudal":18,"-":3} +chromium-320 sacral: 67 geometric hits, taps {"sacral":51,"l6-s1":11,"-":2,"sacroiliac":2,"hip":1} +chromium-320 lumbar: 104 geometric hits, taps {"lumbar":87,"t18-l1":9,"l6-s1":8} +chromium-320 thoracic: 97 geometric hits, taps {"-":1,"thoracic":72,"c7-t1":18,"t18-l1":6} +chromium-320 cervical: 195 geometric hits, taps {"cervical":195} +chromium-320 head-trigger: 284 geometric hits, taps {"head-trigger":278,"-":6} +chromium-375 caudal: 30 geometric hits, taps {"caudal":30} +chromium-375 sacral: 97 geometric hits, taps {"sacral":77,"-":3,"l6-s1":15,"sacroiliac":2} +chromium-375 lumbar: 144 geometric hits, taps {"lumbar":120,"t18-l1":13,"l6-s1":11} +chromium-375 thoracic: 141 geometric hits, taps {"thoracic":121,"c7-t1":13,"t18-l1":7} +chromium-375 cervical: 275 geometric hits, taps {"cervical":269,"-":6} +chromium-375 head-trigger: 403 geometric hits, taps {"head-trigger":399,"-":4} +webkit-375 caudal: 30 geometric hits, taps {"caudal":29,"-":1} +webkit-375 sacral: 97 geometric hits, taps {"l6-s1":4,"-":2,"sacral":91} +webkit-375 lumbar: 144 geometric hits, taps {"lumbar":142,"t18-l1":1,"-":1} +webkit-375 thoracic: 141 geometric hits, taps {"-":10,"thoracic":130,"c7-t1":1} +webkit-375 cervical: 275 geometric hits, taps {"cervical":270,"-":5} +webkit-375 head-trigger: 403 geometric hits, taps {"-":7,"head-trigger":396} + +[exited with code 0] diff --git a/.claude/audits/2026-11-01-v1-2-2-interior-tools/touch-grid.spec.ts.txt b/.claude/audits/2026-11-01-v1-2-2-interior-tools/touch-grid.spec.ts.txt new file mode 100644 index 00000000..de220ac2 --- /dev/null +++ b/.claude/audits/2026-11-01-v1-2-2-interior-tools/touch-grid.spec.ts.txt @@ -0,0 +1,38 @@ +import { test } from '../support/browser' +test('probe zone taps', async ({ page }, info) => { + test.setTimeout(1_800_000) + await page.goto('/e2e/harness/canvas.html') + await page.locator('[data-anno-id="caudal"]').waitFor({ state: 'attached' }) + const zones = ['caudal', 'sacral', 'lumbar', 'thoracic', 'cervical', 'head-trigger'] + const out: string[] = [] + for (const id of zones) { + const pts = await page.evaluate((id) => { + const svg = document.querySelector('[data-testid="anatomy-canvas"] svg') as SVGSVGElement + const ctm = svg.getScreenCTM()! + const z = svg.querySelector(`[data-anno-id="${id}"]`) as SVGGeometryElement + const b = z.getBBox() + const step = 2 / ctm.a + const res: { x: number; y: number; hit: string }[] = [] + for (let x = b.x; x <= b.x + b.width; x += step) for (let y = b.y; y <= b.y + b.height; y += step) { + if (!z.isPointInFill(new DOMPoint(x, y))) continue + const p = new DOMPoint(x, y).matrixTransform(ctm) + const hit = document.elementFromPoint(p.x, p.y)?.closest('[data-anno-id]')?.getAttribute('data-anno-id') ?? '-' + res.push({ x: p.x, y: p.y, hit }) + } + return res + }, id) + const tally: Record = {} + let n = 0 + for (const p of pts) { + if (p.hit !== id) continue + n++ + const before = ((await page.getByTestId('clicks').textContent()) ?? '').split(' ').filter(Boolean).length + await page.touchscreen.tap(p.x, p.y) + await page.waitForTimeout(400) + const got = ((await page.getByTestId('clicks').textContent()) ?? '').split(' ').filter(Boolean).slice(before).join(',') || '-' + tally[got] = (tally[got] ?? 0) + 1 + } + out.push(`${info.project.name} ${id}: ${n} geometric hits, taps ${JSON.stringify(tally)}`) + } + console.log(out.join('\n')) +}) diff --git a/.claude/audits/2026-11-01-v1-2-2-mutations-interior.py b/.claude/audits/2026-11-01-v1-2-2-mutations-interior.py new file mode 100644 index 00000000..1e0e107a --- /dev/null +++ b/.claude/audits/2026-11-01-v1-2-2-mutations-interior.py @@ -0,0 +1,61 @@ +# V1-2.2 last MEDIUM (brief « fermeture du dernier MEDIUM », 2026-11-01), mutation run: Z = the +# interior rule (anatomy::interior, path outline, frame placement, codes), plus the 2026-11-01 +# decision mutants whose anchors this change moved (S1, S8, F16). Z23-Z25 cover the fixes after the +# security review of 8dd2d78. Each mutant is applied to its +# source file, its cargo suite runs, the file is restored. Run from the repo root. +import subprocess +F='crates/core/src/anatomy/frame.rs' +I='crates/core/src/anatomy/interior.rs' +P='crates/core/src/anatomy/path.rs' +R='crates/core/src/domain/sheet/report.rs' +V='crates/core/src/domain/sheet/verdict.rs' +VIS='sheet_marker_visibility' +muts=[ + ('Z1 interior never checked',F,' } else {\n interior_placement(geometry, scale, budget)\n }',' } else {\n Placement::InFrame\n }',VIS), + ('Z2 any disc found accepted',F,' Some(disc) if disc.radius >= radius => Placement::InFrame,',' Some(_) => Placement::InFrame,',VIS), + ('Z3 layer rule evenodd',I,'pub const LAYER_FILL_RULE: FillRule = FillRule::NonZero;','pub const LAYER_FILL_RULE: FillRule = FillRule::EvenOdd;',VIS), + ('Z4 every point inside',I,' if inside { nearest } else { -nearest }',' if inside || true { nearest } else { -nearest }',VIS), + ('Z5 closing edge dropped',I,' for (&a, &b) in closing.zip(subpath.iter()) {',' for (&a, &b) in closing.skip(1).zip(subpath.iter().skip(1)) {','--lib'), + ('Z6 deviation not taken off',I,' let radius = clearance(outline, rule, centre) - outline.deviation;',' let radius = clearance(outline, rule, centre);','--lib'), + ('Z7 chord deviation not recorded',P,' self.outline.deviation = self.outline.deviation.max(bend * step * step / 8.0);\n','','--lib'), + ('Z8 one chord per curve',P,' let count = wanted.clamp(1.0, MAX_CURVE_CHORDS as f64) as usize;',' let count = wanted.clamp(1.0, 1.0) as usize;',VIS), + ('Z9 budget never spent',I,' budget.work -= evaluated * edges;\n','','--lib'), + ('Z10 vertex overflow ignored',I,' !outline.overflow && self.cells(edge_count(outline)) > 0',' self.cells(edge_count(outline)) > 0',VIS), + ('Z11 path vertex cap ignored',P,' if self.vertices == self.max_vertices {',' if false {',VIS), + ('Z12 reported as too small',R,' Placement::InteriorTooSmall => (\n INTERIOR_TOO_SMALL,',' Placement::InteriorTooSmall => (\n TOO_SMALL,',VIS), + ('Z13 verdict ignores the interior',V,' if found(&[INTERIOR_TOO_SMALL]) {\n out.push(codes::MARKER_INTERIOR_TOO_SMALL);\n }\n','',VIS), + ('Z14 interior counted as a rules failure',V,' TOO_SMALL,\n INTERIOR_TOO_SMALL,\n ]',' TOO_SMALL,\n ]',VIS), + ('Z15 evenodd as nonzero',I,' FillRule::EvenOdd => winding % 2 != 0,',' FillRule::EvenOdd => winding != 0,','--lib'), + ('Z16 tolerance in units, not px',F,' let tolerance = INTERIOR_TOLERANCE_PX / scale;',' let tolerance = INTERIOR_TOLERANCE_PX;',VIS), + ('Z17 closepath keeps the subpath',P,' self.quadratic_control = None;\n self.open_subpath();\n }',' self.quadratic_control = None;\n }','--lib'), + ('Z18 cubic bend underestimated',P,' let bend = 6.0\n',' let bend = 1.0\n','--lib'), + ('Z19 arc bend on the smaller radius',P,' let count = self.chords(ellipse.rx.max(ellipse.ry) * ellipse.sweep * ellipse.sweep);',' let count = self.chords(ellipse.rx.min(ellipse.ry) * ellipse.sweep * ellipse.sweep);','--lib'), + ('Z20 unmeasured accepted',F,' return Placement::InteriorUnmeasured;',' return Placement::InFrame;',VIS), + ('Z21 cells past the cap',I,' || evaluated + 4 > affordable\n','','--lib'), + # Security review of 8dd2d78 (MEDIUM tiny arc radius, LOWs), fixed after the first run. + ('Z23 tiny arc radius read',P,' if tiny(arc.rx) || tiny(arc.ry) {\n return None;\n }\n','',VIS), + ('Z24 arc f32 drift dropped',P,' radius * ARC_F32_DRIFT,',' 0.0,','--lib'), + # Equivalent: bounds and outline share one reader, a path with bounds always has an outline. + ('Z25 path without outline accepted (equivalent)',F,' _ => Placement::InteriorUnmeasured,',' _ => Placement::InFrame,',VIS), + # Second security review (03be75b): f32 endpoint equality, arc f32 spread. + ('Z26 endpoints compared in f64',P,' if stored(arc.to) == stored(self.at) {',' if arc.to == self.at {','--lib'), + ('Z27 arc spread dropped',P,' radius * ARC_F32_DRIFT + spread,',' radius * ARC_F32_DRIFT,','--lib'), + ('Z28 variants out of the bounds',P,' for angle in other.extreme_angles() {\n if other.sweeps(angle) {\n self.add(other.at(angle));\n }\n }\n','','--lib'), + # Pruning only: a cell that cannot reach the floor never holds an accepted disc (equivalent). + ('Z22 floor prune removed (equivalent)',I,' || cell.reach() < search.floor\n','',VIS), + ('S1 size never checked (moved)',F,' if visible_size(annotation, geometry, &bounds) * scale < MIN_VISIBLE_PX {',' if false {',VIS), + ('S8 too small counted as a rules failure (moved)',V,' NO_FRAME,\n TOO_SMALL,\n INTERIOR_TOO_SMALL,\n ]',' NO_FRAME,\n INTERIOR_TOO_SMALL,\n ]',VIS), + ('F16 frame faults as rules failure (moved)',V,' let rule = |code: &str| {\n ![\n super::report::GEOMETRY_MISSING,\n OUT_OF_FRAME,\n NO_FRAME,\n TOO_SMALL,\n INTERIOR_TOO_SMALL,\n ]\n .contains(&code)\n };',' let rule = |code: &str| code != super::report::GEOMETRY_MISSING;','sheet_frame'), +] +for name,path,old,new,suite in muts: + src=open(path).read() + if src.count(old)!=1: + print(name,'ANCHOR NOT FOUND x',src.count(old), flush=True); continue + open(path,'w').write(src.replace(old,new)) + try: + target = suite if suite.startswith('--') else f'--test {suite}' + r=subprocess.run(['bash','-c',f'. scripts/rust-env.sh && timeout 600 cargo test -q -p faunosteo-core {target} 2>&1 | tail -3'],capture_output=True,text=True) + out=r.stdout + print(f"{name} ({suite}): {'KILLED' if 'FAILED' in out else ('COMPILE-ERR' if 'could not compile' in out or 'error[' in out else ('TIMEOUT' if r.returncode == 124 else 'SURVIVED'))}", flush=True) + finally: + open(path,'w').write(src) diff --git a/.claude/memory/journal.md b/.claude/memory/journal.md index 1bb054a0..38a136e6 100644 --- a/.claude/memory/journal.md +++ b/.claude/memory/journal.md @@ -497,3 +497,4 @@ R5.4: `draft/{labels,changelog,review_report,drawing,overlay,app_review,svg_comp ## 2026-11-01 - V1-2.2 N (owner 2026-11-01): lot B committed 4f52f5e, R4.1 call-1 svgSha256 e677150, visible wins canvas-only 9c606aa, marker_too_small 4 px @320x568 + frame range 96b9978, path numbers ±2^20 76ead95. check:all + e2e:shell green on 76ead95, 56 mutants killed, 1 equivalent. Open: zone without interior (MEDIUM, owner). STOP at checkpoint. +- 2026-11-01 V1-2.2 last MEDIUM: interior rule (4 px disc, nonzero, stroke out) 8dd2d78 + review fixes 03be75b (sub-f32 arc radius). Equine kept (caudal 4.95 px). Chromium touch adjustment measured. LRN-105..107. Checkpoint pending owner. diff --git a/.claude/memory/learnings.md b/.claude/memory/learnings.md index 56d981c8..4de80e17 100644 --- a/.claude/memory/learnings.md +++ b/.claude/memory/learnings.md @@ -723,3 +723,24 @@ Supersedes [[LRN-100]]. **Context**: V1-2.2 canvas click proofs (Playwright, `e2e/harness/canvas.tsx`), 2026-10-30. **Application**: recompute target box right before each press (`centreOf` per click), or keep layout fixed (output with fixed height, `overflow:hidden`). Treat "first click right, next ones wrong" as layout shift first, hit-test second. + +## LRN-105 — WebKit snaps real taps and clicks to whole CSS px: press with 1.5 px margin, else elementFromPoint (2026-11-01) +**Pattern**: WebKit snaps real input to whole CSS px. Playwright `touchscreen.tap` and `mouse.click` at fractional coords land on rounded pixel; hit test then answers rounded point. Chromium keeps fraction on click, rounds tap. + +**Context**: V1-2.2 canvas click proofs, WebKit 27.2 (Playwright 1.64.1), desktop 1280 and iPhone SE 375 emulation, 2026-11-01. Measured: tap at x 100.1 lands right of edge at 100.4; click at 100.9 lands left of it. Two junction-edge tests failed only on WebKit until margin added. + +**Application**: real presses keep ≥ 1.5 px margin from any edge they test. Below that margin ask `document.elementFromPoint` at exact point instead of pressing. Never read a WebKit-only edge miss as hit-test bug before checking snapping. + +## LRN-106 — Firefox getBoundingClientRect drifts (1/60 px units, stroke included); confirm by painted pixels (2026-11-01) +**Pattern**: Firefox `getBoundingClientRect` drifts from rendered geometry: client rects in 1/60 px app units, and include stroke of element. Rendering itself exact. Size checks via client rects in Firefox show error up to 0.4 % (24 % on 0.067 px hitbox) though pixels are right. + +**Context**: V1-2.2 frame and visible-size probes vs Rust f64 expectation, Firefox 157 (Playwright 1.64.1), preview box 286 × 310, 2026-11-01. Chromium 156 / WebKit 27.2 agree with core ≤ 8.2e-5 relative on same cases. One-unit frame: Firefox rects 3.3 % off 286 px/unit while painted pixels exact. + +**Application**: compare geometry across engines with stroke none on probed element, and confirm Firefox outliers by painted pixels (canvas/screenshot count) before calling a rendering gap. Report Firefox rect gap as measurement artifact, not defect. + +## LRN-107 — WebKit and Chromium stop painting SVG at tiny viewBox spans (f32): floors from painted pixels (2026-11-01) +**Pattern**: WebKit and Chromium stop painting SVG at tiny viewBox spans. Frame span 2⁻⁷ → WebKit paints nothing; Chromium drifts at 2⁻¹⁴ (0.46 px), paints nothing at 2⁻²⁰; Firefox exact at every span. f32 view transform the cause. + +**Context**: V1-2.2 frame range rules, disc a quarter of frame in 286 px box, painted-pixel count, WebKit 27.2 / Chromium 156 / Firefox 157 (Playwright 1.64.1), 2026-11-01. First span floor 2⁻²⁰ withdrawn on this measure; floor set to 1 unit (factor 32 from WebKit's last exact span 2⁻⁵). + +**Application**: bound SVG frame spans and offsets by browser f32 range before trusting geometry; derive floors from painted pixels in all three engines, never from f64 math alone. diff --git a/.claude/tasks/TODO.md b/.claude/tasks/TODO.md index ce3f5d7e..88a91e64 100644 --- a/.claude/tasks/TODO.md +++ b/.claude/tasks/TODO.md @@ -614,6 +614,12 @@ Order (BDR-071): P0 docs + decisions → V1-1 clients and animals → V1-2 sheet - [x] N4 scale bypass: projected visible size rule (owner 2026-11-01: 4 px at 320 × 568, measured equine min 4.97 px), verdict + preview, closed code; numeric guard (finite, non-degenerate, value/transform bounds, f32 precision vs magnitude and frame), Rust vs browser edge cases - [x] N5 gates: cargo all features, clippy, mutations, wasm size, check:all on final HEAD, e2e:ui, e2e:shell if sandbox, C8 Docker + mutations - [ ] N6 fresh verifier + security on final HEAD (old MEDIUMs, f32/f64 residue); memory BDR + 2 LRN (dedup); checkpoint + - [ ] O last MEDIUM, zone without interior (brief « V1-2.2 : fermeture du dernier MEDIUM », 2026-11-01, on de2dfb3; contract `.claude/tasks/contracts/2026-11-01-v1-2-2-interior.md`) + - [x] O1 measure: flattened outline (polygon, path curves/arcs with a chord deviation bound), fill rule (layer = nonzero), widest inscribed disc search (deterministic, capped), projected at 320 × 568 + - [x] O2 rule in `frame::annotation_placement` after the bounds rule; closed codes; verdict + preview; docs (ANNOTATION-RENDERING, RUST.md, V1-2 §6.7) + - [x] O3 tests: back-and-forth, near-flat, self-intersection both rules, curves/arcs near zero, small legit, transforms/scales, threshold edges, equine; browser concordance fixture + spec on 3 engines + - [x] O4 gates: wasm ≤ 600 000, mutations, check:all, e2e:shell sandbox, ignored tests documented, PDF unchanged; fresh verifier + security + - [x] O5 memory: 3 LRN (WebKit snapping, Firefox client rects, WebKit tiny spans); LOW overlap recorded; checkpoint - [ ] 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) diff --git a/.claude/tasks/contracts/2026-11-01-v1-2-2-interior.md b/.claude/tasks/contracts/2026-11-01-v1-2-2-interior.md new file mode 100644 index 00000000..92bd0b49 --- /dev/null +++ b/.claude/tasks/contracts/2026-11-01-v1-2-2-interior.md @@ -0,0 +1,35 @@ +# Contract: V1-2.2 last MEDIUM, zone without interior + +Owner brief « V1-2.2 : fermeture du dernier MEDIUM », 2026-11-01, on `de2dfb3` (branch +`feature/v1-2-anatomical-sheets`). Decisions of the previous checkpoint confirmed, not reopened. + +## Criteria + +- I1 Rule: a zone or trigger drawn as a polygon or a path is refused unless its fill, under the + fill rule the layer paints (nonzero: the layer writes none, the root carries none, lot B + isolation), holds a disc of diameter at least `MIN_VISIBLE_PX` (4 CSS px) on the smallest preview + (main 286 × 310, detail 254 × 191, `xMidYMid meet`). The stroke never counts. The bounds rule stays + and runs first. Circles keep their disc measure. +- I2 Measure in the Rust core, conservative: curves and arcs flattened with a proven chord deviation + bound subtracted from the radius; a point counts only when inside under the rule and at least the + radius away from every edge (implicit closing edges included); deterministic search, capped; over + the caps the annotation is refused (fail closed), never accepted. +- I3 Closed codes, the approved ones unchanged: issue `annotation.geometry.interior_too_small`, + verdict `verification.validation.marker_interior_too_small` (implementer's proposal, to confirm). + Verdict and preview agree. The document and the drawings never rewritten. +- I4 Tests: back-and-forth path, near-flat polygon, self-intersection under both rules, curves and + arcs of near-zero area, small legitimate filled shapes, drawing transforms and extreme scales, + threshold edges, equine non-regression, every case previously accepted wrongly now refused. +- I5 Browser concordance (Chromium, Firefox, WebKit, 320 × 568): for each accepted probe shape real + presses inside the Rust witness disc select it; for each refused one the browser's fill-only hit + area holds no disc of the threshold; the probe fixture generated by the core and checked for drift. +- I6 WASM ≤ 600 000 B gzip (budget not raised); PDF bytes and historical references unchanged; + existing click tests kept. +- I7 Gates: check:all on the final HEAD, e2e:shell on the isolated sandbox, mutations, the three + ignored cargo tests documented. +- I8 Docs: ANNOTATION-RENDERING, RUST.md §12.13, V1-2 contract §6.7; LOW overlap recorded as a known + limitation (human review identifies fully overlapping markers before publication). + +## Out of scope + +No selection redesign, no SQL, no DEV, no merge, no V1-2.3, no deploy.