code wiki / _hdl_build / nx_aid_federation_gate.nx

nx_aid_federation_gate.nx

buildroot/runtime/_hdl_build/nx_aid_federation_gate.nx

8213 B128 linesdepth 6pulls 15 transitivereach 0 importersview sourcekind gate/prooftopic aid
docsdependenciesstructsconstsfunctions

about

nx_aid_federation_gate.nx -- GATE: cross-org charity federation (R-AID-R1). T1 the salted token is DETERMINISTIC (same person -> same token) + DISTINCT (different people -> different tokens). T2 NO PII: the submitted/stored value is a numeric token, never the name. T3 cross-org DETECTION (a token at 2 food banks = double-claim). T4 no false match (single-org claimants not flagged; different people don't collide). T5 one-way (token != id) + FAIL-OPEN (only a review flag, no auto-deny). T6 coordinator review page shows tokens + org counts, NO names, sovereign, shipped. license_tier: ORIGINAL

dependencies 5 imports · 0 importers

nx_aid_federation.nx nx_publisher.nx nx_seg_store.nx nx_syscalls.nx nx_gate_verdict.nx nx_aid_federation_gate.nx

imports: nx_aid_federation.nxnx_publisher.nxnx_seg_store.nxnx_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

main g_p sys_write af_seed_salt af_put fd_streq_store 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 nxa_dump_sizes ss_get sys_mmap ↻ ss_scan sys_mmap ↻ ss_manifest_dyn ss_scan_seglist ss_begin ss_begin_cap sys_mmap ↻ ss_add ss_add2 ss_w32 ss_len fd_seg_next sys_mmap ↻ ss_manifest ss_manifest_file sys_mmap ↻ ss_cat ss_readall ss_commit

structs

none

consts

13const AF_STORE: *u8 = "knowledge/store/aidfed-"
14const AF_SALT: *u8 = "nishi-federation-2026-coordinator-secret"
15const AF_ALICE: *u8 = "alice|1990-03-01|78701"
16const AF_BOB: *u8 = "bob|1985-07-22|78702"
17const AF_CAROL: *u8 = "carol|1992-11-09|90001"
18const AF_NOW: i64 = 110
19const AF_PERIOD: i64 = 30
20const AF_STAGE_FILE: *u8 = "knowledge/staging/aidfed/review.html"
21const AF_LIVE_FILE: *u8 = "knowledge/publish/aidfed-live/review.html"

functions

23func g_p(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 1: main calls 1: sys_write
24func g_i(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
32func g_alldigits(s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { if s[i] < (48 as u8) { return 0 } if s[i] > (57 as u8) { return 0 } i = i + 1 } if i == 0 { return 0 } return 1 }
called by 1: main
33func g_exists(path: *u8) -> i64 { let fd: i64 = sys_openat_rd(path); if fd < 0 { return 0 } sys_close(fd); return 1 }
called by 1: main calls 2: sys_openat_rdsys_close
35func main() -> i64