nx_native_contract_gate.nx
buildroot/runtime/nx_native_contract_gate.nx
about
nx_native_contract_gate.nx -- F103a R-N0: THE NATIVE CONTRACT v1 GATE (on nx_gate_verdict, D001 migrate-on-touch).
Reads the contract card knowledge/registry/native_contract_v1.txt (pipe rows:
clause_id|axis|law|rejects|status|witness_path|needle) and GROUNDS it in live organ bytes:
PROVEN/PARTIAL -> witness file must EXIST and carry the needle (no clause without a live organ)
NEGCTL -> fabricated needle must be ABSENT from the witness (scanner non-vacuity tooth)
NEGCTL_ABSENT -> phantom witness file must be ABSENT (existence-check tooth)
DESIGN -> counted only (honest declared gap; a DESIGN row never fakes a witness)
Structural teeth: >=12 rows, >=6 PROVEN, >=1 DESIGN, >=2 negctl, all 6 doctrine axes, 0 malformed.
argv[1] optionally overrides the card path (pinned at tool registration). Exit 0 GREEN / 1 RED.
license_tier: ORIGINAL No hw writes (Rule 26): reads card + sources, writes stdout only.
dependencies 2 imports · 0 importers
imports: nx_syscalls.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 NCG_CARD_PATH: *u8 = "knowledge/registry/native_contract_v1.txt" as *u8 |
| 15 | const NCG_CARD_CAP: i64 = 65536 |
| 16 | const NCG_WIT_CAP: i64 = 1048576 |
| 17 | const NCG_SCR: i64 = 512 |
| 18 | const NCG_PIPE: i64 = 124 |
| 19 | const NCG_NL: i64 = 10 |
| 20 | const NCG_HASH: i64 = 35 |
functions
| 22 | func ncg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } called by 1: ncg_find |
| 24 | func ncg_eq(a: *u8, b: *u8) -> i64 |
| 37 | func ncg_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 56 | func ncg_find(hay: *u8, hn: i64, nd: *u8) -> i64 |
| 76 | func ncg_cp(src: *u8, o: i64, n: i64, dst: *u8) -> i64 called by 1: main |
| 86 | func ncg_name(dst: *u8, id: *u8, suf: *u8) -> i64 called by 1: main |
| 98 | func ncg_axis(ax: *i64, s: *u8) -> i64 |
| 114 | func main(argc: i64, argv: *i64) -> i64 |