# eyes-proof — GLB meter · proofgate · anchorcheck (distilled)

## Lesson
Measure, don't assert. Three filed instruments become one library
program: (a) a GLB topology meter so a model's counts/χ/symmetry are
reproducible by anyone, not a one-off parse; (b) a proof gate so a
delivery's mechanical claims (files, hashes, sizes, literal text) are
re-measured against disk instead of self-reported — and an empty
manifest FAILs, because the gate blocks on silence; (c) an anchor
check so light is verified to originate where it is claimed to
originate, in numbers, before a founder's eye has to catch drift.

## Provenance
Distilled 2026-11-07 from the house tools (all left untouched):
`~/workspace/tools/eyes/glbmeter.py` + `glbmeter.md`,
`~/workspace/tools/proofgate.py`, and
`~/workspace/tools/eyes/anchorcheck.py` + `anchorcheck.md` with its
filed proofs in `tools/eyes/anchor-proofs/`. Fixtures in `example/`:
`prop.glb` copied from `~/workspace/classroom/graphics-curriculum/cycle-1/ex2/prop.glb`
(a real corpus GLB from the curriculum the meter serves — the eyes
corpus itself holds PNG cases, no GLBs); anchor frames copied from
`~/workspace/wake-shots/pokemon-crystal/` with their filed claim JSONs.

## How to run
```
node check.cjs     # PASS <n> FAIL <m> against all ground truths below
node example.cjs   # all three capabilities on the fixtures + JSON line
const P = require('./program.cjs');
P.measureGLB(file) · P.verifyManifest(manifest, baseDir) · P.evaluateAnchor(frame, claim)
```

## Worked example
`example.cjs` measures prop.glb, verifies `example/manifest.json`
(which carries one tampered entry on purpose), and runs the three
filed anchor claims.

## Numbers reproduced
- **GLB meter** vs `glbmeter.py --json` on prop.glb — every field
  equal: V 119 · F 202 · welded 119 · AABB (0.6, 2.12, 0.15) · χ 18 ·
  boundary 0 · non-manifold 0 · watertight · 9 shells
  (28:2:0 ×5, 20:2:0, 14:2:0 ×3) · symmetry origin/centre
  X 100/100, Y 0/0, Z 100/100 · tri-area min 4.7717392859386587e-4,
  median 0.0036656413288469465, max 0.035100008153915674,
  max/median 9.575407140271585, max/min 73.55810125114805.
- **Proofgate** vs `proofgate.py` on the fixture manifest — identical
  verdict: **6 PASS · 1 FAIL · 1 UNVERIFIED**; the FAIL is the tampered
  `ledger.txt` sha256 entry (it carries hello.txt's hash), refused by
  name; the visual claim rides as UNVERIFIED, never passed.
- **Anchorcheck** vs `tools/eyes/anchor-proofs/out-*.txt` — bedroom
  CENTROID reproduces exactly (centroid (415.6,127.5), |offset| 61.7px
  vs band 40.0px, verdict FAIL — the standing negative control; an
  instrument that passes this frame is broken), bedroom ORIGIN bbox
  (380,96)-(447,159) n=3984 PASS, night ORIGIN bbox (328,116)-(367,151)
  n=768 PASS, day SHADOW measured throw 32° vs predicted 35°
  (delta 3°, PASS).
- Check suite total: **PASS 22 FAIL 0**.

## Consumers
Form/proof gates for graphics lanes; any delivery that ships a
manifest; any lane claiming emitted light sits where it should.

## Honest limits
- **Proofgate `commands` section NOT carried**: the Python gate runs
  shell strings from the manifest; a school library program does not
  execute arbitrary shell. Command entries are reported UNVERIFIED
  by name (never dropped, never passed). Use `tools/proofgate.py`
  where command claims must actually be run.
- **SHADOW blur is an approximation**: the source uses PIL's
  GaussianBlur; this port uses the standard 3-box-blur Gaussian with
  clamped edges. On the filed day proof the throw and verdict match
  exactly (32°, PASS) but the top-3 wedge fractions differ in the
  second decimal (0.37/0.36/0.35 vs filed 0.38/0.38/0.36). The source
  itself names this row a thin-margined, coarse estimator — treat a
  SHADOW pass as "no drift at this coarseness", per anchorcheck.md.
- GLB meter scope matches the source: exactly 1 mesh / 1 primitive;
  anything else fails loudly.
- PNG reader carries 8-bit non-interlaced PNGs (the house frame
  format); anything else fails loudly rather than mis-measuring.
- The Python tools remain the committed instruments of record
  (TOOLBOX.md, one instrument per measurement); this program is the
  school computers' carried copy, proven against them above.
