code wiki / _hdl_build / nx_trustfence_lib.nx

nx_trustfence_lib.nx

buildroot/runtime/_hdl_build/nx_trustfence_lib.nx

6682 B140 linesdepth 6pulls 7 transitivereach 2 importersview sourcekind library
docsdependenciesstructsconstsfunctions

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

nx_ingest_base.nx nx_syscalls.nx nx_trustfence_lib.nx nx_langintel_trustfence.nx nx_langintel_trustfence_gate.nx

imports: nx_ingest_base.nxnx_syscalls.nx

imported by: nx_langintel_trustfence.nxnx_langintel_trustfence_gate.nx

structs

none

consts

12const LTG_VCAP: i64 = 1024
15const LTG_ACCEPT: i64 = 1
16const LTG_REJ_NOT_MERGED: i64 = 2
17const LTG_REJ_NO_MERGE_SHA: i64 = 3
18const LTG_REJ_NO_BASE: i64 = 4
19const LTG_REJ_BASE_SPAN: i64 = 5
20const LTG_REJ_NO_BASE_REF: i64 = 6
21const LTG_REJ_NO_BASE_REPO: i64 = 7
22const LTG_REJ_BASE_REPO_SPAN: i64 = 8
23const LTG_REJ_NO_FULL_NAME: i64 = 9
24const LTG_REJ_NOT_CANONICAL: i64 = 10

functions

26func ltg_qkey(word: *u8, out: *u8) -> i64
called by 1: ltg_classify_code
34func ltg_streq(a: *u8, b: *u8) -> i64
called by 1: ltg_classify_code
42func ltg_obj_span(buf: *u8, n: i64, from: i64, se: *i64) -> i64
called by 1: ltg_classify_code
69func ltg_bool(buf: *u8, n: i64, key: *u8, from: i64) -> i64
called by 1: ltg_classify_code calls 2: ib_findib_slen
84func ltg_classify_code(buf: *u8, n: i64, expect_full: *u8, msha: *u8, bfull: *u8, bref: *u8, bdef: *u8) -> i64
122func ltg_is_accept(code: i64) -> i64 { if code == LTG_ACCEPT { return 1 } return 0 }
called by 1: main
123func ltg_reason(code: i64) -> *u8
called by 1: main
135func ltg_fix(code: i64) -> *u8
called by 1: main