nx_txtscan_gate.nx
buildroot/runtime/nx_txtscan_gate.nx
about
nx_txtscan_gate.nx -- REFEREE for nx_txtscan_lib (byte-oriented text search).
Inherits the canonical verdict base class (nx_gate_verdict, D001) rather than rolling its own
counters, so nx_gate_green can judge this gate from outside and every run records a harness.jrnl
frame. The promote path REFUSED this gate while it hand-rolled a verdict, which is the guard
doing exactly its job -- a gate nothing can read is a gate whose flake stays invisible.
TEETH:
[T1] u2605BITE: the search fires on a present pattern and stays SILENT on an absent one. A search
that cannot report absence always "finds" something.
[T2] boundary: a match at offset 0.
[T3] boundary: a match ending on the FINAL byte -- where an off-by-one reads past the buffer.
[T4] POSITION: successive calls return every distinct offset, strictly increasing, and the
count agrees with the walk.
[T5] u2605THE REGRESSION THIS ORGAN EXISTS FOR: a haystack containing NO newline at all still
resolves distinct offsets. This is the exact input on which the estate's line-oriented
greps degenerate to echoing the whole file (measured on a 112,755-byte one-line corpus).
[T6] overlap semantics are DEFINED, not accidental: "aaa" occurs 3x overlapping, 1x disjoint.
[T7] u2605BITE: case folding -- insensitive finds it, sensitive does not.
[T8] u2605NEG-CONTROL: an empty needle matches NOTHING. The natural implementation makes it match
at every offset, which would report a clean file as entirely corrupt.
[T9] u2605BITE: the control-byte detector fires on a 119-byte 0x0E run and stays SILENT on text
made only of tab/LF/CR. Without the silent half it flags every source file in the estate
and the sweep that found the real defect would have been worthless.
[T10] run length is measured exactly -- the signature that separates a mechanical overwrite
from a stray byte.
[T11] context windows clamp at BOTH ends.
Hermetic: every fixture is in memory. No filesystem, no network, no engine.
Sovereign x86_64. license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_gate_verdict.nxnx_txtscan_lib.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
| none |
functions
| 34 | func tq(a: i64, b: i64) -> i64 { if a == b { return 1 } return 0 } called by 1: main |
| 35 | func tfound(h: i64) -> i64 { if h == TX_NOT_FOUND { return 0 } return 1 } called by 1: main |
| 37 | func main(argc: i64, argv: *i64) -> i64 |