code wiki / _hdl_build / nx_cms_draft_gate.nx
nx_cms_draft_gate.nx
buildroot/runtime/_hdl_build/nx_cms_draft_gate.nx
about
nx_cms_draft_gate.nx -- CMS C9 GATE (re-runnable, evidence-driven): draft-preview mode over real
HTTP against the real admin daemon. Proves the TEAM-AUTHORED _pe_draft lifecycle at the wire:
publish/discard with no draft are REFUSED 409 (the table's absent transitions), a saved draft
never touches the public page, preview is session-only and sanitized, promote goes live atomically,
discard leaves the publish intact. Appends "CMSGATE row=nx_cms_draft ... verdict=PASS|FAIL" to
knowledge/status/cms_gate.log (the Warden board's C9 evidence row). Exit 0 iff all rows pass.
license_tier: ORIGINAL
dependencies 5 imports · 0 importers
imports: nx_cms_store.nxnx_connect.nxnx_sha256.nxnx_syscalls.nxnx_kill_portable.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 14 | const CD_PORT: i64 = 8081 |
| 15 | const CD_SITE: *u8 = "/tmp/_cms_draft_site" |
functions
| 17 | func cd_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 18 | func cd_len(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 19 | func cd_cat(dst: *u8, off: i64, s: *u8) -> i64 |
| 25 | func cd_catn(dst: *u8, off: i64, s: *u8, n: i64) -> i64 |
| 31 | func cd_index(hay: *u8, n: i64, needle: *u8) -> i64 |
| 43 | func cd_has(hay: *u8, n: i64, needle: *u8) -> i64 { if cd_index(hay, n, needle) >= 0 { return 1 } return 0 } |
| 45 | func cd_http(req: *u8, rl: i64, resp: *u8, cap: i64) -> i64 called by 1: main calls 7: sys_socketsys_mmapnx_connect_boundedsys_closesys_writesys_set_socket_timeout+1 |
| 79 | func cd_post(req: *u8, path: *u8, cookie: *u8, body: *u8) -> i64 |
| 101 | func cd_get(req: *u8, path: *u8, cookie: *u8) -> i64 |
| 114 | func cd_row(id: i64, ok: i64, what: *u8) -> i64 |
| 124 | func cd_mkdir(path: *u8, mode: i64) -> i64 |
| 130 | func main() -> i64 |