code wiki / _hdl_build / nx_connect_lds_reconnect_lib.nx
nx_connect_lds_reconnect_lib.nx
buildroot/runtime/_hdl_build/nx_connect_lds_reconnect_lib.nx
about
nx_connect_lds_reconnect_lib.nx -- the MEMBER <-> MISSIONARY RECONNECTION model, extracted as a shared
library so the verifying gate (nx_connect_lds_reconnect) and the LIVE app (nx_connect_serve) bind ONE
implementation of the law instead of two that can drift. This is the split the gate's own DRY note named:
"the small primitives are re-stated to keep the gate self-contained; production extracts them to a shared
library organ". No main, no syscalls, no allocation -- records are caller-supplied buffers -- so any
consumer can import it, including one that never pulls in the syscall layer.
THE LAW (unchanged, integer-only, no floats): two people could have KNOWN each other only if they were in
the SAME MISSION, share an AREA, and their time windows OVERLAP. All three are NECESSARY, so a later
missionary in the same area does not surface (time is load-bearing) and a same-mission person in a
different area does not surface (area is load-bearing). A mutually-confirmed "I remember you" edge
outranks inferred overlap. Discovery is CONSENT-GATED both ways (GDPR Art.9-style): a member who has not
opted in is never surfaced, however real the overlap. The DATE lane is UNREACHABLE when a minor is
involved, in both directions -- a returned missionary and a youth they taught are community, never romance.
RECORD LAYOUT (8 slots): p[0]=age_band p[1]=mission p[2]=areas-bitmask p[3]=start_month p[4]=end_month
p[5]=reconnect_optin p[6]=self_token p[7]=confirmed_tokens
license_tier: ORIGINAL
dependencies 0 imports · 3 importers
imports: none
imported by: nx_connect_api_lib.nxnx_connect_lds_reconnect.nxnx_connect_serve.nx
structs
| none |
consts
| 20 | const RC_LANE_FRIEND: i64 = 1 |
| 21 | const RC_LANE_COMMUNITY: i64 = 2 |
| 22 | const RC_LANE_DATE: i64 = 3 |
| 23 | const RC_BAND_MINOR: i64 = 0 |
| 24 | const RC_BAND_ADULT: i64 = 1 |
| 25 | const RC_EXCLUDED: i64 = 0-1 |
| 26 | const RC_REC_SLOTS: i64 = 8 |
functions
| 29 | func rc_inter_popc(a: i64, b: i64) -> i64 |
| 42 | func rc_clamp100(v: i64) -> i64 { if v > 100 { return 100 } return v } called by 1: rc_raw |
| 43 | func rc_imax(a: i64, b: i64) -> i64 { if a > b { return a } return b } called by 1: rc_time_overlap |
| 44 | func rc_imin(a: i64, b: i64) -> i64 { if a < b { return a } return b } called by 1: rc_time_overlap |
| 45 | func rc_has_bit(mask: i64, bit: i64) -> i64 { if rc_inter_popc(mask, bit) > 0 { return 1 } return 0 } |
| 48 | func rc_time_overlap(a_s: i64, a_e: i64, b_s: i64, b_e: i64) -> i64 |
| 56 | func rc_mk(p: *i64, band: i64, mission: i64, areas: i64, s: i64, e: i64, optin: i64, token: i64, conf: i64) -> i64 |
| 69 | func rc_mutually_confirmed(a: *i64, b: *i64) -> i64 |
| 75 | func rc_raw(a: *i64, b: *i64) -> i64 |
| 90 | func rc_score(a: *i64, b: *i64) -> i64 |
| 98 | func rc_lane(a: *i64, b: *i64, lane: i64) -> i64 |
| 106 | func rc_mission_only(a: *i64, b: *i64) -> i64 called by 1: main |