code wiki / _hdl_build / nx_crew_scribe_test.nx

nx_crew_scribe_test.nx source

↩ module page · 18 lines · 1292 B

1// nx_crew_scribe_test.nx -- show the areas handing DELIVERABLES to each other, each documented 2// by the SCRIBE as one parseable line (fixed schema, clear symbols). A self-heal conversation: 3// conductor asks doctor to build -> doctor delivers to engineer -> engineer detects BAD -> 4// doctor re-heals -> engineer verifies OK -> council admits. Then we PARSE the log ourselves. 5 6import "nx_crew_scribe.nx" 7 8func main() -> i64 { 9 let seq: *i64 = sys_mmap(8) as *i64; seq[0] = 0 10 scribe(seq, ORG_CONDUCTOR, ORG_DOCTOR, K_BUILD, V_OK, "worker-build" as *u8, "regenerate a fresh build" as *u8) 11 scribe(seq, ORG_DOCTOR, ORG_ENGINEER, K_HEAL, V_HEALED, "worker-build" as *u8, "fresh build ready -- verify it" as *u8) 12 scribe(seq, ORG_ENGINEER, ORG_DOCTOR, K_DETECT, V_BAD, "worker-run" as *u8, "canary caught a broken build" as *u8) 13 scribe(seq, ORG_DOCTOR, ORG_ENGINEER, K_HEAL, V_HEALED, "worker-build" as *u8, "rebuilt fresh, try again" as *u8) 14 scribe(seq, ORG_ENGINEER, ORG_COUNCIL, K_VERIFY, V_OK, "worker-run" as *u8, "ran clean, self-verified each beat" as *u8) 15 scribe(seq, ORG_COUNCIL, ORG_CONDUCTOR,K_ADMIT, V_OK, "worker-run" as *u8, "admitted -- ready for review" as *u8) 16 sys_exit(0) 17 return 0 18}