code wiki / _hdl_build / nx_editor_canvas_gate.nx

nx_editor_canvas_gate.nx source

↩ module page · 298 lines · 18224 B

1// nx_editor_canvas_gate.nx -- the editor engine: snap/align/distribute/nudge, the ORIGINAL one-deep 2// snapshot undo, and the OPERATION-STACK adoption that gives the canvas real multi-level undo, redo, 3// bit-exact replay and re-evaluation at depth. 4// 5// PART A IS A REGRESSION GUARD AND IS DELIBERATELY UNCHANGED. T1..T6 are the six assertions this gate 6// already made, on the same fixtures with the same expected numbers, exercising ec_snap_all / ec_align / 7// ec_distribute_h / ec_nudge / ec_save / ec_undo through the ORIGINAL direct-call path. They are also the 8// POSITIVE CONTROL for part B: if adopting the stack had broken the engine underneath, or if the new 9// guards refused work they should allow, these six would go red. 10// 11// PART B PROVES THE ADOPTION, and its anti-vacuity tooth is T11. A one-deep snapshot passes a single 12// undo -- T9 alone cannot tell the two designs apart. Only undo-undo-undo followed by redo-redo-redo 13// separates a log from a snapshot, because the snapshot holds exactly one state and has nothing to 14// return to on the second call. T17 is the second anti-vacuity tooth: it proves the canvas the caller 15// renders IS the stack's own memory rather than a copy kept in step by hand. 16// 17// 100% sovereign. No hardware writes (Rule 26). expect_exit: 0 18import "nx_syscalls.nx" 19import "nx_gate_verdict.nx" 20import "nx_editstack_lib.nx" 21import "nx_editor_canvas.nx" 22 23func eq(a: i64, b: i64) -> i64 { if a == b { return 1 } return 0 } 24func ne(a: i64, b: i64) -> i64 { if a != b { return 1 } return 0 } 25func put(c: *i64, i: i64, x: i64, y: i64, w: i64, h: i64) -> i64 { c[i*5+0]=0; c[i*5+1]=x; c[i*5+2]=y; c[i*5+3]=w; c[i*5+4]=h; return 0 } 26func pv(label: *u8, v: i64) -> i64 { gv_puts(label); gv_num(v); gv_puts("\n" as *u8); return 0 } 27func streq(a: *u8, b: *u8) -> i64 { 28 var i: i64 = 0 29 while a[i] != (0 as u8) { if a[i] != b[i] { return 0 } i = i + 1 } 30 if b[i] != (0 as u8) { return 0 } 31 return 1 32} 33 34func main() -> i64 { 35 let ctr: *i64 = gv_ctr() 36 gv_head("nx_editor_canvas_gate -- engine + one-deep snapshot (regression) + operation-stack adoption" as *u8) 37 38 let c: *i64 = sys_mmap(512) as *i64 39 let h: *i64 = sys_mmap(512) as *i64 40 41 // ================= PART A: the ORIGINAL direct path, unchanged. REGRESSION GUARD. ================= 42 put(c, 0, 37, 11, 63, 20); put(c, 1, 35, 63, 10, 10) 43 ec_snap_all(c, 2, 8) 44 pv("A snap el0 x = " as *u8, c[1]); pv("A snap el0 y = " as *u8, c[2]); pv("A snap el0 w = " as *u8, c[3]) 45 pv("A snap el1 x = " as *u8, c[6]); pv("A snap el1 y = " as *u8, c[7]); pv("A snap el1 w = " as *u8, c[8]) 46 gv_check("T1 snap-all: (37,11,63)->(40,8,64) and (35,63,10)->(32,64,8)" as *u8, 47 eq(c[1],40)*eq(c[2],8)*eq(c[3],64)*eq(c[6],32)*eq(c[7],64)*eq(c[8],8), ctr) 48 49 put(c, 0, 10, 0, 5, 5); put(c, 1, 40, 0, 5, 5); put(c, 2, 70, 0, 5, 5) 50 ec_align(c, 3, 0) 51 pv("A align-left x0 = " as *u8, c[1]); pv("A align-left x1 = " as *u8, c[6]); pv("A align-left x2 = " as *u8, c[11]) 52 gv_check("T2 align-left: x={10,40,70} -> all 10" as *u8, eq(c[1],10)*eq(c[6],10)*eq(c[11],10), ctr) 53 54 put(c, 0, 10, 0, 20, 5); put(c, 1, 40, 0, 10, 5); put(c, 2, 70, 0, 30, 5) 55 ec_align(c, 3, 1) 56 pv("A align-right x0 = " as *u8, c[1]); pv("A align-right x1 = " as *u8, c[6]); pv("A align-right x2 = " as *u8, c[11]) 57 gv_check("T3 align-right: right edges aligned at maxr=100 -> x={80,90,70}" as *u8, 58 eq(c[1],80)*eq(c[6],90)*eq(c[11],70), ctr) 59 60 put(c, 0, 0, 0, 5, 5); put(c, 1, 5, 0, 5, 5); put(c, 2, 100, 0, 5, 5) 61 ec_distribute_h(c, 3) 62 pv("A distribute x0 = " as *u8, c[1]); pv("A distribute x1 = " as *u8, c[6]); pv("A distribute x2 = " as *u8, c[11]) 63 gv_check("T4 distribute-h: x={0,5,100} -> evenly {0,50,100}" as *u8, eq(c[1],0)*eq(c[6],50)*eq(c[11],100), ctr) 64 65 put(c, 0, 10, 10, 5, 5) 66 ec_nudge(c, 0, 5, 0-3) 67 pv("A nudge x = " as *u8, c[1]); pv("A nudge y = " as *u8, c[2]) 68 gv_check("T5 nudge: (10,10) + (5,-3) -> (15,7)" as *u8, eq(c[1],15)*eq(c[2],7), ctr) 69 70 put(c, 0, 100, 100, 5, 5) 71 ec_save(c, 1, h) 72 ec_nudge(c, 0, 50, 50) 73 let moved: i64 = eq(c[1],150)*eq(c[2],150) 74 ec_undo(c, 1, h) 75 pv("A snapshot-undo moved-first = " as *u8, moved); pv("A snapshot-undo x = " as *u8, c[1]); pv("A snapshot-undo y = " as *u8, c[2]) 76 gv_check("T6 one-deep snapshot undo STILL restores (100,100) -- the old path is untouched" as *u8, 77 moved*eq(c[1],100)*eq(c[2],100), ctr) 78 79 // ================= PART B: the operation-stack adoption ================= 80 let st: *i64 = ecs_new(64, 3) 81 put(c, 0, 10, 3, 5, 5); put(c, 1, 40, 17, 5, 5); put(c, 2, 70, 31, 5, 5) 82 let seeded: i64 = ecs_seed(st, c, 3) 83 let cv: *i64 = ecs_canvas(st) 84 let d0: i64 = ecs_digest(st) 85 pv("B seed rc = " as *u8, seeded); pv("B nelem = " as *u8, ecs_nelem(st)) 86 pv("B live x0 = " as *u8, cv[1]); pv("B live x1 = " as *u8, cv[6]); pv("B live x2 = " as *u8, cv[11]) 87 gv_check("T7 FIXTURE REACHED: seed landed in the stack's OWN live cells, nelem derived from ncells" as *u8, 88 eq(seeded,ECS_OK)*eq(ecs_nelem(st),3)*eq(cv[1],10)*eq(cv[6],40)*eq(cv[11],70), ctr) 89 90 let ra: i64 = ecs_align(st, 0) 91 let d1: i64 = ecs_digest(st) 92 pv("B align rc = " as *u8, ra); pv("B after-align x1 = " as *u8, cv[6]); pv("B head = " as *u8, es_head(st)); pv("B count = " as *u8, es_count(st)) 93 gv_check("T8 FIXTURE REACHED: one recorded align CHANGED the canvas and advanced head to 1" as *u8, 94 eq(ra,ECS_OK)*eq(cv[6],10)*eq(cv[11],10)*ne(d1,d0)*eq(es_head(st),1)*eq(es_count(st),1), ctr) 95 96 let ru: i64 = ecs_undo(st) 97 pv("B undo rc = " as *u8, ru); pv("B after-undo x1 = " as *u8, cv[6]); pv("B after-undo head = " as *u8, es_head(st)) 98 gv_check("T9 an align is UNDOABLE: digest returns to the pre-align digest EXACTLY, canvas with it" as *u8, 99 eq(ru,ECS_OK)*eq(ecs_digest(st),d0)*eq(cv[6],40)*eq(es_head(st),0)*eq(es_count(st),1), ctr) 100 101 let rr: i64 = ecs_redo(st) 102 pv("B redo rc = " as *u8, rr); pv("B after-redo x1 = " as *u8, cv[6]) 103 gv_check("T10 an align is REDOABLE: digest returns to the post-align digest EXACTLY" as *u8, 104 eq(rr,ECS_OK)*eq(ecs_digest(st),d1)*eq(cv[6],10)*eq(es_head(st),1), ctr) 105 106 // ---- T11 ANTI-VACUITY: three levels. A one-deep snapshot passes T9 and CANNOT pass this. ---- 107 let st3: *i64 = ecs_new(64, 3) 108 put(c, 0, 10, 3, 5, 5); put(c, 1, 40, 17, 5, 5); put(c, 2, 70, 31, 5, 5) 109 ecs_seed(st3, c, 3) 110 let b0: i64 = ecs_digest(st3) 111 let g1: i64 = ecs_snap(st3, 8) 112 let b1: i64 = ecs_digest(st3) 113 let g2: i64 = ecs_align(st3, 2) 114 let b2: i64 = ecs_digest(st3) 115 let g3: i64 = ecs_nudge(st3, 1, 5, 5) 116 let b3: i64 = ecs_digest(st3) 117 pv("B3 gesture rc sum = " as *u8, g1+g2+g3); pv("B3 count = " as *u8, es_count(st3)) 118 gv_check("T11a FIXTURE REACHED: three recorded gestures each genuinely changed the state" as *u8, 119 eq(g1,ECS_OK)*eq(g2,ECS_OK)*eq(g3,ECS_OK)*ne(b1,b0)*ne(b2,b1)*ne(b3,b2)*eq(es_count(st3),3), ctr) 120 121 let u1: i64 = ecs_undo(st3); let a2d: i64 = ecs_digest(st3) 122 let u2: i64 = ecs_undo(st3); let a1d: i64 = ecs_digest(st3) 123 let u3: i64 = ecs_undo(st3); let a0d: i64 = ecs_digest(st3) 124 pv("B3 undo rc sum = " as *u8, u1+u2+u3); pv("B3 head after 3 undos = " as *u8, es_head(st3)) 125 gv_check("T11 MULTI-LEVEL UNDO: three undos walk back through b2 and b1 and land on the base -- the one thing a snapshot cannot do" as *u8, 126 eq(u1,ECS_OK)*eq(u2,ECS_OK)*eq(u3,ECS_OK)*eq(a2d,b2)*eq(a1d,b1)*eq(a0d,b0)*eq(es_head(st3),0)*eq(es_count(st3),3), ctr) 127 128 let v1: i64 = ecs_redo(st3); let r1d: i64 = ecs_digest(st3) 129 let v2: i64 = ecs_redo(st3); let r2d: i64 = ecs_digest(st3) 130 let v3: i64 = ecs_redo(st3); let r3d: i64 = ecs_digest(st3) 131 pv("B3 redo rc sum = " as *u8, v1+v2+v3); pv("B3 head after 3 redos = " as *u8, es_head(st3)) 132 gv_check("T12 MULTI-LEVEL REDO: three redos walk forward through b1 and b2 and land on b3" as *u8, 133 eq(v1,ECS_OK)*eq(v2,ECS_OK)*eq(v3,ECS_OK)*eq(r1d,b1)*eq(r2d,b2)*eq(r3d,b3)*eq(es_head(st3),3), ctr) 134 135 // ---- T13 REPLAY from the base is BIT-IDENTICAL, proven against an independently built stack ---- 136 let stx: *i64 = ecs_new(64, 3) 137 put(c, 0, 10, 3, 5, 5); put(c, 1, 40, 17, 5, 5); put(c, 2, 70, 31, 5, 5) 138 ecs_seed(stx, c, 3) 139 ecs_snap(stx, 8); ecs_align(stx, 2); ecs_nudge(stx, 1, 5, 5) 140 let xd: i64 = ecs_digest(stx) 141 let rp: i64 = ecs_replay(st3) 142 pv("B replay rc = " as *u8, rp); pv("B replayed digest = " as *u8, ecs_digest(st3)); pv("B independent digest = " as *u8, xd) 143 gv_check("T13 N operations REPLAY from the base to a BIT-IDENTICAL digest, equal to an independently built stack" as *u8, 144 eq(rp,ECS_OK)*eq(ecs_digest(st3),b3)*eq(xd,b3), ctr) 145 146 // ---- T14 RE-EVALUATE a parameter at depth: later gestures preserved and re-applied on top ---- 147 let stb: *i64 = ecs_new(64, 3) 148 let stc: *i64 = ecs_new(64, 3) 149 put(c, 0, 10, 0, 5, 5); put(c, 1, 40, 0, 5, 5); put(c, 2, 70, 0, 5, 5) 150 ecs_seed(stb, c, 3); ecs_seed(stc, c, 3) 151 ecs_align(stb, 0); ecs_nudge(stb, 0, 7, 0) 152 ecs_align(stc, 1); ecs_nudge(stc, 0, 7, 0) 153 let want: i64 = ecs_digest(stc) 154 let bbefore: i64 = ecs_digest(stb) 155 let re: i64 = ecs_reeval(stb, 0, 1, 0, 0) 156 let bv: *i64 = ecs_canvas(stb) 157 pv("B reeval rc = " as *u8, re); pv("B reeval x0 = " as *u8, bv[1]); pv("B reeval x1 = " as *u8, bv[6]); pv("B reeval count = " as *u8, es_count(stb)) 158 gv_check("T14 RE-EVALUATE op 0 from align-left to align-right: the LATER nudge is preserved and re-applied, and the result equals building it that way from scratch" as *u8, 159 eq(re,ECS_OK)*ne(bbefore,want)*eq(ecs_digest(stb),want)*eq(bv[1],77)*eq(bv[6],70)*eq(es_count(stb),2), ctr) 160 161 // ---- T15 redo-tail truncation survives the consumer path (standard editor semantics) ---- 162 let stt: *i64 = ecs_new(64, 3) 163 put(c, 0, 10, 0, 5, 5); put(c, 1, 40, 0, 5, 5); put(c, 2, 70, 0, 5, 5) 164 ecs_seed(stt, c, 3) 165 ecs_align(stt, 0); ecs_align(stt, 2); ecs_nudge(stt, 0, 1, 1) 166 ecs_undo(stt); ecs_undo(stt) 167 let tc0: i64 = es_count(stt) 168 ecs_nudge(stt, 2, 3, 3) 169 pv("B truncate count before = " as *u8, tc0); pv("B truncate count after = " as *u8, es_count(stt)); pv("B truncate head = " as *u8, es_head(stt)) 170 gv_check("T15 a gesture after an undo TRUNCATES the redo tail: count follows head, 3 -> 2" as *u8, 171 eq(tc0,3)*eq(es_count(stt),2)*eq(es_head(stt),2)*eq(ecs_redo(stt),ES_E_ATHEAD), ctr) 172 173 // ---- T16 POSITIVE CONTROL: a guard that refuses everything passes every refusal test below ---- 174 let stp: *i64 = ecs_new(64, 3) 175 put(c, 0, 10, 3, 5, 5); put(c, 1, 40, 17, 5, 5); put(c, 2, 70, 31, 5, 5) 176 ecs_seed(stp, c, 3) 177 let p1: i64 = ecs_snap(stp, 8) 178 let p2: i64 = ecs_align(stp, 4) 179 let p3: i64 = ecs_distribute_h(stp) 180 let p4: i64 = ecs_nudge(stp, 2, 0-4, 6) 181 let p5: i64 = ecs_align(stp, ECS_ALIGN_MODE_MAX) 182 pv("B positive-control rc sum = " as *u8, p1+p2+p3+p4+p5); pv("B positive-control count = " as *u8, es_count(stp)) 183 gv_check("T16 POSITIVE CONTROL: every legal gesture -- snap, centre-h, distribute, a negative nudge, the boundary mode 5 -- is ADMITTED" as *u8, 184 eq(p1,ECS_OK)*eq(p2,ECS_OK)*eq(p3,ECS_OK)*eq(p4,ECS_OK)*eq(p5,ECS_OK)*eq(es_count(stp),5), ctr) 185 186 // ---- T17 ANTI-VACUITY: the rendered canvas IS the stack's memory, not a copy ---- 187 let dpre: i64 = ecs_digest(stp) 188 let pvv: *i64 = ecs_canvas(stp) 189 ec_nudge(pvv, 0, 11, 0) 190 let dout: i64 = ecs_digest(stp) 191 let rheal: i64 = ecs_replay(stp) 192 pv("B out-of-band digest changed = " as *u8, ne(dout,dpre)); pv("B healed digest matches = " as *u8, eq(ecs_digest(stp),dpre)) 193 gv_check("T17 NO SHADOW COPY: an ec_ write straight through ecs_canvas moves the digest, and replay heals it back to the log" as *u8, 194 ne(dout,dpre)*eq(rheal,ECS_OK)*eq(ecs_digest(stp),dpre), ctr) 195 196 // ---- T18 the digest discriminates at all (asserted, never assumed) ---- 197 gv_check("T18 the digest DISCRIMINATES: different canvas states carry different digests, equal states equal ones" as *u8, 198 ne(d0,d1)*ne(b1,b2)*ne(b2,b3)*eq(xd,b3), ctr) 199 200 // ============ NEGATIVE CONTROLS: each must FIRE on the bad input and STAY SILENT on the good ============ 201 let sb: *i64 = ecs_new(64, 3) 202 put(c, 0, 10, 0, 5, 5); put(c, 1, 40, 0, 5, 5); put(c, 2, 70, 0, 5, 5) 203 ecs_seed(sb, c, 3) 204 let base_d: i64 = ecs_digest(sb) 205 let bad_undo: i64 = ecs_undo(sb) 206 let undo_kept_state: i64 = eq(ecs_digest(sb), base_d) 207 ecs_align(sb, 0) 208 let good_undo: i64 = ecs_undo(sb) 209 pv("N undo-at-base rc = " as *u8, bad_undo); pv("N undo-with-op rc = " as *u8, good_undo) 210 gv_bite("neg-control-undo-past-the-base-REFUSES-and-changes-nothing" as *u8, 211 eq(bad_undo,ES_E_ATBASE)*undo_kept_state, ne(good_undo,ECS_OK), ctr) 212 213 let sr: *i64 = ecs_new(64, 3) 214 ecs_seed(sr, c, 3) 215 let bad_redo: i64 = ecs_redo(sr) 216 ecs_align(sr, 0); ecs_undo(sr) 217 let good_redo: i64 = ecs_redo(sr) 218 pv("N redo-at-head rc = " as *u8, bad_redo); pv("N redo-with-tail rc = " as *u8, good_redo) 219 gv_bite("neg-control-redo-past-the-head-REFUSES" as *u8, eq(bad_redo,ES_E_ATHEAD), ne(good_redo,ECS_OK), ctr) 220 221 let sg: *i64 = ecs_new(64, 3) 222 ecs_seed(sg, c, 3) 223 let gd: i64 = ecs_digest(sg) 224 let bad_grid: i64 = ecs_snap(sg, 0) 225 let grid_kept: i64 = eq(ecs_digest(sg), gd)*eq(es_count(sg), 0) 226 let good_grid: i64 = ecs_snap(sg, 8) 227 pv("N snap-grid-0 rc = " as *u8, bad_grid); pv("N snap-grid-8 rc = " as *u8, good_grid) 228 gv_bite("neg-control-snap-grid-zero-REFUSES-unrecorded-because-a-recorded-zero-would-fault-on-every-replay" as *u8, 229 eq(bad_grid,ECS_E_GRID)*grid_kept, ne(good_grid,ECS_OK), ctr) 230 231 let sm: *i64 = ecs_new(64, 3) 232 ecs_seed(sm, c, 3) 233 let bad_mode: i64 = ecs_align(sm, ECS_ALIGN_MODE_MAX + 1) 234 let mode_kept: i64 = eq(es_count(sm), 0) 235 let good_mode: i64 = ecs_align(sm, 3) 236 pv("N align-mode-6 rc = " as *u8, bad_mode); pv("N align-mode-3 rc = " as *u8, good_mode) 237 gv_bite("neg-control-align-mode-out-of-range-REFUSES-where-the-direct-call-silently-does-nothing" as *u8, 238 eq(bad_mode,ECS_E_MODE)*mode_kept, ne(good_mode,ECS_OK), ctr) 239 240 let si: *i64 = ecs_new(64, 3) 241 ecs_seed(si, c, 3) 242 let bad_idx: i64 = ecs_nudge(si, 3, 1, 1) 243 // CAPTURED HERE, BEFORE THE LEGAL CALL BELOW. Reading es_count inside the gv_bite argument reads it 244 // AFTER the legal nudge has already pushed an op, so the state-unchanged half of the condition is 245 // false and the whole tooth reports VACUOUS. That is exactly what happened on the first run of this 246 // gate, and the vacuity detector -- not the verdict vector -- is what said so. 247 let idx_kept: i64 = eq(es_count(si), 0) 248 let good_idx: i64 = ecs_nudge(si, 2, 1, 1) 249 pv("N nudge-idx-3-of-3 rc = " as *u8, bad_idx); pv("N nudge-idx-3-of-3 left count at = " as *u8, idx_kept); pv("N nudge-idx-2-of-3 rc = " as *u8, good_idx) 250 gv_bite("neg-control-nudge-element-index-out-of-range-REFUSES-unrecorded" as *u8, 251 eq(bad_idx,ECS_E_IDX)*idx_kept, ne(good_idx,ECS_OK), ctr) 252 253 let sk: *i64 = ecs_new(64, 3) 254 ecs_seed(sk, c, 3) 255 let bad_kind: i64 = es_push_raw(sk, ES_OP_SET, 0, 0, 0, 0) 256 let good_kind: i64 = es_push_raw(sk, ECS_OP_ALIGN, 0, 0, 0, 0) 257 pv("N push_raw generic-kind rc = " as *u8, bad_kind); pv("N push_raw consumer-kind rc = " as *u8, good_kind) 258 gv_bite("neg-control-push_raw-REFUSES-a-kind-below-the-reserved-consumer-range" as *u8, 259 eq(bad_kind,ES_E_RESERVED), ne(good_kind,ES_OK), ctr) 260 261 let sf: *i64 = ecs_new(2, 3) 262 ecs_seed(sf, c, 3) 263 let f1: i64 = ecs_align(sf, 0) 264 let f2: i64 = ecs_align(sf, 2) 265 let dfull: i64 = ecs_digest(sf) 266 let f3: i64 = ecs_nudge(sf, 0, 9, 9) 267 let full_kept: i64 = eq(ecs_digest(sf), dfull)*eq(es_count(sf), 2) 268 pv("N cap-2 third-push rc = " as *u8, f3); pv("N cap-2 count = " as *u8, es_count(sf)) 269 gv_bite("neg-control-a-full-stack-REFUSES-the-gesture-and-does-not-move-the-canvas" as *u8, 270 eq(f3,ES_E_FULL)*full_kept, ne(f1+f2,ECS_OK), ctr) 271 272 let ss: *i64 = ecs_new(64, 3) 273 let bad_seed: i64 = ecs_seed(ss, c, 2) 274 let good_seed: i64 = ecs_seed(ss, c, 3) 275 pv("N seed-wrong-n rc = " as *u8, bad_seed); pv("N seed-right-n rc = " as *u8, good_seed) 276 gv_bite("neg-control-seeding-a-stack-sized-for-a-different-element-count-REFUSES" as *u8, 277 eq(bad_seed,ECS_E_ARGS), ne(good_seed,ECS_OK), ctr) 278 279 // ---- T19: the refusal-naming contract, across the LAYER BOUNDARY. ecs_code_name names the canvas's 280 // own refusals and falls through to es_err_name for the stack's, so this also proves a stack refusal 281 // that propagates out through the canvas still arrives with a name rather than a bare negative. 282 // It exists because the sibling gate's mutation run showed a code-name table with no caller compiles 283 // away entirely -- an unexercised naming table is a contract nobody checks. 284 let cn1: i64 = streq(ecs_code_name(ECS_OK), "OK" as *u8) 285 let cn2: i64 = streq(ecs_code_name(ECS_E_GRID), "REFUSED-SNAP-GRID-NOT-POSITIVE" as *u8) 286 let cn3: i64 = streq(ecs_code_name(ECS_E_MODE), "REFUSED-ALIGN-MODE-OUT-OF-RANGE" as *u8) 287 let cn4: i64 = streq(ecs_code_name(ES_E_ATBASE), "REFUSED-ALREADY-AT-BASE" as *u8) 288 let cn5: i64 = streq(ecs_code_name(ES_E_RESERVED), "REFUSED-KIND-BELOW-CONSUMER-RANGE" as *u8) 289 let cn6: i64 = streq(ecs_code_name(0 - 999), "REFUSED-UNCLASSIFIED" as *u8) 290 gv_puts("N name(ECS_E_GRID) = " as *u8); gv_puts(ecs_code_name(ECS_E_GRID)); gv_puts("\n" as *u8) 291 gv_puts("N name(ES_E_ATBASE) = " as *u8); gv_puts(ecs_code_name(ES_E_ATBASE)); gv_puts("\n" as *u8) 292 gv_puts("N name(ES_E_RESERVED) = " as *u8); gv_puts(ecs_code_name(ES_E_RESERVED)); gv_puts("\n" as *u8) 293 gv_check("T19 EVERY REFUSAL IS NAMED ACROSS THE LAYER BOUNDARY: canvas codes name themselves, stack codes fall through to es_err_name, and an unknown code is not laundered into a known one" as *u8, 294 cn1*cn2*cn3*cn4*cn5*cn6, ctr) 295 296 return gv_verdict("nx_editor_canvas_gate" as *u8, ctr, 297 "the canvas engine, its original one-deep snapshot, and its adoption of the operation stack" as *u8) 298}