code wiki / _hdl_build / nx_connect_events_lib.nx

nx_connect_events_lib.nx

buildroot/runtime/_hdl_build/nx_connect_events_lib.nx

5799 B150 linesdepth 0pulls 0 transitivereach 13 importersview sourcekind librarytopic connect
docsdependenciesstructsconstsfunctions

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

nx_connect_events_lib.nx nx_connect_api_lib.nx nx_connect_events.nx nx_connect_serve.nx

imports: none

imported by: nx_connect_api_lib.nxnx_connect_events.nxnx_connect_serve.nx

structs

none

consts

15const EV_MAX: i64 = 16
16const RS_MAX: i64 = 128
17const MB_MAX: i64 = 64
18const UA_MAX: i64 = 64
21const CX_RSEV: i64 = 0
22const CX_RSUS: i64 = 1
23const CX_RSAC: i64 = 2
24const CX_NRS: i64 = 3
25const CX_EVGRP: i64 = 4
26const CX_EVCAP: i64 = 5
27const CX_EVYTH: i64 = 6
28const CX_MBGRP: i64 = 7
29const CX_MBUS: i64 = 8
30const CX_NMB: i64 = 9
31const CX_UAUS: i64 = 10
32const CX_UAMIN: i64 = 11
33const CX_NUA: i64 = 12

functions

35func cxp(ctx: *i64, i: i64) -> *i64 { return ctx[i] as *i64 }
37func ev_is_member(ctx: *i64, group: i64, user: i64) -> i64
called by 2: ev_rsvpev_rsvp_nowall calls 1: cxp
46func ev_is_minor(ctx: *i64, user: i64) -> i64
54func ev_count_active(ctx: *i64, e: i64) -> i64
called by 3: mainev_rsvpev_rsvp_nowall calls 1: cxp
63func ev_count_adults(ctx: *i64, e: i64) -> i64
76func ev_count_minors(ctx: *i64, e: i64) -> i64
called by 2: mainev_roster_safe calls 2: cxpev_is_minor
89func ev_has_active(ctx: *i64, e: i64, user: i64) -> i64
called by 2: ev_rsvpev_rsvp_nowall calls 1: cxp
100func ev_rsvp(ctx: *i64, e: i64, user: i64) -> i64
120func ev_cancel(ctx: *i64, e: i64, user: i64) -> i64
called by 1: main calls 1: cxp
130func ev_roster_safe(ctx: *i64, e: i64) -> i64
called by 1: main calls 2: ev_count_minorsev_count_adults
136func ev_rsvp_nowall(ctx: *i64, e: i64, user: i64) -> i64