nmarshall commited on
Commit
abd65d4
·
1 Parent(s): 31bcd46

qvm: trace final restore gate

Browse files
docs/ASSET_PIPELINE_TODO.md CHANGED
@@ -568,3 +568,6 @@ Research progress: RE-628 [report](research/QVM_TRACE_RELINK.md); remaining nati
568
 
569
 
570
  Research progress: RE-629 [report](research/QVM_TRACE_BOUNDS_RESTORE.md); remaining native/content/runtime/platform scope stays open.
 
 
 
 
568
 
569
 
570
  Research progress: RE-629 [report](research/QVM_TRACE_BOUNDS_RESTORE.md); remaining native/content/runtime/platform scope stays open.
571
+
572
+
573
+ Research progress: RE-630 [report](research/QVM_TRACE_FINALIZE.md); remaining native/content/runtime/platform scope stays open.
docs/FINDINGS.md CHANGED
@@ -920,3 +920,6 @@ Bounded qagame paths recover bomb-plant/inactivity correction requests, direct f
920
 
921
 
922
  **RE-629 — Candidate bound restoration and f32 round-trip limits:** The restoration suffix repeats eligibility gates, reverses bound arithmetic and writes fixed ±15 dimensions rather than restoring a saved record. [Evidence](research/QVM_TRACE_BOUNDS_RESTORE.md).
 
 
 
 
920
 
921
 
922
  **RE-629 — Candidate bound restoration and f32 round-trip limits:** The restoration suffix repeats eligibility gates, reverses bound arithmetic and writes fixed ±15 dimensions rather than restoring a saved record. [Evidence](research/QVM_TRACE_BOUNDS_RESTORE.md).
923
+
924
+
925
+ **RE-630 — Shooter restoration gate final link and trace return:** The trace suffix requests144413 only for client shooters without424 bit8 and mode exactly1; otherwise it links the shooter and returns local96. [Evidence](research/QVM_TRACE_FINALIZE.md).
docs/PROVISIONAL_TODO.md CHANGED
@@ -888,3 +888,6 @@ Research progress: RE-628 [report](research/QVM_TRACE_RELINK.md); remaining nati
888
 
889
 
890
  Research progress: RE-629 [report](research/QVM_TRACE_BOUNDS_RESTORE.md); remaining native/content/runtime/platform scope stays open.
 
 
 
 
888
 
889
 
890
  Research progress: RE-629 [report](research/QVM_TRACE_BOUNDS_RESTORE.md); remaining native/content/runtime/platform scope stays open.
891
+
892
+
893
+ Research progress: RE-630 [report](research/QVM_TRACE_FINALIZE.md); remaining native/content/runtime/platform scope stays open.
docs/RESEARCH_LEDGER.md CHANGED
@@ -822,3 +822,8 @@ The skipped-target cleanup issues native−31 in insertion order and preserves d
822
  ## 2026-10-20 — RE-629 Candidate bound restoration and f32 round-trip limits (separate task commit)
823
 
