code wiki / _hdl_build / nx_gonogo.nx
nx_gonogo.nx
buildroot/runtime/_hdl_build/nx_gonogo.nx
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
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
structs
| none |
consts
| 36 | const GG_GO: i64 = 0 |
| 37 | const GG_NOGO: i64 = 1 |
| 38 | const GG_BLOCKED: i64 = 2 |
| 39 | const GG_UNKNOWN: i64 = 0 - 1 |
| 40 | const GG_BUF: i64 = 65536 |
functions
| 43 | func 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 |
| 62 | func gg_thresh(buf: *u8, n: i64, id: *u8, scratch: *u8, dflt: i64) -> i64 |
| 76 | func gg_word(v: i64) -> *u8 called by 1: main |
| 82 | func gg_reason(out: *u8, o: i64, k: *i64) -> i64 |
| 98 | func main(argc: i64, argv: *i64) -> i64 |