code wiki / _hdl_build / nx_staghyg_gate.nx
nx_staghyg_gate.nx
buildroot/runtime/_hdl_build/nx_staghyg_gate.nx
about
nx_staghyg_gate.nx -- prove the staging-hygiene guard REFUSES a backwards promote, does NOT refuse a
legitimate one, and -- the tooth this gate earned the hard way -- does NOT refuse an ORDINARY EDIT.
Inherits the nx_gate_verdict base class (D001/L009: gv_ctr/gv_head/gv_check/gv_bite/gv_verdict) so
nx_gate_green can judge it and it records a harness frame.
DETERMINISTIC BY CONSTRUCTION: every fixture mtime is set explicitly via sys_utimensat and `now` is
passed to sg_classify as a parameter, so there are NO sleeps and NO filesystem-resolution races.
Each tooth writes its OWN file names, so nothing depends on whether the write helper truncates.
THE cfg BELOW IS THE SHIPPED POLICY, NOT A CONVENIENT ONE. An earlier version of this gate passed
10/10 against thresholds the shipped conf did not use, which proves the mechanism and says nothing
about the rule operators actually meet. T4 and T8 prove it FIRES; T11 proves it STAYS SILENT on a
one-run edit -- and T11 exists because the first tuning refused the very build that introduced it.
A guard that fires on routine work is not strict, it is training people to bypass it.
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_staging_guard.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 21 | const GT_NOW: i64 = 1800000000 |
| 22 | const GT_DAY: i64 = 86400 |
functions
| 24 | func gt_wfd(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 } |
| 25 | func gt_wnfd(fd: i64, v: i64) -> i64 |
| 45 | func gt_tokens(path: *u8, prefix: *u8, n: i64, pad: i64, odd: *i64) -> i64 |
| 64 | func gt_odd(o: *i64, start: i64, count: i64) -> i64 { o[0] = start; o[1] = count; return 0 } called by 1: main |
| 66 | func gt_fill(dst: *u8, s: *u8) -> i64 called by 1: main |
| 72 | func gt_set_mtime(path: *u8, sec: i64) -> i64 |
| 78 | func main() -> i64 |