nmarshall commited on
Commit
eae7f32
·
1 Parent(s): 99a6f51

qvm: recover movement scratch and mode dispatch

Browse files
docs/FINDINGS.md CHANGED
@@ -1899,3 +1899,5 @@ RE-981: Rust matches96 original movement-setup cases, preserving type precedence
1899
  RE-982: Forty-eight source154089 executions compose preparation, routing, rewritten inputs, actual inactivity and movement setup through154544. Blocking movement can turn an otherwise active command into a timeout; early exits retain preceding timestamp/command mutations. Inactivity receives the pre-round delta, including the allowed negative exception. Native routing/team/send/drop effects remain captured; scratch setup and actual movement are beyond the boundary. [Evidence](research/QVM_CLIENT_PRE_MOVEMENT.md).
1900
 
1901
  RE-983: Rust matches48 original pre-movement executions, composing shared timing/spectator state, command masking, actual inactivity policy and finite movement setup. Ordinary early exits commit preceding writes; unsupported typed domains stage all state and effects atomically. Unit tests verify blocked-activity timeout, pre-round delta forwarding, timestamp persistence on routing and rollback after a late float error. Captured callbacks and later physics remain open. [Evidence](research/RUST_CLIENT_PRE_MOVEMENT.md).
 
 
 
1899
  RE-982: Forty-eight source154089 executions compose preparation, routing, rewritten inputs, actual inactivity and movement setup through154544. Blocking movement can turn an otherwise active command into a timeout; early exits retain preceding timestamp/command mutations. Inactivity receives the pre-round delta, including the allowed negative exception. Native routing/team/send/drop effects remain captured; scratch setup and actual movement are beyond the boundary. [Evidence](research/QVM_CLIENT_PRE_MOVEMENT.md).
1900
 
1901
  RE-983: Rust matches48 original pre-movement executions, composing shared timing/spectator state, command masking, actual inactivity policy and finite movement setup. Ordinary early exits commit preceding writes; unsupported typed domains stage all state and effects atomically. Unit tests verify blocked-activity timeout, pre-round delta forwarding, timestamp persistence on routing and rollback after a late float error. Captured callbacks and later physics remain open. [Evidence](research/RUST_CLIENT_PRE_MOVEMENT.md).
1902
+
1903
+ RE-984: Twelve original-QVM probes recover a 268-byte zero fill at frame+56, preserving four-byte guards on both sides. Mode10 requests152792 then152673; mode8 requests153419; other modes request neither. Zeroing precedes callbacks. Native memset is modeled with coherent byte writes; callback bodies and their state feedback remain unresolved. [Evidence](research/QVM_CLIENT_MOVE_SCRATCH.md).
docs/PROVISIONAL_TODO.md CHANGED
@@ -1955,3 +1955,5 @@ RE-964–973 completed timer deadline/phase/recovery contracts, whole-body compo
1955
  - [x] RE-983 Rust composed pre-movement pipeline with source early-exit mutations ([evidence](research/RUST_CLIENT_PRE_MOVEMENT.md)).
1956
 
1957
  RE-974–983 completed routing, command rewrite, inactivity, movement-parameter setup and composed prefix through154544. RE-984 tracks later callbacks/physics and native/runtime integration. [Batch and next work](research/QVM_CLIENT_PROCESSING_BATCH.md).
 
 
 
1955
  - [x] RE-983 Rust composed pre-movement pipeline with source early-exit mutations ([evidence](research/RUST_CLIENT_PRE_MOVEMENT.md)).
1956
 
1957
  RE-974–983 completed routing, command rewrite, inactivity, movement-parameter setup and composed prefix through154544. RE-984 tracks later callbacks/physics and native/runtime integration. [Batch and next work](research/QVM_CLIENT_PROCESSING_BATCH.md).
1958
+
1959
+ - [x] RE-984 Recover movement scratch initialization and mode dispatch ([evidence](research/QVM_CLIENT_MOVE_SCRATCH.md)).
docs/RESEARCH_LEDGER.md CHANGED
@@ -2607,3 +2607,7 @@ Forty-eight source154089 executions compose preparation, routing, rewritten inpu
2607
  Rust matches48 original pre-movement executions, composing shared timing/spectator state, command masking, actual inactivity policy and finite movement setup. Ordinary early exits commit preceding writes; unsupported typed domains stage all state and effects atomically. Unit tests verify blocked-activity timeout, pre-round delta forwarding, timestamp persistence on routing and rollback after a late float error. Captured callbacks and later physics remain open. Focused `cargo xtask test-group rust-client-pre-movement` passes with deterministic report regeneration, relevant regressions and storage/documentation/whitespace checks. Full suite deferred to the tenth-commit boundary. Original assets unchanged; native IO effects remain captured.
2608
 
2609
  Batch RE-974–983 boundary: the single `cargo xtask test-full --since 74af72a2` run after commit ten passed with the flake-declared Nix Python: 1,898 Python tests, 280 Rust tests (assets10, gameplay240, xtask30), 111 deterministic report producers, storage policy, 557 documentation files and whitespace guards. No generated report drift. Focused dependency-selection regression covers all five new source/Rust pairs and shared processing/timer/command/loading/lifecycle/native-policy/formatter inputs, including scoped gameplay test-count metadata. Validation notes were amended into task ten; original assets unchanged. See [batch findings and next work](research/QVM_CLIENT_PROCESSING_BATCH.md).
 
 
 
 
 
