code wiki / (root) / nx_gate_green.nx

nx_gate_green.nx

buildroot/runtime/nx_gate_green.nx

4175 B100 linesdepth 4pulls 4 transitivereach 8 importersview sourcekind librarytopic gate
docsdependenciesstructsconstsfunctions

about

nx_gate_green.nx -- shared LAST-VERDICT-LINE judging (the Examiner pattern as a reusable lib): "the LAST line containing <anchor> must contain <pat>". module: nishi-core.status.gate_green capability: CORE_COMPUTE EXTRACTED 2026-06-10 during the standards audit of nx_sreach_scorecard, which had a REAL false-green bug: its line-bounding loop discarded the newline index, so the pattern window ran to END OF FILE -- a "rc=0" on a LATER line could green a rung whose own line said rc=1. Fixed here with the found-index pattern and pinned by nx_gate_green_test KATs (the false-green construction is KAT 3). Anything judging gate logs should use THIS, not a private copy.

dependencies 2 imports · 8 importers

nx_str.nx nx_syscalls.nx nx_gate_green.nx nx_comms_hwup_census.nx nx_comms_perf_census.nx nx_gate_bite.nx nx_gate_green_test.nx nx_gate_migrate.nx nx_search_competitor_census.nx nx_sreach_scorecard.nx nx_wasm_promote.nx

imports: nx_str.nxnx_syscalls.nx

imported by: nx_comms_hwup_census.nxnx_comms_perf_census.nxnx_gate_bite.nxnx_gate_green_test.nxnx_gate_migrate.nxnx_search_competitor_census.nxnx_sreach_scorecard.nxnx_wasm_promote.nx

structs

none

consts

18const GG_FILE_CAP: i64 = 524288
27const GG_GREEN: i64 = 1
28const GG_RED: i64 = 0
29const GG_UNJUDGEABLE: i64 = 0 - 1 // anchor absent: the log says NOTHING about a verdict
30const GG_UNREADABLE: i64 = 0 - 2 // no such file / empty: nothing to judge at all
31const GG_LF: i64 = 0x0A

functions

33func gg_read(path: *u8, buf: *u8, cap: i64) -> i64
48func gg_last(buf: *u8, n: i64, needle: *u8) -> i64
67func gg_line_judge(buf: *u8, n: i64, anchor: *u8, pat: *u8) -> i64
82func gg_line_green(buf: *u8, n: i64, anchor: *u8, pat: *u8) -> i64
89func gg_gate_judge(path: *u8, anchor: *u8, pat: *u8) -> i64
97func gg_gate_green(path: *u8, anchor: *u8, pat: *u8) -> i64
called by 8: rungmainmeasmainmainmain+2 calls 1: gg_gate_judge