nx_manga_rating.nx
buildroot/runtime/nx_manga_rating.nx
about
nx_manga_rating.nx -- THE CONTENT RATING PLANE for the manga lane (mangagen MG24 mr_rate_row,
MG32 mr_adult_invariant). A rating is DATA CARRIED ON THE ASSET -- never a property of the
account, and never which folder somebody remembered to drop the file in.
COMPOSES THE INCUMBENTS AND RE-IMPLEMENTS NEITHER:
nx_torrent_access nx_taccess_allow(viewer_level, area) -- the fail-closed VIEWER-LEVEL
decision from the operator directive of 2026-06-20. Levels OWNER 3 /
FAMILY 1 / ANON 0; areas SFW 0 requires FAMILY, NSFW 1 requires OWNER.
This organ NEVER re-decides access; it only says which AREA an asset
belongs in, and hands that to the incumbent ruler.
nx_wardrobe_state WS_ADULT_AGE -- the adult threshold that already fails closed at
construction in the character lane. IMPORTED rather than redeclared:
the same constant written twice is two constants to every scanner, and
an age threshold that can drift between two organs is a defect generator.
THE LOAD-BEARING PROPERTY, and the whole point of the organ:
AN UNRATED ASSET IS TREATED AS GATED, NEVER AS SAFE. An absent rating is not evidence of
innocence. Every mapping below fails toward the MORE restrictive area, so the failure mode of
a missing row is the family viewer cannot see it, never the child can.
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_torrent_access.nxnx_wardrobe_state.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 26 | const MR_RATE_UNRATED: i64 = 0-1 |
| 27 | const MR_RATE_ALLAGES: i64 = 0 |
| 28 | const MR_RATE_TEEN: i64 = 1 |
| 29 | const MR_RATE_MATURE: i64 = 2 |
| 30 | const MR_RATE_ADULT: i64 = 3 |
| 31 | const MR_RATE_MAX: i64 = 3 |
| 34 | const MR_OK: i64 = 0 |
| 35 | const MR_E_MINOR: i64 = 0-1 |
| 36 | const MR_E_RATING: i64 = 0-2 |
| 37 | const MR_E_ROW: i64 = 0-3 |
| 39 | const MR_ROWCAP: i64 = 512 |
| 40 | const MR_PIPE: i64 = 124 |
functions
| 42 | func mr_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 44 | func mr_apps(dst: *u8, o: i64, s: *u8) -> i64 called by 1: mr_rate_row |
| 50 | func mr_num(dst: *u8, o: i64, v: i64) -> i64 |
| 64 | func mr_rating_valid(r: i64) -> i64 |
| 73 | func mr_area_for_rating(r: i64) -> i64 |
| 81 | func mr_may_serve(viewer_level: i64, r: i64) -> i64 |
| 90 | func mr_adult_invariant(subject_age: i64, r: i64) -> i64 |
| 100 | func mr_rate_row(cid: *u8, r: i64, src: *u8, epoch: i64, out: *u8, cap: i64) -> i64 |
| 118 | func mr_puts(s: *u8) -> i64 { sys_write(1, s, mr_slen(s)); return 0 } |
| 119 | func mr_putn(v: i64) -> i64 { let b: *u8 = sys_mmap(64); let n: i64 = mr_num(b, 0, v); sys_write(1, b, n); return 0 } |
| 121 | func mr_atoi(s: *u8) -> i64 called by 1: main |
| 137 | func main(argc: i64, argv: *i64) -> i64 |