code wiki / _hdl_build / nx_connect_events_lib.nx
nx_connect_events_lib.nx
buildroot/runtime/_hdl_build/nx_connect_events_lib.nx
about
nx_connect_events_lib.nx -- the real-world EVENTS + RSVP engine, extracted as a shared library so the
verifying gate (nx_connect_events) and the LIVE app (nx_connect_serve /events) bind ONE implementation.
Until this split the live page ran a hand-written admission check with NO CAPACITY AT ALL -- an event
could be RSVP'd without limit, while this gate-proven engine sat unused.
Symbols are moved VERBATIM, deliberately un-renamed: renaming is what silently de-grounded three rows of
the public compare scorecard on the earlier splits (seq689), since matrix rows are verified by an
implementing-symbol on disk. connect.matrix's events row was repointed at THIS file in the same change.
ADMISSION ORDER IS LOAD-BEARING: membership, then idempotency, then the categorical youth wall, and only
THEN capacity. Checking capacity first would let a nearly-full event become the reason a safety rule was
skipped. Age is FAIL-CLOSED: a user with no verified band counts as a MINOR, so safety defaults down.
RSVP codes: 1 admitted; 2 already-in (idempotent); -1 not a group member; -2 full; -3 two-deep denied;
-4 minor on a non-youth event. license_tier: ORIGINAL
dependencies 0 imports · 3 importers
imports: none
imported by: nx_connect_api_lib.nxnx_connect_events.nxnx_connect_serve.nx
structs
| none |
consts
| 15 | const EV_MAX: i64 = 16 |
| 16 | const RS_MAX: i64 = 128 |
| 17 | const MB_MAX: i64 = 64 |
| 18 | const UA_MAX: i64 = 64 |
| 21 | const CX_RSEV: i64 = 0 |
| 22 | const CX_RSUS: i64 = 1 |
| 23 | const CX_RSAC: i64 = 2 |
| 24 | const CX_NRS: i64 = 3 |
| 25 | const CX_EVGRP: i64 = 4 |
| 26 | const CX_EVCAP: i64 = 5 |
| 27 | const CX_EVYTH: i64 = 6 |
| 28 | const CX_MBGRP: i64 = 7 |
| 29 | const CX_MBUS: i64 = 8 |
| 30 | const CX_NMB: i64 = 9 |
| 31 | const CX_UAUS: i64 = 10 |
| 32 | const CX_UAMIN: i64 = 11 |
| 33 | const CX_NUA: i64 = 12 |
functions
| 35 | func cxp(ctx: *i64, i: i64) -> *i64 { return ctx[i] as *i64 } |
| 37 | func ev_is_member(ctx: *i64, group: i64, user: i64) -> i64 |
| 46 | func ev_is_minor(ctx: *i64, user: i64) -> i64 |
| 54 | func ev_count_active(ctx: *i64, e: i64) -> i64 |
| 63 | func ev_count_adults(ctx: *i64, e: i64) -> i64 |
| 76 | func ev_count_minors(ctx: *i64, e: i64) -> i64 |
| 89 | func ev_has_active(ctx: *i64, e: i64, user: i64) -> i64 |
| 100 | func ev_rsvp(ctx: *i64, e: i64, user: i64) -> i64 |
| 120 | func ev_cancel(ctx: *i64, e: i64, user: i64) -> i64 |
| 130 | func ev_roster_safe(ctx: *i64, e: i64) -> i64 |
| 136 | func ev_rsvp_nowall(ctx: *i64, e: i64, user: i64) -> i64 |