code wiki / _hdl_build / nx_connect_social.nx
nx_connect_social.nx
buildroot/runtime/_hdl_build/nx_connect_social.nx
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
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
structs
| none |
consts
| 15 | const PF_MAGIC_4096: i64 = 4096 |
| 16 | const PF_MAGIC_4095: i64 = 4095 |
| 17 | const PF_MAGIC_7741: i64 = 7741 |
| 18 | const PF_MAGIC_88123: i64 = 88123 |
| 19 | const PF_MAGIC_9999: i64 = 9999 |
| 20 | const PF_MAGIC_31337: i64 = 31337 |
| 22 | const PF_MAX: i64 = 16 |
| 23 | const MO_MAX: i64 = 32 |
| 24 | const ST_MAX: i64 = 16 |
| 25 | const FW_MAX: i64 = 32 |
| 26 | const DH_MAX: i64 = 16 |
| 27 | const QR_MAX: i64 = 16 |
| 29 | const CX_PFU: i64 = 0 |
| 30 | const CX_PFTEACH: i64 = 1 |
| 31 | const CX_PFLEARN: i64 = 2 |
| 32 | const CX_PFINT: i64 = 3 |
| 33 | const CX_PFFAITH: i64 = 4 |
| 34 | const CX_PFCONS: i64 = 5 |
| 35 | const CX_NPF: i64 = 6 |
| 36 | const CX_MOU: i64 = 7 |
| 37 | const CX_MOT: i64 = 8 |
| 38 | const CX_MOTX: i64 = 9 |
| 39 | const CX_MOTOMB: i64 = 10 |
| 40 | const CX_NMO: i64 = 11 |
| 41 | const CX_FWF: i64 = 12 |
| 42 | const CX_FWT: i64 = 13 |
| 43 | const CX_NFW: i64 = 14 |
| 44 | const CX_STU: i64 = 15 |
| 45 | const CX_STT: i64 = 16 |
| 46 | const CX_STTTL: i64 = 17 |
| 47 | const CX_STTX: i64 = 18 |
| 48 | const CX_STTOMB: i64 = 19 |
| 49 | const CX_NST: i64 = 20 |
| 50 | const CX_DHH: i64 = 21 |
| 51 | const CX_DHU: i64 = 22 |
| 52 | const CX_NDH: i64 = 23 |
| 53 | const CX_QRT: i64 = 24 |
| 54 | const CX_QRU: i64 = 25 |
| 55 | const CX_QRE: i64 = 26 |
| 56 | const CX_NQR: i64 = 27 |
functions
| 58 | func sw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 59 | func 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 } |
| 60 | func tcheck(pass: i64, label: *u8, fails: *i64) -> i64 |
| 65 | func cxp(ctx: *i64, i: i64) -> *i64 { return ctx[i] as *i64 } |
| 66 | func cxb(ctx: *i64, i: i64) -> *u8 { return ctx[i] as *u8 } |
| 67 | func so_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 68 | func so_app(dst: *u8, pos: *i64, cap: i64, s: *u8) -> i64 called by 1: so_card |
| 73 | func so_find(buf: *u8, n: i64, needle: *u8) -> i64 |
| 86 | func so_copy64(dst: *u8, slot: i64, s: *u8) -> i64 called by 1: main |
| 94 | func sn_into(dst: *u8, pos: *i64, cap: i64, v: i64) -> i64 |
| 106 | func so_find_slot(arena: *u8, slot: i64, needle: *u8) -> i64 |
| 119 | func so_prof_idx(ctx: *i64, user: i64) -> i64 |
| 127 | func so_card(ctx: *i64, user: i64, out: *u8, cap: i64) -> i64 |
| 151 | func so_follows(ctx: *i64, a: i64, b: i64) -> i64 |
| 160 | func so_feed(ctx: *i64, viewer: i64, oidx: *i64, maxn: i64) -> i64 |
| 186 | func so_story_visible(ctx: *i64, si: i64, now: i64) -> i64 |
| 195 | func so_discover_handle(ctx: *i64, handle: i64) -> i64 |
| 204 | func so_add_by_token(ctx: *i64, token: i64, now: i64) -> i64 |
| 221 | func so_phonebook_discover(pbook: *i64, npb: i64, target_user: i64) -> i64 called by 1: main |
| 227 | func main() -> i64 |