nx_wflow_evidence_gate_t229.nx source
↩ module page · 16 lines · 813 B
1// Regression for release workflow evidence failure. Uses only a probe action.
2// Existing directory /tmp is deliberately not a writable ledger file.
3// No deployment, provider call, message, or production data mutation.
4import "nx_wflow_engine.nx"
5func main() -> i64 {
6 let steps: *i64=sys_mmap(8) as *i64
7 let cx: *i64=sys_mmap(64) as *i64
8 steps[0]="release|1|probe-fail|-|1|1" as *u8 as i64
9 cx[0]=steps as i64;cx[1]=1;cx[2]="/tmp" as *u8 as i64
10 cx[3]=0;cx[4]=0;cx[5]=0;cx[6]=0;cx[7]=0
11 let rc: i64=wf_run_from(cx,"unwritable-ledger-test","release",0)
12 p("RELEASE-WORKFLOW evidence-unavailable returned=");pn(rc);p("\n")
13 if rc>=0 {p("FAIL: workflow reported completed steps despite unavailable ledger\n");return 1}
14 p("PASS: unavailable required evidence prevents successful workflow result\n")
15 return 0
16}