code wiki / (root) / nx_unread_sensor_lib.nx

nx_unread_sensor_lib.nx

buildroot/runtime/nx_unread_sensor_lib.nx

8624 B185 linesdepth 2pulls 2 transitivereach 2 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_unread_sensor_lib.nx -- the pure core of the UNREAD-SENSOR census. THE PATTERN THIS EXISTS FOR, MEASURED FOUR TIMES IN ONE DAY (2026-09-03): * procchurn.jrnl carried a correct sev= on every frame for 35 DAYS and no organ read that field. * nx_raidwatch was verdict=RED the whole time and nothing consumed it. * loadgov LV1 was the same shape one board over. * nx_health reported overall:OK for 16 services while having NO STORAGE AXIS AT ALL, and nx_healthtruth -- built for exactly that shape -- had been STAGED and never promoted. Four independent rediscoveries of one shape is not four mistakes, it is A STRUCTURAL PATTERN WITH A MEASURED RECURRENCE RATE, and the estate had no instrument for it. A SENSOR WHOSE OUTPUT NOTHING READS CANNOT CHANGE AN OUTCOME, AND FROM ANY DASHBOARD IT IS INDISTINGUISHABLE FROM ONE THAT IS WORKING. WHAT IT MEASURES, STATED AS THE NARROW THING IT IS. For every artifact under knowledge/status/, it counts how many DISTINCT .nx sources mention that filename literally. That count is a FLOOR on readers and writers together, so the buckets are named for what was measured and never for the remedy: NO-LITERAL-REFERENCE no source names it at all -- built from a variable, or genuinely orphaned SINGLE-NAMER exactly one source names it, which is almost always its own producer NAMED-BY-SEVERAL at least two, so something other than the writer can see it SINGLE-NAMER is the suspicious class, NOT a proven defect: a producer that also re-reads its own file is legitimately single. ★ NAME A BUCKET FOR WHAT WAS MEASURED, NEVER FOR THE ACTION YOU IMAGINE FOLLOWS -- a bucket called UNREAD would send the next reader deleting live instruments. DECLARED BLIND SPOTS, because a census that hides its own reach is worse than none: * only .nx sources are scanned. A consumer that names a status file from a .conf, a cron row or a shell fragment is INVISIBLE here, so a SINGLE-NAMER row is a QUESTION, not a verdict. * a path assembled at runtime from a prefix and a variable is invisible by construction. * a file read past the per-file cap contributes only its head, and those files are COUNTED.

dependencies 1 imports · 2 importers

nx_syscalls.nx nx_unread_sensor_lib.nx nx_unread_sensor.nx nx_unread_sensor_gate.nx

imports: nx_syscalls.nx

imported by: nx_unread_sensor.nxnx_unread_sensor_gate.nx

structs

none

consts

30const US_CLASS_NONE: i64 = 0
31const US_CLASS_SINGLE: i64 = 1
32const US_CLASS_SEVERAL: i64 = 2
33const US_CLASS_SHARD: i64 = 3
34const US_NAMECAP: i64 = 96
35const US_DOT: i64 = 46
36const US_DASH: i64 = 45
37const US_USCORE: i64 = 95
38const US_D0: i64 = 48
39const US_D9: i64 = 57
40const US_UA: i64 = 65
41const US_UZ: i64 = 90
42const US_LA: i64 = 97
43const US_LZ: i64 = 122

functions

45func us_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
49func us_isnamechar(c: i64) -> i64
called by 3: mainmainus_name_at
62func us_find_from(buf: *u8, n: i64, from: i64, needle: *u8) -> i64
called by 2: mainmain calls 1: us_len
83func us_name_at(buf: *u8, n: i64, pos: i64, out: *u8, cap: i64) -> i64
called by 2: mainmain calls 1: us_isnamechar
99func us_streq(a: *u8, b: *u8) -> i64
110func us_tbl_find(names: *u8, stride: i64, n: i64, name: *u8) -> i64
called by 2: mainmain calls 1: us_streq
127func us_is_store_shard(name: *u8) -> i64
called by 2: mainus_classify calls 2: us_lenus_streq
168func us_is_self(name: *u8, selfname: *u8) -> i64 { return us_streq(name, selfname) }
called by 2: mainmain calls 1: us_streq
173func us_classify(name: *u8, refs: i64) -> i64
called by 2: mainmain calls 1: us_is_store_shard
180func us_class_name(c: i64) -> *u8
called by 1: main