2607
  Rust matches48 original pre-movement executions, composing shared timing/spectator state, command masking, actual inactivity policy and finite movement setup. Ordinary early exits commit preceding writes; unsupported typed domains stage all state and effects atomically. Unit tests verify blocked-activity timeout, pre-round delta forwarding, timestamp persistence on routing and rollback after a late float error. Captured callbacks and later physics remain open. Focused `cargo xtask test-group rust-client-pre-movement` passes with deterministic report regeneration, relevant regressions and storage/documentation/whitespace checks. Full suite deferred to the tenth-commit boundary. Original assets unchanged; native IO effects remain captured.
2608
 
2609
  Batch RE-974–983 boundary: the single `cargo xtask test-full --since 74af72a2` run after commit ten passed with the flake-declared Nix Python: 1,898 Python tests, 280 Rust tests (assets10, gameplay240, xtask30), 111 deterministic report producers, storage policy, 557 documentation files and whitespace guards. No generated report drift. Focused dependency-selection regression covers all five new source/Rust pairs and shared processing/timer/command/loading/lifecycle/native-policy/formatter inputs, including scoped gameplay test-count metadata. Validation notes were amended into task ten; original assets unchanged. See [batch findings and next work](research/QVM_CLIENT_PROCESSING_BATCH.md).
2610
+
2611
+ ## 2026-10-29 — RE-984 Recover movement scratch initialization and mode dispatch
2612
+
2613
+ Twelve original-QVM probes recover a 268-byte zero fill at frame+56, preserving four-byte guards on both sides. Mode10 requests152792 then152673; mode8 requests153419; other modes request neither. Zeroing precedes callbacks. Native memset is modeled with coherent byte writes; callback bodies and their state feedback remain unresolved. Focused `cargo xtask test-group qvm-client-move-scratch` passes with deterministic report regeneration and selected regressions. Full suite deferred to task ten. Original assets unchanged; Python uses the flake-declared Nix runtime.
docs/REVERSE_ENGINEERING_TODO.md CHANGED
@@ -1992,3 +1992,5 @@ RE-974–983 recover routing, command rewriting, inactivity and composed setup t
1992
  - [x] RE-983 Rust composed pre-movement pipeline with source early-exit mutations ([evidence](research/RUST_CLIENT_PRE_MOVEMENT.md)).
1993
 
1994
  - [ ] RE-984 Recover movement scratch/callbacks and remaining caller paths, native feedback/ownership and full Rust/Bevy/Solari acceptance ([next work](research/QVM_CLIENT_PROCESSING_BATCH.md)).
 
 
 
1992
  - [x] RE-983 Rust composed pre-movement pipeline with source early-exit mutations ([evidence](research/RUST_CLIENT_PRE_MOVEMENT.md)).
1993
 
1994
  - [ ] RE-984 Recover movement scratch/callbacks and remaining caller paths, native feedback/ownership and full Rust/Bevy/Solari acceptance ([next work](research/QVM_CLIENT_PROCESSING_BATCH.md)).
1995
+
1996
+ - [x] RE-984 Recover movement scratch initialization and mode dispatch ([evidence](research/QVM_CLIENT_MOVE_SCRATCH.md)).
docs/research/QVM_CLIENT_MOVE_SCRATCH.md ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ # Recover movement scratch initialization and mode dispatch
2
+
3
+ RE-984. Focused validation: `cargo xtask test-group qvm-client-move-scratch`. [Machine report](qvm-client-move-scratch.json).
4
+
5
+ Twelve original-QVM probes recover a 268-byte zero fill at frame+56, preserving four-byte guards on both sides. Mode10 requests152792 then152673; mode8 requests153419; other modes request neither. Zeroing precedes callbacks. Native memset is modeled with coherent byte writes; callback bodies and their state feedback remain unresolved.
docs/research/README.md CHANGED
@@ -1527,3 +1527,5 @@ The extension collector adds five focused tests for native tail calls, command-r
1527
  - [RE-983: Rust composed pre-movement pipeline with source early-exit mutations](RUST_CLIENT_PRE_MOVEMENT.md).
1528
 
1529
  - [RE-974–983 client processing batch and RE-984 next work](QVM_CLIENT_PROCESSING_BATCH.md).
 
 
 
1527
  - [RE-983: Rust composed pre-movement pipeline with source early-exit mutations](RUST_CLIENT_PRE_MOVEMENT.md).
1528
 
1529
  - [RE-974–983 client processing batch and RE-984 next work](QVM_CLIENT_PROCESSING_BATCH.md).
