code wiki / _hdl_build / nx_research_pipeline.nx

nx_research_pipeline.nx source

↩ module page · 46 lines · 2766 B

1// nx_research_pipeline.nx -- the governed research->task loop, fully wired (the deterministic next 2// move the layered backlog named). A finding only becomes a BUILD TASK if it survives BOTH gates: 3// GATE 1 (RESEARCHER): cross-source 3-vote adversarial verify -> CONFIRMED? 4// GATE 2 (CRITIC): scientific evaluation -> not REFUTED by a counter-theory, and actually 5// RED-TEAMED (not a blind spot)? 6// This is a LAYERED DEFENCE: the Critic is the DEEPER gate that catches what the Researcher's 7// source-agreement passed -- e.g. PSNR-as-quality is researcher-CONFIRMED (everyone uses it) yet 8// critic-REFUTED (Blau-Michaeli counter-theory), so it is correctly REJECTED. Dispositions: 9// TASK -> survived both gates + actionable -> placed at its layer for the backlog. 10// FLAG_REDTEAM -> confirmed but never red-teamed (a blind spot) -> Researcher hunts counter first. 11// REJECT -> researcher-unconfirmed or critic-refuted -> recorded, never built. 12// Then the surviving tasks feed nx_layered_backlog: the Conductor dispatches the deepest-layer 13// parallel batch. RACI: Researcher verifies, Critic red-teams, Conductor dispatches, Builder builds. 14// license_tier: ORIGINAL 15 16import "nx_researcher.nx" 17import "nx_critic.nx" 18import "nx_layered_backlog.nx" 19 20const RP_TASK: i64 = 1 21const RP_FLAG_REDTEAM: i64 = 2 22const RP_REJECT: i64 = 3 23 24// the integrated disposition for one finding (both gates). 25func rp_disposition(cv: i64, rv: i64, reproductions: i64, counters: i64, redteamed: i64, actionable: i64) -> i64 { 26 if res_verify(cv, rv) != RES_CONFIRMED { return RP_REJECT } // gate 1 failed 27 if crit_status(reproductions, counters, redteamed) == CRIT_REFUTED { return RP_REJECT } // gate 2: counter-theory wins 28 if crit_is_blindspot(reproductions, redteamed) == 1 { return RP_FLAG_REDTEAM } // gate 2: not red-teamed yet 29 if actionable == 1 { return RP_TASK } 30 return RP_REJECT 31} 32 33// run the pipeline over n findings: emit the surviving TASKS' layers into task_layer[] (for the 34// backlog) and count dispositions. Returns the task count; flags/rejects returned via out params. 35func rp_run(n: i64, cv: *i64, rv: *i64, repro: *i64, counters: *i64, redteamed: *i64, actionable: *i64, layer: *i64, task_layer: *i64, counts: *i64) -> i64 { 36 var nt: i64 = 0; var nf: i64 = 0; var nr: i64 = 0; var i: i64 = 0 37 while i < n { 38 let d: i64 = rp_disposition(cv[i], rv[i], repro[i], counters[i], redteamed[i], actionable[i]) 39 if d == RP_TASK { task_layer[nt] = layer[i]; nt = nt + 1 } 40 if d == RP_FLAG_REDTEAM { nf = nf + 1 } 41 if d == RP_REJECT { nr = nr + 1 } 42 i = i + 1 43 } 44 counts[0] = nt; counts[1] = nf; counts[2] = nr 45 return nt 46}