code wiki / _hdl_build / nx_connect_youth_lib.nx

nx_connect_youth_lib.nx

buildroot/runtime/_hdl_build/nx_connect_youth_lib.nx

2934 B46 linesdepth 0pulls 0 transitivereach 15 importersview sourcekind librarytopic connect
docsdependenciesstructsconstsfunctions

about

nx_connect_youth_lib.nx -- the YOUTH-SAFETY VISIBLE-CONTEXT WALL ("two-deep"), extracted as a shared library so the verifying gate (nx_connect_lds_youth) and the LIVE app (nx_connect_serve /events) bind ONE implementation. Before this split the live RSVP path re-stated the rule as an inline `adults >= 2` check -- correct by luck, but a second copy that could drift from the verified one. No main, no syscalls, no allocation. THE INVARIANT (encodes the Church's own "two-deep leadership / never one adult alone with a youth" norm as a HARD information-flow rule rather than a policy page; consumes a verified age BAND, never a self-declared age): * peer<->peer (adult<->adult or minor<->minor): allowed. * a linked GUARDIAN and their own youth: allowed -- parents are never blocked. * a non-guardian ADULT <-> a MINOR: allowed ONLY inside a VISIBLE GROUP carrying >=2 adults. A private 1:1, or a group with a single adult, is DENIED BY CONSTRUCTION. Meetup, Tandem, Match and Facebook all permit the adult->minor private DM this denies. Also: no advertising is ever shown to a minor (COPPA + child dignity; the vertical is free either way). license_tier: ORIGINAL

dependencies 0 imports · 4 importers

nx_connect_youth_lib.nx nx_connect_api_lib.nx nx_connect_lds_youth.nx nx_connect_serve.nx nx_connect_wards_lib.nx

imports: none

imported by: nx_connect_api_lib.nxnx_connect_lds_youth.nxnx_connect_serve.nxnx_connect_wards_lib.nx

structs

none

consts

19const YW_BAND_MINOR: i64 = 0
20const YW_BAND_ADULT: i64 = 1
21const YW_CTX_DM: i64 = 0 // private 1:1
22const YW_CTX_GROUP: i64 = 1 // visible group room
23const YW_TWO_DEEP: i64 = 2 // adults required before adult<->minor contact may exist

functions

26func yw_is_mixed(ab: i64, bb: i64) -> i64
called by 1: yw_may_channel
34func yw_may_channel(a_band: i64, b_band: i64, guardian: i64, ctx: i64, adults_present: i64) -> i64
43func yw_may_incumbent(a_band: i64, b_band: i64, guardian: i64, ctx: i64, adults_present: i64) -> i64 { return 1 }
called by 1: main
46func yw_ad_allowed(band: i64) -> i64 { if band == YW_BAND_MINOR { return 0 } return 1 }
called by 1: main