code wiki / _hdl_build / nx_gonogo.nx

nx_gonogo.nx

buildroot/runtime/_hdl_build/nx_gonogo.nx

9495 B170 linesdepth 8pulls 11 transitivereach 1 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_gonogo.nx -- THE dmkt CAPSTONE (F317 / milestone M9): the GO / NO-GO decision gate. The lane's charter claims a CLOSED idea-to-market loop. Without this organ the loop was open: nx_product_score could score CAPABILITY COVERAGE but had no economics, and nx_sourcing_path could price a sourcing mix but had no verdict. This joins them. ★★THE DESIGN HINGES ON A THIRD VERDICT. A gate that can only answer GO or NO-GO **will fabricate**: asked to decide with a missing input it must invent one, and the invented one is always the one nobody can check. So the verdict space is GO | NO-GO | BLOCKED-ON-EVIDENCE, and the blocked state NAMES the evidence it lacks. This is the operator's no-fake-numbers law expressed as control flow rather than as a comment. ★★THE ASYMMETRY IS THE WHOLE VALUE. Missing evidence blocks a GO but must NEVER block a NO-GO. A product whose priced mix loses money is rejectable TODAY, with no demand study, no market research and no propensity model -- you do not need to know how many people want a thing to know you cannot afford to make it. Checking hard failures FIRST is what stops this gate degenerating into a permanently-blocked oracle that answers nothing. Cheap disqualification is a feature. DATA, NOT CODE (rule 11): every threshold is a plane row. There is not one hardcoded bar here. `gonogothresh-` : <id> TAB <label> TAB <value> margin_floor_permil | domestic_floor_permil | risk_ceiling | coverage_floor_permil `demand-` : ANY row = demand evidence exists. ZERO rows = the demand gate is BLIND. Set a threshold to 0 to disable that gate deliberately -- an explicit, auditable waiver. Composes nx_sourcing_path (which composes nx_landed_cost) -- one duty implementation, one mix pricer, no copies. Target-imports-target is proven and gated by nx_lcimport_test. VERBS: nx_gonogo verdict <bomprefix> <units> <unitprice_c> <ocean01> <pref01> <incprefix> <threshprefix> <demandprefix> [coverage_permil|-1] nx_gonogo selftest license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 3 imports · 1 importers

nx_syscalls.nx nx_sourcing_path.nx nx_evidence.nx nx_gonogo.nx nx_gonogo_gate.nx

imports: nx_syscalls.nxnx_sourcing_path.nxnx_evidence.nx

imported by: nx_gonogo_gate.nx

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

main spw sys_write lc_eq 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 ↻ lc_atoi sp_inc_permil sp_rowcount sp_row_start sp_num lc_extract lc_atoi ↻ ev_count sys_mmap ↻ ev_admit sys_mmap ↻ sp_rowcount ↻ sp_row_start ↻ lc_extract ↻ lc_eq ↻ sp_num ↻ sg_score_permil sg_valid sg_rel_permil sg_cred_permil sg_party_permil

structs

none

consts

36const GG_GO: i64 = 0
37const GG_NOGO: i64 = 1
38const GG_BLOCKED: i64 = 2
39const GG_UNKNOWN: i64 = 0 - 1
40const GG_BUF: i64 = 65536

functions

43func gg_decide(margin: i64, margin_floor: i64, risk: i64, risk_ceil: i64, cov: i64, cov_floor: i64, dom: i64, dom_floor: i64, demand_rows: i64, k: *i64) -> i64
called by 2: mainmain
62func gg_thresh(buf: *u8, n: i64, id: *u8, scratch: *u8, dflt: i64) -> i64
76func gg_word(v: i64) -> *u8
called by 1: main
82func gg_reason(out: *u8, o: i64, k: *i64) -> i64
called by 1: main calls 1: lc_lit
98func main(argc: i64, argv: *i64) -> i64