nx_compare_preview_effect_gate_t56.nx source
↩ module page · 18 lines · 1624 B
1// ORIGINAL. Tests the private preview projection against retained real reference bytes; no publishing call.
2import "nx_swcompare_preview_matrix_t56.nx"
3import "nx_gate_verdict.nx"
4func main(argc:i64,argv:*i64)->i64 {
5 let ctr:*i64=gv_ctr();gv_head("COMPARE-PREVIEW-EFFECT-CONTRACT" as *u8)
6 sc_preview_projection=1
7 gv_check("preview context selected" as *u8,sc_preview_projection==1,ctr)
8 gv_check("retained real RFC mirror equals existing public bytes" as *u8,rp_existing_identical("knowledge/fetched/cmp_comms_rfc9420.html" as *u8,"comms" as *u8)==1,ctr)
9 gv_check("preview gated resolver keeps verified existing link" as *u8,rp_publish_gated("knowledge/fetched/cmp_comms_rfc9420.html" as *u8,"comms" as *u8,"published-standard" as *u8)==1,ctr)
10 gv_check("missing mirror produces no asserted link" as *u8,rp_publish_gated("knowledge/fetched/absent-preview-contract-t56.html" as *u8,"comms" as *u8,"published-standard" as *u8)==0,ctr)
11 gv_check("invalid domain refused" as *u8,rp_existing_identical("knowledge/fetched/cmp_comms_rfc9420.html" as *u8,"../comms" as *u8)==0,ctr)
12 gv_check("empty mirror refused" as *u8,rp_existing_identical("" as *u8,"comms" as *u8)==0,ctr)
13 let out:*u8=sys_mmap(GAL_PROBE_CAP);var n:i64=99
14 let rc:i64=gal_probe_run("/absent-preview-probe-t56" as *u8,"comms" as *u8,"absent.html" as *u8,out,&n)
15 gv_check("preview probe explicitly not executed" as *u8,rc== -2,ctr)
16 gv_check("preview probe stale output cleared" as *u8,n==0,ctr)
17 return gv_verdict("COMPARE-PREVIEW-EFFECT-CONTRACT" as *u8,ctr,"real retained mirror resolver and negative controls; not browser or syscall tracing" as *u8)
18}