code wiki / _hdl_build / nx_eco_scorecard.nx

nx_eco_scorecard.nx

buildroot/runtime/_hdl_build/nx_eco_scorecard.nx

18446 B318 linesdepth 5pulls 8 transitivereach 0 importersview sourcekind tooltopic eco
docsdependenciesstructsconstsfunctions

about

nx_eco_scorecard.nx -- SOVEREIGN ECOSYSTEM HEALTH SCORECARD, graded against the REAL industry battery (operator 2026-07-20: "industry benchmarking of ecosystems ... sovereign versions of state of the art tooling ... proper non navel gazing grading and evidence, from god up"). This is our own implementation of what SonarQube/SQALE, OpenSSF Scorecard, CISQ ISO/IEC 5055 and ISO/IEC 25010 do -- zero third-party, all integer. ANTI-FLATTERY BY CONSTRUCTION: the HEADLINE is benchmark_coverage_permil = how much of the external battery we have actually BUILT sovereignly (HAVE=2, PARTIAL=1, GAP=0), NOT a letter grade. A good letter on a battery we barely implement is navel-gazing, so the letter never travels without its coverage. Every threshold cited is the PUBLISHED external one, carried as DATA in knowledge/registry/ecosystem_benchmarks.tsv (rule 11), never in code. SQALE (SonarQube): td_ratio = remediation / (30 min per LOC x LOC); A<=50 B<=100 C<=200 D<=500 E>500 permil Duplication gate: SonarQube quality gate <=3pct (30 permil) duplicated code OpenSSF Scorecard: 18 checks x 0-10, aggregate = risk-weighted (Critical 10 / High 7.5 / Med 5 / Low 2.5) SCOPE = the from-god atlas lineage: organ_count is SELF-MEASURED by walking the live source tree, so the denominator is the real ecosystem, not a flattering subset. Fails closed: no manifest -> RED, no grade without data. NATIVE INFORMATION MANAGEMENT (2026-07-20): the battery, the OpenSSF check map and the ricketiness classes are read from sovereign SEG-STORE PLANES (knowledge/store/ecobench- · openssf- · favela-), NOT from .tsv files -- the standing "no tsv, nishi formats" law. Migrated losslessly + round-trip-verified by nx_tsv_migrate. license_tier: ORIGINAL expect_exit: 0

dependencies 5 imports · 0 importers

nx_sovjson_lib.nx nx_store_seed_lib.nx nx_seg_store.nx nx_syscalls.nx nx_estate_path.nx nx_eco_scorecard.nx

imports: nx_sovjson_lib.nxnx_store_seed_lib.nxnx_seg_store.nxnx_syscalls.nxnx_estate_path.nx

imported by: nobody (leaf or entry point)

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

main ep_anchor sys_openat_rd sys_close sys_chdir 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 ↻ sys_mmap ↻ sts_load sts_gen_note sts_pfxhash ss_max_segid sys_mmap ↻ ss_cat ss_readall sys_openat_rd ↻ sys_lseek sys_mmap ↻ sys_read sys_close ↻ ss_segid_ok ss_open_cached ssc_init sys_mmap ↻ ssc_sig_of ss_cat ↻ sys_fstatat

structs

none

consts

24const SC_MAGIC_3900: i64 = 3900
25const SC_MAGIC_131072: i64 = 131072
26const SC_MAGIC_4096: i64 = 4096
27const SC_MAGIC_262144: i64 = 262144
29const SC_PLANE_CAP: i64 = 1048576
31const SC_LOC_PER_ORGAN: i64 = 120 // disclosed constant: mean source lines per organ (audit by re-measuring)
32const SC_DEV_MIN_PER_LOC: i64 = 30 // SonarQube DEFAULT cost-to-develop-one-line, in minutes (external constant)
33const SC_MIN_PER_SEV_OPEN: i64 = 240 // disclosed: half a day to ROOT one open workaround class, per severity point
34const SC_MIN_PER_SEV_MIT: i64 = 60 // disclosed: residual hour per severity point once mitigated
35const SC_DUP_GATE_PERMIL: i64 = 30 // SonarQube duplicated-code quality gate = 3 percent

functions

37func sc_puts(s: *u8) -> i64 { return sj_puts(s) }
called by 1: main calls 1: sj_puts
38func sc_cat(o: *u8, at: i64, s: *u8) -> i64 { return sj_cat(o, at, s) }
called by 1: main calls 1: sj_cat
39func sc_catf(o: *u8, at: i64, p: *u8, n: i64) -> i64 { var i: i64=0; var a: i64=at; while i<n { o[a]=p[i]; a=a+1; i=i+1 } return a }
called by 1: main
40func sc_catn(o: *u8, at: i64, v: i64) -> i64 { return sj_catn(o, at, v) }
called by 1: main calls 1: sj_catn
41func sc_count(buf: *u8, n: i64, needle: *u8) -> i64
called by 1: main
55func sc_split(buf: *u8, ls: i64, lend: i64, fs: *i64, fl: *i64, maxf: i64) -> i64
called by 1: main
69func sc_atoi(buf: *u8, s: i64, n: i64) -> i64
called by 1: main
75func sc_isdotdot(nm: *u8) -> i64 { if nm[0]==(46 as u8){ if nm[1]==(0 as u8){return 1} if nm[1]==(46 as u8){ if nm[2]==(0 as u8){return 1} } } return 0 }
called by 1: sc_walk_nx
76func sc_join(buf: *u8, base_n: i64, name: *u8) -> i64 { buf[base_n]=47 as u8; var o: i64=base_n+1; var i: i64=0; while name[i]!=(0 as u8){buf[o]=name[i];o=o+1;i=i+1} return o }
called by 1: sc_walk_nx
78func sc_walk_nx(p: *u8, pn: i64, depth: i64) -> i64
110func main() -> i64