code wiki / _hdl_build / nx_aid_federation_gate.nx

nx_aid_federation_gate.nx

buildroot/runtime/_hdl_build/nx_aid_federation_gate.nx

7810 B121 linesdepth 6pulls 14 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 4 imports · 0 importers

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

imports: nx_aid_federation.nxnx_publisher.nxnx_seg_store.nxnx_syscalls.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 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 ss_segid_ok sys_mmap ↻ ss_cat ↻ ss_catn sys_mmap ↻ sys_write ↻ ss_write_seg ss_segid_ok ↻ sys_mmap ↻ ss_cat ↻ ss_catn ↻ sys_write ↻

structs

none

consts

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

functions

22func 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
23func g_i(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
31func 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
32func 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
34func main() -> i64