code wiki / (root) / nx_realperson.nx

nx_realperson.nx

buildroot/runtime/nx_realperson.nx

17025 B274 linesdepth 0pulls 0 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_realperson.nx -- WRITING arc, rung W-RP-1: THE REAL-PERSON DEPICTION GATE. Closes gap-queue row #1 of nx_writebench (pop 378/378 -- it applies to the WHOLE corpus). The ruler (arXiv:2601.14324) lists real-person depiction in its measured refuse-class inventory, alongside minors, non-consent, sexual violence, torture, CBRN, drug synthesis and cyber-attack. ★★★★★★WHY THIS ONE IS NOT MORALISING, AND THE DISTINCTION IS THE WHOLE POINT. The operator's standing line is LEGALITY BY CONSTRUCTION, NEVER SHAME BY SCORING, and [[nx_dialogue]] already encodes the consequence: H+/C+ (two consenting adults) is NOT a defect and is never scored as one. This organ does not touch that. It fires on a different fact entirely -- **a THIRD PARTY who never agreed to be in the scene**. A user can consent for themselves; they cannot consent for someone else. So the rule here is CONSENT, not taste, and the organ is built so that a DECLARED consent (your own likeness, a signed release, a public-domain historical subject) turns a refusal into an allow. A system that refused those too would be moralising, which is exactly what we are not doing. ★WHAT IT IS AND IS NOT. It detects REAL-PERSON REFERENCE PATTERNS, not identities. It holds no celebrity list and cannot have one -- any such list is unbounded, instantly stale, and biased toward the famous while missing the private individual who is far likelier to be harmed. ⚠HONEST ENVELOPE, stated because a detector that hides its blind spot is worse than none: ABSENCE OF A SIGNAL IS NOT PROOF THE SUBJECT IS FICTIONAL. A bare unusual name with no marker reads CLEAR here. This organ raises the floor; it is not a licence to skip human judgement. The lexicons stay pure operator DATA (rule 25 -- the packed NUL-terminated terms + parallel weights contract that nx_register/nx_dialogue already use), so the SFW lane and the operator's local lane tune them without touching this logic, and this organ authors no content of any kind. Pure integer, NO syscalls, caller owns every buffer. license_tier: ORIGINAL module: nishi-core.write.realperson depends: nishi-core.write.register capability: WRITE_REAL_PERSON_GATE

dependencies 0 imports · 1 importers

nx_realperson.nx nx_realperson_gate.nx

imports: none

imported by: nx_realperson_gate.nx

structs

none

consts

57const RP_CLEAR: i64 = 0 // no real-person reference detected
58const RP_PROTECTED: i64 = 1 // real person, but LAWFUL EXPRESSION (fiction/parody/commentary).
60const RP_REVIEW: i64 = 2 // a genuinely unsettled edge (commercial likeness, factual-seeming claim)
61const RP_REFUSE: i64 = 3 // an actual legal line: NCII imagery, or a minor, with no lawful basis
62const RP_CONSENT: i64 = 4 // would have been REFUSE, but consent is DECLARED -> allowed
63const RP_FLAG_OPERATOR: i64 = 5 // UNSETTLED: the OPERATOR decides, the machine must not (see below)
64const RP_QUARANTINE: i64 = 6 // WITHHELD from serving, PRESERVED, escalated to a human (see below)
83const RP_MINOR_NONE: i64 = 0
84const RP_MINOR_SUSPECTED: i64 = 1 // inference -> quarantine + human review
85const RP_MINOR_CONFIRMED: i64 = 2 // verified -> absolute
109const RP_SUBJECT_PRIVATE: i64 = 0 // no such publication -> the classic NCII victim
110const RP_SUBJECT_PUBLISHED: i64 = 1 // adult performer / published adult media -> operator's call
113const RP_MEDIUM_TEXT: i64 = 0 // prose/fiction: broad First Amendment protection in the US
114const RP_MEDIUM_IMAGE: i64 = 1 // photorealistic likeness: where NCII statutes actually bite
117const RP_PRESENT_FICTION: i64 = 0 // evidently or explicitly fiction/parody/satire
118const RP_PRESENT_FACTUAL: i64 = 1 // asserted as something that really happened
121const RP_CONSENT_NONE: i64 = 0
122const RP_CONSENT_SELF: i64 = 1 // the requester's own likeness
123const RP_CONSENT_RELEASE: i64 = 2 // a signed model release on file
124const RP_CONSENT_HISTORIC: i64 = 3 // long-deceased / public-domain subject
127const RP_REF_THRESHOLD: i64 = 3
128const RP_INTIMATE_THRESHOLD: i64 = 5

functions

130func rp_lower(c: i64) -> i64 { if c >= 65 { if c <= 90 { return c + 32 } } return c }
called by 1: rp_has_word
132func rp_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
136func rp_is_wordch(c: i64) -> i64
142func rp_has_word(buf: *u8, a: i64, b: i64, term: *u8) -> i64
called by 1: rp_score calls 3: rp_lenrp_lowerrp_is_wordch
166func rp_score(buf: *u8, a: i64, b: i64, terms: *u8, weights: *i64, nterms: i64) -> i64
called by 2: rp_judgemain calls 2: rp_lenrp_has_word
190func rp_name_shaped(buf: *u8, a: i64, b: i64) -> i64
called by 2: rp_judgemain calls 1: rp_is_wordch
236func rp_decision(ref: i64, intimate: i64, medium: i64, present: i64, minor: i64, commercial: i64,
called by 1: rp_judge
265func rp_judge(buf: *u8, a: i64, b: i64,