fix(anatomy): V1-2.2 refuse markers too small on the phone preview

Owner decision 2026-11-01: the scale bypass (viewBox blown up, drawing
scaled back) is closed by the visible size, 4 CSS px on the editor at
320 x 568 (equine junctions 4.97 px), verdict marker_too_small. A frame
is usable only where browsers draw it faithfully: edges within 2^20,
span from 1 unit, aspect 100, offset 256 spans; measured in 3 engines.
This commit is contained in:
bchanot committed 2026-11-01 01:28:48 +01:00
1 parent 9c606aa567
commit 96b99784b5
17 files changed
+944 -37

No files matched your search

+34
View File
@@ -4294,3 +4294,37 @@ which tints the part it covers at 30 %.
The five `fixme` of the previous checkpoint were one test, « a click on a vertebral junction records the junction », in
each of the five projects of the time: it now runs unmarked in the six. Module: 574 234 B gzip -9 (lot B 573 134).
**The scale bypass, closed by the visible size** (owner decision 2026-11-01: the projected visibility of the markers,
not a cap on the `viewBox`; threshold 4 CSS px on the smallest supported preview, the 6 px starting point refusing the
validated equine). The security review's reproduction: the horse's `viewBox` × 1 000 with the content scaled back draws
the same horse, every marker in frame and below a pixel, accepted. One definition in `anatomy::frame`, measured by the
verdict and the preview after the frame (`frame_faults`), the composers framing on the same `view_frame`:
| Rule | Value and why | Where |
|---|---|---|
| Smallest preview | the editor at 320 × 568 CSS px (the narrowest width the V1-2 contract §8.4 tests), measured in Chromium on 2026-11-01: the main view's canvas box 286 px wide, growing to 310 px tall (a tall frame reaches 310.4); a detail view in the dialog's 4:3 box, 254.9 × 191.1. `MAIN_PREVIEW_PX` 286 × 310, `DETAIL_PREVIEW_PX` 254 × 191, scale `min(w / width, h / height)` (`xMidYMid meet`) | `frame::Frame::preview_scale` |
| Visible size | what the layer paints, never the click surface: a point's (or a circle zone's) visible disc `2 × max(2, r − 12)` (`layer::twin_radius`, the one formula the layer draws with), a trigger circle's diameter, a polygon's or a path's smaller side, curves and arcs on their shape (`path_bounds`) | `frame::visible_size` |
| Threshold | `MIN_VISIBLE_PX` 4. Measured equine at 320 × 568: junctions 4.97 px (`c7-t1`, `l6-s1`, `t18-l1`, r 30), the other main points 6.07, the head points 15.1, the smallest zone side 13.1 (sacral). 6 px would refuse the junctions at 320, 360 (5.66) and 375 px (5.92) | |
| Refusal | issue `annotation.geometry.too_small` (path `annotations[i].geometry`), verdict `verification.validation.marker_too_small` after `out_of_frame`; the document never rewritten | `report.rs`, `verdict.rs`, `preview.rs` (through `frame_issues`) |
| Frame range (`f32`) | a frame is usable only if finite and: every edge within `2²⁰` (`f32` keeps a sixteenth of a unit there), each span at least 1 unit (painted pixels, below: WebKit 27.2 paints nothing from `2⁻⁷`, Chromium 156 drifts at `2⁻¹⁴`; below one unit the layer's fixed sizes exceed the frame), aspect at most 100 (beyond, the frame is 2.9 px tall on the phone box), farthest edge at most 256 smaller spans (a coordinate's `f32` error, about `|v| × 2⁻²⁴`, stays below `2⁻¹⁶` of the span: 0.15 px on a frame shown 10 000 px wide). Equine: edges 2 073.4, ratio 1.27 (main) and 1.47 (head). Otherwise no usable frame (`view.frame.unknown`, `out_of_frame`); the canvas falls back to `0 0 100 100`, the PDF view to no `viewBox` | `frame::Frame::from_numbers` |
The values and transforms the rule bounds: the markers' only transform is the frame's mapping onto the box (they sit
in the engine's root, §12.12), bounded by the frame range; their coordinates are inside the frame, so within it. The
drawing's own transforms move the drawing alone and change no measure (`transforms_inside_the_drawing_never_change_the_measure`);
a drawing scaled to nothing is the preview's and the reviewers' to see, as any drawing content.
Rust and the browsers on the limits (tools `.claude/audits/2026-11-01-v1-2-2-decisions-tools/`: `frame-probe.mjs` on
the cases of `frame_probe_generator.rs.txt`, `span-pixels.mjs`; Chromium 156, Firefox 157, WebKit 27.2). Each case is the
core's composed canvas in the preview box with the AnatomyCanvas CSS; the core's f64 expectation of each hitbox (stroke
none: Firefox counts a stroke in an element's client rect, the others do not) against the browser's layout:
| Case | Core | Chromium / WebKit: size gap, centre gap | Firefox |
|---|---|---|---|
| equine main, × 1.24, × 1.25, × 100, head on the detail box | accepted, accepted (junction disc 4.005 px), `too_small` (3.973), `too_small` (0.050), accepted (15.08) | ≤ 8.2e-5 relative, ≤ 0.014 px | ≤ 0.4 % relative (client rects in 1/60 px app units: 24 % of the 0.067 px hitbox at × 100), ≤ 0.012 px |
| thresholds on a 1 000-unit frame, discs 4.576 and 3.432 px | accepted, `too_small` | ≤ 1e-6 relative, ≤ 4.2e-7 px | ≤ 0.2 %, 0.0035 px |
| far edge at `2²⁰` (span 8 192); far edge at 256 spans (span 10) | accepted, accepted | 0, ≤ 0.0034 px | ≤ 0.84 %, ≤ 0.2 px |
| far edge at 10⁵ and 10⁶ spans (refused, drawn raw) | `no_frame` | centre gap 0.14 px, then 11 px: the `f32` error the ratio rule keeps out | 0.44 px, 9.6 px |
| span 1 unit to `2⁻²⁰`, disc a quarter of the frame, painted pixels | accepted from 1 unit (`no_frame` below) | Chromium exact to `2⁻¹⁰`, 0.46 px at `2⁻¹⁴`, nothing painted at `2⁻²⁰`; WebKit exact to `2⁻⁵`, nothing painted from `2⁻⁷` | exact at every span (its client rects drift from 286 px per unit: 3.3 % at a span of 1, rendering unaffected) |
Declared limit: a thin shape drawn on a diagonal is measured on its bounds, so it can pass while showing a line; the
rule is a scale floor against the bypass, never a review of shapes (the zones keep their declared 2-unit stroke).
+2 -1
View File
@@ -1046,7 +1046,8 @@ Four stages, each a superset of the previous:
| Caps of §1, all of them | yes | | | `verification.validation.caps` |
| Every annotation has a geometry | yes | | | `verification.validation.no_geometry` |
| Every reachable drawing present, size and sha256 equal to its row, read without removal, in the stored form of §9.2 | yes | | | `verification.integrity.*` |
| Every annotation entirely inside the frame of its view, edges included: the view's `view_box`, else the `viewBox` of the drawing it draws, read as a browser reads it (four numbers, positive width and height); curves and arcs measured on their shape; path data a browser would not read whole refused; a view drawn on a clean drawing without either has no frame. Measured on the views whose drawing reads clean; the document is never rewritten (owner brief 2026-10-30, RUST.md §12.11) | yes | | | `verification.validation.out_of_frame` (issues `annotation.geometry.out_of_frame`, `view.frame.unknown`) |
| Every annotation entirely inside the frame of its view, edges included: the view's `view_box`, else the `viewBox` of the drawing it draws, read as a browser reads it (four numbers, positive width and height) and usable within the range rules browsers draw faithfully (owner brief 2026-11-01: edges within 2²⁰, spans from 1 unit, aspect at most 100, farthest edge at most 256 smaller spans); curves and arcs measured on their shape; path data a browser would not read whole refused; a view drawn on a clean drawing without either has no frame. Measured on the views whose drawing reads clean; the document is never rewritten (owner brief 2026-10-30, RUST.md §12.11) | yes | | | `verification.validation.out_of_frame` (issues `annotation.geometry.out_of_frame`, `view.frame.unknown`) |
| Every annotation in frame shows at least 4 CSS px on the smallest preview, the editor at 320 × 568 (main view box 286 × 310, detail view box 254 × 191, `xMidYMid meet`): a point's visible disc (`2 × max(2, r − 12)`), a trigger circle's diameter, a polygon's or a path's smaller side (curves and arcs on their shape). Same views, same frame; the document is never rewritten (owner brief 2026-11-01, RUST.md §12.13) | yes | | | `verification.validation.marker_too_small` (issue `annotation.geometry.too_small`) |
| Fingerprint computed | yes | | | `verification.integrity.fingerprint` |
| Verdict passed, on the current revision | | yes | yes | `verdict.missing`, `verdict.failed`, `verdict.stale` |
| No `to_confirm` element (D2) | | yes | yes | `publish.to_confirm.open` |