code wiki / (root) / nx_unread_sensor.nx

nx_unread_sensor.nx

buildroot/runtime/nx_unread_sensor.nx

11394 B256 linesdepth 7pulls 10 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_unread_sensor.nx -- WHICH STATUS ARTIFACTS DOES NOTHING NAME. usage: nx_unread_sensor [statusdir] default knowledge/status/ exit: 0 GREEN (single-namer count at or below its ratchet) | 1 RED (it rose) | 3 UNPROVEN See nx_unread_sensor_lib.nx for why this exists and for the blind spots it declares. In short: this estate rediscovered "a sensor nothing reads" four times in one day, and owned no instrument that could have found the fifth. Every number below is a FLOOR on readers, so a row here is a QUESTION. IT REFUSES TO RUN ON A SATURATED BOX. Composing ct_admit_now costs one small /proc read and no fork, and the alternative is a corpus-wide scan that becomes the load it was built to explain -- A DIAGNOSTIC THAT CANNOT REFUSE TO RUN IS A LOAD GENERATOR WITH GOOD INTENTIONS. THE RATCHET SELF-BASELINES ON FIRST SIGHT, so shipping it cannot turn every build red on day one, and it is written ONLY on a fall or a first run: a ratchet that rewrites its baseline on a RISE launders itself green and is worse than no ratchet at all. license_tier: ORIGINAL expect_exit: 0 Read-only. No hw writes (Rule 26).

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_gatekit_lib.nx nx_ctxtop_lib.nx nx_unread_sensor_lib.nx nx_unread_sensor.nx

imports: nx_syscalls.nxnx_gatekit_lib.nxnx_ctxtop_lib.nxnx_unread_sensor_lib.nx

imported by: nobody (leaf or entry point)

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

main ct_admit_now rm_conf rm_field rm_slen ct_admit ct_load_centi ur_puts sys_write us_len sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_openat_rd sys_getdents64 us_isnamechar sys_munmap sys_close gk_corpus_count sys_mmap ↻ gk_corpus_root sys_mmap ↻ gk_cat gk_exists sys_openat_rd ↻ sys_close ↻ gk_corpus_hdl gk_corpus_root ↻

structs

none

consts

23const UR_MAXART: i64 = 512
24const UR_STRIDE: i64 = 96
25const UR_NAMES_BYTES: i64 = 49152 // UR_MAXART * UR_STRIDE
26const UR_I64_BYTES: i64 = 4096 // UR_MAXART * 8
27const UR_FILECAP: i64 = 262144
28const UR_PATHCAP: i64 = 1024
29const UR_CORPUS_STRIDE: i64 = 256
30const UR_DIRBUF: i64 = 65536
31const UR_DIRENT_NAME_OFF: i64 = 19
32const UR_BASELINE: *u8 = "knowledge/status/unread_sensor.baseline"
33const UR_BASELINE_NAME: *u8 = "unread_sensor.baseline"
34const UR_MODE_644: i64 = 420
35const UR_EXIT_GREEN: i64 = 0
36const UR_EXIT_RED: i64 = 1
37const UR_EXIT_UNPROVEN: i64 = 3
38const UR_NEEDLE: *u8 = "knowledge/status/"
39const UR_NEEDLE_LEN: i64 = 17

functions

41func ur_puts(s: *u8) -> i64 { sys_write(1, s, us_len(s)); return 0 }
called by 1: main calls 2: sys_writeus_len
42func ur_num(v: i64) -> i64
50func main(argc: i64, argv: *i64) -> i64