1530
+
1531
+ - [RE-984: Recover movement scratch initialization and mode dispatch](QVM_CLIENT_MOVE_SCRATCH.md).
docs/research/qvm-client-move-scratch.json ADDED
@@ -0,0 +1,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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "limits": "154544..154579: native memset modeled exactly; mode callbacks captured without feedback. No movement simulation.",
3
+ "probes": [
4
+ {
5
+ "events": [
6
+ {
7
+ "count": 268,
8
+ "offset": 56,
9
+ "op": "zero"
10
+ }
11
+ ],
12
+ "execution": {
13
+ "stop": 154579,
14
+ "trace_length": 17,
15
+ "trace_sha256": "3ce2e9d2e50d38c84f3d006b95945877beb9cd1056c3a5f0de554412e58045ad"
16
+ },
17
+ "guards": [
18
+ "00000000",
19
+ "00000000"
20
+ ],
21
+ "input": {
22
+ "dirty": 0,
23
+ "mode": 0
24
+ },
25
+ "words": [
26
+ 0,
27
+ 0,
28
+ 0,
29
+ 0,
30
+ 0,
31
+ 0,
32
+ 0,
33
+ 0,
34
+ 0,
35
+ 0,
36
+ 0,
37
+ 0,
38
+ 0,
39
+ 0,
40
+ 0,
41
+ 0,
42
+ 0,
43
+ 0,
44
+ 0,
45
+ 0,
46
+ 0,
47
+ 0,
48
+ 0,
49
+ 0,
50
+ 0,
51
+ 0,
52
+ 0,
53
+ 0,
54
+ 0,
55
+ 0,
56
+ 0,
57
+ 0,
58
+ 0,
59
+ 0,
60
+ 0,
61
+ 0,
62
+ 0,
63
+ 0,
64
+ 0,
65
+ 0,
66
+ 0,
67
+ 0,
68
+ 0,
69
+ 0,
70
+ 0,
71
+ 0,
72
+ 0,
73
+ 0,
74
+ 0,
75
+ 0,
76
+ 0,
77
+ 0,
78
+ 0,
79
+ 0,
80
+ 0,
81
+ 0,
82
+ 0,
83
+ 0,
84
+ 0,
85
+ 0,
86
+ 0,
87
+ 0,
88
+ 0,
89
+ 0,
90
+ 0,
91
+ 0,
92
+ 0
93
+ ]
94
+ },
95
+ {
96
+ "events": [
97
+ {
98
+ "count": 268,
99
+ "offset": 56,
100
+ "op": "zero"
101
+ }
102
+ ],
103
+ "execution": {
104
+ "stop": 154579,
105
+ "trace_length": 17,
106
+ "trace_sha256": "3ce2e9d2e50d38c84f3d006b95945877beb9cd1056c3a5f0de554412e58045ad"
107
+ },
108
+ "guards": [
109
+ "a5a5a5a5",
110
+ "a5a5a5a5"
111
+ ],
112
+ "input": {
113
+ "dirty": 165,
114
+ "mode": 0
115
+ },
116
+ "words": [
117
+ 0,
118
+ 0,
119
+ 0,
120
+ 0,
121
+ 0,
122
+ 0,
123
+ 0,
124
+ 0,
125
+ 0,
126
+ 0,
127
+ 0,
128
+ 0,
129
+ 0,
130
+ 0,
131
+ 0,
132
+ 0,
133
+ 0,
134
+ 0,
135
+ 0,
136
+ 0,
137
+ 0,
138
+ 0,
139
+ 0,
140
+ 0,
141
+ 0,
142
+ 0,
143
+ 0,
144
+ 0,
145
+ 0,
146
+ 0,
147
+ 0,
148
+ 0,
149
+ 0,
150
+ 0,
151
+ 0,
152
+ 0,
153
+ 0,
154
+ 0,
155
+ 0,
156
+ 0,
157
+ 0,
158
+ 0,
159
+ 0,
160
+ 0,
161
+ 0,
162
+ 0,
163
+ 0,
164
+ 0,
165
+ 0,
166
+ 0,
167
+ 0,
168
+ 0,
169
+ 0,
170
+ 0,
171
+ 0,
172
+ 0,
173
+ 0,
174
+ 0,
175
+ 0,
176
+ 0,
177
+ 0,
178
+ 0,
179
+ 0,
180
+ 0,
181
+ 0,
182
+ 0,
183
+ 0
184
+ ]
185
+ },
186
+ {
187
+ "events": [
188
+ {
189
+ "count": 268,
190
+ "offset": 56,
191
+ "op": "zero"
192
+ }
193
+ ],
194
+ "execution": {
195
+ "stop": 154579,
196
+ "trace_length": 17,
197
+ "trace_sha256": "3ce2e9d2e50d38c84f3d006b95945877beb9cd1056c3a5f0de554412e58045ad"
198
+ },
199
+ "guards": [
200
+ "ffffffff",
201
+ "ffffffff"
202
+ ],
203
+ "input": {
204
+ "dirty": 255,
205
+ "mode": 0
206
+ },
207
+ "words": [
208
+ 0,
209
+ 0,
210
+ 0,
211
+ 0,
212
+ 0,
213
+ 0,
214
+ 0,
215
+ 0,
216
+ 0,
217
+ 0,
218
+ 0,
219
+ 0,
220
+ 0,
221
+ 0,
222
+ 0,
223
+ 0,
224
+ 0,
225
+ 0,
226
+ 0,
227
+ 0,
228
+ 0,
229
+ 0,
230
+ 0,
231
+ 0,
232
+ 0,
233
+ 0,
234
+ 0,
235
+ 0,
236
+ 0,
237
+ 0,
238
+ 0,
239
+ 0,
240
+ 0,
241
+ 0,
242
+ 0,
243
+ 0,
244
+ 0,
245
+ 0,
246
+ 0,
247
+ 0,
248
+ 0,
249
+ 0,
250
+ 0,
251
+ 0,
252
+ 0,
253
+ 0,
254
+ 0,
255
+ 0,
256
+ 0,
257
+ 0,
258
+ 0,
259
+ 0,
260
+ 0,
261
+ 0,
262
+ 0,
263
+ 0,
264
+ 0,
265
+ 0,
266
+ 0,
267
+ 0,
268
+ 0,
269
+ 0,
270
+ 0,
271
+ 0,
272
+ 0,
273
+ 0,
274
+ 0
275
+ ]
276
+ },
277
+ {
278
+ "events": [
279
+ {
280
+ "count": 268,
281
+ "offset": 56,
282
+ "op": "zero"
283
+ },
284
+ {
285
+ "op": "callback",
286
+ "slot": 2,
287
+ "target": 153419
288
+ }
289
+ ],
290
+ "execution": {
291
+ "stop": 154579,
292
+ "trace_length": 23,
293
+ "trace_sha256": "ac64b60842e8be6cbd5c366eba3ab6ea75835766e0c7db630f727f945c928ae2"
294
+ },
295
+ "guards": [
296
+ "00000000",
297
+ "00000000"
298
+ ],
299
+ "input": {
300
+ "dirty": 0,
301
+ "mode": 8
302
+ },
303
+ "words": [
304
+ 0,
305
+ 0,
306
+ 0,
307
+ 0,
308
+ 0,
309
+ 0,
310
+ 0,
311
+ 0,
312
+ 0,
313
+ 0,
314
+ 0,
315
+ 0,
316
+ 0,
317
+ 0,
318
+ 0,
319
+ 0,
320
+ 0,
321
+ 0,
322
+ 0,
323
+ 0,
324
+ 0,
325
+ 0,
326
+ 0,
327
+ 0,
328
+ 0,
329
+ 0,
330
+ 0,
331
+ 0,
332
+ 0,
333
+ 0,
334
+ 0,
335
+ 0,
336
+ 0,
337
+ 0,
338
+ 0,
339
+ 0,
340
+ 0,
341
+ 0,
342
+ 0,
343
+ 0,
344
+ 0,
345
+ 0,
346
+ 0,
347
+ 0,
348
+ 0,
349
+ 0,
350
+ 0,
351
+ 0,
352
+ 0,
353
+ 0,
354
+ 0,
355
+ 0,
356
+ 0,
357
+ 0,
358
+ 0,
359
+ 0,
360
+ 0,
361
+ 0,
362
+ 0,
363
+ 0,
364
+ 0,
365
+ 0,
366
+ 0,
367
+ 0,
368
+ 0,
369
+ 0,
370
+ 0
371
+ ]
372
+ },
373
+ {
374
+ "events": [
375
+ {
376
+ "count": 268,
377
+ "offset": 56,
378
+ "op": "zero"
379
+ },
380
+ {
381
+ "op": "callback",
382
+ "slot": 2,
383
+ "target": 153419
384
+ }
385
+ ],
386
+ "execution": {
387
+ "stop": 154579,
388
+ "trace_length": 23,
389
+ "trace_sha256": "ac64b60842e8be6cbd5c366eba3ab6ea75835766e0c7db630f727f945c928ae2"
390
+ },
391
+ "guards": [
392
+ "a5a5a5a5",
393
+ "a5a5a5a5"
394
+ ],
395
+ "input": {
396
+ "dirty": 165,
397
+ "mode": 8
398
+ },
399
+ "words": [
400
+ 0,
401
+ 0,
402
+ 0,
403
+ 0,
404
+ 0,
405
+ 0,
406
+ 0,
407
+ 0,
408
+ 0,
409
+ 0,
410
+ 0,
411
+ 0,
412
+ 0,
413
+ 0,
414
+ 0,
415
+ 0,
416
+ 0,
417
+ 0,
418
+ 0,
419
+ 0,
420
+ 0,
421
+ 0,
422
+ 0,
423
+ 0,
424
+ 0,
425
+ 0,
426
+ 0,
427
+ 0,
428
+ 0,
429
+ 0,
430
+ 0,
431
+ 0,
432
+ 0,
433
+ 0,
434
+ 0,
435
+ 0,
436
+ 0,
437
+ 0,
438
+ 0,
439
+ 0,
440
+ 0,
441
+ 0,
442
+ 0,
443
+ 0,
444
+ 0,
445
+ 0,
446
+ 0,
447
+ 0,
448
+ 0,
449
+ 0,
450
+ 0,
451
+ 0,
452
+ 0,
453
+ 0,
454
+ 0,
455
+ 0,
456
+ 0,
457
+ 0,
458
+ 0,
459
+ 0,
460
+ 0,
461
+ 0,
462
+ 0,
463
+ 0,
464
+ 0,
465
+ 0,
466
+ 0
467
+ ]
468
+ },
469
+ {
470
+ "events": [
471
+ {
472
+ "count": 268,
473
+ "offset": 56,
474
+ "op": "zero"
475
+ },
476
+ {
477
+ "op": "callback",
478
+ "slot": 2,
479
+ "target": 153419
480
+ }
481
+ ],
482
+ "execution": {
483
+ "stop": 154579,
484
+ "trace_length": 23,
485
+ "trace_sha256": "ac64b60842e8be6cbd5c366eba3ab6ea75835766e0c7db630f727f945c928ae2"
486
+ },
487
+ "guards": [
488
+ "ffffffff",
489
+ "ffffffff"
490
+ ],
491
+ "input": {
492
+ "dirty": 255,
493
+ "mode": 8
494
+ },
495
+ "words": [
496
+ 0,
497
+ 0,
498
+ 0,
499
+ 0,
500
+ 0,
501
+ 0,
502
+ 0,
503
+ 0,
504
+ 0,
505
+ 0,
506
+ 0,
507
+ 0,
508
+ 0,
509
+ 0,
510
+ 0,
511
+ 0,
512
+ 0,
513
+ 0,
514
+ 0,
515
+ 0,
516
+ 0,
517
+ 0,
518
+ 0,
519
+ 0,
520
+ 0,
521
+ 0,
522
+ 0,
523
+ 0,
524
+ 0,
525
+ 0,
526
+ 0,
527
+ 0,
528
+ 0,
529
+ 0,
530
+ 0,
531
+ 0,
532
+ 0,
533
+ 0,
534
+ 0,
535
+ 0,
536
+ 0,
537
+ 0,
538
+ 0,
539
+ 0,
540
+ 0,
541
+ 0,
542
+ 0,
543
+ 0,
544
+ 0,
545
+ 0,
546
+ 0,
547
+ 0,
548
+ 0,
549
+ 0,
550
+ 0,
551
+ 0,
552
+ 0,
553
+ 0,
554
+ 0,
555
+ 0,
556
+ 0,
557
+ 0,
558
+ 0,
559
+ 0,
560
+ 0,
561
+ 0,
562
+ 0
563
+ ]
564
+ },
565
+ {
566
+ "events": [
567
+ {
568
+ "count": 268,
569
+ "offset": 56,
570
+ "op": "zero"
571
+ },
572
+ {
573
+ "op": "callback",
574
+ "slot": 2,
575
+ "target": 152792
576
+ },
577
+ {
578
+ "op": "callback",
579
+ "slot": 2,
580
+ "target": 152673
581
+ }
582
+ ],
583
+ "execution": {
584
+ "stop": 154579,
585
+ "trace_length": 29,
586
+ "trace_sha256": "a7e35d82111427365fc7c826af34dcb38ab1ea1738e18955fe9f0b51859810d4"
587
+ },
588
+ "guards": [
589
+ "00000000",
590
+ "00000000"
591
+ ],
592
+ "input": {
593
+ "dirty": 0,
594
+ "mode": 10
595
+ },
596
+ "words": [
597
+ 0,
598
+ 0,
599
+ 0,
600
+ 0,
601
+ 0,
602
+ 0,
603
+ 0,
604
+ 0,
605
+ 0,
606
+ 0,
607
+ 0,
608
+ 0,
609
+ 0,
610
+ 0,
611
+ 0,
612
+ 0,
613
+ 0,
614
+ 0,
615
+ 0,
616
+ 0,
617
+ 0,
618
+ 0,
619
+ 0,
620
+ 0,
621
+ 0,
622
+ 0,
623
+ 0,
624
+ 0,
625
+ 0,
626
+ 0,
627
+ 0,
628
+ 0,
629
+ 0,
630
+ 0,
631
+ 0,
632
+ 0,
633
+ 0,
634
+ 0,
635
+ 0,
636
+ 0,
637
+ 0,
638
+ 0,
639
+ 0,
640
+ 0,
641
+ 0,
642
+ 0,
643
+ 0,
644
+ 0,
645
+ 0,
646
+ 0,
647
+ 0,
648
+ 0,
649
+ 0,
650
+ 0,
651
+ 0,
652
+ 0,
653
+ 0,
654
+ 0,
655
+ 0,
656
+ 0,
657
+ 0,
658
+ 0,
659
+ 0,
660
+ 0,
661
+ 0,
662
+ 0,
663
+ 0
664
+ ]
665
+ },
666
+ {
667
+ "events": [
668
+ {
669
+ "count": 268,
670
+ "offset": 56,
671
+ "op": "zero"
672
+ },
673
+ {
674
+ "op": "callback",
675
+ "slot": 2,
676
+ "target": 152792
677
+ },
678
+ {
679
+ "op": "callback",
680
+ "slot": 2,
681
+ "target": 152673
682
+ }
683
+ ],
684
+ "execution": {
685
+ "stop": 154579,
686
+ "trace_length": 29,
687
+ "trace_sha256": "a7e35d82111427365fc7c826af34dcb38ab1ea1738e18955fe9f0b51859810d4"
688
+ },
689
+ "guards": [
690
+ "a5a5a5a5",
691
+ "a5a5a5a5"
692
+ ],
693
+ "input": {
694
+ "dirty": 165,
695
+ "mode": 10
696
+ },
697
+ "words": [
698
+ 0,
699
+ 0,
700
+ 0,
701
+ 0,
702
+ 0,
703
+ 0,
704
+ 0,
705
+ 0,
706
+ 0,
707
+ 0,
708
+ 0,
709
+ 0,
710
+ 0,
711
+ 0,
712
+ 0,
713
+ 0,
714
+ 0,
715
+ 0,
716
+ 0,
717
+ 0,
718
+ 0,
719
+ 0,
720
+ 0,
721
+ 0,
722
+ 0,
723
+ 0,
724
+ 0,
725
+ 0,
726
+ 0,
727
+ 0,
728
+ 0,
729
+ 0,
730
+ 0,
731
+ 0,
732
+ 0,
733
+ 0,
734
+ 0,
735
+ 0,
736
+ 0,
737
+ 0,
738
+ 0,
739
+ 0,
740
+ 0,
741
+ 0,
742
+ 0,
743
+ 0,
744
+ 0,
745
+ 0,
746
+ 0,
747
+ 0,
748
+ 0,
749
+ 0,
750
+ 0,
751
+ 0,
752
+ 0,
753
+ 0,
754
+ 0,
755
+ 0,
756
+ 0,
757
+ 0,
758
+ 0,
759
+ 0,
760
+ 0,
761
+ 0,
762
+ 0,
763
+ 0,
764
+ 0
765
+ ]
766
+ },
767
+ {
768
+ "events": [
769
+ {
770
+ "count": 268,
771
+ "offset": 56,
772
+ "op": "zero"
773
+ },
774
+ {
775
+ "op": "callback",
776
+ "slot": 2,
777
+ "target": 152792
778
+ },
779
+ {
780
+ "op": "callback",
781
+ "slot": 2,
782
+ "target": 152673
783
+ }
784
+ ],
785
+ "execution": {
786
+ "stop": 154579,
787
+ "trace_length": 29,
788
+ "trace_sha256": "a7e35d82111427365fc7c826af34dcb38ab1ea1738e18955fe9f0b51859810d4"
789
+ },
790
+ "guards": [
791
+ "ffffffff",
792
+ "ffffffff"
793
+ ],
794
+ "input": {
795
+ "dirty": 255,
796
+ "mode": 10
797
+ },
798
+ "words": [
799
+ 0,
800
+ 0,
801
+ 0,
802
+ 0,
803
+ 0,
804
+ 0,
805
+ 0,
806
+ 0,
807
+ 0,
808
+ 0,
809
+ 0,
810
+ 0,
811
+ 0,
812
+ 0,
813
+ 0,
814
+ 0,
815
+ 0,
816
+ 0,
817
+ 0,
818
+ 0,
819
+ 0,
820
+ 0,
821
+ 0,
822
+ 0,
823
+ 0,
824
+ 0,
825
+ 0,
826
+ 0,
827
+ 0,
828
+ 0,
829
+ 0,
830
+ 0,
831
+ 0,
832
+ 0,
833
+ 0,
834
+ 0,
835
+ 0,
836
+ 0,
837
+ 0,
838
+ 0,
839
+ 0,
840
+ 0,
841
+ 0,
842
+ 0,
843
+ 0,
844
+ 0,
845
+ 0,
846
+ 0,
847
+ 0,
848
+ 0,
849
+ 0,
850
+ 0,
851
+ 0,
852
+ 0,
853
+ 0,
854
+ 0,
855
+ 0,
856
+ 0,
857
+ 0,
858
+ 0,
859
+ 0,
860
+ 0,
861
+ 0,
862
+ 0,
863
+ 0,
864
+ 0,
865
+ 0
866
+ ]
867
+ },
868
+ {
869
+ "events": [
870
+ {
871
+ "count": 268,
872
+ "offset": 56,
873
+ "op": "zero"
874
+ }
875
+ ],
876
+ "execution": {
877
+ "stop": 154579,
878
+ "trace_length": 17,
879
+ "trace_sha256": "3ce2e9d2e50d38c84f3d006b95945877beb9cd1056c3a5f0de554412e58045ad"
880
+ },
881
+ "guards": [
882
+ "00000000",
883
+ "00000000"
884
+ ],
885
+ "input": {
886
+ "dirty": 0,
887
+ "mode": 4294967295
888
+ },
889
+ "words": [
890
+ 0,
891
+ 0,
892
+ 0,
893
+ 0,
894
+ 0,
895
+ 0,
896
+ 0,
897
+ 0,
898
+ 0,
899
+ 0,
900
+ 0,
901
+ 0,
902
+ 0,
903
+ 0,
904
+ 0,
905
+ 0,
906
+ 0,
907
+ 0,
908
+ 0,
909
+ 0,
910
+ 0,
911
+ 0,
912
+ 0,
913
+ 0,
914
+ 0,
915
+ 0,
916
+ 0,
917
+ 0,
918
+ 0,
919
+ 0,
920
+ 0,
921
+ 0,
922
+ 0,
923
+ 0,
924
+ 0,
925
+ 0,
926
+ 0,
927
+ 0,
928
+ 0,
929
+ 0,
930
+ 0,
931
+ 0,
932
+ 0,
933
+ 0,
934
+ 0,
935
+ 0,
936
+ 0,
937
+ 0,
938
+ 0,
939
+ 0,
940
+ 0,
941
+ 0,
942
+ 0,
943
+ 0,
944
+ 0,
945
+ 0,
946
+ 0,
947
+ 0,
948
+ 0,
949
+ 0,
950
+ 0,
951
+ 0,
952
+ 0,
953
+ 0,
954
+ 0,
955
+ 0,
956
+ 0
957
+ ]
958
+ },
959
+ {
960
+ "events": [
961
+ {
962
+ "count": 268,
963
+ "offset": 56,
964
+ "op": "zero"
965
+ }
966
+ ],
967
+ "execution": {
968
+ "stop": 154579,
969
+ "trace_length": 17,
970
+ "trace_sha256": "3ce2e9d2e50d38c84f3d006b95945877beb9cd1056c3a5f0de554412e58045ad"
971
+ },
972
+ "guards": [
973
+ "a5a5a5a5",
974
+ "a5a5a5a5"
975
+ ],
976
+ "input": {
977
+ "dirty": 165,
978
+ "mode": 4294967295
979
+ },
980
+ "words": [
981
+ 0,
982
+ 0,
983
+ 0,
984
+ 0,
985
+ 0,
986
+ 0,
987
+ 0,
988
+ 0,
989
+ 0,
990
+ 0,
991
+ 0,
992
+ 0,
993
+ 0,
994
+ 0,
995
+ 0,
996
+ 0,
997
+ 0,
998
+ 0,
999
+ 0,
1000
+ 0,
1001
+ 0,
1002
+ 0,
1003
+ 0,
1004
+ 0,
1005
+ 0,
1006
+ 0,
1007
+ 0,
1008
+ 0,
1009
+ 0,
1010
+ 0,
1011
+ 0,
1012
+ 0,
1013
+ 0,
1014
+ 0,
1015
+ 0,
1016
+ 0,
1017
+ 0,
1018
+ 0,
1019
+ 0,
1020
+ 0,
1021
+ 0,
1022
+ 0,
1023
+ 0,
1024
+ 0,
1025
+ 0,
1026
+ 0,
1027
+ 0,
1028
+ 0,
1029
+ 0,
1030
+ 0,
1031
+ 0,
1032
+ 0,
1033
+ 0,
1034
+ 0,
1035
+ 0,
1036
+ 0,
1037
+ 0,
1038
+ 0,
1039
+ 0,
1040
+ 0,
1041
+ 0,
1042
+ 0,
1043
+ 0,
1044
+ 0,
1045
+ 0,
1046
+ 0,
1047
+ 0
1048
+ ]
1049
+ },
1050
+ {
1051
+ "events": [
1052
+ {
1053
+ "count": 268,
1054
+ "offset": 56,
1055
+ "op": "zero"
1056
+ }
1057
+ ],
1058
+ "execution": {
1059
+ "stop": 154579,
1060
+ "trace_length": 17,
1061
+ "trace_sha256": "3ce2e9d2e50d38c84f3d006b95945877beb9cd1056c3a5f0de554412e58045ad"
1062
+ },
1063
+ "guards": [
1064
+ "ffffffff",
1065
+ "ffffffff"
1066
+ ],
1067
+ "input": {
1068
+ "dirty": 255,
1069
+ "mode": 4294967295
1070
+ },
1071
+ "words": [
1072
+ 0,
1073
+ 0,
1074
+ 0,
1075
+ 0,
1076
+ 0,
1077
+ 0,
1078
+ 0,
1079
+ 0,
1080
+ 0,
1081
+ 0,
1082
+ 0,
1083
+ 0,
1084
+ 0,
1085
+ 0,
1086
+ 0,
1087
+ 0,
1088
+ 0,
1089
+ 0,
1090
+ 0,
1091
+ 0,
1092
+ 0,
1093
+ 0,
1094
+ 0,
1095
+ 0,
1096
+ 0,
1097
+ 0,
1098
+ 0,
1099
+ 0,
1100
+ 0,
1101
+ 0,
1102
+ 0,
1103
+ 0,
1104
+ 0,
1105
+ 0,
1106
+ 0,
1107
+ 0,
1108
+ 0,
1109
+ 0,
1110
+ 0,
1111
+ 0,
1112
+ 0,
1113
+ 0,
1114
+ 0,
1115
+ 0,
1116
+ 0,
1117
+ 0,
1118
+ 0,
1119
+ 0,
1120
+ 0,
1121
+ 0,
1122
+ 0,
1123
+ 0,
1124
+ 0,
1125
+ 0,
1126
+ 0,
1127
+ 0,
1128
+ 0,
1129
+ 0,
1130
+ 0,
1131
+ 0,
1132
+ 0,
1133
+ 0,
1134
+ 0,
1135
+ 0,
1136
+ 0,
1137
+ 0,
1138
+ 0
1139
+ ]
1140
+ }
1141
+ ],
1142
+ "sha256": "a589351dfe517470a1b121dd2164714987d9e4577bf00c6486e1540035d7a79d",
1143
+ "source": {
1144
+ "archive": "zUrT43_qvm.pk3",
1145
+ "archive_sha256": "b59bf0c5bedf11d50e0edd220da7eade96de40601e98ae14c54c819047df0796",
1146
+ "member": {
1147
+ "bytes": 983300,
1148
+ "comment_hex": "",
1149
+ "compressed_bytes": 246560,
1150
+ "compression": 8,
1151
+ "crc32": "98ea1768",
1152
+ "create_system": 0,
1153
+ "create_version": 63,
1154
+ "date_time": [
1155
+ 2018,
1156
+ 6,
1157
+ 18,
1158
+ 22,
1159
+ 11,
1160
+ 50
1161
+ ],
1162
+ "directory": false,
1163
+ "entry_index": 2,
1164
+ "external_attr": 32,
1165
+ "extra_hex": "0a0020000000000001001800d1e24e974007d40116dcbf962f1fd20116dcbf962f1fd201",
1166
+ "extract_version": 20,
1167
+ "flags": 0,
1168
+ "header_offset": 221309,
1169
+ "internal_attr": 0,
1170
+ "occurrence": 0,
1171
+ "output": "assets/extracted/zUrT43_qvm.pk3/members/000002/vm/qagame.qvm",
1172
+ "path": "vm/qagame.qvm",
1173
+ "sha256": "a589351dfe517470a1b121dd2164714987d9e4577bf00c6486e1540035d7a79d",
1174
+ "type": "member",
1175
+ "volume": 0
1176
+ }
1177
+ }
1178
+ }
scripts/analyze_qvm_client_move_scratch.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Verified original movement-context source contract."""
2
+ from pathlib import Path
3
+ from analyze_qvm import write_json
4
+ from qvm_research_support import source
5
+ from qvm_client_move_context_support import seed,scratch,scratch_fixtures
6
+
7
+ def main():
8
+ q,raw,h,ins=source();probes=[]
9
+ for a in scratch_fixtures():
10
+ m,b=seed(raw,h,a);m,p,b=scratch(ins,m,b,a);p['input']=a;probes.append(p)
11
+ write_json(Path('docs/research/qvm-client-move-scratch.json'),dict(source=q['source'],sha256=q['sha256'],probes=probes,limits='154544..154579: native memset modeled exactly; mode callbacks captured without feedback. No movement simulation.'))
12
+ if __name__=='__main__':main()
scripts/qvm_client_move_context_oracle.py ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ """Independent expectations for movement scratch and context contracts."""
2
+ def scratch(a):
3
+ t=[152792,152673] if a['mode']==10 else [153419] if a['mode']==8 else []
4
+ return dict(events=[dict(op='zero',offset=56,count=268)]+[dict(op='callback',target=v,slot=2) for v in t],words=[0]*67,guards=[bytes([a['dirty']]*4).hex()]*2)
scripts/qvm_client_move_context_support.py ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Original154544 movement scratch/callback and collision-context boundaries."""
2
+ from qvm_client_processing_support import seed as base_seed,execute,ROOT,ENTITY,CLIENT
3
+ from qvm_byte_memory_support import write_bytes,read_bytes
4
+
5
+ def seed(raw,h,a):return base_seed(raw,h,a)
6
+
7
+ def scratch_fixtures():
8
+ return [dict(mode=mode,dirty=dirty) for mode in [0,8,10,0xffffffff] for dirty in [0,0xa5,0xff]]
9
+
10
+ def scratch_seed(m,b,a):
11
+ m[34090788]=a['mode']
12
+ write_bytes(m,b,{ROOT+o:a['dirty'] for o in range(52,328)})
13
+
14
+ def scratch_handlers(events):
15
+ def memset(i,m,a,bs):
16
+ assert a[8]==ROOT+56 and a[12]==0 and a[16]==268
17
+ data={a[8]+j:0 for j in range(a[16])};write_bytes(m,dict(bs),data)
18
+ events.append(dict(op='zero',offset=56,count=268))
19
+ return m,a[8],{'modeled_native_memset':True,'child_memory_bytes':data}
20
+ def callback(target):
21
+ def call(i,m,a,bs):
22
+ assert a[8]==ENTITY
23
+ events.append(dict(op='callback',target=target,slot=2));return m,0,{'captured_mode_callback':target}
24
+ return call
25
+ return {-101:memset,**{t:callback(t) for t in [152792,152673,153419]}}
26
+
27
+ def scratch(ins,m,b,a):
28
+ scratch_seed(m,b,a);events=[];m,e,b=execute(ins,m,b,154544,154579,scratch_handlers(events))
29
+ return m,dict(events=events,words=[m[ROOT+o]&0xffffffff for o in range(56,324,4)],guards=[read_bytes(m,b,ROOT+52,4).hex(),read_bytes(m,b,ROOT+324,4).hex()],execution={k:e[k] for k in ['stop','trace_length','trace_sha256']}),b
scripts/test_qvm_client_move_scratch.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json,unittest
2
+ from pathlib import Path
3
+ from qvm_client_move_context_oracle import scratch
4
+ class OriginalTests(unittest.TestCase):
5
+ def test_original_contract(self):
6
+ rows=json.loads(Path('docs/research/qvm-client-move-scratch.json').read_text())['probes'];self.assertEqual(len(rows),12)
7
+ for p in rows:
8
+ with self.subTest(input=p['input']):
9
+ for k,v in scratch(p['input']).items():self.assertEqual(p[k],v,k)
10
+ def test_fixture_identity_and_trace(self):
11
+ r=json.loads(Path('docs/research/qvm-client-move-scratch.json').read_text());self.assertEqual(len(r['sha256']),64)
12
+ self.assertTrue(all(p['execution']['trace_length']>0 for p in r['probes']))
13
+ if __name__=='__main__':unittest.main()
xtask/checks.tsv CHANGED
@@ -3670,3 +3670,7 @@ edge crates/urt-gameplay/src/client_timer.rs scripts/analyze_rust_client_pre_mov
3670
  edge crates/urt-gameplay/src/bin/urt-client-timer.rs scripts/analyze_rust_client_pre_movement.py
3671
  edge crates/urt-gameplay/src/client_processing.rs scripts/analyze_rust_client_pre_movement.py
3672
  edge crates/urt-gameplay/src/bin/urt-client-processing.rs scripts/analyze_rust_client_pre_movement.py
 
 
 
 
 
3670
  edge crates/urt-gameplay/src/bin/urt-client-timer.rs scripts/analyze_rust_client_pre_movement.py
3671
  edge crates/urt-gameplay/src/client_processing.rs scripts/analyze_rust_client_pre_movement.py
3672
  edge crates/urt-gameplay/src/bin/urt-client-processing.rs scripts/analyze_rust_client_pre_movement.py
3673
+ report scripts/analyze_qvm_client_move_scratch.py docs/research/qvm-client-move-scratch.json
3674
+ edge docs/research/qvm-client-move-scratch.json scripts/test_qvm_client_move_scratch.py
3675
+ group qvm-client-move-scratch scripts/analyze_qvm_client_move_scratch.py
3676
+ edge scripts/analyze_qvm_client_move_scratch.py scripts/analyze_qvm_resumer_audit.py