code wiki / _hdl_build / nx_chartlay_adoption_gate.nx
nx_chartlay_adoption_gate.nx
buildroot/runtime/_hdl_build/nx_chartlay_adoption_gate.nx
about
nx_chartlay_adoption_gate.nx -- datavis DV9 (2026-09-15): THE FLEET RATCHET for the one chart-layout ruler.
Names every SVG-emitting function in the compare generators (the sources are DATA in cl_adoption.conf) and refuses
a chart that scales, places or colours by hand. An emitter is an ADOPTER when it, or its prefix family (the helpers
sharing its name up to the first underscore -- the estate's one-figure-one-prefix convention), calls a ruler verb
(the verbs are DATA too); HAND when none does; HAND-COLOUR when the family paints an SVG fill or stroke with a
literal rgb() instead of a token. A decorative icon (aria-hidden on the tag) is counted, never judged; an SVG named
only in a comment is nothing. Named allow rows exempt one function WITH a reason and can only shrink: an allow row
whose function is no longer an offender is STALE and reads RED until deleted, so the ratchet tightens by
construction. Planted fixtures prove every class both ways before the live census runs, and the census prints one
line per emitter -- a count without a worklist is not actionable. The imprecision lived with: attribute literals
are matched in their single-quoted spelling only (the family's emitters use no other), and nx_lineconf_lib is not
composed because it is a first-key reader while this file is a ROW LIST with repeated keys. license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nx
imported by: nobody (leaf or entry point)
structs
| none |
consts
| 16 | const CA_CONF: *u8 = "knowledge/compare/cl_adoption.conf" |
| 17 | const CA_CONF_BR: *u8 = "buildroot/knowledge/compare/cl_adoption.conf" |
| 18 | const CA_BR_PFX: *u8 = "buildroot/" |
| 19 | const CA_DIR: *u8 = "/tmp/nx_chartlay_adoption_gate/" |
| 20 | const CA_FX_CONF: *u8 = "/tmp/nx_chartlay_adoption_gate/fixture.conf" |
| 21 | const CA_FX_CONF_ALLOW: *u8 = "/tmp/nx_chartlay_adoption_gate/fixture_allow.conf" |
| 22 | const CA_FX_CONF_STALE: *u8 = "/tmp/nx_chartlay_adoption_gate/fixture_stale.conf" |
| 23 | const CA_FX_A: *u8 = "/tmp/nx_chartlay_adoption_gate/adopter.nx" |
| 24 | const CA_FX_H: *u8 = "/tmp/nx_chartlay_adoption_gate/hand.nx" |
| 25 | const CA_FX_C: *u8 = "/tmp/nx_chartlay_adoption_gate/colour.nx" |
| 26 | const CA_FX_I: *u8 = "/tmp/nx_chartlay_adoption_gate/icon.nx" |
| 27 | const CA_DIR_MODE: i64 = 493 |
| 28 | const CA_FILE_MODE: i64 = 420 |
| 29 | const CA_MAX_FUNCS: i64 = 4096 |
| 30 | const CA_MAX_ROWS: i64 = 256 |
| 31 | const CA_NAME_W: i64 = 96 |
| 32 | const CA_PATH_W: i64 = 256 |
| 33 | const CA_REASON_W: i64 = 320 |
| 34 | const CA_MAX_EMIT: i64 = 512 |
| 35 | const CA_TAG_SPAN: i64 = 400 |
| 36 | const CA_NUM_W: i64 = 24 |
| 37 | const CA_I64: i64 = 8 |
| 38 | const CA_CH_NL: i64 = 10 |
| 39 | const CA_CH_QUOTE: i64 = 34 |
| 40 | const CA_CH_SLASH: i64 = 47 |
| 41 | const CA_CH_BSLASH: i64 = 92 |
| 42 | const CA_CH_PIPE: i64 = 124 |
| 43 | const CA_CH_USCORE: i64 = 95 |
| 44 | const CA_CH_LPAREN: i64 = 40 |
| 45 | const CA_CH_GT: i64 = 62 |
| 46 | const CA_CH_D0: i64 = 48 |
| 47 | const CA_CH_MINUS: i64 = 45 |
| 49 | const CA_NONE: i64 = -1 |
| 50 | const CA_ADOPTER: i64 = 1 |
| 51 | const CA_HAND: i64 = 2 |
| 52 | const CA_HAND_COLOUR: i64 = 3 |
| 54 | const CA_S_SOURCES: i64 = 0 |
| 55 | const CA_S_UNREADABLE: i64 = 1 |
| 56 | const CA_S_FUNCS: i64 = 2 |
| 57 | const CA_S_EMITTERS: i64 = 3 |
| 58 | const CA_S_ADOPTERS: i64 = 4 |
| 59 | const CA_S_HAND: i64 = 5 |
| 60 | const CA_S_HAND_COLOUR: i64 = 6 |
| 61 | const CA_S_ICONS: i64 = 7 |
| 62 | const CA_S_ALLOWED: i64 = 8 |
| 63 | const CA_S_STALE_ALLOW: i64 = 9 |
| 64 | const CA_S_OFFENDERS: i64 = 10 |
| 65 | const CA_S_RULERS: i64 = 11 |
| 66 | const CA_S_EMIT_TRUNC: i64 = 12 |
| 67 | const CA_S_W: i64 = 13 |
functions
| 69 | func ca_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 70 | func ca_put(fd: i64, s: *u8) -> i64 { sys_write(fd, s, ca_len(s)); return 0 } |
| 71 | func ca_putn(fd: i64, v: i64) -> i64 |
| 83 | func ca_q(fd: i64) -> i64 { let b: *u8 = sys_mmap(2); b[0] = CA_CH_QUOTE as u8; sys_write(fd, b, 1); return 0 } |
| 85 | func ca_find(buf: *u8, n: i64, needle: *u8) -> i64 |
| 97 | func ca_starts(buf: *u8, n: i64, needle: *u8) -> i64 |
| 104 | func ca_eq(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while a[i] == b[i] { if a[i] == (0 as u8) { return 1 } i = i + 1 } return 0 } |
| 106 | func ca_copy(dst: *u8, cap: i64, s: *u8, n: i64) -> i64 |
| 114 | func ca_cat(dst: *u8, cap: i64, a: *u8, b: *u8) -> i64 |
| 126 | func ca_write(path: *u8, s: *u8) -> i64 { sys_unlinkat(path); let fd: i64 = sys_openat_wr(path, CA_FILE_MODE); if fd < 0 { return -1 } sys_write(fd, s, ca_len(s)); sys_close(fd); return 0 } |
| 127 | func ca_exists(path: *u8) -> i64 { let fd: i64 = sys_openat_rd(path); if fd < 0 { return 0 } sys_close(fd); return 1 } |
| 131 | func ca_strip(src: *u8, n: i64, dst: *u8) -> i64 called by 1: cl_adoption_gate |
| 155 | func ca_row(buf: *u8, n: i64, key: *u8, k: i64) -> i64 |
| 175 | func ca_field(buf: *u8, n: i64, ls: i64, idx: i64, out: *u8, cap: i64) -> i64 |
| 193 | func ca_read_source(path: *u8, out_n: *i64, scratch: *u8) -> *u8 |
| 201 | func ca_tag_is_icon(buf: *u8, n: i64, p: i64) -> i64 |
| 210 | func ca_verdict_of(em_names: *u8, em_verd: *i64, em_n: i64, name: *u8) -> i64 calls 1: ca_eq |
| 215 | func ca_verdict_word(v: i64) -> *u8 called by 1: cl_adoption_gate |
| 224 | func cl_adoption_gate(conf: *u8, st: *i64, em_names: *u8, em_verd: *i64) -> i64 |
| 394 | func ca_fx_adopter() -> i64 |
| 405 | func ca_fx_hand() -> i64 |
| 416 | func ca_fx_colour() -> i64 |
| 426 | func ca_fx_icon() -> i64 |
| 436 | func ca_fx_conf(path: *u8, allow_row: *u8) -> i64 |
| 446 | func main() -> i64 |