code wiki / _hdl_build / nx_eco_scorecard.nx
nx_eco_scorecard.nx
buildroot/runtime/_hdl_build/nx_eco_scorecard.nx
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
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
structs
| none |
consts
| 24 | const SC_MAGIC_3900: i64 = 3900 |
| 25 | const SC_MAGIC_131072: i64 = 131072 |
| 26 | const SC_MAGIC_4096: i64 = 4096 |
| 27 | const SC_MAGIC_262144: i64 = 262144 |
| 29 | const SC_PLANE_CAP: i64 = 1048576 |
| 31 | const SC_LOC_PER_ORGAN: i64 = 120 // disclosed constant: mean source lines per organ (audit by re-measuring) |
| 32 | const SC_DEV_MIN_PER_LOC: i64 = 30 // SonarQube DEFAULT cost-to-develop-one-line, in minutes (external constant) |
| 33 | const SC_MIN_PER_SEV_OPEN: i64 = 240 // disclosed: half a day to ROOT one open workaround class, per severity point |
| 34 | const SC_MIN_PER_SEV_MIT: i64 = 60 // disclosed: residual hour per severity point once mitigated |
| 35 | const SC_DUP_GATE_PERMIL: i64 = 30 // SonarQube duplicated-code quality gate = 3 percent |
functions
| 37 | func sc_puts(s: *u8) -> i64 { return sj_puts(s) } |
| 38 | func sc_cat(o: *u8, at: i64, s: *u8) -> i64 { return sj_cat(o, at, s) } |
| 39 | func 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 |
| 40 | func sc_catn(o: *u8, at: i64, v: i64) -> i64 { return sj_catn(o, at, v) } |
| 41 | func sc_count(buf: *u8, n: i64, needle: *u8) -> i64 called by 1: main |
| 55 | func sc_split(buf: *u8, ls: i64, lend: i64, fs: *i64, fl: *i64, maxf: i64) -> i64 called by 1: main |
| 69 | func sc_atoi(buf: *u8, s: i64, n: i64) -> i64 called by 1: main |
| 75 | func 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 |
| 76 | func 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 |
| 78 | func sc_walk_nx(p: *u8, pn: i64, depth: i64) -> i64 called by 2: sc_walk_nxmain calls 10: sys_openat_rdsys_mmapsys_getdents64dirent_typedirent_namesc_isdotdot+4 |
| 110 | func main() -> i64 |