code wiki / (root) / nx_gauge_gate.nx

nx_gauge_gate.nx

buildroot/runtime/nx_gauge_gate.nx

6734 B111 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_gauge_gate.nx -- CE9 (codeeffectiveness sm_gauge_alarm): the gauge-heartbeat ruler proven on planted stamps. In-process over nx_gauge_lib (the ONE classifier the writing beat and the /compare emitter both use), so a stale gauge is proven to read STALE and never zero, a blind axis to read BLIND, an absent stamp ABSENT, a future stamp STALE (clock skew is never fresh), the value present ONLY on a FRESH row, and an unpinned cadence STALE by construction. Every parsed field is -1 when absent, never 0. Rows written with real bytes under /tmp. exit: 0 GREEN . 1 RED . 3 SKIP license_tier: ORIGINAL No hw writes.

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_gauge_lib.nx nx_gauge_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_gauge_lib.nx

imported by: nobody (leaf or entry point)

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

main gv_ctr 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 ↻ gv_head gv_puts sys_write ↻ sys_mkdir sys_unlinkat ga_stamp_write sys_mmap ↻ sj_cat sj_catn sys_mmap ↻ sys_openat_wr sys_write ↻ sys_close gg_raw sys_unlinkat ↻ sys_openat_wr ↻ sys_write ↻ gg_slen sys_close ↻ gv_need gv_puts ↻ gv_verdict gv_note_bare_rate

structs

none

consts

11const GG_ROOT: *u8 = "/tmp/nx_gauge_gate"
12const GG_FRESH: *u8 = "/tmp/nx_gauge_gate/fresh.stamp"
13const GG_STALE: *u8 = "/tmp/nx_gauge_gate/stale.stamp"
14const GG_FUTURE: *u8 = "/tmp/nx_gauge_gate/future.stamp"
15const GG_BLIND: *u8 = "/tmp/nx_gauge_gate/blind.stamp"
16const GG_NOCAD: *u8 = "/tmp/nx_gauge_gate/nocad.stamp"
17const GG_NOFIELD: *u8 = "/tmp/nx_gauge_gate/nofield.stamp"
18const GG_ABSENT: *u8 = "/tmp/nx_gauge_gate/does-not-exist.stamp"
19const GG_MODE_RWX: i64 = 493
20const GG_MODE_RW: i64 = 420
21const GG_NOW: i64 = 1788700000
22const GG_CAD: i64 = 100 // max_age = 2*100 = 200
23const GG_GAUGE: i64 = 42
24const GG_DOC: i64 = 4096

functions

26func gg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: gg_containsgg_raw
27func gg_contains(buf: *u8, n: i64, needle: *u8) -> i64
called by 1: main calls 1: gg_slen
35func gg_raw(path: *u8, s: *u8) -> i64
44func main(argc: i64, argv: *i64) -> i64