nx_market_ladder_lib.nx
buildroot/runtime/nx_market_ladder_lib.nx
about
nx_market_ladder_lib.nx -- THE MARKET-ENTRY VERDICT AS ONE RULER (2026-08-24, /compare PT6: ml_entry_verdict).
license_tier: ORIGINAL No hw writes (Rule 26). LIB (no main).
THE OPERATOR ASK (2026-08-24): the ecosystem establishes best-in-class per rung (hobbyist -> small business ->
market leader -> innovation -> research) and says ENTER, HOLD or GROW-FIRST ITSELF. A ladder row in <dom>.plan
carries its narrative in prose and its REQUIREMENT as data: a 7th field naming the rung ids that must be LANDED
before that level is entered (ladder|level|best|have|grow|verdict|requires). This lib resolves each required
rung id -> its symbol (the plan's rung row) -> the organ that must carry it (the matrix row with that symbol,
`_ABSENT_:` stripped) -> declared or not, by THE ONE SYMBOL RULER (nx_symdecl_lib sd_declared, the same
function the page, the watch plane and the ranker use), so the verdict cannot disagree with the page.
all required rungs landed -> ENTER / some -> GROW-FIRST (binding = the first rung not landed) / none -> HOLD
empty requires -> NO-REQUIREMENT (the level is open by construction, e.g. hobbyist)
a rung id with no rung row, or a symbol with no matrix row -> UNRESOLVED (the plan and matrix disagree: named,
never guessed, never silently ENTER)
Both the generator (nx_swcompare_lib plan_pass) and the CLI (nx_market_ladder) call ml_verdict, so the page and
the command line prove the same code.
dependencies 2 imports · 11 importers
diagram shows first 10 each side; +0 more imports, +1 more importers in the complete lists below.
imports: nx_syscalls.nxnx_symdecl_lib.nx
imported by: nx_compare_shared_fit_lib_20260910.nxnx_market_ladder.nxnx_market_ladder_gate.nxnx_swcompare_evidence_lib_t138.nxnx_swcompare_growth_candidate_20260910.nxnx_swcompare_heading_lib_20260907.nxnx_swcompare_ladder_candidate.nxnx_swcompare_lib.nxnx_swcompare_preview_lib_t56.nxnx_swcompare_production_lib_20260907.nxnx_swcompare_release_candidate.nx
structs
| none |
consts
| 20 | const ML_ENTER: i64 = 0 |
| 21 | const ML_GROW_FIRST: i64 = 1 |
| 22 | const ML_HOLD: i64 = 2 |
| 23 | const ML_NO_REQUIREMENT: i64 = 3 |
| 24 | const ML_UNRESOLVED: i64 = 4 |
| 25 | const ML_PROSE: i64 = 0 - 1 |
| 26 | const ML_PIPE: i64 = 124 |
| 27 | const ML_NL: i64 = 10 |
| 28 | const ML_HASH: i64 = 35 |
| 29 | const ML_AT: i64 = 64 |
| 30 | const ML_COMMA: i64 = 44 |
| 31 | const ML_SPACE: i64 = 32 |
| 32 | const ML_SLASH: i64 = 47 |
| 33 | const ML_SRC_ROOT: *u8 = "buildroot/" // matrix organ paths are RELATIVE TO buildroot/ (the two-trees law) -- the same prefix nx_compare_rank's rk_measure applies |
| 34 | const ML_SRC_ROOT_CAP: i64 = 16 |
| 35 | const ML_ABSENT_PREFIX: *u8 = "_ABSENT_:" |
| 36 | const ML_ABSENT_PREFIX_LEN: i64 = 9 |
| 37 | const ML_F_RUNG_ID: i64 = 1 |
| 38 | const ML_F_RUNG_SYM: i64 = 3 |
| 39 | const ML_F_MATRIX_ORGAN: i64 = 1 |
| 40 | const ML_F_MATRIX_SYM: i64 = 2 |
| 41 | const ML_PATH_CAP: i64 = 1024 |
| 42 | const ML_SYM_CAP: i64 = 256 |
| 43 | const ML_OUT_CODE: i64 = 0 |
| 44 | const ML_OUT_REQUIRED: i64 = 1 |
| 45 | const ML_OUT_LANDED: i64 = 2 |
| 46 | const ML_OUT_BINDING_OFF: i64 = 3 |
| 47 | const ML_OUT_BINDING_LEN: i64 = 4 |
| 48 | const ML_OUT_UNRESOLVED: i64 = 5 |
| 49 | const ML_OUT_SLOTS: i64 = 8 |
| 50 | const ML_SLOT: i64 = 8 |
| 51 | const ML_PLAN_SUFFIX: *u8 = ".plan" |
| 52 | const ML_MATRIX_SUFFIX: *u8 = ".matrix" |
| 53 | const ML_PLAN_SUFFIX_LEN: i64 = 5 |
| 58 | const ML_TOK_GATE: *u8 = "gate:" |
| 59 | const ML_TOK_GATE_LEN: i64 = 5 |
| 60 | const ML_TOK_ROWS: *u8 = "rows:" |
| 61 | const ML_TOK_ROWS_LEN: i64 = 5 |
| 62 | const ML_HARNESS_JRNL: *u8 = "knowledge/status/harness.jrnl" |
| 63 | const ML_HARNESS_F_NAME: i64 = 2 |
| 64 | const ML_HARNESS_F_VERDICT: i64 = 4 |
| 65 | const ML_TAB: i64 = 9 |
| 66 | const ML_ROOT_PROBE: *u8 = "buildroot/knowledge/compare/regen.list" // exists only when the CWD is the nishihost root |
| 185 | const ML_UP: *u8 = "../" |
functions
| 68 | func ml_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 70 | func ml_field(buf: *u8, s: i64, e: i64, idx: i64, box: *i64) -> i64 |
| 86 | func ml_span_same(a: *u8, ao: i64, an: i64, b: *u8, bo: i64, bn: i64) -> i64 |
| 92 | func ml_span_starts(buf: *u8, off: i64, len: i64, pfx: *u8) -> i64 called by 6: mainml_find_rung_symml_find_matrix_organml_gate_greenml_entry_verdictml_authored_code calls 1: ml_slen |
| 100 | func ml_find_rung_sym(plan: *u8, n: i64, req: *u8, ido: i64, idn: i64, out: *i64) -> i64 |
| 121 | func ml_find_matrix_organ(mx: *u8, n: i64, sym: *u8, so: i64, sn: i64, out: *i64) -> i64 called by 9: sl_loadml_entry_verdictsl_loadmainsl_loadsl_load+3 calls 4: sys_mmapml_fieldml_span_startsml_span_same |
| 143 | func ml_span_cstr(buf: *u8, off: i64, len: i64, dst: *u8, cap: i64) -> i64 |
| 150 | func ml_sibling_matrix(plan_path: *u8, out: *u8, cap: i64) -> i64 |
| 169 | func ml_organ_path(orgc: *u8, out: *u8, cap: i64) -> i64 called by 1: ml_entry_verdict |
| 186 | func ml_evidence_path(src: *u8, out: *u8, cap: i64) -> i64 |
| 195 | func ml_gate_green(name: *u8) -> i64 called by 1: ml_entry_verdict calls 7: sys_mmapml_evidence_pathsys_read_fileml_slenml_span_sameml_span_starts+1 |
| 239 | func ml_rows_present(path: *u8) -> i64 |
| 263 | func ml_at_root() -> i64 |
| 269 | func ml_entry_verdict(matrix_path: *u8, plan_path: *u8, req: *u8, out: *i64) -> i64 called by 2: mainml_render_computed_html calls 12: ml_slensys_mmapsys_read_fileml_span_startsml_span_cstrml_gate_green+6 |
| 345 | func ml_code_text(code: i64) -> *u8 |
| 354 | func ml_authored_code(verdict: *u8) -> i64 |
| 360 | func ml_wfd(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 } |
| 361 | func ml_wnfd(fd: i64, v: i64) -> i64 |
| 377 | func ml_render_computed_html(fd: i64, plan_path: *u8, req: *u8) -> i64 |
| 393 | func ml_agrees(authored: i64, computed: i64) -> i64 called by 1: main |