code wiki / (root) / nx_grounding.nx

nx_grounding.nx

buildroot/runtime/nx_grounding.nx

6916 B155 linesdepth 2pulls 2 transitivereach 7 importersview sourcekind library
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_grounding.nx nx_finance_svc.nx nx_gtm_svc.nx nx_labsci_svc.nx nx_legal_svc.nx nx_plan_svc.nx nx_qc_svc.nx nx_service.nx

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

44const GND_UNKNOWN: i64 = 0
45const GND_ATTESTED: i64 = 1
46const GND_ASSERTED: i64 = 2
47const GND_DERIVED: i64 = 3
48const GND_VALIDATED: i64 = 4
49const GND_ANCHORED: i64 = 5
129const GC_PEPTIDE_MASS: i64 = 0 // ANCHORED (residue-sum == elemental == lit)
130const GC_MOLECULAR_FORMULA: i64 = 1 // ANCHORED (integer, vs published formula)
131const GC_FREEZING_CURVE: i64 = 2 // VALIDATED (vs Goff/Hartel points)
132const GC_PASTEURIZATION_Z: i64 = 3 // VALIDATED (recovered from 2 legal schedules)
133const GC_ISOELECTRIC_POINT: i64 = 4 // DERIVED (bisection over integer pKa set)
134const GC_ION_MZ: i64 = 5 // DERIVED (mass + proton convention)
135const GC_INGREDIENT_COST: i64 = 6 // ASSERTED (indicative bulk range)
136const GC_CPI_SCORE: i64 = 7 // ASSERTED (typed from memory)
137const GC_REGULATORY_CLASS: i64 = 8 // ASSERTED (correct, but no in-system oracle)
138const GC_TRIAL_COST: i64 = 9 // ASSERTED (order-of-magnitude planning)
139const GC_CGMP_FLAG: i64 = 10 // ATTESTED (operator declaration)
140const GC_N: i64 = 11

functions

51func gnd_name(t: i64) -> *u8
called by 1: nsvc_ground
61func gnd_meaning(t: i64) -> *u8
called by 1: nsvc_ground
70func gnd_valid(t: i64) -> i64
78func gnd_compose(a: i64, b: i64) -> i64
called by 1: gnd_compose3
83func gnd_compose3(a: i64, b: i64, c: i64) -> i64
calls 1: gnd_compose
90func gnd_min(tiers: *i64, n: i64) -> i64
105func gnd_is_verified(t: i64) -> i64
called by 1: nsvc_ground
111func gnd_decision_usable(t: i64) -> i64
118func gnd_needs_caveat(t: i64) -> i64
142func gnd_class_tier(gc: i64) -> i64