code wiki / _hdl_build / nx_trustfence_lib.nx
nx_trustfence_lib.nx
buildroot/runtime/_hdl_build/nx_trustfence_lib.nx
about
nx_trustfence_lib.nx -- LangIntel LI9 SHARED trust-tier classifier (pure, NO I/O, NO main).
SEALED verdict codes so BOTH the CLI (nx_langintel_trustfence) and the CI fixture gate
(nx_langintel_trustfence_gate) reuse ONE ltg_classify_code = single source of truth (Rule 15 DRY,
the atlas OO-consolidation directive). Provenance-only trust: tier-1 IFF merged + real merge_commit_sha +
base.repo.full_name == the canonical owner/repo (an attacker cannot merge into it). Branch identity is
evidence, NOT gated (default_branch is CURRENT, base.ref is HISTORICAL -- master->main rename would
false-reject a genuine gold patch). Consolidates onto nx_ingest_base (ib_find/ib_jstr/ib_slen).
Read-only external, NO exec (Rule 26). license_tier: ORIGINAL
dependencies 2 imports · 2 importers
imports: nx_ingest_base.nxnx_syscalls.nx
imported by: nx_langintel_trustfence.nxnx_langintel_trustfence_gate.nx
structs
| none |
consts
| 12 | const LTG_VCAP: i64 = 1024 |
| 15 | const LTG_ACCEPT: i64 = 1 |
| 16 | const LTG_REJ_NOT_MERGED: i64 = 2 |
| 17 | const LTG_REJ_NO_MERGE_SHA: i64 = 3 |
| 18 | const LTG_REJ_NO_BASE: i64 = 4 |
| 19 | const LTG_REJ_BASE_SPAN: i64 = 5 |
| 20 | const LTG_REJ_NO_BASE_REF: i64 = 6 |
| 21 | const LTG_REJ_NO_BASE_REPO: i64 = 7 |
| 22 | const LTG_REJ_BASE_REPO_SPAN: i64 = 8 |
| 23 | const LTG_REJ_NO_FULL_NAME: i64 = 9 |
| 24 | const LTG_REJ_NOT_CANONICAL: i64 = 10 |
functions
| 26 | func ltg_qkey(word: *u8, out: *u8) -> i64 called by 1: ltg_classify_code |
| 34 | func ltg_streq(a: *u8, b: *u8) -> i64 called by 1: ltg_classify_code |
| 42 | func ltg_obj_span(buf: *u8, n: i64, from: i64, se: *i64) -> i64 called by 1: ltg_classify_code |
| 69 | func ltg_bool(buf: *u8, n: i64, key: *u8, from: i64) -> i64 |
| 84 | func ltg_classify_code(buf: *u8, n: i64, expect_full: *u8, msha: *u8, bfull: *u8, bref: *u8, bdef: *u8) -> i64 |
| 122 | func ltg_is_accept(code: i64) -> i64 { if code == LTG_ACCEPT { return 1 } return 0 } called by 1: main |
| 123 | func ltg_reason(code: i64) -> *u8 called by 1: main |
| 135 | func ltg_fix(code: i64) -> *u8 called by 1: main |