code wiki / _hdl_build / nx_connect_wards_lib.nx

nx_connect_wards_lib.nx

buildroot/runtime/_hdl_build/nx_connect_wards_lib.nx

3173 B73 linesdepth 1pulls 1 transitivereach 13 importersview sourcekind librarytopic connect
docsdependenciesstructsconstsfunctions

about

nx_connect_wards_lib.nx -- WARD & BRANCH COMMUNITY groups, extracted as a shared library so the verifying gate (nx_connect_wards) and the LIVE app (nx_connect_serve /community) bind ONE implementation. Before this split the live page merely ASSERTED "this group holds no callings, records, attendance, or donations by construction" -- prose, with no registry actually enforcing it. THE BOUNDARY, enforced as data rather than promised in copy: a group's schema is a FIELD REGISTRY (rule 11) where every field carries a CLASS, and the community layer may carry ONLY class 0. A checker scans the registry and refuses any congregation-administration class. The same checker flags an incumbent-style ward-admin schema, which is what makes the boundary load-bearing rather than decorative. classes: 0=community-safe 1=calling 2=membership-record 3=attendance 4=ordinance 5=donation Joining is faith-revealing, so it requires explicit faith consent (GDPR Art.9 idiom): without consent the join is REFUSED and the person never appears in any roster. Joins are idempotent (rule 10). The youth-channel rule delegates to the ONE two-deep wall rather than re-deriving it here. license_tier: ORIGINAL

dependencies 1 imports · 3 importers

nx_connect_youth_lib.nx nx_connect_wards_lib.nx nx_connect_api_lib.nx nx_connect_serve.nx nx_connect_wards.nx

imports: nx_connect_youth_lib.nx

imported by: nx_connect_api_lib.nxnx_connect_serve.nxnx_connect_wards.nx

structs

none

consts

18const WD_MAX: i64 = 8
19const WM_MAX: i64 = 64
20const FR_MAX: i64 = 16
23const WD_CLASS_SAFE: i64 = 0
24const WD_CLASS_CALLING: i64 = 1
25const WD_CLASS_RECORD: i64 = 2
26const WD_CLASS_ATTENDANCE: i64 = 3
27const WD_CLASS_ORDINANCE: i64 = 4
28const WD_CLASS_DONATION: i64 = 5
31const WD_JOINED: i64 = 1
32const WD_ALREADY: i64 = 2
33const WD_NO_CONSENT: i64 = 0-1

functions

35func wd_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
36func wd_streq(a: *u8, b: *u8) -> i64
45func wd_forbidden_count(classes: *i64, n: i64) -> i64
54func wd_join(mw: *i64, mu: *i64, nm: *i64, ward: i64, user: i64, consent: i64) -> i64
called by 2: cs_handle2main
63func wd_in(mw: *i64, mu: *i64, nm: *i64, ward: i64, user: i64) -> i64
called by 1: main
71func wd_youth_channel_ok(adults_present: i64) -> i64
called by 1: main calls 1: yw_may_channel