code wiki / _hdl_build / nx_meet_curate.nx

nx_meet_curate.nx source

↩ module page · 47 lines · 2423 B

1// nx_meet_curate.nx -- R7 of the NISHI MEET PLATFORM: the CURATION / MEMBERSHIP gate (LIBRARY, no main) -- the 2// "club" that keeps quality meeting quality. Composes R6 (nx_meet_trust) as the auto-screen at the door + a 3// vetting STATE MACHINE that cannot be skipped (you can't jump straight to MEMBER without screening + verify). 4// A filled honeypot, an AI-slop resume, or a ghost posting => auto-FLAGGED. Sovereign (no ML/JS). States are 5// named consts (rule 11). license_tier: ORIGINAL 6import "nx_syscalls.nx" 7import "nx_meet_lib.nx" 8import "nx_meet_trust.nx" 9 10const ST_PENDING: i64 = 0 // applied, awaiting screening 11const ST_SCREENED: i64 = 1 // passed the auto-screen (eligible to verify) 12const ST_VERIFIED: i64 = 2 // identity/credentials verified 13const ST_MEMBER: i64 = 3 // admitted to the community (terminal) 14const ST_FLAGGED: i64 = 4 // auto-flagged: bot / AI-slop / ghost 15const ST_REJECTED: i64 = 5 // declined (terminal) 16 17// auto-screen a candidate application -> the state it lands in. honeypot non-empty => a bot tripped it. 18func curate_screen_resume(text: *u8, honeypot: *u8) -> i64 { 19 if mlen(honeypot) > 0 { return ST_FLAGGED } 20 if trust_is_fake_resume(text) == 1 { return ST_FLAGGED } 21 return ST_SCREENED 22} 23// auto-screen an employer posting -> the state it lands in. 24func curate_screen_posting(text: *u8, honeypot: *u8) -> i64 { 25 if mlen(honeypot) > 0 { return ST_FLAGGED } 26 if trust_is_ghost_posting(text) == 1 { return ST_FLAGGED } 27 return ST_SCREENED 28} 29 30// 1 if a vetting-flow transition is allowed, 0 otherwise (the club can't be skipped). 31func curate_valid_transition(from: i64, to: i64) -> i64 { 32 if from == ST_PENDING { if to == ST_SCREENED { return 1 } return 0 } 33 if from == ST_SCREENED { if to == ST_VERIFIED { return 1 } if to == ST_FLAGGED { return 1 } return 0 } 34 if from == ST_VERIFIED { if to == ST_MEMBER { return 1 } return 0 } 35 if from == ST_FLAGGED { if to == ST_REJECTED { return 1 } if to == ST_VERIFIED { return 1 } return 0 } 36 return 0 37} 38 39func curate_state_name(st: i64) -> *u8 { 40 if st == ST_PENDING { return "PENDING" as *u8 } 41 if st == ST_SCREENED { return "SCREENED" as *u8 } 42 if st == ST_VERIFIED { return "VERIFIED" as *u8 } 43 if st == ST_MEMBER { return "MEMBER" as *u8 } 44 if st == ST_FLAGGED { return "FLAGGED" as *u8 } 45 if st == ST_REJECTED { return "REJECTED" as *u8 } 46 return "UNKNOWN" as *u8 47}