MAP-TEST-SWEEP — the full part-step pose sweep (design + guide + for-idiots)
Test:
facett-map3d/tests/partstep_sweep.rs. Ratified discipline: Rickard's 3D-test LAW (2026-06-22) — "not one value into the black box; rotate 360° + zoom in many combinations." Peer ofchain_sweep.rs(raw projection) andclip_pipeline.rs(one-pose composite blob).
Design
The 3D map render is a pipeline of part-steps: near_clip → project → cull → shade → depth_sort → scissor → composite. A bug (the weeks-long clip smear) hides at pose-dependent stage boundaries — e.g. a triangle straddling the near plane at a street-level dolly. So a single-pose test is blind: green at one camera says nothing about the next. MAP-TEST-SWEEP drives the shipping pipeline (shade_faces_clip → scissor_report) across the whole camera-pose space and asserts the clip-bug oracle at every pose.
- Grid (default arm): 360° azimuth (step 10° = 36) × 25 zoom × 4 elevations × 2 fixtures (giant 20×20 city that straddles the near plane + the rabbit) = 7200 poses. Heavy arm (
#[ignore],--ignored/--heavy): 72 × 100 × 4 = 28 800. - Oracle:
scissor.clipped_escapes == 0at every pose (nothing painted outside the widget rect after the scissor) +ink_outside_rectfinite. Plus a coverage assertion: >50% of poses must render geometry (else "green" is vacuous). - Degenerate arm: zero-area footprints, behind-the-eye and grazing poses → no panic, no escape, finite ink.
- Evidence: per-step
functional_statusemits (scissor/composite/composite_blob, testmatrix-gated) + a CPU-rasterised PNG blob of the worst- overshoot pose written to$NORNIR_WAREHOUSE_ROOT/facett-map3d(or temp), read back and asserted non-blank + 0 px outside the rect.
Guide (run it / extend it)
cargo test -p facett-map3d --test partstep_sweep --features testmatrix -- --nocapture
cargo test -p facett-map3d --test partstep_sweep --features testmatrix -- --ignored # full 360×100
To add a part-step: drive it inside run_pose() and assert its reading per pose; emit a functional_status only if the result can't be read from the return value (EMIT-DOCTRINE). To extend the discipline to a new skin (2D map, graph3d), copy the grid + the clipped_escapes==0 / lit-coverage / PNG-blob shape (see the render-path matrix gap list — graph3d + map2d pose-sweeps are the next ones).
For idiots
Imagine spinning the camera all the way around a tiny city and zooming from a mile up down to standing-in-the-street, 7200 times. At every angle and zoom we check one thing: did any building get painted outside the little window it's supposed to live in? If yes → the test goes RED (that was the old "green smear" bug). It's also allowed to be ugly geometry on purpose (degenerate buildings) to make sure we never crash. At the worst angle it saves a picture so a human (or an agent) can literally look and see the city stays inside its box. One value into a black box proves nothing in 3D — you have to spin and zoom.