61 lines
4.0 KiB
Markdown
61 lines
4.0 KiB
Markdown
# Contract: V1-2.2 three MEDIUM (marker isolation, click hijack, view frame)
|
|
|
|
Owner brief « V1-2.2 : arbitrages propriétaire sur les trois MEDIUM », 2026-10-30, on `958228a`
|
|
(branch `feature/v1-2-anatomical-sheets`). Two lots:
|
|
|
|
- Lot A (committed): the frame rule, defect 3.
|
|
- Lot B (working tree, NOT committed, awaiting the owner's authorisation because it changes the
|
|
frozen R3 references): marker isolation and hitbox capture, defects 1 and 2, with the click proofs.
|
|
|
|
Diff under review: the working tree (lot A + lot B) against `958228a`.
|
|
|
|
## Problems
|
|
|
|
1. Both composers (`crates/core/src/anatomy/compose.rs`) appended the engine's marker layer to the
|
|
drawing's own root: every presentation attribute the reader keeps on that root reached the markers,
|
|
inherited (`stroke-opacity`, `stroke-dasharray`, `stroke-width`, `stroke-linejoin`, `fill-rule`,
|
|
`color-interpolation-filters` on the halo…) or acting on a whole group (`opacity`, `display`).
|
|
2. The point hitbox (`pointer-events="all"`, no stroke of its own) inherited a root `stroke-width`: a
|
|
giant stroke widened every hitbox and the last one took the clicks meant for other markers.
|
|
3. A view without `view_box` was framed by the drawing's `viewBox`: moving it and translating the
|
|
drawing back left the horse identical and every marker out of frame, accepted.
|
|
|
|
## Criteria
|
|
|
|
- C1 Structural isolation, common to the canvas and the PDF view: no attribute of the drawing's root
|
|
reaches the layer or the halo filter, inherited or group-wide; the drawing keeps its own attributes
|
|
and renders as before; not a denylist of attributes.
|
|
- C2 Interactive surfaces declare their geometry and capture rule: the point hitbox `stroke="none"` and
|
|
a capture on its circle only; ergonomic sizes unchanged; zones and trigger keep their declared stroke.
|
|
- C3 Real click tests in Chromium, Firefox and WebKit (installed engines), touch where testable: normal
|
|
hock click, giant root stroke, hock after the fix, two close points, invisible and overlapping
|
|
surfaces; red on `958228a`, green after. A missing engine is named, never passed silently.
|
|
- C4 Frame rule in the Rust core, one definition for both composers, the verdict and PreviewSheet: the
|
|
view's `view_box`, else the drawing's `viewBox` read as a browser reads it; `preserveAspectRatio`
|
|
handled; annotations entirely in frame, edges included; curves, arcs, invalid coordinates, secondary
|
|
views, views without `view_box`, legitimate transforms; explicit refusal with a closed code; the
|
|
document never rewritten.
|
|
- C5 The reported drawing (horse, offset `viewBox`, compensating translate) is refused with its 19
|
|
main-view markers, the historical annotations unchanged.
|
|
- C6 No frozen reference (R3 oracles, R3 canvas goldens, R4 digests, R4.1 real-raster manifest, step6
|
|
goldens, N-1 copies, seed review drawings, equine drawing and fingerprint) rewritten or regenerated;
|
|
where lot B changes what a reference compares, the change is identified, explained and left for the
|
|
owner (no updated expectation committed).
|
|
- C7 `osteo-halo` and `root_visibility` protections intact; the A6 perimeter unchanged.
|
|
- C8 Gates: cargo on every feature set, clippy `-D warnings`, mutations, wasm module under 600 000 B
|
|
gzip, check:all DEV-isolated (lot A), browser proofs.
|
|
- C9 Docs describe only what is implemented (lot A in RUST.md §12.11, V1-2 contract §6.7,
|
|
ANNOTATION-RENDERING); lot B documented in its patch and the evidence file, not as shipped.
|
|
|
|
## Out of scope
|
|
|
|
No SQL, no Supabase DEV, no worker DEV, no historical resource change, no merge, no V1-2.3.
|
|
|
|
## Clarifications
|
|
|
|
- The junction-point overlap (zones painted and hit after the vertebral junction points, part of their
|
|
disc records the zone, on the historical sheet in every engine) is pre-existing and needs an owner
|
|
decision on the capture order: reported, marked `fixme` in the click spec, not fixed.
|
|
- `with_isolated_layer` (tests/common/svg_tree.rs, lot B) is the proposed declared change applied to
|
|
the frozen R3 trees; it is not committed.
|