nx_photogrambench.nx
buildroot/runtime/nx_photogrambench.nx
about
nx_photogrambench.nx -- THE PHOTOGRAMMETRY RULER. Measures where the Nishi stack stands on the FULL
photo->metric-3D pipeline vs the July-2026 SOTA bar (COLMAP / RealityCapture / Metashape / OpenMVS /
MVSNet / VGGT-Pi3 feed-forward / 3DGS), so the build order is CHOSEN BY MEASUREMENT, not by taste.
WHY THIS INSTRUMENT AND NOT THE OLD ONE: nx_cadtwin_census scores a photogrammetry-adjacent slice by
HAND-TYPED cell values, and its citations drift from what the files actually do -- it credits classical
image features to "nx_descriptor", which is a TEXT descriptor profiler for the writing arc (dx_profile
over a term lexicon), with no pixel in it. Presence-scoring plus hand-typed cells is exactly the
author-optimism the operator liar-killed. So this ruler is built the other way round:
1. EVERY score is COMPUTED FROM DISK, never typed. us = f(source-file exists, gate/test exists).
us=0 ABSENT (no source) us=1 PRESENT-UNPROVEN (source, no gate) us=2 PROVEN (source + gate).
"Unproven = absent" is softened to 1 rather than 0 only because the source is a real head start;
it can never reach 2 without a gate on disk. No file, no credit.
2. A read-grounded CAP per axis: us = min(computed, cap). The cap is the honest ceiling of what the
named organ ACTUALLY does, set only after reading it. This is what stops a file-name from voting.
Every cap below 2 carries its reason inline. THIS is where the old census leaked.
3. INSTRUMENT SELF-CHECK: a positive probe (a file that must exist) and a negative probe (a file that
must not) run every time. If the prober cannot tell present from absent, the census is VOID and
the organ exits RED -- a ruler that cannot discriminate must refuse to publish a number.
4. GAP QUEUE: axes ranked by (2-us) * weight * (1+blocks), where `blocks` counts how many OTHER axes
are structurally dead until this one exists. Weight alone is not a build order -- graded on weight
only, twelve axes tie at the top and the "queue" orders nothing. The blocking term is what makes
it an order: it promotes the axis whose absence sterilizes the most of the pipeline. The top of
the queue is the next rung, chosen by the ruler and not by me.
Run from the nxc2 root (paths are repo-relative). Emits human rows, a summary, the gap queue, and a
final one-line JSON envelope for the MCP/API surface.
license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_estate_path.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 32 | const PGB_MAGIC_1048576: i64 = 1048576 |
| 33 | const PGB_MAGIC_65536: i64 = 65536 |
| 34 | const PGB_MAGIC_917504: i64 = 917504 |
| 36 | const PGB_MAX: i64 = 64 |
| 37 | const PGB_NONE: *u8 = "runtime/_pgb_no_such_file.nx" |
functions
| 58 | func pw(s: *u8) -> i64 |
| 65 | func pn(v: i64) -> i64 |
| 83 | func ppad(s: *u8, width: i64) -> i64 |
| 104 | func phave(path: *u8) -> i64 |
| 135 | func pgb_bench_row(buf: *u8, a: i64, b: i64) -> i64 |
| 188 | func pgb_load_bench() -> i64 |
| 231 | func pgb_boot() -> i64 |
| 247 | func pgb_axis(name: *u8, bar: *u8, src1: *u8, src2: *u8, g1: *u8, g2: *u8, w: i64, cap: i64, blk: i64) -> i64 |
| 289 | func pgb_axis_measured(name: *u8, bar: *u8, w: i64, blk: i64) -> i64 |
| 334 | func main() -> i64 |