nx_grounding.nx
buildroot/runtime/nx_grounding.nx
about
nx_grounding.nx -- EVIDENCE-TIER / ANTI-OVER-OPTIMISM rung. Every datum this
ecosystem emits carries a grounding tier that says how much to trust it, and
a composite claim is only as trustworthy as its WEAKEST input. This exists
so the system stops presenting a number I typed from memory (a CPI score, a
bulk price) with the same authority as a number two independent methods
verified against published literature (a peptide mass). That conflation is
the exact over-optimism this rung refuses to allow.
THE TIERS, weakest to strongest:
ATTESTED an operator DECLARED it done; the system cannot check it
(e.g. "the cGMP facility is qualified"). Trust = the operator.
ASSERTED a constant entered from domain knowledge with NO in-system
external oracle (e.g. a CPI score, a bulk cost, a regulatory
tier). Plausible, internally consistent, UNVERIFIED. A gate that
checks the code returns this constant proves nothing about the
constant's truth.
DERIVED computed from stronger inputs by sound arithmetic, but not
itself checked against an external reference (e.g. a peptide's
isoelectric point, an ion m/z). As true as its inputs + the math.
VALIDATED a model checked against PUBLISHED data points (e.g. the freezing
curve vs Goff/Hartel; the z-value recovered from two legal
schedules landing in the published band).
ANCHORED verified by an INDEPENDENT second method AND external ground
truth (e.g. a peptide mass: residue-sum == elemental-sum ==
published formula == published mass). The strongest claim.
THE COMPOSITION LAW: a chain is as strong as its weakest link. An "effective
manufacturing cost" that multiplies an ASSERTED bulk price by a DERIVED
formula is ASSERTED, not DERIVED -- gnd_compose takes the MINIMUM. This is
what stops a pile of asserted constants from laundering itself into a
confident-looking result.
gnd_is_verified draws the honest line: only VALIDATED and ANCHORED count as
"verified". Everything the go-to-market / cost / regulatory layer emits is
ASSERTED or below, and this function will say so -- in the machine output,
not just in prose.
genealogy_id: rigor + service_infrastructure + liar_killer
dependencies 1 imports · 7 importers
imports: nx_syscalls.nx
imported by: nx_finance_svc.nxnx_gtm_svc.nxnx_labsci_svc.nxnx_legal_svc.nxnx_plan_svc.nxnx_qc_svc.nxnx_service.nx
structs
| none |
consts
| 44 | const GND_UNKNOWN: i64 = 0 |
| 45 | const GND_ATTESTED: i64 = 1 |
| 46 | const GND_ASSERTED: i64 = 2 |
| 47 | const GND_DERIVED: i64 = 3 |
| 48 | const GND_VALIDATED: i64 = 4 |
| 49 | const GND_ANCHORED: i64 = 5 |
| 129 | const GC_PEPTIDE_MASS: i64 = 0 // ANCHORED (residue-sum == elemental == lit) |
| 130 | const GC_MOLECULAR_FORMULA: i64 = 1 // ANCHORED (integer, vs published formula) |
| 131 | const GC_FREEZING_CURVE: i64 = 2 // VALIDATED (vs Goff/Hartel points) |
| 132 | const GC_PASTEURIZATION_Z: i64 = 3 // VALIDATED (recovered from 2 legal schedules) |
| 133 | const GC_ISOELECTRIC_POINT: i64 = 4 // DERIVED (bisection over integer pKa set) |
| 134 | const GC_ION_MZ: i64 = 5 // DERIVED (mass + proton convention) |
| 135 | const GC_INGREDIENT_COST: i64 = 6 // ASSERTED (indicative bulk range) |
| 136 | const GC_CPI_SCORE: i64 = 7 // ASSERTED (typed from memory) |
| 137 | const GC_REGULATORY_CLASS: i64 = 8 // ASSERTED (correct, but no in-system oracle) |
| 138 | const GC_TRIAL_COST: i64 = 9 // ASSERTED (order-of-magnitude planning) |
| 139 | const GC_CGMP_FLAG: i64 = 10 // ATTESTED (operator declaration) |
| 140 | const GC_N: i64 = 11 |
functions
| 51 | func gnd_name(t: i64) -> *u8 called by 1: nsvc_ground |
| 61 | func gnd_meaning(t: i64) -> *u8 called by 1: nsvc_ground |
| 70 | func gnd_valid(t: i64) -> i64 |
| 78 | func gnd_compose(a: i64, b: i64) -> i64 called by 1: gnd_compose3 |
| 83 | func gnd_compose3(a: i64, b: i64, c: i64) -> i64 calls 1: gnd_compose |
| 90 | func gnd_min(tiers: *i64, n: i64) -> i64 |
| 105 | func gnd_is_verified(t: i64) -> i64 called by 1: nsvc_ground |
| 111 | func gnd_decision_usable(t: i64) -> i64 |
| 118 | func gnd_needs_caveat(t: i64) -> i64 |
| 142 | func gnd_class_tier(gc: i64) -> i64 |