code wiki / (root) / nx_proportion_guard.nx

nx_proportion_guard.nx

buildroot/runtime/nx_proportion_guard.nx

8051 B166 linesdepth 4pulls 4 transitivereach 5 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_proportion_guard.nx -- FINITE plausibility envelopes for body axes. nx_canon_proportions.nx already seals the axis vocabulary (NX_AXIS_*, ids 1..32) and the RATIO canon (this ratio should be phi-ish, within tolerance). What it does not carry is an ABSOLUTE envelope: a body can satisfy every ratio and still be 3 metres tall. Ratio-only checking is exactly how an alien figure passes review. THE LAW THIS ENCODES (operator, 2026-07-30): a human being has a finite range, and even idealized or fantasy forms have finite proportions -- wider, differently centred, still bounded. So regimes are DATA and every one of them is closed at both ends: HUMAN -- population range for an adult female IDEALIZED -- narrower aesthetic band, strictly INSIDE human-possible KIN -- monsterkin/fantasy: wider than human, still finite by construction ★THE DESIGN DECISION THAT MAKES THIS A GUARD: an axis with no bound row REFUSES. Treating "no bound" as "anything goes" is how impossible values get in -- the same shape as a capability-denied read being mistaken for "unavailable". Missing is not permission. Callers must REFUSE on a non-zero verdict, never silently clamp: a clamped body is a lie told to whoever reads the number back. PROVENANCE (honest): the rows below are literature-typical adult-female ranges entered by hand, not yet an ingest of a measured anthropometric dataset. They are bounds we can defend as plausible, not bounds we have measured ourselves -- see the debt filed alongside this file. Widen or narrow them by MEASUREMENT, never by feel. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 2 imports · 2 importers

nx_syscalls.nx nx_canon_proportions.nx nx_proportion_guard.nx nx_proportion_guard_gate.nx nx_softtissue.nx

imports: nx_syscalls.nxnx_canon_proportions.nx

imported by: nx_proportion_guard_gate.nxnx_softtissue.nx

structs

none

consts

30const NX_MAGIC_1400: i64 = 1400
31const NX_MAGIC_1950: i64 = 1950
32const NX_MAGIC_1550: i64 = 1550
33const NX_MAGIC_1850: i64 = 1850
34const NX_MAGIC_1200: i64 = 1200
35const NX_MAGIC_2400: i64 = 2400
39const NX_AXIS_BREAST_PROJECTION: i64 = 33 // chest wall to nipple, mm
41const PG_HUMAN: i64 = 0
42const PG_IDEALIZED: i64 = 1
43const PG_KIN: i64 = 2
44const PG_REGIME_N: i64 = 3
46const PG_OK: i64 = 0
47const PG_BELOW: i64 = 1
48const PG_ABOVE: i64 = 2
49const PG_NO_BOUND: i64 = 3
51const PG_MIN: i64 = 0
52const PG_MAX: i64 = 1
56const PG_ABSOLUTE_CEILING_MM: i64 = 3000

functions

61func pg_bound(axis: i64, regime: i64, which: i64) -> i64
105func pg_has_bound(axis: i64, regime: i64) -> i64
112func pg_check(axis: i64, value_mm: i64, regime: i64) -> i64
called by 1: main calls 2: pg_has_boundpg_bound
122func pg_sample(axis: i64, regime: i64, h01: i64) -> i64
135func pg_selftest() -> i64
called by 1: main calls 3: sys_mmappg_has_boundpg_bound