824
  The restoration suffix repeats eligibility gates, reverses bound arithmetic and writes fixed ±15 dimensions rather than restoring a saved record. Six canonical/arbitrary/large-magnitude fixtures independently compare all six candidate records and demonstrate exact and lossy round trips. Full suite: 1001 tests pass. Report regenerates byte-identically (647300 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
 
 
 
 
 
 
822
  ## 2026-10-20 — RE-629 Candidate bound restoration and f32 round-trip limits (separate task commit)
823
 
824
  The restoration suffix repeats eligibility gates, reverses bound arithmetic and writes fixed ±15 dimensions rather than restoring a saved record. Six canonical/arbitrary/large-magnitude fixtures independently compare all six candidate records and demonstrate exact and lossy round trips. Full suite: 1001 tests pass. Report regenerates byte-identically (647300 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
825
+
826
+
827
+ ## 2026-10-20 — RE-630 Shooter restoration gate final link and trace return (separate task commit)
828
+
829
+ The trace suffix requests144413 only for client shooters without424 bit8 and mode exactly1; otherwise it links the shooter and returns local96. 24 client/flag/mode/result combinations independently verify the exact gate, native link request and numeric return. Full suite: 1004 tests pass. Report regenerates byte-identically (28647 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
docs/REVERSE_ENGINEERING_TODO.md CHANGED
@@ -931,3 +931,6 @@ Purpose: turn the supplied installation into an evidence-backed specification of
931
 
932
 
933
  - [x] RE-629 Candidate bound restoration and f32 round-trip limits ([report](research/QVM_TRACE_BOUNDS_RESTORE.md)).
 
 
 
 
931
 
932
 
933
  - [x] RE-629 Candidate bound restoration and f32 round-trip limits ([report](research/QVM_TRACE_BOUNDS_RESTORE.md)).
934
+
935
+
936
+ - [x] RE-630 Shooter restoration gate final link and trace return ([report](research/QVM_TRACE_FINALIZE.md)).
docs/research/QVM_TRACE_FINALIZE.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # Shooter restoration gate final link and trace return
2
+
3
+ RE-630. Reproduce with `python3 scripts/analyze_qvm_trace_finalize.py`; check with `python3 scripts/test_qvm_trace_finalize.py`. The [machine report](qvm-trace-finalize.json) retains source identity and bounded fixtures.
4
+
5
+ Actual292504–292542 reads shooter client presence, record424 bit8 and argument mode176. Only non-null client, bit8 clear and mode==1 reaches144413; mode2 does not. The report suspends before that unknown helper. All other cases issue captured native−31 for the shooter and return the existing local96 without reinterpretation as successful hit/damage. Result fixtures0/1 test direct return propagation only. No engine relinking or rewind effect executes, and pending restore paths neither link nor fabricate a child return.
6
+
7
+ No original executable/full QVM/native collision/physics/rendering executes. Native responses and legal input domains are supplied or unverified where stated; full runtime/macOS/Linux Rust/Bevy/Solari gameplay remains open.
docs/research/README.md CHANGED
@@ -489,3 +489,6 @@ The extension collector adds five focused tests for native tail calls, command-r
489
 
490
 
491
  [RE-629: Candidate bound restoration and f32 round-trip limits](QVM_TRACE_BOUNDS_RESTORE.md). Reproduce with `python3 scripts/analyze_qvm_trace_bounds_restore.py`; check with `python3 scripts/test_qvm_trace_bounds_restore.py`.
 
 
 
 
489
 
490
 
491
  [RE-629: Candidate bound restoration and f32 round-trip limits](QVM_TRACE_BOUNDS_RESTORE.md). Reproduce with `python3 scripts/analyze_qvm_trace_bounds_restore.py`; check with `python3 scripts/test_qvm_trace_bounds_restore.py`.
492
+
493
+
494
+ [RE-630: Shooter restoration gate final link and trace return](QVM_TRACE_FINALIZE.md). Reproduce with `python3 scripts/analyze_qvm_trace_finalize.py`; check with `python3 scripts/test_qvm_trace_finalize.py`.
docs/research/qvm-trace-finalize.json ADDED
@@ -0,0 +1,1261 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "limits": "Actual292504\u2013292542, or stop before144413. Native\u221231 captured, numeric return is supplied prior local96 state, not hit validation. Rewind restoration remains unrecovered in this report.",
3
+ "probes": [
4
+ {
5
+ "execution": {
6
+ "byte_writes": [],
7
+ "calls": [
8
+ {
9
+ "args": {
10
+ "8": 34147688
11
+ },
12
+ "instruction": 292538,
13
+ "target": -31
14
+ }
15
+ ],
16
+ "children": [
17
+ {
18
+ "call": {
19
+ "args": {
20
+ "8": 34147688
21
+ },
22
+ "instruction": 292538,
23
+ "target": -31
24
+ },
25
+ "effect": {
26
+ "arguments": {
27
+ "8": 34147688
28
+ },
29
+ "native_effect_not_executed": true
30
+ }
31
+ }
32
+ ],
33
+ "return": 0,
34
+ "stop": 292543,
35
+ "trace": null,
36
+ "trace_length": 20,
37
+ "trace_sha256": "f9997b671d2cbd689018d9105697540d8932e370e5f283e2130878ba6d90c9ef"
38
+ },
39
+ "initial": {
40
+ "client": 0,
41
+ "entity": 34147688,
42
+ "flags424": 0,
43
+ "mode": 0,
44
+ "result96": 0
45
+ },
46
+ "pending_call": null,
47
+ "requests": [
48
+ {
49
+ "arguments": {
50
+ "8": 34147688
51
+ },
52
+ "native_effect_not_executed": true
53
+ }
54
+ ],
55
+ "status": "returned"
56
+ },
57
+ {
58
+ "execution": {
59
+ "byte_writes": [],
60
+ "calls": [
61
+ {
62
+ "args": {
63
+ "8": 34147688
64
+ },
65
+ "instruction": 292538,
66
+ "target": -31
67
+ }
68
+ ],
69
+ "children": [
70
+ {
71
+ "call": {
72
+ "args": {
73
+ "8": 34147688
74
+ },
75
+ "instruction": 292538,
76
+ "target": -31
77
+ },
78
+ "effect": {
79
+ "arguments": {
80
+ "8": 34147688
81
+ },
82
+ "native_effect_not_executed": true
83
+ }
84
+ }
85
+ ],
86
+ "return": 1,
87
+ "stop": 292543,
88
+ "trace": null,
89
+ "trace_length": 20,
90
+ "trace_sha256": "f9997b671d2cbd689018d9105697540d8932e370e5f283e2130878ba6d90c9ef"
91
+ },
92
+ "initial": {
93
+ "client": 0,
94
+ "entity": 34147688,
95
+ "flags424": 0,
96
+ "mode": 0,
97
+ "result96": 1
98
+ },
99
+ "pending_call": null,
100
+ "requests": [
101
+ {
102
+ "arguments": {
103
+ "8": 34147688
104
+ },
105
+ "native_effect_not_executed": true
106
+ }
107
+ ],
108
+ "status": "returned"
109
+ },
110
+ {
111
+ "execution": {
112
+ "byte_writes": [],
113
+ "calls": [
114
+ {
115
+ "args": {
116
+ "8": 34147688
117
+ },
118
+ "instruction": 292538,
119
+ "target": -31
120
+ }
121
+ ],
122
+ "children": [
123
+ {
124
+ "call": {
125
+ "args": {
126
+ "8": 34147688
127
+ },
128
+ "instruction": 292538,
129
+ "target": -31
130
+ },
131
+ "effect": {
132
+ "arguments": {
133
+ "8": 34147688
134
+ },
135
+ "native_effect_not_executed": true
136
+ }
137
+ }
138
+ ],
139
+ "return": 0,
140
+ "stop": 292543,
141
+ "trace": null,
142
+ "trace_length": 20,
143
+ "trace_sha256": "f9997b671d2cbd689018d9105697540d8932e370e5f283e2130878ba6d90c9ef"
144
+ },
145
+ "initial": {
146
+ "client": 0,
147
+ "entity": 34147688,
148
+ "flags424": 0,
149
+ "mode": 1,
150
+ "result96": 0
151
+ },
152
+ "pending_call": null,
153
+ "requests": [
154
+ {
155
+ "arguments": {
156
+ "8": 34147688
157
+ },
158
+ "native_effect_not_executed": true
159
+ }
160
+ ],
161
+ "status": "returned"
162
+ },
163
+ {
164
+ "execution": {
165
+ "byte_writes": [],
166
+ "calls": [
167
+ {
168
+ "args": {
169
+ "8": 34147688
170
+ },
171
+ "instruction": 292538,
172
+ "target": -31
173
+ }
174
+ ],
175
+ "children": [
176
+ {
177
+ "call": {
178
+ "args": {
179
+ "8": 34147688
180
+ },
181
+ "instruction": 292538,
182
+ "target": -31
183
+ },
184
+ "effect": {
185
+ "arguments": {
186
+ "8": 34147688
187
+ },
188
+ "native_effect_not_executed": true
189
+ }
190
+ }
191
+ ],
192
+ "return": 1,
193
+ "stop": 292543,
194
+ "trace": null,
195
+ "trace_length": 20,
196
+ "trace_sha256": "f9997b671d2cbd689018d9105697540d8932e370e5f283e2130878ba6d90c9ef"
197
+ },
198
+ "initial": {
199
+ "client": 0,
200
+ "entity": 34147688,
201
+ "flags424": 0,
202
+ "mode": 1,
203
+ "result96": 1
204
+ },
205
+ "pending_call": null,
206
+ "requests": [
207
+ {
208
+ "arguments": {
209
+ "8": 34147688
210
+ },
211
+ "native_effect_not_executed": true
212
+ }
213
+ ],
214
+ "status": "returned"
215
+ },
216
+ {
217
+ "execution": {
218
+ "byte_writes": [],
219
+ "calls": [
220
+ {
221
+ "args": {
222
+ "8": 34147688
223
+ },
224
+ "instruction": 292538,
225
+ "target": -31
226
+ }
227
+ ],
228
+ "children": [
229
+ {
230
+ "call": {
231
+ "args": {
232
+ "8": 34147688
233
+ },
234
+ "instruction": 292538,
235
+ "target": -31
236
+ },
237
+ "effect": {
238
+ "arguments": {
239
+ "8": 34147688
240
+ },
241
+ "native_effect_not_executed": true
242
+ }
243
+ }
244
+ ],
245
+ "return": 0,
246
+ "stop": 292543,
247
+ "trace": null,
248
+ "trace_length": 20,
249
+ "trace_sha256": "f9997b671d2cbd689018d9105697540d8932e370e5f283e2130878ba6d90c9ef"
250
+ },
251
+ "initial": {
252
+ "client": 0,
253
+ "entity": 34147688,
254
+ "flags424": 0,
255
+ "mode": 2,
256
+ "result96": 0
257
+ },
258
+ "pending_call": null,
259
+ "requests": [
260
+ {
261
+ "arguments": {
262
+ "8": 34147688
263
+ },
264
+ "native_effect_not_executed": true
265
+ }
266
+ ],
267
+ "status": "returned"
268
+ },
269
+ {
270
+ "execution": {
271
+ "byte_writes": [],
272
+ "calls": [
273
+ {
274
+ "args": {
275
+ "8": 34147688
276
+ },
277
+ "instruction": 292538,
278
+ "target": -31
279
+ }
280
+ ],
281
+ "children": [
282
+ {
283
+ "call": {
284
+ "args": {
285
+ "8": 34147688
286
+ },
287
+ "instruction": 292538,
288
+ "target": -31
289
+ },
290
+ "effect": {
291
+ "arguments": {
292
+ "8": 34147688
293
+ },
294
+ "native_effect_not_executed": true
295
+ }
296
+ }
297
+ ],
298
+ "return": 1,
299
+ "stop": 292543,
300
+ "trace": null,
301
+ "trace_length": 20,
302
+ "trace_sha256": "f9997b671d2cbd689018d9105697540d8932e370e5f283e2130878ba6d90c9ef"
303
+ },
304
+ "initial": {
305
+ "client": 0,
306
+ "entity": 34147688,
307
+ "flags424": 0,
308
+ "mode": 2,
309
+ "result96": 1
310
+ },
311
+ "pending_call": null,
312
+ "requests": [
313
+ {
314
+ "arguments": {
315
+ "8": 34147688
316
+ },
317
+ "native_effect_not_executed": true
318
+ }
319
+ ],
320
+ "status": "returned"
321
+ },
322
+ {
323
+ "execution": {
324
+ "byte_writes": [],
325
+ "calls": [
326
+ {
327
+ "args": {
328
+ "8": 34147688
329
+ },
330
+ "instruction": 292538,
331
+ "target": -31
332
+ }
333
+ ],
334
+ "children": [
335
+ {
336
+ "call": {
337
+ "args": {
338
+ "8": 34147688
339
+ },
340
+ "instruction": 292538,
341
+ "target": -31
342
+ },
343
+ "effect": {
344
+ "arguments": {
345
+ "8": 34147688
346
+ },
347
+ "native_effect_not_executed": true
348
+ }
349
+ }
350
+ ],
351
+ "return": 0,
352
+ "stop": 292543,
353
+ "trace": null,
354
+ "trace_length": 20,
355
+ "trace_sha256": "f9997b671d2cbd689018d9105697540d8932e370e5f283e2130878ba6d90c9ef"
356
+ },
357
+ "initial": {
358
+ "client": 0,
359
+ "entity": 34147688,
360
+ "flags424": 8,
361
+ "mode": 0,
362
+ "result96": 0
363
+ },
364
+ "pending_call": null,
365
+ "requests": [
366
+ {
367
+ "arguments": {
368
+ "8": 34147688
369
+ },
370
+ "native_effect_not_executed": true
371
+ }
372
+ ],
373
+ "status": "returned"
374
+ },
375
+ {
376
+ "execution": {
377
+ "byte_writes": [],
378
+ "calls": [
379
+ {
380
+ "args": {
381
+ "8": 34147688
382
+ },
383
+ "instruction": 292538,
384
+ "target": -31
385
+ }
386
+ ],
387
+ "children": [
388
+ {
389
+ "call": {
390
+ "args": {
391
+ "8": 34147688
392
+ },
393
+ "instruction": 292538,
394
+ "target": -31
395
+ },
396
+ "effect": {
397
+ "arguments": {
398
+ "8": 34147688
399
+ },
400
+ "native_effect_not_executed": true
401
+ }
402
+ }
403
+ ],
404
+ "return": 1,
405
+ "stop": 292543,
406
+ "trace": null,
407
+ "trace_length": 20,
408
+ "trace_sha256": "f9997b671d2cbd689018d9105697540d8932e370e5f283e2130878ba6d90c9ef"
409
+ },
410
+ "initial": {
411
+ "client": 0,
412
+ "entity": 34147688,
413
+ "flags424": 8,
414
+ "mode": 0,
415
+ "result96": 1
416
+ },
417
+ "pending_call": null,
418
+ "requests": [
419
+ {
420
+ "arguments": {
421
+ "8": 34147688
422
+ },
423
+ "native_effect_not_executed": true
424
+ }
425
+ ],
426
+ "status": "returned"
427
+ },
428
+ {
429
+ "execution": {
430
+ "byte_writes": [],
431
+ "calls": [
432
+ {
433
+ "args": {
434
+ "8": 34147688
435
+ },
436
+ "instruction": 292538,
437
+ "target": -31
438
+ }
439
+ ],
440
+ "children": [
441
+ {
442
+ "call": {
443
+ "args": {
444
+ "8": 34147688
445
+ },
446
+ "instruction": 292538,
447
+ "target": -31
448
+ },
449
+ "effect": {
450
+ "arguments": {
451
+ "8": 34147688
452
+ },
453
+ "native_effect_not_executed": true
454
+ }
455
+ }
456
+ ],
457
+ "return": 0,
458
+ "stop": 292543,
459
+ "trace": null,
460
+ "trace_length": 20,
461
+ "trace_sha256": "f9997b671d2cbd689018d9105697540d8932e370e5f283e2130878ba6d90c9ef"
462
+ },
463
+ "initial": {
464
+ "client": 0,
465
+ "entity": 34147688,
466
+ "flags424": 8,
467
+ "mode": 1,
468
+ "result96": 0
469
+ },
470
+ "pending_call": null,
471
+ "requests": [
472
+ {
473
+ "arguments": {
474
+ "8": 34147688
475
+ },
476
+ "native_effect_not_executed": true
477
+ }
478
+ ],
479
+ "status": "returned"
480
+ },
481
+ {
482
+ "execution": {
483
+ "byte_writes": [],
484
+ "calls": [
485
+ {
486
+ "args": {
487
+ "8": 34147688
488
+ },
489
+ "instruction": 292538,
490
+ "target": -31
491
+ }
492
+ ],
493
+ "children": [
494
+ {
495
+ "call": {
496
+ "args": {
497
+ "8": 34147688
498
+ },
499
+ "instruction": 292538,
500
+ "target": -31
501
+ },
502
+ "effect": {
503
+ "arguments": {
504
+ "8": 34147688
505
+ },
506
+ "native_effect_not_executed": true
507
+ }
508
+ }
509
+ ],
510
+ "return": 1,
511
+ "stop": 292543,
512
+ "trace": null,
513
+ "trace_length": 20,
514
+ "trace_sha256": "f9997b671d2cbd689018d9105697540d8932e370e5f283e2130878ba6d90c9ef"
515
+ },
516
+ "initial": {
517
+ "client": 0,
518
+ "entity": 34147688,
519
+ "flags424": 8,
520
+ "mode": 1,
521
+ "result96": 1
522
+ },
523
+ "pending_call": null,
524
+ "requests": [
525
+ {
526
+ "arguments": {
527
+ "8": 34147688
528
+ },
529
+ "native_effect_not_executed": true
530
+ }
531
+ ],
532
+ "status": "returned"
533
+ },
534
+ {
535
+ "execution": {
536
+ "byte_writes": [],
537
+ "calls": [
538
+ {
539
+ "args": {
540
+ "8": 34147688
541
+ },
542
+ "instruction": 292538,
543
+ "target": -31
544
+ }
545
+ ],
546
+ "children": [
547
+ {
548
+ "call": {
549
+ "args": {
550
+ "8": 34147688
551
+ },
552
+ "instruction": 292538,
553
+ "target": -31
554
+ },
555
+ "effect": {
556
+ "arguments": {
557
+ "8": 34147688
558
+ },
559
+ "native_effect_not_executed": true
560
+ }
561
+ }
562
+ ],
563
+ "return": 0,
564
+ "stop": 292543,
565
+ "trace": null,
566
+ "trace_length": 20,
567
+ "trace_sha256": "f9997b671d2cbd689018d9105697540d8932e370e5f283e2130878ba6d90c9ef"
568
+ },
569
+ "initial": {
570
+ "client": 0,
571
+ "entity": 34147688,
572
+ "flags424": 8,
573
+ "mode": 2,
574
+ "result96": 0
575
+ },
576
+ "pending_call": null,
577
+ "requests": [
578
+ {
579
+ "arguments": {
580
+ "8": 34147688
581
+ },
582
+ "native_effect_not_executed": true
583
+ }
584
+ ],
585
+ "status": "returned"
586
+ },
587
+ {
588
+ "execution": {
589
+ "byte_writes": [],
590
+ "calls": [
591
+ {
592
+ "args": {
593
+ "8": 34147688
594
+ },
595
+ "instruction": 292538,
596
+ "target": -31
597
+ }
598
+ ],
599
+ "children": [
600
+ {
601
+ "call": {
602
+ "args": {
603
+ "8": 34147688
604
+ },
605
+ "instruction": 292538,
606
+ "target": -31
607
+ },
608
+ "effect": {
609
+ "arguments": {
610
+ "8": 34147688
611
+ },
612
+ "native_effect_not_executed": true
613
+ }
614
+ }
615
+ ],
616
+ "return": 1,
617
+ "stop": 292543,
618
+ "trace": null,
619
+ "trace_length": 20,
620
+ "trace_sha256": "f9997b671d2cbd689018d9105697540d8932e370e5f283e2130878ba6d90c9ef"
621
+ },
622
+ "initial": {
623
+ "client": 0,
624
+ "entity": 34147688,
625
+ "flags424": 8,
626
+ "mode": 2,
627
+ "result96": 1
628
+ },
629
+ "pending_call": null,
630
+ "requests": [
631
+ {
632
+ "arguments": {
633
+ "8": 34147688
634
+ },
635
+ "native_effect_not_executed": true
636
+ }
637
+ ],
638
+ "status": "returned"
639
+ },
640
+ {
641
+ "execution": {
642
+ "byte_writes": [],
643
+ "calls": [
644
+ {
645
+ "args": {
646
+ "8": 34147688
647
+ },
648
+ "instruction": 292538,
649
+ "target": -31
650
+ }
651
+ ],
652
+ "children": [
653
+ {
654
+ "call": {
655
+ "args": {
656
+ "8": 34147688
657
+ },
658
+ "instruction": 292538,
659
+ "target": -31
660
+ },
661
+ "effect": {
662
+ "arguments": {
663
+ "8": 34147688
664
+ },
665
+ "native_effect_not_executed": true
666
+ }
667
+ }
668
+ ],
669
+ "return": 0,
670
+ "stop": 292543,
671
+ "trace": null,
672
+ "trace_length": 33,
673
+ "trace_sha256": "862f50957f2b7792ff87fc8c171a0da11bb6af51bbb7ce189f1f4407c0b37474"
674
+ },
675
+ "initial": {
676
+ "client": 65536,
677
+ "entity": 34147688,
678
+ "flags424": 0,
679
+ "mode": 0,
680
+ "result96": 0
681
+ },
682
+ "pending_call": null,
683
+ "requests": [
684
+ {
685
+ "arguments": {
686
+ "8": 34147688
687
+ },
688
+ "native_effect_not_executed": true
689
+ }
690
+ ],
691
+ "status": "returned"
692
+ },
693
+ {
694
+ "execution": {
695
+ "byte_writes": [],
696
+ "calls": [
697
+ {
698
+ "args": {
699
+ "8": 34147688
700
+ },
701
+ "instruction": 292538,
702
+ "target": -31
703
+ }
704
+ ],
705
+ "children": [
706
+ {
707
+ "call": {
708
+ "args": {
709
+ "8": 34147688
710
+ },
711
+ "instruction": 292538,
712
+ "target": -31
713
+ },
714
+ "effect": {
715
+ "arguments": {
716
+ "8": 34147688
717
+ },
718
+ "native_effect_not_executed": true
719
+ }
720
+ }
721
+ ],
722
+ "return": 1,
723
+ "stop": 292543,
724
+ "trace": null,
725
+ "trace_length": 33,
726
+ "trace_sha256": "862f50957f2b7792ff87fc8c171a0da11bb6af51bbb7ce189f1f4407c0b37474"
727
+ },
728
+ "initial": {
729
+ "client": 65536,
730
+ "entity": 34147688,
731
+ "flags424": 0,
732
+ "mode": 0,
733
+ "result96": 1
734
+ },
735
+ "pending_call": null,
736
+ "requests": [
737
+ {
738
+ "arguments": {
739
+ "8": 34147688
740
+ },
741
+ "native_effect_not_executed": true
742
+ }
743
+ ],
744
+ "status": "returned"
745
+ },
746
+ {
747
+ "execution": {
748
+ "byte_writes": [],
749
+ "calls": [],
750
+ "children": [],
751
+ "return": null,
752
+ "stop": 292528,
753
+ "trace": null,
754
+ "trace_length": 24,
755
+ "trace_sha256": "14137c822ce71fbcaebd4a3c084658ca90e0fcdf910df4f5981c9763d6124ff6"
756
+ },
757
+ "initial": {
758
+ "client": 65536,
759
+ "entity": 34147688,
760
+ "flags424": 0,
761
+ "mode": 1,
762
+ "result96": 0
763
+ },
764
+ "pending_call": {
765
+ "arguments": {
766
+ "8": 34147688
767
+ },
768
+ "target": 144413
769
+ },
770
+ "requests": [],
771
+ "status": "rewind-restore-pending"
772
+ },
773
+ {
774
+ "execution": {
775
+ "byte_writes": [],
776
+ "calls": [],
777
+ "children": [],
778
+ "return": null,
779
+ "stop": 292528,
780
+ "trace": null,
781
+ "trace_length": 24,
782
+ "trace_sha256": "14137c822ce71fbcaebd4a3c084658ca90e0fcdf910df4f5981c9763d6124ff6"
783
+ },
784
+ "initial": {
785
+ "client": 65536,
786
+ "entity": 34147688,
787
+ "flags424": 0,
788
+ "mode": 1,
789
+ "result96": 1
790
+ },
791
+ "pending_call": {
792
+ "arguments": {
793
+ "8": 34147688
794
+ },
795
+ "target": 144413
796
+ },
797
+ "requests": [],
798
+ "status": "rewind-restore-pending"
799
+ },
800
+ {
801
+ "execution": {
802
+ "byte_writes": [],
803
+ "calls": [
804
+ {
805
+ "args": {
806
+ "8": 34147688
807
+ },
808
+ "instruction": 292538,
809
+ "target": -31
810
+ }
811
+ ],
812
+ "children": [
813
+ {
814
+ "call": {
815
+ "args": {
816
+ "8": 34147688
817
+ },
818
+ "instruction": 292538,
819
+ "target": -31
820
+ },
821
+ "effect": {
822
+ "arguments": {
823
+ "8": 34147688
824
+ },
825
+ "native_effect_not_executed": true
826
+ }
827
+ }
828
+ ],
829
+ "return": 0,
830
+ "stop": 292543,
831
+ "trace": null,
832
+ "trace_length": 33,
833
+ "trace_sha256": "862f50957f2b7792ff87fc8c171a0da11bb6af51bbb7ce189f1f4407c0b37474"
834
+ },
835
+ "initial": {
836
+ "client": 65536,
837
+ "entity": 34147688,
838
+ "flags424": 0,
839
+ "mode": 2,
840
+ "result96": 0
841
+ },
842
+ "pending_call": null,
843
+ "requests": [
844
+ {
845
+ "arguments": {
846
+ "8": 34147688
847
+ },
848
+ "native_effect_not_executed": true
849
+ }
850
+ ],
851
+ "status": "returned"
852
+ },
853
+ {
854
+ "execution": {
855
+ "byte_writes": [],
856
+ "calls": [
857
+ {
858
+ "args": {
859
+ "8": 34147688
860
+ },
861
+ "instruction": 292538,
862
+ "target": -31
863
+ }
864
+ ],
865
+ "children": [
866
+ {
867
+ "call": {
868
+ "args": {
869
+ "8": 34147688
870
+ },
871
+ "instruction": 292538,
872
+ "target": -31
873
+ },
874
+ "effect": {
875
+ "arguments": {
876
+ "8": 34147688
877
+ },
878
+ "native_effect_not_executed": true
879
+ }
880
+ }
881
+ ],
882
+ "return": 1,
883
+ "stop": 292543,
884
+ "trace": null,
885
+ "trace_length": 33,
886
+ "trace_sha256": "862f50957f2b7792ff87fc8c171a0da11bb6af51bbb7ce189f1f4407c0b37474"
887
+ },
888
+ "initial": {
889
+ "client": 65536,
890
+ "entity": 34147688,
891
+ "flags424": 0,
892
+ "mode": 2,
893
+ "result96": 1
894
+ },
895
+ "pending_call": null,
896
+ "requests": [
897
+ {
898
+ "arguments": {
899
+ "8": 34147688
900
+ },
901
+ "native_effect_not_executed": true
902
+ }
903
+ ],
904
+ "status": "returned"
905
+ },
906
+ {
907
+ "execution": {
908
+ "byte_writes": [],
909
+ "calls": [
910
+ {
911
+ "args": {
912
+ "8": 34147688
913
+ },
914
+ "instruction": 292538,
915
+ "target": -31
916
+ }
917
+ ],
918
+ "children": [
919
+ {
920
+ "call": {
921
+ "args": {
922
+ "8": 34147688
923
+ },
924
+ "instruction": 292538,
925
+ "target": -31
926
+ },
927
+ "effect": {
928
+ "arguments": {
929
+ "8": 34147688
930
+ },
931
+ "native_effect_not_executed": true
932
+ }
933
+ }
934
+ ],
935
+ "return": 0,
936
+ "stop": 292543,
937
+ "trace": null,
938
+ "trace_length": 29,
939
+ "trace_sha256": "b6fb47fc222679ae6e11f3066f034f59de6da0f6bfe8517af89ff809ac8d5865"
940
+ },
941
+ "initial": {
942
+ "client": 65536,
943
+ "entity": 34147688,
944
+ "flags424": 8,
945
+ "mode": 0,
946
+ "result96": 0
947
+ },
948
+ "pending_call": null,
949
+ "requests": [
950
+ {
951
+ "arguments": {
952
+ "8": 34147688
953
+ },
954
+ "native_effect_not_executed": true
955
+ }
956
+ ],
957
+ "status": "returned"
958
+ },
959
+ {
960
+ "execution": {
961
+ "byte_writes": [],
962
+ "calls": [
963
+ {
964
+ "args": {
965
+ "8": 34147688
966
+ },
967
+ "instruction": 292538,
968
+ "target": -31
969
+ }
970
+ ],
971
+ "children": [
972
+ {
973
+ "call": {
974
+ "args": {
975
+ "8": 34147688
976
+ },
977
+ "instruction": 292538,
978
+ "target": -31
979
+ },
980
+ "effect": {
981
+ "arguments": {
982
+ "8": 34147688
983
+ },
984
+ "native_effect_not_executed": true
985
+ }
986
+ }
987
+ ],
988
+ "return": 1,
989
+ "stop": 292543,
990
+ "trace": null,
991
+ "trace_length": 29,
992
+ "trace_sha256": "b6fb47fc222679ae6e11f3066f034f59de6da0f6bfe8517af89ff809ac8d5865"
993
+ },
994
+ "initial": {
995
+ "client": 65536,
996
+ "entity": 34147688,
997
+ "flags424": 8,
998
+ "mode": 0,
999
+ "result96": 1
1000
+ },
1001
+ "pending_call": null,
1002
+ "requests": [
1003
+ {
1004
+ "arguments": {
1005
+ "8": 34147688
1006
+ },
1007
+ "native_effect_not_executed": true
1008
+ }
1009
+ ],
1010
+ "status": "returned"
1011
+ },
1012
+ {
1013
+ "execution": {
1014
+ "byte_writes": [],
1015
+ "calls": [
1016
+ {
1017
+ "args": {
1018
+ "8": 34147688
1019
+ },
1020
+ "instruction": 292538,
1021
+ "target": -31
1022
+ }
1023
+ ],
1024
+ "children": [
1025
+ {
1026
+ "call": {
1027
+ "args": {
1028
+ "8": 34147688
1029
+ },
1030
+ "instruction": 292538,
1031
+ "target": -31
1032
+ },
1033
+ "effect": {
1034
+ "arguments": {
1035
+ "8": 34147688
1036
+ },
1037
+ "native_effect_not_executed": true
1038
+ }
1039
+ }
1040
+ ],
1041
+ "return": 0,
1042
+ "stop": 292543,
1043
+ "trace": null,
1044
+ "trace_length": 29,
1045
+ "trace_sha256": "b6fb47fc222679ae6e11f3066f034f59de6da0f6bfe8517af89ff809ac8d5865"
1046
+ },
1047
+ "initial": {
1048
+ "client": 65536,
1049
+ "entity": 34147688,
1050
+ "flags424": 8,
1051
+ "mode": 1,
1052
+ "result96": 0
1053
+ },
1054
+ "pending_call": null,
1055
+ "requests": [
1056
+ {
1057
+ "arguments": {
1058
+ "8": 34147688
1059
+ },
1060
+ "native_effect_not_executed": true
1061
+ }
1062
+ ],
1063
+ "status": "returned"
1064
+ },
1065
+ {
1066
+ "execution": {
1067
+ "byte_writes": [],
1068
+ "calls": [
1069
+ {
1070
+ "args": {
1071
+ "8": 34147688
1072
+ },
1073
+ "instruction": 292538,
1074
+ "target": -31
1075
+ }
1076
+ ],
1077
+ "children": [
1078
+ {
1079
+ "call": {
1080
+ "args": {
1081
+ "8": 34147688
1082
+ },
1083
+ "instruction": 292538,
1084
+ "target": -31
1085
+ },
1086
+ "effect": {
1087
+ "arguments": {
1088
+ "8": 34147688
1089
+ },
1090
+ "native_effect_not_executed": true
1091
+ }
1092
+ }
1093
+ ],
1094
+ "return": 1,
1095
+ "stop": 292543,
1096
+ "trace": null,
1097
+ "trace_length": 29,
1098
+ "trace_sha256": "b6fb47fc222679ae6e11f3066f034f59de6da0f6bfe8517af89ff809ac8d5865"
1099
+ },
1100
+ "initial": {
1101
+ "client": 65536,
1102
+ "entity": 34147688,
1103
+ "flags424": 8,
1104
+ "mode": 1,
1105
+ "result96": 1
1106
+ },
1107
+ "pending_call": null,
1108
+ "requests": [
1109
+ {
1110
+ "arguments": {
1111
+ "8": 34147688
1112
+ },
1113
+ "native_effect_not_executed": true
1114
+ }
1115
+ ],
1116
+ "status": "returned"
1117
+ },
1118
+ {
1119
+ "execution": {
1120
+ "byte_writes": [],
1121
+ "calls": [
1122
+ {
1123
+ "args": {
1124
+ "8": 34147688
1125
+ },
1126
+ "instruction": 292538,
1127
+ "target": -31
1128
+ }
1129
+ ],
1130
+ "children": [
1131
+ {
1132
+ "call": {
1133
+ "args": {
1134
+ "8": 34147688
1135
+ },
1136
+ "instruction": 292538,
1137
+ "target": -31
1138
+ },
1139
+ "effect": {
1140
+ "arguments": {
1141
+ "8": 34147688
1142
+ },
1143
+ "native_effect_not_executed": true
1144
+ }
1145
+ }
1146
+ ],
1147
+ "return": 0,
1148
+ "stop": 292543,
1149
+ "trace": null,
1150
+ "trace_length": 29,
1151
+ "trace_sha256": "b6fb47fc222679ae6e11f3066f034f59de6da0f6bfe8517af89ff809ac8d5865"
1152
+ },
1153
+ "initial": {
1154
+ "client": 65536,
1155
+ "entity": 34147688,
1156
+ "flags424": 8,
1157
+ "mode": 2,
1158
+ "result96": 0
1159
+ },
1160
+ "pending_call": null,
1161
+ "requests": [
1162
+ {
1163
+ "arguments": {
1164
+ "8": 34147688
1165
+ },
1166
+ "native_effect_not_executed": true
1167
+ }
1168
+ ],
1169
+ "status": "returned"
1170
+ },
1171
+ {
1172
+ "execution": {
1173
+ "byte_writes": [],
1174
+ "calls": [
1175
+ {
1176
+ "args": {
1177
+ "8": 34147688
1178
+ },
1179
+ "instruction": 292538,
1180
+ "target": -31
1181
+ }
1182
+ ],
1183
+ "children": [
1184
+ {
1185
+ "call": {
1186
+ "args": {
1187
+ "8": 34147688
1188
+ },
1189
+ "instruction": 292538,
1190
+ "target": -31
1191
+ },
1192
+ "effect": {
1193
+ "arguments": {
1194
+ "8": 34147688
1195
+ },
1196
+ "native_effect_not_executed": true
1197
+ }
1198
+ }
1199
+ ],
1200
+ "return": 1,
1201
+ "stop": 292543,
1202
+ "trace": null,
1203
+ "trace_length": 29,
1204
+ "trace_sha256": "b6fb47fc222679ae6e11f3066f034f59de6da0f6bfe8517af89ff809ac8d5865"
1205
+ },
1206
+ "initial": {
1207
+ "client": 65536,
1208
+ "entity": 34147688,
1209
+ "flags424": 8,
1210
+ "mode": 2,
1211
+ "result96": 1
1212
+ },
1213
+ "pending_call": null,
1214
+ "requests": [
1215
+ {
1216
+ "arguments": {
1217
+ "8": 34147688
1218
+ },
1219
+ "native_effect_not_executed": true
1220
+ }
1221
+ ],
1222
+ "status": "returned"
1223
+ }
1224
+ ],
1225
+ "sha256": "a589351dfe517470a1b121dd2164714987d9e4577bf00c6486e1540035d7a79d",
1226
+ "source": {
1227
+ "archive": "zUrT43_qvm.pk3",
1228
+ "archive_sha256": "b59bf0c5bedf11d50e0edd220da7eade96de40601e98ae14c54c819047df0796",
1229
+ "member": {
1230
+ "bytes": 983300,
1231
+ "comment_hex": "",
1232
+ "compressed_bytes": 246560,
1233
+ "compression": 8,
1234
+ "crc32": "98ea1768",
1235
+ "create_system": 0,
1236
+ "create_version": 63,
1237
+ "date_time": [
1238
+ 2018,
1239
+ 6,
1240
+ 18,
1241
+ 22,
1242
+ 11,
1243
+ 50
1244
+ ],
1245
+ "directory": false,
1246
+ "entry_index": 2,
1247
+ "external_attr": 32,
1248
+ "extra_hex": "0a0020000000000001001800d1e24e974007d40116dcbf962f1fd20116dcbf962f1fd201",
1249
+ "extract_version": 20,
1250
+ "flags": 0,
1251
+ "header_offset": 221309,
1252
+ "internal_attr": 0,
1253
+ "occurrence": 0,
1254
+ "output": "assets/extracted/zUrT43_qvm.pk3/members/000002/vm/qagame.qvm",
1255
+ "path": "vm/qagame.qvm",
1256
+ "sha256": "a589351dfe517470a1b121dd2164714987d9e4577bf00c6486e1540035d7a79d",
1257
+ "type": "member",
1258
+ "volume": 0
1259
+ }
1260
+ }
1261
+ }
scripts/analyze_qvm_trace_finalize.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Shooter rewind-restore gate, final native link request and numeric return."""
3
+ import itertools
4
+ from pathlib import Path
5
+ from qvm_research_support import source,execute
6
+ from analyze_qvm_shot_trace_request import fixture,LOCAL
7
+ from analyze_qvm import write_json
8
+
9
+ def finalize(ins,m):
10
+ p=m[LOCAL+152];initial={'entity':p,'client':m[p+520],'flags424':m[p+424],'mode':m[LOCAL+176],'result96':m[LOCAL+96]};requests=[]
11
+ def link(i,m,a,c):e={'arguments':a,'native_effect_not_executed':True};requests.append(e);return m,c,0,e
12
+ m,_,e=execute(ins,292504,292543,m,(0,0,0),LOCAL,{-31:link},boundaries=[292528]);pending=e['stop']==292528
13
+ return m,{'initial':initial,'execution':e,'requests':requests,'status':'rewind-restore-pending' if pending else 'returned','pending_call':{'target':144413,'arguments':{8:p}} if pending else None}
14
+
15
+ def main():
16
+ q,raw,h,ins=source();rows=[]
17
+ for client,flag,mode,result in itertools.product([False,True],[0,8],[0,1,2],[0,1]):
18
+ m,a=fixture(raw,h);p=a[8];m[p+520]=m[p+520] if client else 0;m[p+424]=flag;m.update({LOCAL+152:p,LOCAL+176:mode,LOCAL+96:result});rows.append(finalize(ins,m)[1])
19
+ write_json(Path('docs/research/qvm-trace-finalize.json'),{'source':q['source'],'sha256':q['sha256'],'probes':rows,'limits':'Actual292504–292542, or stop before144413. Native−31 captured, numeric return is supplied prior local96 state, not hit validation. Rewind restoration remains unrecovered in this report.'})
20
+ if __name__=='__main__':main()
scripts/test_qvm_trace_finalize.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json,unittest
2
+ from pathlib import Path
3
+ class TraceFinalizeTests(unittest.TestCase):
4
+ @classmethod
5
+ def setUpClass(cls):cls.r=json.loads(Path('docs/research/qvm-trace-finalize.json').read_text())
6
+ def test_independent_exact_mode_and_flags_gate(self):
7
+ self.assertEqual(len(self.r['probes']),24)
8
+ for p in self.r['probes']:
9
+ a=p['initial'];pending=bool(a['client'] and not(a['flags424']&8) and a['mode']==1);self.assertEqual(p['status'],'rewind-restore-pending' if pending else 'returned')
10
+ def test_numeric_result_and_single_shooter_link(self):
11
+ for p in self.r['probes']:
12
+ if p['status']=='returned':self.assertEqual(p['execution']['return'],p['initial']['result96']);self.assertEqual(p['requests'],[{'arguments':{'8':p['initial']['entity']},'native_effect_not_executed':True}]);self.assertEqual([c['target'] for c in p['execution']['calls']],[-31])
13
+ def test_pending_has_no_fabricated_child_return_or_link(self):
14
+ for p in self.r['probes']:
15
+ if p['status']=='rewind-restore-pending':self.assertIsNone(p['execution']['return']);self.assertEqual(p['requests'],[]);self.assertEqual(p['pending_call'],{'target':144413,'arguments':{'8':p['initial']['entity']}})
16
+ if __name__=='__main__':unittest.main()