code wiki / (root) / nx_triage_ground.nx

nx_triage_ground.nx

buildroot/runtime/nx_triage_ground.nx

8115 B192 linesdepth 4pulls 4 transitivereach 1 importersview sourcekind tooltopic triage
docsdependenciesstructsconstsfunctions

about

nx_triage_ground.nx -- EVIDENCE-GROUNDS the capability-triage registry's has_organ column against DISK FACTS, eating the debt "the registry is Claude's hand-seeded opinion" (the subtlest navel- gaze). COMPOSES the EXISTING engine `nx_capability_census` (cc_our_grade: exceed-gate > organ > absent -- "never self-scored", per its own doctrine) instead of reinventing it (the round-4 lesson). Per probeable row (bare nx_[a-z0-9_]+ runtime organ) it derives the disk-fact grade and flags where my claimed has_organ DISAGREES -> DISCREPANCY = a label the disk can't back (wrong name or fabrication). NAS backends / external / descriptive names = UNPROBEABLE (honest). This is the self-hosting-analysis local half: the loop's has_organ stops being asserted, starts being measured. usage: nx_triage_ground scan [registry] Always exit 0; journals a summary. license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 1 importers

nx_syscalls.nx nx_crashresume_census_core.nx nx_triage_ground.nx nx_triage_ground_gate.nx

imports: nx_syscalls.nxnx_crashresume_census_core.nx

imported by: nx_triage_ground_gate.nx

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main tg_streq sys_mmap ccz_read sys_openat_rd sys_read sys_close tg_puts sys_write tg_field ccz_num_at ccz_slen tg_probeable tg_grade sys_mmap ↻ tg_path ccz_cat_str tg_exists sys_mmap ↻ sys_fstatat tg_verdict tg_putn nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap tg_vname ccz_cat_str ↻ ccz_cat_num ↻ sys_write ↻ sys_openat_append sys_close ↻

structs

none

consts

13const TG_MAGIC_65536: i64 = 65536
14const TG_MAGIC_65535: i64 = 65535
22const TG_GROUNDED: i64 = 0
23const TG_DISCREPANCY: i64 = 1 // has_organ=1 but disk ABSENT -> fix the label
24const TG_UNDERCLAIM: i64 = 2 // has_organ=0 but disk shows it
25const TG_UNPROBEABLE: i64 = 3

functions

27func tg_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 1: main calls 1: sys_write
28func tg_putn(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
29func tg_streq(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while a[i] != (0 as u8) { if a[i] != b[i] { return 0 } i = i + 1 } if b[i] != (0 as u8) { return 0 } return 1 }
called by 1: main
32func tg_verdict(probeable: i64, has_organ: i64, grade: i64) -> i64
called by 2: mainmain
44func tg_vname(v: i64) -> *u8
called by 1: main
51func tg_probeable(name: *u8, n: i64) -> i64
called by 2: mainmain
70func tg_field(buf: *u8, ls: i64, le: i64, idx: i64, out: *u8) -> i64
called by 1: main
94func tg_path(name: *u8, suffix: *u8, out: *u8) -> i64
called by 1: tg_grade calls 1: ccz_cat_str
103func tg_exists(path: *u8) -> i64
called by 1: tg_grade calls 2: sys_mmapsys_fstatat
110func tg_grade(name: *u8) -> i64
called by 2: mainmain calls 3: sys_mmaptg_pathtg_exists
121func main(argc: i64, argv: *i64) -> i64