nx_identity_persist.nx
buildroot/runtime/nx_identity_persist.nx
about
nx_identity_persist.nx -- SOVEREIGN identity-persistence drift-catcher. The #1 old-system failure (census
BEHIND, disasters.json): a render can be great QUALITY but the WRONG PERSON ("canonical Elara is platinum
blonde; this is a brunette"). The old platform caught it with a triangulation panel = face_embedding +
hair_color + caption_check -> 0/3 PASS = drift. This is the sovereign, no-3rd-party version: at PROMPT stage
it runs the two TEXT checks (hair_color: no forbidden hair terms; caption: all required identity tokens
present) so a wrong-identity prompt is REJECTED BEFORE a gen is wasted -- this alone catches the exact brunette
error I made. The 3rd check (face_embedding on the RENDERED image) wires to nx_sovereign_image_fr (our own
LBP face recognition, no 3rd-party lib) post-render. Identity spec (required/forbidden tokens) is DATA per
persona (rule 11/25). license_tier: ORIGINAL
dependencies 1 imports · 1 importers
imports: nx_syscalls.nx
imported by: nx_identity_persist_gate.nx
structs
| none |
consts
| 13 | const IDP_PRESERVED: i64 = 2 // both text checks pass -> identity preserved (proceed) |
| 14 | const IDP_DRIFT: i64 = 0 // a check failed -> DRIFT (reject/regenerate) |
functions
| 16 | func idp_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 17 | func idp_lc(c: u8) -> u8 { if c >= (65 as u8) { if c <= (90 as u8) { return (c + (32 as u8)) as u8 } } return c } called by 1: idp_ci_find |
| 19 | func idp_ci_find(hay: *u8, hlen: i64, needle: *u8, nl: i64) -> i64 |
| 32 | func idp_item_at(list: *u8, llen: i64, idx: i64, out2: *i64) -> i64 |
| 42 | func idp_item_count(list: *u8, llen: i64) -> i64 { if llen<=0 {return 0} var c: i64=1; var i: i64=0; while i<llen { if list[i]==(0x7C as u8){c=c+1} i=i+1 } return c } |
| 45 | func idp_list_any(text: *u8, tlen: i64, list: *u8) -> i64 |
| 59 | func idp_list_all(text: *u8, tlen: i64, list: *u8) -> i64 |
| 75 | func idp_prompt_verdict(prompt: *u8, plen: i64, required: *u8, forbidden: *u8, out2: *i64) -> i64 |
| 84 | func idp_prompt_ok(prompt: *u8, plen: i64, required: *u8, forbidden: *u8) -> i64 |