code wiki / _hdl_build / nx_connect_wards_lib.nx
nx_connect_wards_lib.nx
buildroot/runtime/_hdl_build/nx_connect_wards_lib.nx
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
imports: nx_connect_youth_lib.nx
imported by: nx_connect_api_lib.nxnx_connect_serve.nxnx_connect_wards.nx
structs
| none |
consts
| 18 | const WD_MAX: i64 = 8 |
| 19 | const WM_MAX: i64 = 64 |
| 20 | const FR_MAX: i64 = 16 |
| 23 | const WD_CLASS_SAFE: i64 = 0 |
| 24 | const WD_CLASS_CALLING: i64 = 1 |
| 25 | const WD_CLASS_RECORD: i64 = 2 |
| 26 | const WD_CLASS_ATTENDANCE: i64 = 3 |
| 27 | const WD_CLASS_ORDINANCE: i64 = 4 |
| 28 | const WD_CLASS_DONATION: i64 = 5 |
| 31 | const WD_JOINED: i64 = 1 |
| 32 | const WD_ALREADY: i64 = 2 |
| 33 | const WD_NO_CONSENT: i64 = 0-1 |
functions
| 35 | func wd_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 36 | func wd_streq(a: *u8, b: *u8) -> i64 |
| 45 | func wd_forbidden_count(classes: *i64, n: i64) -> i64 |
| 54 | func wd_join(mw: *i64, mu: *i64, nm: *i64, ward: i64, user: i64, consent: i64) -> i64 |
| 63 | func wd_in(mw: *i64, mu: *i64, nm: *i64, ward: i64, user: i64) -> i64 called by 1: main |
| 71 | func wd_youth_channel_ok(adults_present: i64) -> i64 |