nx_rosterconf_lib.nx
buildroot/runtime/nx_rosterconf_lib.nx
about
nx_rosterconf_lib.nx -- WHICH CONFS ARE GATE ROSTERS, AND IS A GATE A ROW OF ONE (2026-09-18, ecosystem EC57).
THE DEFECT THIS CLOSES: the heavy roster (knowledge/gateroster_heavy.conf, clock row gaterosterheavy) runs its gates into the
SAME production journal as the main roster, while the two organs that ask "does a roster run this gate" each read ONE conf
by name: nx_rungclose printed rostered=0 for a gate the heavy beat runs daily, and nx_execsurface credited it no roster
surface. A NAME LIST OF CONFS WOULD LAG THE NEXT ROSTER THE SAME WAY, so the list is DERIVED from the resource that causes
the execution: a ROSTER is a (conf, journal) PAIR -- the runner's default pair (what `beat` reads and writes when it names
neither) plus every pair a clock row runs through `nx_gate_roster_run beat <conf> <journal>`. A third roster is read by
declaring its clock row -- no edit here and none in any consumer.
THE JOURNAL IS HALF OF THE PAIR (measured 2026-09-18 on the live plane: four beats, and two of them -- gateroster-slow and
nofloatslow -- write knowledge/status/gateroster_slow.jrnl and nofloat_slow.jrnl, each keeping its own heartbeat beside its
journal, so they must NOT be repointed onto the shared one). A reader that credits a roster must read ITS journal: the close
ruler proves TESTED and OPERATED from the production journal plus the journal of every pair whose conf lists the gate, so a
slow beat's evidence is read where that beat writes it. RCF_META_OTHER still counts the beats off the production journal.
ONE GRAMMAR, MIRRORED FROM ITS AUTHORITY (nx_gate_roster_run.nx: main's argv parse, grr_load, grr_isid), so every organ
that asks reads a conf exactly the way the beat that runs it does:
a beat the program nx_gate_roster_run (any path, .elf or not; a longer or PREFIX name is another program) with the
verb beat; its next argument, when present, is the conf (else RCF_CONF_DEFAULT) and the one after it the journal
(else RCF_JRNL). trial and admit run candidates and argless runs nothing, so none of them names a roster.
a row leading spaces skipped; a line opening with # or ; is a comment; the gate is the maximal run of name
characters [A-Za-z0-9_./-] from there -- so an @directive names nothing, a CR a row carries from another host
ends the name, and a longer or PREFIX name is another gate.
Pure: every function takes buffers and numbers, so a gate drives it in-process (nx_rungclose_gate).
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 1 imports · 3 importers
imports: nx_syscalls.nx
imported by: nx_execsurface.nxnx_rungclose.nxnx_rungclose_gate.nx
structs
| none |
consts
| 26 | const RCF_I64: i64 = 8 |
| 27 | const RCF_RUNNER: *u8 = "nx_gate_roster_run" |
| 28 | const RCF_VERB: *u8 = "beat" |
| 29 | const RCF_CONF_DEFAULT: *u8 = "knowledge/gateroster.conf" // the runner's GRR_CONF: what beat reads when it names no conf |
| 32 | const RCF_JRNL: *u8 = "knowledge/status/gateroster.jrnl" |
| 33 | const RCF_ARG_CONF: i64 = 0 // beat [conf] [journal] [ms]: the arguments after the verb, by position |
| 34 | const RCF_ARG_JRNL: i64 = 1 |
| 35 | const RCF_ELF_SFX: *u8 = ".elf" |
| 36 | const RCF_NOT_A_BEAT: i64 = 0 - 1 |
| 37 | const RCF_NONE: i64 = 0 - 1 |
| 39 | const RCF_TEXT_P: i64 = 0 |
| 40 | const RCF_TEXT_N: i64 = 1 |
| 41 | const RCF_TEXT_STRIDE: i64 = 2 |
| 43 | const RCF_META_BEATS: i64 = 0 // plane rows that are roster beats, whatever journal they write |
| 44 | const RCF_META_BYTES: i64 = 1 // the pair list's length in bytes |
| 45 | const RCF_META_OTHER: i64 = 2 // of them, the beats writing a journal other than RCF_JRNL (read from that journal) |
| 46 | const RCF_META_SLOTS: i64 = 3 |
| 48 | const RCF_CH_TAB: i64 = 9 |
| 49 | const RCF_CH_NL: i64 = 10 |
| 50 | const RCF_CH_CR: i64 = 13 |
| 51 | const RCF_CH_SP: i64 = 32 |
| 52 | const RCF_CH_HASH: i64 = 35 |
| 53 | const RCF_CH_COMMA: i64 = 44 |
| 54 | const RCF_CH_MINUS: i64 = 45 |
| 55 | const RCF_CH_DOT: i64 = 46 |
| 56 | const RCF_CH_SLASH: i64 = 47 |
| 57 | const RCF_CH_0: i64 = 48 |
| 58 | const RCF_CH_9: i64 = 57 |
| 59 | const RCF_CH_SEMI: i64 = 59 |
| 60 | const RCF_CH_UA: i64 = 65 |
| 61 | const RCF_CH_UZ: i64 = 90 |
| 62 | const RCF_CH_US: i64 = 95 |
| 63 | const RCF_CH_LA: i64 = 97 |
| 64 | const RCF_CH_LZ: i64 = 122 |
| 308 | const RCF_PART_CONF: i64 = 0 |
| 309 | const RCF_PART_JRNL: i64 = 1 |
functions
| 66 | func rcf_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 69 | func rcf_isid(c: i64) -> i64 called by 1: rcf_row_len |
| 81 | func rcf_isblank(c: i64) -> i64 called by 1: rcf_token |
| 89 | func rcf_line_end(buf: *u8, n: i64, p: i64) -> i64 |
| 100 | func rcf_span_is(buf: *u8, off: i64, len: i64, lit: *u8) -> i64 |
| 109 | func rcf_span_eq(a: *u8, ao: i64, al: i64, b: *u8, bo: i64, bl: i64) -> i64 |
| 117 | func rcf_token(buf: *u8, p: i64, e: i64, off: *i64) -> i64 |
| 129 | func rcf_beat_arg(buf: *u8, coff: i64, clen: i64, k: i64, off: *i64) -> i64 |
| 160 | func rcf_beat_conf(buf: *u8, coff: i64, clen: i64, off: *i64) -> i64 { return rcf_beat_arg(buf, coff, clen, RCF_ARG_CONF, off) } |
| 161 | func rcf_beat_jrnl(buf: *u8, coff: i64, clen: i64, off: *i64) -> i64 { return rcf_beat_arg(buf, coff, clen, RCF_ARG_JRNL, off) } |
| 164 | func rcf_jrnl_is_prod(buf: *u8, jo: i64, jl: i64) -> i64 |
| 170 | func rcf_list_has(list: *u8, n: i64, buf: *u8, off: i64, len: i64) -> i64 |
| 181 | func rcf_list_add(list: *u8, n: i64, buf: *u8, off: i64, len: i64) -> i64 |
| 194 | func rcf_lines(list: *u8, n: i64) -> i64 |
| 202 | func rcf_line(list: *u8, n: i64, k: i64, off: *i64) -> i64 |
| 217 | func rcf_confs_bound(plane: *u8, pn: i64) -> i64 |
| 223 | func rcf_pair_compose(dst: *u8, cb: *u8, co: i64, cl: i64, jb: *u8, jo: i64, jl: i64) -> i64 called by 1: rcf_confs |
| 241 | func rcf_confs(plane: *u8, pn: i64, list: *u8, meta: *i64) -> i64 called by 4: mainrp_gather_rostersmainmain calls 10: sys_mmaprcf_slenrcf_pair_composercf_list_addrcf_line_endrcf_beat_conf+4 |
| 286 | func rcf_pair_conf(list: *u8, n: i64, k: i64, off: *i64) -> i64 |
| 296 | func rcf_pair_jrnl(list: *u8, n: i64, k: i64, off: *i64) -> i64 |
| 310 | func rcf_pair_part(list: *u8, n: i64, k: i64, which: i64, off: *i64) -> i64 |
| 314 | func rcf_pair_origin(list: *u8, n: i64, k: i64, which: i64) -> i64 called by 6: mainrcf_join_confsrp_gather_rostersmainmainmain calls 4: sys_mmaprcf_pair_partrcf_span_eqsys_munmap |
| 334 | func rcf_row_start(text: *u8, p: i64, e: i64) -> i64 |
| 339 | func rcf_row_len(text: *u8, c0: i64, e: i64) -> i64 |
| 349 | func rcf_has_gate(text: *u8, tn: i64, gate: *u8, gl: i64) -> i64 called by 3: rcf_findrp_roster_evidenceg_credit calls 4: rcf_line_endrcf_row_startrcf_span_eqrcf_row_len |
| 364 | func rcf_find(texts: *i64, k: i64, gate: *u8, gl: i64) -> i64 |
| 376 | func rcf_join_confs(list: *u8, n: i64, dst: *u8, o0: i64) -> i64 called by 2: rp_roster_confs_tailmain calls 5: sys_mmaprcf_linesrcf_pair_originrcf_pair_confsys_munmap |