Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/facett

facett-map3d/.nornir/map-test-sweep.md

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 of chain_sweep.rs (raw projection) and clip_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.

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.