code wiki / _hdl_build / nx_connect_social.nx

nx_connect_social.nx

buildroot/runtime/_hdl_build/nx_connect_social.nx

15476 B377 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic connect
docsdependenciesstructsconstsfunctions

about

nx_connect_social.nx -- CONNECT SOCIAL SURFACE: profile cards + moments feed + stories (TTL) + consent-preserving contact discovery (exact handle + QR-style share token). Closes three SOC cells of nx_connect_func_census (profile+feed, stories, contact discovery + QR add). BY CONSTRUCTION properties (each with a tooth or neg-control): - faith is GDPR Art.9 special-category: the profile CARD omits it unless faith_consent=1. - looks de-emphasized: the profile schema has NO photo-rank field at all; cards are text-first. - delete = TOMBSTONE (additive-only, rule 13): a deleted moment / expired story stops RENDERING but its bytes are never destroyed. - discovery is CONSENT-ARTIFACT-ONLY: you are findable by your chosen handle or a QR token YOU minted -- there is NO phonebook-upload ingestion path, so a non-consenting person structurally cannot be surfaced. NEG-CONTROL: the incumbent phonebook-upload model (FB 'people you may know' style) surfaces exactly that non-consenting user; the same checker proves ours cannot. Times are passed in (deterministic, no clock). 100% sovereign. license_tier: ORIGINAL expect_exit: 0

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_connect_social.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap sw sys_write so_card sys_mmap ↻ so_prof_idx cxp cxp ↻ so_app sn_into sys_mmap ↻ so_find so_slen tcheck sw ↻ so_copy64 so_feed cxp ↻ so_follows cxp ↻ so_find_slot so_slen ↻ so_story_visible cxp ↻ so_discover_handle cxp ↻ so_add_by_token cxp ↻ so_phonebook_discover sn sys_mmap ↻ sys_write ↻ sys_exit

structs

none

consts

15const PF_MAGIC_4096: i64 = 4096
16const PF_MAGIC_4095: i64 = 4095
17const PF_MAGIC_7741: i64 = 7741
18const PF_MAGIC_88123: i64 = 88123
19const PF_MAGIC_9999: i64 = 9999
20const PF_MAGIC_31337: i64 = 31337
22const PF_MAX: i64 = 16
23const MO_MAX: i64 = 32
24const ST_MAX: i64 = 16
25const FW_MAX: i64 = 32
26const DH_MAX: i64 = 16
27const QR_MAX: i64 = 16
29const CX_PFU: i64 = 0
30const CX_PFTEACH: i64 = 1
31const CX_PFLEARN: i64 = 2
32const CX_PFINT: i64 = 3
33const CX_PFFAITH: i64 = 4
34const CX_PFCONS: i64 = 5
35const CX_NPF: i64 = 6
36const CX_MOU: i64 = 7
37const CX_MOT: i64 = 8
38const CX_MOTX: i64 = 9
39const CX_MOTOMB: i64 = 10
40const CX_NMO: i64 = 11
41const CX_FWF: i64 = 12
42const CX_FWT: i64 = 13
43const CX_NFW: i64 = 14
44const CX_STU: i64 = 15
45const CX_STT: i64 = 16
46const CX_STTTL: i64 = 17
47const CX_STTX: i64 = 18
48const CX_STTOMB: i64 = 19
49const CX_NST: i64 = 20
50const CX_DHH: i64 = 21
51const CX_DHU: i64 = 22
52const CX_NDH: i64 = 23
53const CX_QRT: i64 = 24
54const CX_QRU: i64 = 25
55const CX_QRE: i64 = 26
56const CX_NQR: i64 = 27

functions

58func sw(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 2: tcheckmain calls 1: sys_write
59func sn(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)} let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1} sys_write(1,bb,k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
60func tcheck(pass: i64, label: *u8, fails: *i64) -> i64
called by 1: main calls 1: sw
65func cxp(ctx: *i64, i: i64) -> *i64 { return ctx[i] as *i64 }
66func cxb(ctx: *i64, i: i64) -> *u8 { return ctx[i] as *u8 }
67func so_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 2: so_findso_find_slot
68func so_app(dst: *u8, pos: *i64, cap: i64, s: *u8) -> i64
called by 1: so_card
73func so_find(buf: *u8, n: i64, needle: *u8) -> i64
called by 1: main calls 1: so_slen
86func so_copy64(dst: *u8, slot: i64, s: *u8) -> i64
called by 1: main
94func sn_into(dst: *u8, pos: *i64, cap: i64, v: i64) -> i64
called by 1: so_card calls 1: sys_mmap
106func so_find_slot(arena: *u8, slot: i64, needle: *u8) -> i64
called by 1: main calls 1: so_slen
119func so_prof_idx(ctx: *i64, user: i64) -> i64
called by 1: so_card calls 1: cxp
127func so_card(ctx: *i64, user: i64, out: *u8, cap: i64) -> i64
151func so_follows(ctx: *i64, a: i64, b: i64) -> i64
called by 1: so_feed calls 1: cxp
160func so_feed(ctx: *i64, viewer: i64, oidx: *i64, maxn: i64) -> i64
called by 1: main calls 2: cxpso_follows
186func so_story_visible(ctx: *i64, si: i64, now: i64) -> i64
called by 1: main calls 1: cxp
195func so_discover_handle(ctx: *i64, handle: i64) -> i64
called by 1: main calls 1: cxp
204func so_add_by_token(ctx: *i64, token: i64, now: i64) -> i64
called by 1: main calls 1: cxp
221func so_phonebook_discover(pbook: *i64, npb: i64, target_user: i64) -> i64
called by 1: main
227func main() -> i64