code wiki / _hdl_build / nx_work_predict_lib.nx

nx_work_predict_lib.nx

buildroot/runtime/_hdl_build/nx_work_predict_lib.nx

9238 B240 linesdepth 3pulls 3 transitivereach 2 importersview sourcekind librarytopic work
docsdependenciesstructsconstsfunctions

about

nx_work_predict_lib.nx -- the FUTURE axis: GENEALOGY-grounded prediction of what work grows next. Reads capability_ladder.tsv (itself COMPUTED from real deps+DONE status -- "NOT asserted", so it is already a non-hallucinated source) and finds the ADJACENT-POSSIBLE frontier: a capability whose status is not DONE but ALL of its prerequisites ARE DONE -- i.e. the parent just got built, so this node is the next thing that can grow "out from god". Prediction as DATA, never prose from a model: every prediction is a row whose deps are mechanically verified DONE, with the WHY = which prerequisite unlocked it. (per author-by-organ-not-claude + no-wave-measured-exceed.) columns of capability_ladder.tsv: layer<TAB>id<TAB>status<TAB>grounding<TAB>deps (deps "-" or a,b,c) REUSE (DRY): jx_find / jx_len from nx_json_lib. Sovereign. license_tier: ORIGINAL

dependencies 2 imports · 2 importers

nx_syscalls.nx nx_json_lib.nx nx_work_predict_lib.nx nx_work_predict.nx nx_work_predict_gate.nx

imports: nx_syscalls.nxnx_json_lib.nx

imported by: nx_work_predict.nxnx_work_predict_gate.nx

structs

none

consts

13const WP_MAGIC_1024: i64 = 1024
15const WP_DONE: i64 = 0 // status already DONE -> not a prediction
16const WP_ADJACENT: i64 = 1 // not DONE, has real dep(s), ALL deps DONE -> probable-next (the gold)
17const WP_ROOT: i64 = 2 // not DONE, deps "-" -> foundational-available (no parent to grow from)
18const WP_BLOCKED: i64 = 3 // not DONE, some dep NOT DONE -> still blocked, not yet predictable
20const WP_MAXADJ: i64 = 1024
21const WP_IDCAP: i64 = 96
22const WP_DONECAP: i64 = 262144

functions

24func wp_streq(a: *u8, b: *u8) -> i64
33func wp_cat(dst: *u8, off: i64, s: *u8) -> i64 { var o: i64 = off; var i: i64 = 0; while s[i] != (0 as u8) { dst[o] = s[i]; o = o + 1; i = i + 1 } return o }
called by 1: wp_predict
34func wp_catn(dst: *u8, off: i64, v: i64) -> i64
called by 1: wp_predict calls 1: sys_mmap
46func wp_is_done(doneset: *u8, donelen: i64, id: *u8) -> i64
called by 1: wp_classify calls 3: sys_mmapjx_lenjx_find
59func wp_classify(status: *u8, deps: *u8, doneset: *u8, donelen: i64) -> i64
92func wp_field(buf: *u8, ls: i64, le: i64, k: i64, out: *u8, outcap: i64) -> i64
111func wp_atoi(s: *u8) -> i64
called by 1: wp_predict
118func wp_first_dep(deps: *u8, out: *u8) -> i64
called by 1: wp_predict
130func wp_build_doneset(buf: *u8, len: i64, ds: *u8, dscap: i64) -> i64
called by 1: wp_predict calls 3: sys_mmapwp_fieldwp_streq
158func wp_predict(buf: *u8, len: i64, out: *u8, outcap: i64, stats: *i64) -> i64