code wiki / _hdl_build / nx_dora.nx

nx_dora.nx

buildroot/runtime/_hdl_build/nx_dora.nx

31088 B549 linesdepth 5pulls 7 transitivereach 1 importersview sourcekind tooltopic dora
docsdependenciesstructsconstsfunctions

about

nx_dora.nx -- DORA-analogue delivery metrics derived from SOVEREIGN event planes (F740). Operator ask: beyond-SOTA, evidence-driven, no manual instrumentation. Incumbents (Jellyfish/LinearB/ Swarmia/DX) POLL git/Jira; we DERIVE the DORA keys from our own event stream -- the sovereign exceed /compare/pmdash flagged as GAP F740: - DEPLOY FREQUENCY = DONE frames in knowledge/status/ws_sync.jrnl (each shipped ws = a delivery event) - LEAD TIME (cycle) = DONE_epoch - most-recent-prior KICKOFF_epoch of the same ws, median across pairs - CHANGE-FAIL proxy = incident-class OPEN debts / deploys (debt- plane; declared heuristic, labeled) - MTTR proxy = median debt filed->eaten span is NOT in the row (needs debthist join) -> declared PENDING Honest by construction: 2 keys MEASURED, 2 PROXY/PENDING, each labeled; DORA elite/high/medium/low bands. argv[1] = mode: json(default -> stdout) | html [argv[2]=out path, default sites/nishifamily/dora.html] license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 3 imports · 1 importers

nx_store_seed_lib.nx nx_itoa_lib.nx nx_syscalls.nx nx_dora.nx nx_dora_gate.nx

imports: nx_store_seed_lib.nxnx_itoa_lib.nxnx_syscalls.nx

imported by: nx_dora_gate.nx

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main d_sj_eq d_len d_len ↻ d_int d_ship_join sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ d_read sys_openat_rd sys_read sys_close d_p sys_write ↻ d_len ↻ d_sj_col d_int ↻ d_sj_eq ↻ d_num nxi_out nxi_fd sys_mmap ↻ ccz_cat_num nxi_buf sys_write ↻ sys_munmap d_sj_emit

structs

none

consts

16const DJPATH: *u8 = "knowledge/status/ws_sync.jrnl"
17const DEBTPFX: *u8 = "knowledge/store/debt-"
18const DNL: i64 = 10
19const DTAB: i64 = 9
20const DHASH: i64 = 35
21const DZERO: i64 = 48
22const DNINE: i64 = 57
23const DCAP: i64 = 33554432 // 2026-08-06 MEASURED by nx_planefit: knowledge/store/debt- loads to 4,396,892B. At the old 1 MiB this organ silently lost 3,348,316B = 76% of the board, and because AN APPEND-ONLY PLANE PAST A PREFIX CAP LOSES ITS NEWEST ROWS FIRST it was reporting on the OLDEST quarter -- degrading exactly as new work arrived. 32 MiB matches nx_debt DB_CAP sizing. Re-verify: nx_planefit knowledge/store/debt- 33554432
24const DMAXEV: i64 = 6000
25const DSECDAY: i64 = 86400
26const DSECHR: i64 = 3600
27const DSECWK: i64 = 604800
28const DHTMLH: i64 = 104 // 'h'
29const DOUTCAP: i64 = 262144
30const DI64: i64 = 8
133const DSJ_ST_OTHER: i64 = 0
134const DSJ_ST_BUILD: i64 = 1
135const DSJ_ST_SHIPPED: i64 = 2
136const DSJ_ST_PROVE: i64 = 3
137const DSJ_ST_ADOPT: i64 = 4
138const DSJ_PCT: i64 = 100 // the x100 fixed point d_band_deploy already speaks

functions

32func d_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
33func d_p(s: *u8) -> i64 { sys_write(1, s, d_len(s)); return 0 }
called by 2: d_ship_joinmain calls 2: sys_writed_len
34func d_read(path: *u8, buf: *u8, cap: i64) -> i64
49func d_int(buf: *u8, a: i64, b: i64) -> i64
called by 3: d_ship_joinmainmain
56func d_span_eq(buf: *u8, a: i64, b: i64, c: i64, d: i64) -> i64
called by 2: mainmain
63func d_starts(buf: *u8, a: i64, b: i64, lit: *u8) -> i64
called by 2: d_hasmain calls 1: d_len
71func d_has(buf: *u8, a: i64, b: i64, lit: *u8) -> i64
called by 2: mainmain calls 2: d_lend_starts
83func d_num(v: i64) -> i64 { nxi_out(v); return 0 }
called by 2: d_ship_joinmain calls 1: nxi_out
86func d_band_deploy(per_week: i64) -> i64 { // per_week*100 (fixed-point x100 to keep integer)
called by 3: d_ship_joinmainmain
92func d_band_lead(hrs: i64) -> i64
called by 3: d_ship_joinmainmain
98func d_band_cfr(pct: i64) -> i64
called by 2: mainmain
103func d_band_label(b: i64) -> *u8
called by 3: d_ship_joinmainmain
140func d_sj_col(buf: *u8, ls: i64, le: i64, k: i64, sp: *i64) -> i64
called by 1: d_ship_join
158func d_sj_eq(buf: *u8, a: i64, b: i64, lit: *u8) -> i64
called by 2: d_ship_joinmain calls 1: d_len
166func d_sj_emit(buf: *u8, a: i64, b: i64) -> i64 { sys_write(1, ((buf as i64) + a) as *u8, b - a); return 0 }
called by 1: d_ship_join calls 1: sys_write
168func d_ship_join(path: *u8, days: i64) -> i64
335func main(argc: i64, argv: *i64) -> i64