nx_clock_caps.nx
buildroot/runtime/nx_clock_caps.nx
about
nx_clock_caps.nx -- THE ONE COMMAND-SLOT CAP for the clock plane, shared by BOTH ends:
* nx_clockjob (the WRITER) derives CJ_ROWCAP from CLK_CMD_CAP (longest row `put` admits)
* nx_clock_sched (the READER/DISPATCHER) derives CLK_NAMEW from CLK_CMD_CAP (the per-slot width every
load/merge/save copy loop bounds at)
WHY ONE CONST (2026-08-22): the writer admitted rows up to 1024 bytes while the reader's slot was a
hand-mirrored 128, so every command longer than 127 bytes was committed INTACT to the DESIRED plane
(clockjobs-) and then SILENTLY CUT at merge into the LIVE plane (clocksched-). Measured on the live
store 2026-08-22: 7 of 103 jobs executed truncated argv -- the gateroster beat ran with deadline 1800
(ms) instead of 180000, admit appended to knowledge/gateroster.c instead of knowledge/gateroster.conf,
alertscore/refusalshape self-baselined to kno and knowledge/stat. TWO SPELLINGS OF ONE CAP IS
COORDINATION BY DISCIPLINE; ONE IMPORTED CONST MAKES DISAGREEMENT IMPOSSIBLE BY CONSTRUCTION.
DERIVATION, so neither number is magic:
CLK_CMD_CAP = 1024: the writer's whole-row bound (name TAB interval TAB organ, refused at >= CAP-2).
A single field of an admitted row is therefore <= CAP-2-3 (1-byte name, 2 tabs, 1-digit interval)
= 1019 bytes < CLK_CMD_CAP, so a slot of CLK_CMD_CAP bytes (NUL included) holds ANY field an
admitted row can carry -- the reader cannot truncate what the writer admits, BY ARITHMETIC.
1024 is CJ_ROWCAP's established value (2026-08-06); raising it here raises BOTH ends together.
CLK_ARGV_MAX = 64: dispatcher argv vector bound. The live registry's widest command is 18 tokens
(gateadjudicate, 402 bytes); 64 is >=3.5x headroom, the same named-headroom shape as
CLK_MAXJOBS's 4x. The bound is NAMED and its exceedance ANNOUNCES (clk_split_argv prints
ARGV-OVERFLOW with the job name and the dropped count) -- never silent. The by-construction
alternative (CLK_CMD_CAP/2 + 2 = 514, the arithmetic max of space-split tokens in an admitted
command) costs one extra page per dispatch; adopt it if an announced overflow is ever seen live.
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 0 imports · 5 importers
imports: none
imported by: nx_clock_driver_sched_ar.nxnx_clock_sched.nxnx_clock_sched_reserved_fault_v2_ar.nxnx_clock_sched_reserved_v2_ar.nxnx_clockjob.nx
structs
| none |
consts
| 25 | const CLK_CMD_CAP: i64 = 1024 |
| 26 | const CLK_ARGV_MAX: i64 = 64 |
functions
| none |