code wiki / (root) / nx_market_ladder_lib.nx

nx_market_ladder_lib.nx

buildroot/runtime/nx_market_ladder_lib.nx

19498 B398 linesdepth 3pulls 3 transitivereach 59 importersview sourcekind librarytopic market
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_symdecl_lib.nx nx_market_ladder_lib.nx nx_compare_shared_fit_lib_20260910 nx_market_ladder.nx nx_market_ladder_gate.nx nx_swcompare_evidence_lib_t138.nx nx_swcompare_growth_candidate_2026 nx_swcompare_heading_lib_20260907. nx_swcompare_ladder_candidate.nx nx_swcompare_lib.nx nx_swcompare_preview_lib_t56.nx nx_swcompare_production_lib_202609

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

20const ML_ENTER: i64 = 0
21const ML_GROW_FIRST: i64 = 1
22const ML_HOLD: i64 = 2
23const ML_NO_REQUIREMENT: i64 = 3
24const ML_UNRESOLVED: i64 = 4
25const ML_PROSE: i64 = 0 - 1
26const ML_PIPE: i64 = 124
27const ML_NL: i64 = 10
28const ML_HASH: i64 = 35
29const ML_AT: i64 = 64
30const ML_COMMA: i64 = 44
31const ML_SPACE: i64 = 32
32const ML_SLASH: i64 = 47
33const 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
34const ML_SRC_ROOT_CAP: i64 = 16
35const ML_ABSENT_PREFIX: *u8 = "_ABSENT_:"
36const ML_ABSENT_PREFIX_LEN: i64 = 9
37const ML_F_RUNG_ID: i64 = 1
38const ML_F_RUNG_SYM: i64 = 3
39const ML_F_MATRIX_ORGAN: i64 = 1
40const ML_F_MATRIX_SYM: i64 = 2
41const ML_PATH_CAP: i64 = 1024
42const ML_SYM_CAP: i64 = 256
43const ML_OUT_CODE: i64 = 0
44const ML_OUT_REQUIRED: i64 = 1
45const ML_OUT_LANDED: i64 = 2
46const ML_OUT_BINDING_OFF: i64 = 3
47const ML_OUT_BINDING_LEN: i64 = 4
48const ML_OUT_UNRESOLVED: i64 = 5
49const ML_OUT_SLOTS: i64 = 8
50const ML_SLOT: i64 = 8
51const ML_PLAN_SUFFIX: *u8 = ".plan"
52const ML_MATRIX_SUFFIX: *u8 = ".matrix"
53const ML_PLAN_SUFFIX_LEN: i64 = 5
58const ML_TOK_GATE: *u8 = "gate:"
59const ML_TOK_GATE_LEN: i64 = 5
60const ML_TOK_ROWS: *u8 = "rows:"
61const ML_TOK_ROWS_LEN: i64 = 5
62const ML_HARNESS_JRNL: *u8 = "knowledge/status/harness.jrnl"
63const ML_HARNESS_F_NAME: i64 = 2
64const ML_HARNESS_F_VERDICT: i64 = 4
65const ML_TAB: i64 = 9
66const ML_ROOT_PROBE: *u8 = "buildroot/knowledge/compare/regen.list" // exists only when the CWD is the nishihost root
185const ML_UP: *u8 = "../"

functions

68func ml_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
70func ml_field(buf: *u8, s: i64, e: i64, idx: i64, box: *i64) -> i64
86func ml_span_same(a: *u8, ao: i64, an: i64, b: *u8, bo: i64, bn: i64) -> i64
92func ml_span_starts(buf: *u8, off: i64, len: i64, pfx: *u8) -> i64
100func ml_find_rung_sym(plan: *u8, n: i64, req: *u8, ido: i64, idn: i64, out: *i64) -> i64
121func ml_find_matrix_organ(mx: *u8, n: i64, sym: *u8, so: i64, sn: i64, out: *i64) -> i64
143func ml_span_cstr(buf: *u8, off: i64, len: i64, dst: *u8, cap: i64) -> i64
150func ml_sibling_matrix(plan_path: *u8, out: *u8, cap: i64) -> i64
called by 2: mainml_render_computed_html calls 1: ml_slen
169func ml_organ_path(orgc: *u8, out: *u8, cap: i64) -> i64
called by 1: ml_entry_verdict
186func ml_evidence_path(src: *u8, out: *u8, cap: i64) -> i64
195func ml_gate_green(name: *u8) -> i64
239func ml_rows_present(path: *u8) -> i64
263func ml_at_root() -> i64
269func ml_entry_verdict(matrix_path: *u8, plan_path: *u8, req: *u8, out: *i64) -> i64
345func ml_code_text(code: i64) -> *u8
354func ml_authored_code(verdict: *u8) -> i64
called by 1: main calls 2: ml_span_startsml_slen
360func 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 }
361func ml_wnfd(fd: i64, v: i64) -> i64
377func ml_render_computed_html(fd: i64, plan_path: *u8, req: *u8) -> i64
393func ml_agrees(authored: i64, computed: i64) -> i64
called by 1: main