code wiki / _hdl_build / nx_ecomat_page.nx
nx_ecomat_page.nx source
↩ module page · 21 lines · 1347 B
1// nx_ecomat_page.nx -- R2 PUBLISH: render the live maturity dashboard to HTML from the SOVEREIGN
2// store (knowledge/store/ecomat), organ-authored, no TSV/no JS. This is the "report to me on the
3// roadmap" surface -- it replaces the hand-edited "47%" with the measured 420 from the store.
4// Publish: stage web_assets/maturity.html -> pub_submit -> nx_pub_ship -> NAS, operator promotes to
5// /wiki/. argv[1]=store argv[2]=autonomy_log argv[3]=out_html. license_tier: ORIGINAL
6import "nx_ecomat_lib.nx"
7
8func main(argc: i64, argv: *i64) -> i64 {
9 var store: *u8 = ECOMAT_STORE
10 var autolog: *u8 = "knowledge/status/autonomy_meter.log" as *u8
11 var outhtml: *u8 = "web_assets/maturity.html" as *u8
12 if argc >= 2 { store = argv[1] as *u8 }
13 if argc >= 3 { autolog = argv[2] as *u8 }
14 if argc >= 4 { outhtml = argv[3] as *u8 }
15 let v: i64 = em_emit_page(store, autolog, outhtml)
16 if v < 0 { _p("ECOMAT-PAGE verdict=RED reason=no-store (run nx_ecomat_seed)\n" as *u8); sys_exit(101); return 101 }
17 _p("ECOMAT-PAGE wrote " as *u8); _p(outhtml); _p(" source=seg_store verdict=" as *u8)
18 if v == 0 { _p("GREEN (publish: pub_submit -> nx_pub_ship -> NAS, operator promotes to /wiki/)\n" as *u8) } else { _p("GREEN-with-LIAR-KILL (page written; footer flags the unbacked claim)\n" as *u8) }
19 sys_exit(0)
20 return 0
21}