code wiki / (root) / nx_share_consent.nx

nx_share_consent.nx

buildroot/runtime/nx_share_consent.nx

7104 B134 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic share
docsdependenciesstructsconstsfunctions

about

nx_share_consent.nx -- PRIVACY / CONSENT ON SHARES (sharing ring rung 3; frontier momentum 170). The ACL discipline applied to the share plane, DENY-BY-DEFAULT: SHARE-CONSENT: a share lands ONLY if the recipient consented -- by PERSON ("Dana may share anything with me"), by CONTEXT ("professional contacts may share jobs"), or wildcard -- SCOPED by item type, with explicit BLOCKS OUTRANKING every allow. No record = DENY (privacy by default, the exact inverse of every social feed). INTRO-CONSENT: an intro exposes a THIRD party -- introducing Priya shares Priya. So intros ALSO require the SUBJECT's own standing consent to be introduced. Both sides must say yes or nothing moves. Consent policy = additive records (person | from-or-"ctx:<context>"-or-* | allow/block | scope-itype-or-*) -- data, not code; the share layer (nx_share/serve) MUST call sc_check (+ sc_intro_ok for intros) BEFORE sh_save. Pure logic + selftest gate (argless): a 7-check matrix incl. block-outranks-context and third-party intro consent. license_tier: ORIGINAL expect_exit: 0

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_share_consent.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 p sys_write slen sys_mmap sc_say p ↻ sc_check seq sc_from_match seq ↻ sc_intro_ok seq ↻ pn p ↻ sys_mmap ↻ sys_write ↻

structs

none

consts

none

functions

14func slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: p
15func p(s: *u8) -> i64 { sys_write(1, s, slen(s)); return 0 }
called by 3: pnsc_saymain calls 2: sys_writeslen
16func pn(v: i64) -> i64
called by 1: main calls 3: psys_mmapsys_write
22func seq(a: *u8, b: *u8) -> i64
29func sc_from_match(pat: *u8, from: *u8, fromctx: *u8) -> i64
called by 1: sc_check calls 1: seq
42func sc_check(pol: *i64, from: *u8, to: *u8, itype: *u8, fromctx: *u8) -> i64
called by 1: main calls 2: seqsc_from_match
74func sc_intro_ok(pol: *i64, subject: *u8) -> i64
called by 1: main calls 1: seq
88func sc_say(label: *u8, got: i64, want: i64) -> i64
called by 1: main calls 1: p
96func main() -> i64