code wiki / _hdl_build / nx_logtail_gate.nx

nx_logtail_gate.nx

buildroot/runtime/_hdl_build/nx_logtail_gate.nx

6625 B135 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_logtail.nx nx_gate_verdict.nx nx_logtail_gate.nx

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

main gv_head gv_puts sys_write 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 ↻ sys_mmap ↻ gv_cat gv_catn sys_mmap ↻ sys_munmap sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real lg_append sys_openat_append sys_write ↻ sys_close lt_read_tail sys_openat_rd sys_lseek sys_close ↻ sys_read lt_shift_down gv_check gv_puts ↻

structs

none

consts

14const LG_BUF: i64 = 65536
15const LG_SMALL: i64 = 512
16const LG_MODE: i64 = 0x1a4
17const LG_FILL: i64 = 400

functions

19func lg_append(path: *u8, s: *u8) -> i64
28func lg_contains(hay: *u8, hn: i64, needle: *u8) -> i64
called by 1: main
44func main(argc: i64, argv: *i64) -> i64