code wiki / _hdl_build / nx_ciq_submit.nx
nx_ciq_submit.nx source
↩ module page · 38 lines · 3241 B
1// nx_ciq_submit.nx -- routes the S-class-verified CIQ bundle THROUGH THE PUBLISHER (operator: "pass to the
2// publisher who should opaque gate it behind the family level"). Calls pub_submit (the no-bypass LAW intake)
3// for each artifact with a dest under the FAMILY-GATED route prefix /wiki/family/ (opaque gate = authz
4// level>=2 on that prefix, the recon's building block) so the analysis parses out to the wiki engine behind
5// family auth, NOT public. Policy "outward" => the publisher's governed loop HOLDS at stage until the operator
6// approval token exists (the "publish" authorization checkpoint) -> no direct/unapproved push, by construction.
7// Pre-req: run nx_ciq_publish (emits the bundle) + nx_ciq_sclass_gate GREEN first. license_tier: ORIGINAL expect_exit: 0
8import "nx_syscalls.nx"
9import "nx_publisher.nx"
10
11func cw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
12func cn(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)} let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1} sys_write(1,bb,k); return 0 }
13
14// submit one artifact through the publisher LAW; print + return 1 ok.
15func sub(src: *u8, dest: *u8) -> i64 {
16 let r: i64 = pub_submit(src, dest, "nishifamily" as *u8, "ws_ciq" as *u8, "outward" as *u8)
17 cw(" pub_submit " as *u8); cw(src); cw(" -> " as *u8); cw(dest); cw(" rc=" as *u8); cn(r)
18 if r == 1 { cw(" [QUEUED]\n" as *u8); return 1 }
19 cw(" [FAIL]\n" as *u8); return 0
20}
21
22func main() -> i64 {
23 cw("=== nx_ciq_submit -- routing CIQ bundle through the publisher to the FAMILY-GATED wiki (/wiki/family/) ===\n" as *u8)
24 var ok: i64 = 0; var tot: i64 = 0
25 tot=tot+1; ok=ok+sub("knowledge/staging/ciq_report.html" as *u8, "/wiki/family/ciq.html" as *u8)
26 tot=tot+1; ok=ok+sub("knowledge/staging/ciq_report_ai.md" as *u8, "/wiki/family/ciq_ai.md" as *u8)
27 tot=tot+1; ok=ok+sub("knowledge/staging/ciq_report_machine.nxr" as *u8, "/wiki/family/ciq_machine.nxr" as *u8)
28 tot=tot+1; ok=ok+sub("knowledge/staging/ciq_connect_quadrant.html" as *u8, "/wiki/family/ciq_connect_quadrant.html" as *u8)
29 tot=tot+1; ok=ok+sub("knowledge/staging/ciq_imagegen_quadrant.html" as *u8, "/wiki/family/ciq_imagegen_quadrant.html" as *u8)
30 tot=tot+1; ok=ok+sub("knowledge/staging/ciq_games_quadrant.html" as *u8, "/wiki/family/ciq_games_quadrant.html" as *u8)
31 tot=tot+1; ok=ok+sub("knowledge/staging/ciq_omniforge_quadrant.html" as *u8, "/wiki/family/ciq_omniforge_quadrant.html" as *u8)
32 tot=tot+1; ok=ok+sub("knowledge/staging/ciq_clinical_quadrant.html" as *u8, "/wiki/family/ciq_clinical_quadrant.html" as *u8)
33
34 cw("CIQ-SUBMIT queued=" as *u8); cn(ok); cw("/" as *u8); cn(tot)
35 cw(" policy=outward (governed loop HOLDS at stage until operator approval token = the 'publish' checkpoint; no direct push, by construction)\n" as *u8)
36 if ok == tot { cw("CIQ-SUBMIT verdict=GREEN (all artifacts queued to the publisher, family-gated)\n" as *u8); sys_exit(0); return 0 }
37 cw("CIQ-SUBMIT verdict=RED (a submit failed)\n" as *u8); sys_exit(1); return 1
38}