code wiki / _hdl_build / nx_logtail_gate.nx
nx_logtail_gate.nx
buildroot/runtime/_hdl_build/nx_logtail_gate.nx
about
nx_logtail_gate.nx -- TEETH FOR THE SHARED HONEST TAIL READER (nx_logtail.nx, debt 1786054115).
Inherits nx_gate_verdict (gv_ctr/gv_head/gv_check/gv_verdict) rather than rolling its own counter,
per the D001 MIGRATE-ON-TOUCH law -- a new gate that hand-rolls a verdict is a new D001 row.
THE LOAD-BEARING TOOTH IS T4, THE NEG-CONTROL. Asserting only "the newest record survived" would
ALSO pass for a reader that quietly returned the entire file, so it cannot discriminate a tail read
from no read at all. T4 demands the OLDEST record be ABSENT, which is the only assertion that
distinguishes "kept the tail" from "kept everything" -- and keeping the wrong end silently is the
entire defect class this lib exists to close.
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_logtail.nxnx_gate_verdict.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
| 14 | const LG_BUF: i64 = 65536 |
| 15 | const LG_SMALL: i64 = 512 |
| 16 | const LG_MODE: i64 = 0x1a4 |
| 17 | const LG_FILL: i64 = 400 |
functions
| 19 | func lg_append(path: *u8, s: *u8) -> i64 |
| 28 | func lg_contains(hay: *u8, hn: i64, needle: *u8) -> i64 called by 1: main |
| 44 | func main(argc: i64, argv: *i64) -> i64 |