code wiki / (root) / nx_uxf_cid_gate.nx

nx_uxf_cid_gate.nx

buildroot/runtime/nx_uxf_cid_gate.nx

5282 B104 linesdepth 7pulls 8 transitivereach 0 importersview sourcekind gate/prooftopic uxf
docsdependenciesstructsconstsfunctions

about

nx_uxf_cid_gate.nx -- the D001 MIGRATION of nx_uxf_cid_test onto nx_gate_verdict (2026-09-06). WHY THIS EXISTS. nx_uxf_cid_test proved the self-describing multicodec CID in June 2026 and has been UNPROMOTABLE ever since: /api/promote refuses it D001 because it hand-rolls its pass and total counters and prints its own verdict line, so nx_gate_green cannot judge it and it records no harness frame -- flake and erosion stay invisible for it. The sanctioned answer is to MIGRATE, never to pass allow_own_verdict=yes, which would ship a permanently unreadable gate. EVERY TOOTH IS PRESERVED EXACTLY. The five checks are the original five, in the original order, with the original predicates; what changes is that gv_check owns the counting (so declared and executed cannot diverge) and gv_kv emits the values, so this gate's GREEN can be contradicted from outside by anyone who recomputes a CID. The original test is left untouched as provenance. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 4 imports · 0 importers

nx_gate_verdict.nx nx_syscalls.nx nx_canon_cid.nx nx_uxf_cid.nx nx_uxf_cid_gate.nx

imports: nx_gate_verdict.nxnx_syscalls.nxnx_canon_cid.nxnx_uxf_cid.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ sys_mmap ↻ canon_encode sys_mmap ↻ cc_cmp cc_w32 cc_len sys_munmap uxf_cid_profiled sys_mmap ↻ sha256_digest sys_mmap ↻ sha256_init sys_mmap ↻ sha256_seed_allocated sha256_k sha256_update sha256_compress_ni_blocks blk_set_byte sha256_compress sha256_compress_ni

structs

none

consts

19const UG_PTRTAB: i64 = 64
20const UG_CANON: i64 = 4096
21const UG_CIDBUF: i64 = 128
22const UG_NFIELDS: i64 = 2
23const UG_PROF_HASH_OFF: i64 = 8 // profiled CID is nxc1-<2hex codec>-<64hex>, hash starts at 8
24const UG_PLAIN_HASH_OFF: i64 = 5 // plain cid_of is nxc1-<64hex>, hash starts at 5
25const UG_HASH_HEX: i64 = 64

functions

27func ug_streq(a: *u8, b: *u8) -> i64
called by 1: main
39func ug_hash_differs(cidprof: *u8, plain: *u8) -> i64
called by 1: main
45func main(argc: i64, argv: *i64) -> i64