code wiki / (root) / nx_organ_ground_lib.nx

nx_organ_ground_lib.nx

buildroot/runtime/nx_organ_ground_lib.nx

4545 B85 linesdepth 3pulls 3 transitivereach 2 importersview sourcekind librarytopic organ
docsdependenciesstructsconstsfunctions

about

nx_organ_ground_lib.nx -- IS THIS SYMBOL ACTUALLY IN THE ORGAN ITS ROW NAMES? The second half of the compare-matrix row question. nx_matrix_sym_lib owns the SYMBOL FIELD's format (bare _ABSENT_ vs the _ABSENT_:<watch> contract) and deliberately performs NO file IO, so that purely lexical consumers can use it. This lib owns the MEASUREMENT: open the organ the row declares, and answer whether the symbol occurs in it. WHY IT EXISTS (measured 2026-08-16). FOUR organs each carried their own copy of this, and the copies did not agree, so the estate published four different answers about the same 25 rows of mangagen: nx_swcompare_evidence 18 present / 7 absent (correct) nx_compare_unified 0 present / 25 absent (read organ paths BARE -> everything missed) nx_swarm_maturity every row L0, 0/1000 (same bare read, same confident zero) nx_sota_status 25 present / 0 gaps (lexical only, never opened anything) ★★★★★★FOUR PRIVATE COPIES OF ONE MEASUREMENT ARE FOUR DIFFERENT NUMBERS, AND EACH ONE LOOKS AUTHORITATIVE ON ITS OWN PAGE. Nothing compared them, so nothing could notice. PATH RESOLUTION IS THE WHOLE DEFECT AND IT IS NOT OPTIONAL. Matrix rows name organs BUILDROOT- relative ("runtime/nx_gen.nx") while these organs run from the serving root, so a bare open misses EVERY row and reports it as absent -- a confident zero that is indistinguishable from an honest "not built". Composes nx_estate_path's ep_open_rd, the estate's ONE resolver, whose own header states the law: A VERDICT THAT CHANGES WITH THE CALLER'S WORKING DIRECTORY IS NOT A MEASUREMENT. THREE STATES, NEVER TWO. "I read the organ and the symbol is not there" and "I could not read the organ" are OPPOSITE facts; collapsing them into 0 is exactly what let a resolution bug masquerade as a fleet of honestly-unbuilt capabilities. Callers that only branch on ==1 keep their behaviour; callers that want to abstain can now see the difference. LAYER: runtime/ primitive, importable by runtime/ and _hdl_build/. Library only: NO main(). license_tier: ORIGINAL module: nishi-core.compare.ground capability: MATRIX_ROW_SYMBOL_GROUNDING

dependencies 2 imports · 1 importers

nx_syscalls.nx nx_estate_path.nx nx_organ_ground_lib.nx nx_sota_status.nx

imports: nx_syscalls.nxnx_estate_path.nx

imported by: nx_sota_status.nx

structs

none

consts

37const OG_READ_CAP: i64 = 1 << 20
39const OG_PRESENT: i64 = 1
40const OG_ABSENT: i64 = 0
41const OG_UNREADABLE: i64 = 0 - 1
42const OG_TRUNCATED: i64 = 0 - 2

functions

47func og_find(buf: *u8, n: i64, ned: *u8, na: i64, nl: i64) -> i64
called by 1: og_symbol_in_organ
69func og_symbol_in_organ(path: *u8, scratch: *u8, cap: i64, ned: *u8, na: i64, nl: i64) -> i64