nmarshall commited on
Commit
b16a43c
·
1 Parent(s): a1fd4e2

qvm: recover location selection and cache gates

Browse files
docs/FINDINGS.md CHANGED
@@ -2009,3 +2009,5 @@ RE-1032: Forty-eight coherent source cases execute full defuse gates/lookup/dist
2009
  RE-1033: Rust matches48 full-source scenarios with actual constructor/radio/score/counter policies. Selected bomb origin and live teammate table feed the resolved effects rather than fixed synthetic responses. Missing-bomb and paused-score boundaries are preserved; world and feedback stage together on late errors. Tests materialize event84, wrapped score/counter changes and missing/error preservation. Native allocation/link/send/ranking/log and location/formatter boundaries remain explicit. [Evidence](research/RUST_EFFECT_DEFUSE_COMPLETE.md).
2010
 
2011
  RE-1024–1033 batch validation passed:1,998 Python tests,329 Rust tests,141 deterministic affected producers and612 documentation files. Source205260 is score update,283463 is indexed counter increment and193620 is team radio; old capture names remain compatibility labels. [Resolved feedback and next work](research/QVM_EFFECT_FEEDBACK_BATCH.md).
 
 
 
2009
  RE-1033: Rust matches48 full-source scenarios with actual constructor/radio/score/counter policies. Selected bomb origin and live teammate table feed the resolved effects rather than fixed synthetic responses. Missing-bomb and paused-score boundaries are preserved; world and feedback stage together on late errors. Tests materialize event84, wrapped score/counter changes and missing/error preservation. Native allocation/link/send/ranking/log and location/formatter boundaries remain explicit. [Evidence](research/RUST_EFFECT_DEFUSE_COMPLETE.md).
2010
 
2011
  RE-1024–1033 batch validation passed:1,998 Python tests,329 Rust tests,141 deterministic affected producers and612 documentation files. Source205260 is score update,283463 is indexed counter increment and193620 is team radio; old capture names remain compatibility labels. [Resolved feedback and next work](research/QVM_EFFECT_FEEDBACK_BATCH.md).
2012
+
2013
+ RE-1034: Sixteen original-QVM cases recover268248. A cached pointer returns only before its signed expiry. Otherwise a supplied box query over origin±40/40/52 chooses the first case-insensitive trigger_location candidate, or a linked-list fallback selects visible squared-distance≤best, so later equal-distance entries win. PVS is queried only for candidates within the current bound201326592. Cache fields are not written. Native box/PVS replies and linked identity remain supplied. [Evidence](research/QVM_LOCATION_NEAREST.md).
docs/PROVISIONAL_TODO.md CHANGED
@@ -2070,3 +2070,5 @@ RE-974–983 completed routing, command rewrite, inactivity, movement-parameter
2070
 
2071
  - [x] RE-1024–1033 resolved-feedback batch:174 paired scenarios with corrected score/counter/radio identities and actual QVM effect bodies ([evidence](research/QVM_EFFECT_FEEDBACK_BATCH.md)).
2072
  - [ ] RE-1034 connect remaining allocation/location/format/ranking/native feedback and migrate legacy labels ([scope](research/QVM_EFFECT_FEEDBACK_BATCH.md#next-work-re-1034)).
 
 
 
2070
 
2071
  - [x] RE-1024–1033 resolved-feedback batch:174 paired scenarios with corrected score/counter/radio identities and actual QVM effect bodies ([evidence](research/QVM_EFFECT_FEEDBACK_BATCH.md)).
2072
  - [ ] RE-1034 connect remaining allocation/location/format/ranking/native feedback and migrate legacy labels ([scope](research/QVM_EFFECT_FEEDBACK_BATCH.md#next-work-re-1034)).
2073
+
2074
+ - [x] RE-1034 Recover cached trigger and nearest location selection ([evidence](research/QVM_LOCATION_NEAREST.md)).
docs/RESEARCH_LEDGER.md CHANGED
@@ -2807,3 +2807,7 @@ Forty-eight coherent source cases execute full defuse gates/lookup/distance with
2807
  ## 2026-10-29 — RE-1033 Port full defuse policy with resolved effect bodies
2808
 
2809
  Rust matches48 full-source scenarios with actual constructor/radio/score/counter policies. Selected bomb origin and live teammate table feed the resolved effects rather than fixed synthetic responses. Missing-bomb and paused-score boundaries are preserved; world and feedback stage together on late errors. Tests materialize event84, wrapped score/counter changes and missing/error preservation. Native allocation/link/send/ranking/log and location/formatter boundaries remain explicit. Focused `cargo xtask test-group rust-effect-defuse-complete` passes with deterministic report regeneration and selected regressions. The single `cargo xtask test-full --since 74572275` run at the tenth-commit boundary passed: **1,998 Python tests** across549 modules, **329 Rust tests** (assets10, gameplay289, xtask30), **141 deterministic affected report producers**, storage policy, links across **612 documentation files** and whitespace guards. Regeneration left no changes, including earlier defuse outputs. Focused dependency-registry regression passed. Validation notes are amended into task ten, preserving ten commits. Original assets unchanged; Python uses the flake-declared Nix runtime.
 
 
 
 
 
2807
  ## 2026-10-29 — RE-1033 Port full defuse policy with resolved effect bodies
2808
 
2809
  Rust matches48 full-source scenarios with actual constructor/radio/score/counter policies. Selected bomb origin and live teammate table feed the resolved effects rather than fixed synthetic responses. Missing-bomb and paused-score boundaries are preserved; world and feedback stage together on late errors. Tests materialize event84, wrapped score/counter changes and missing/error preservation. Native allocation/link/send/ranking/log and location/formatter boundaries remain explicit. Focused `cargo xtask test-group rust-effect-defuse-complete` passes with deterministic report regeneration and selected regressions. The single `cargo xtask test-full --since 74572275` run at the tenth-commit boundary passed: **1,998 Python tests** across549 modules, **329 Rust tests** (assets10, gameplay289, xtask30), **141 deterministic affected report producers**, storage policy, links across **612 documentation files** and whitespace guards. Regeneration left no changes, including earlier defuse outputs. Focused dependency-registry regression passed. Validation notes are amended into task ten, preserving ten commits. Original assets unchanged; Python uses the flake-declared Nix runtime.
2810
+
2811
+ ## 2026-10-29 — RE-1034 Recover cached trigger and nearest location selection
2812
+
2813
+ Sixteen original-QVM cases recover268248. A cached pointer returns only before its signed expiry. Otherwise a supplied box query over origin±40/40/52 chooses the first case-insensitive trigger_location candidate, or a linked-list fallback selects visible squared-distance≤best, so later equal-distance entries win. PVS is queried only for candidates within the current bound201326592. Cache fields are not written. Native box/PVS replies and linked identity remain supplied. Focused `cargo xtask test-group qvm-location-nearest` 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
@@ -2107,3 +2107,5 @@ RE-974–983 recover routing, command rewriting, inactivity and composed setup t
2107
 
2108
  - [x] RE-1024–1033 resolved-feedback batch:174 paired scenarios with corrected score/counter/radio identities and actual QVM effect bodies ([evidence](research/QVM_EFFECT_FEEDBACK_BATCH.md)).
2109
  - [ ] RE-1034 connect remaining allocation/location/format/ranking/native feedback and migrate legacy labels ([scope](research/QVM_EFFECT_FEEDBACK_BATCH.md#next-work-re-1034)).
 
 
 
2107
 
2108
  - [x] RE-1024–1033 resolved-feedback batch:174 paired scenarios with corrected score/counter/radio identities and actual QVM effect bodies ([evidence](research/QVM_EFFECT_FEEDBACK_BATCH.md)).
2109
  - [ ] RE-1034 connect remaining allocation/location/format/ranking/native feedback and migrate legacy labels ([scope](research/QVM_EFFECT_FEEDBACK_BATCH.md#next-work-re-1034)).
2110
+
2111
+ - [x] RE-1034 Recover cached trigger and nearest location selection ([evidence](research/QVM_LOCATION_NEAREST.md)).
docs/research/QVM_LOCATION_NEAREST.md ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ # Recover cached trigger and nearest location selection
2
+
3
+ RE-1034. Focused validation: `cargo xtask test-group qvm-location-nearest`. [Machine report](qvm-location-nearest.json).
4
+
5
+ Sixteen original-QVM cases recover268248. A cached pointer returns only before its signed expiry. Otherwise a supplied box query over origin±40/40/52 chooses the first case-insensitive trigger_location candidate, or a linked-list fallback selects visible squared-distance≤best, so later equal-distance entries win. PVS is queried only for candidates within the current bound201326592. Cache fields are not written. Native box/PVS replies and linked identity remain supplied.
docs/research/README.md CHANGED
@@ -1637,3 +1637,5 @@ The extension collector adds five focused tests for native tail calls, command-r
1637
  - [RE-1033: Port full defuse policy with resolved effect bodies](RUST_EFFECT_DEFUSE_COMPLETE.md).
1638
 
1639
  - [Resolved defuse effect feedback: RE-1024–1033](QVM_EFFECT_FEEDBACK_BATCH.md).
 
 
 
1637
  - [RE-1033: Port full defuse policy with resolved effect bodies](RUST_EFFECT_DEFUSE_COMPLETE.md).
1638
 
1639
  - [Resolved defuse effect feedback: RE-1024–1033](QVM_EFFECT_FEEDBACK_BATCH.md).
1640
+
1641
+ - [RE-1034: Recover cached trigger and nearest location selection](QVM_LOCATION_NEAREST.md).
docs/research/qvm-location-nearest.json ADDED
@@ -0,0 +1,1059 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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ual268248 with actual69386 classname comparison. Engine-33 candidates and-27 PVS supplied; finite3D inputs and fixed linked identity. No native spatial-query conformance.",
3
+ "probes": [
4
+ {
5
+ "cache": null,
6
+ "execution": {
7
+ "stop": 268635,
8
+ "trace_length": 506,
9
+ "trace_sha256": "c350ca9a3b57a4928ea9406edf5bbedeaf453f7a59347085928641cbb39514d5"
10
+ },
11
+ "input": {
12
+ "cache": null,
13
+ "expiry": 10001,
14
+ "order": [
15
+ 0,
16
+ 1,
17
+ 2
18
+ ],
19
+ "points": [
20
+ [
21
+ 10.0,
22
+ 0.0,
23
+ 0.0
24
+ ],
25
+ [
26
+ 20.0,
27
+ 0.0,
28
+ 0.0
29
+ ],
30
+ [
31
+ -10.0,
32
+ 0.0,
33
+ 0.0
34
+ ]
35
+ ],
36
+ "profile": 0,
37
+ "query": [],
38
+ "tick": 10000,
39
+ "triggers": [
40
+ 0,
41
+ 0,
42
+ 0
43
+ ],
44
+ "visible": [
45
+ 1,
46
+ 1,
47
+ 1
48
+ ]
49
+ },
50
+ "pvs": [
51
+ 0,
52
+ 2
53
+ ],
54
+ "queries": [
55
+ [
56
+ [
57
+ 3256877056,
58
+ 3256877056,
59
+ 3260022784
60
+ ],
61
+ [
62
+ 1109393408,
63
+ 1109393408,
64
+ 1112539136
65
+ ]
66
+ ]
67
+ ],
68
+ "selected": 2
69
+ },
70
+ {
71
+ "cache": 0,
72
+ "execution": {
73
+ "stop": 268277,
74
+ "trace_length": 28,
75
+ "trace_sha256": "85ea11d5a1fac6ec8e41239687a5e94a934d2af1eab84e032bb15785f4aff044"
76
+ },
77
+ "input": {
78
+ "cache": 0,
79
+ "expiry": 10001,
80
+ "order": [
81
+ 0,
82
+ 1,
83
+ 2
84
+ ],
85
+ "points": [
86
+ [
87
+ 10.0,
88
+ 0.0,
89
+ 0.0
90
+ ],
91
+ [
92
+ 20.0,
93
+ 0.0,
94
+ 0.0
95
+ ],
96
+ [
97
+ -10.0,
98
+ 0.0,
99
+ 0.0
100
+ ]
101
+ ],
102
+ "profile": 1,
103
+ "query": [],
104
+ "tick": 10000,
105
+ "triggers": [
106
+ 0,
107
+ 0,
108
+ 0
109
+ ],
110
+ "visible": [
111
+ 1,
112
+ 1,
113
+ 1
114
+ ]
115
+ },
116
+ "pvs": [],
117
+ "queries": [],
118
+ "selected": 0
119
+ },
120
+ {
121
+ "cache": 0,
122
+ "execution": {
123
+ "stop": 268635,
124
+ "trace_length": 517,
125
+ "trace_sha256": "46f781303dba7c9435c2741d2ca5bc731556c4051d737cbce5c6a85ecbaf6081"
126
+ },
127
+ "input": {
128
+ "cache": 0,
129
+ "expiry": 10000,
130
+ "order": [
131
+ 0,
132
+ 1,
133
+ 2
134
+ ],
135
+ "points": [
136
+ [
137
+ 10.0,
138
+ 0.0,
139
+ 0.0
140
+ ],
141
+ [
142
+ 20.0,
143
+ 0.0,
144
+ 0.0
145
+ ],
146
+ [
147
+ -10.0,
148
+ 0.0,
149
+ 0.0
150
+ ]
151
+ ],
152
+ "profile": 2,
153
+ "query": [],
154
+ "tick": 10000,
155
+ "triggers": [
156
+ 0,
157
+ 0,
158
+ 0
159
+ ],
160
+ "visible": [
161
+ 1,
162
+ 1,
163
+ 1
164
+ ]
165
+ },
166
+ "pvs": [
167
+ 0,
168
+ 2
169
+ ],
170
+ "queries": [
171
+ [
172
+ [
173
+ 3256877056,
174
+ 3256877056,
175
+ 3260022784
176
+ ],
177
+ [
178
+ 1109393408,
179
+ 1109393408,
180
+ 1112539136
181
+ ]
182
+ ]
183
+ ],
184
+ "selected": 2
185
+ },
186
+ {
187
+ "cache": 0,
188
+ "execution": {
189
+ "stop": 268635,
190
+ "trace_length": 517,
191
+ "trace_sha256": "46f781303dba7c9435c2741d2ca5bc731556c4051d737cbce5c6a85ecbaf6081"
192
+ },
193
+ "input": {
194
+ "cache": 0,
195
+ "expiry": 9999,
196
+ "order": [
197
+ 0,
198
+ 1,
199
+ 2
200
+ ],
201
+ "points": [
202
+ [
203
+ 10.0,
204
+ 0.0,
205
+ 0.0
206
+ ],
207
+ [
208
+ 20.0,
209
+ 0.0,
210
+ 0.0
211
+ ],
212
+ [
213
+ -10.0,
214
+ 0.0,
215
+ 0.0
216
+ ]
217
+ ],
218
+ "profile": 3,
219
+ "query": [],
220
+ "tick": 10000,
221
+ "triggers": [
222
+ 0,
223
+ 0,
224
+ 0
225
+ ],
226
+ "visible": [
227
+ 1,
228
+ 1,
229
+ 1
230
+ ]
231
+ },
232
+ "pvs": [
233
+ 0,
234
+ 2
235
+ ],
236
+ "queries": [
237
+ [
238
+ [
239
+ 3256877056,
240
+ 3256877056,
241
+ 3260022784
242
+ ],
243
+ [
244
+ 1109393408,
245
+ 1109393408,
246
+ 1112539136
247
+ ]
248
+ ]
249
+ ],
250
+ "selected": 2
251
+ },
252
+ {
253
+ "cache": 1,
254
+ "execution": {
255
+ "stop": 268277,
256
+ "trace_length": 28,
257
+ "trace_sha256": "85ea11d5a1fac6ec8e41239687a5e94a934d2af1eab84e032bb15785f4aff044"
258
+ },
259
+ "input": {
260
+ "cache": 1,
261
+ "expiry": 0,
262
+ "order": [
263
+ 0,
264
+ 1,
265
+ 2
266
+ ],
267
+ "points": [
268
+ [
269
+ 10.0,
270
+ 0.0,
271
+ 0.0
272
+ ],
273
+ [
274
+ 20.0,
275
+ 0.0,
276
+ 0.0
277
+ ],
278
+ [
279
+ -10.0,
280
+ 0.0,
281
+ 0.0
282
+ ]
283
+ ],
284
+ "profile": 4,
285
+ "query": [],
286
+ "tick": 4294967295,
287
+ "triggers": [
288
+ 0,
289
+ 0,
290
+ 0
291
+ ],
292
+ "visible": [
293
+ 1,
294
+ 1,
295
+ 1
296
+ ]
297
+ },
298
+ "pvs": [],
299
+ "queries": [],
300
+ "selected": 1
301
+ },
302
+ {
303
+ "cache": null,
304
+ "execution": {
305
+ "stop": 268508,
306
+ "trace_length": 245,
307
+ "trace_sha256": "4f09f40d1c2004a8fff77c8cb27326d68bbf8929e10bb0691229131345703d7c"
308
+ },
309
+ "input": {
310
+ "cache": null,
311
+ "expiry": 10001,
312
+ "order": [
313
+ 0,
314
+ 1,
315
+ 2
316
+ ],
317
+ "points": [
318
+ [
319
+ 10.0,
320
+ 0.0,
321
+ 0.0
322
+ ],
323
+ [
324
+ 20.0,
325
+ 0.0,
326
+ 0.0
327
+ ],
328
+ [
329
+ -10.0,
330
+ 0.0,
331
+ 0.0
332
+ ]
333
+ ],
334
+ "profile": 5,
335
+ "query": [
336
+ 1,
337
+ 0
338
+ ],
339
+ "tick": 10000,
340
+ "triggers": [
341
+ 1,
342
+ 1,
343
+ 0
344
+ ],
345
+ "visible": [
346
+ 1,
347
+ 1,
348
+ 1
349
+ ]
350
+ },
351
+ "pvs": [],
352
+ "queries": [
353
+ [
354
+ [
355
+ 3256877056,
356
+ 3256877056,
357
+ 3260022784
358
+ ],
359
+ [
360
+ 1109393408,
361
+ 1109393408,
362
+ 1112539136
363
+ ]
364
+ ]
365
+ ],
366
+ "selected": 1
367
+ },
368
+ {
369
+ "cache": null,
370
+ "execution": {
371
+ "stop": 268508,
372
+ "trace_length": 287,
373
+ "trace_sha256": "cd8de39eaa968e7c0dd90404576fcff72ead42b89fdc2500fdba9060c622139d"
374
+ },
375
+ "input": {
376
+ "cache": null,
377
+ "expiry": 10001,
378
+ "order": [
379
+ 0,
380
+ 1,
381
+ 2
382
+ ],
383
+ "points": [
384
+ [
385
+ 10.0,
386
+ 0.0,
387
+ 0.0
388
+ ],
389
+ [
390
+ 20.0,
391
+ 0.0,
392
+ 0.0
393
+ ],
394
+ [
395
+ -10.0,
396
+ 0.0,
397
+ 0.0
398
+ ]
399
+ ],
400
+ "profile": 6,
401
+ "query": [
402
+ 2,
403
+ 0
404
+ ],
405
+ "tick": 10000,
406
+ "triggers": [
407
+ 1,
408
+ 0,
409
+ 0
410
+ ],
411
+ "visible": [
412
+ 1,
413
+ 1,
414
+ 1
415
+ ]
416
+ },
417
+ "pvs": [],
418
+ "queries": [
419
+ [
420
+ [
421
+ 3256877056,
422
+ 3256877056,
423
+ 3260022784
424
+ ],
425
+ [
426
+ 1109393408,
427
+ 1109393408,
428
+ 1112539136
429
+ ]
430
+ ]
431
+ ],
432
+ "selected": 0
433
+ },
434
+ {
435
+ "cache": null,
436
+ "execution": {
437
+ "stop": 268635,
438
+ "trace_length": 590,
439
+ "trace_sha256": "9a581227b8d75bc96abd3c5991eb1b7559d6af73a5a0a4f6e757c23012100972"
440
+ },
441
+ "input": {
442
+ "cache": null,
443
+ "expiry": 10001,
444
+ "order": [
445
+ 0,
446
+ 1,
447
+ 2
448
+ ],
449
+ "points": [
450
+ [
451
+ 10.0,
452
+ 0.0,
453
+ 0.0
454
+ ],
455
+ [
456
+ 20.0,
457
+ 0.0,
458
+ 0.0
459
+ ],
460
+ [
461
+ -10.0,
462
+ 0.0,
463
+ 0.0
464
+ ]
465
+ ],
466
+ "profile": 7,
467
+ "query": [
468
+ 0,
469
+ 1
470
+ ],
471
+ "tick": 10000,
472
+ "triggers": [
473
+ 0,
474
+ 0,
475
+ 0
476
+ ],
477
+ "visible": [
478
+ 1,
479
+ 1,
480
+ 1
481
+ ]
482
+ },
483
+ "pvs": [
484
+ 0,
485
+ 2
486
+ ],
487
+ "queries": [
488
+ [
489
+ [
490
+ 3256877056,
491
+ 3256877056,
492
+ 3260022784
493
+ ],
494
+ [
495
+ 1109393408,
496
+ 1109393408,
497
+ 1112539136
498
+ ]
499
+ ]
500
+ ],
501
+ "selected": 2
502
+ },
503
+ {
504
+ "cache": null,
505
+ "execution": {
506
+ "stop": 268635,
507
+ "trace_length": 500,
508
+ "trace_sha256": "2830201fd3c9cc9bac57acd881cf0275320d099569a5cb5d585e3c07343c2717"
509
+ },
510
+ "input": {
511
+ "cache": null,
512
+ "expiry": 10001,
513
+ "order": [
514
+ 0,
515
+ 1,
516
+ 2
517
+ ],
518
+ "points": [
519
+ [
520
+ 10.0,
521
+ 0.0,
522
+ 0.0
523
+ ],
524
+ [
525
+ 20.0,
526
+ 0.0,
527
+ 0.0
528
+ ],
529
+ [
530
+ -10.0,
531
+ 0.0,
532
+ 0.0
533
+ ]
534
+ ],
535
+ "profile": 8,
536
+ "query": [],
537
+ "tick": 10000,
538
+ "triggers": [
539
+ 0,
540
+ 0,
541
+ 0
542
+ ],
543
+ "visible": [
544
+ 1,
545
+ 0,
546
+ 0
547
+ ]
548
+ },
549
+ "pvs": [
550
+ 0,
551
+ 2
552
+ ],
553
+ "queries": [
554
+ [
555
+ [
556
+ 3256877056,
557
+ 3256877056,
558
+ 3260022784
559
+ ],
560
+ [
561
+ 1109393408,
562
+ 1109393408,
563
+ 1112539136
564
+ ]
565
+ ]
566
+ ],
567
+ "selected": 0
568
+ },
569
+ {
570
+ "cache": null,
571
+ "execution": {
572
+ "stop": 268635,
573
+ "trace_length": 509,
574
+ "trace_sha256": "8b6492aed40ebaa9fb757a9fe7f7f09005ddb74951ec08adce1c206fa89eb1f1"
575
+ },
576
+ "input": {
577
+ "cache": null,
578
+ "expiry": 10001,
579
+ "order": [
580
+ 0,
581
+ 1,
582
+ 2
583
+ ],
584
+ "points": [
585
+ [
586
+ 10.0,
587
+ 0.0,
588
+ 0.0
589
+ ],
590
+ [
591
+ 20.0,
592
+ 0.0,
593
+ 0.0
594
+ ],
595
+ [
596
+ -10.0,
597
+ 0.0,
598
+ 0.0
599
+ ]
600
+ ],
601
+ "profile": 9,
602
+ "query": [],
603
+ "tick": 10000,
604
+ "triggers": [
605
+ 0,
606
+ 0,
607
+ 0
608
+ ],
609
+ "visible": [
610
+ 0,
611
+ 0,
612
+ 0
613
+ ]
614
+ },
615
+ "pvs": [
616
+ 0,
617
+ 1,
618
+ 2
619
+ ],
620
+ "queries": [
621
+ [
622
+ [
623
+ 3256877056,
624
+ 3256877056,
625
+ 3260022784
626
+ ],
627
+ [
628
+ 1109393408,
629
+ 1109393408,
630
+ 1112539136
631
+ ]
632
+ ]
633
+ ],
634
+ "selected": null
635
+ },
636
+ {
637
+ "cache": null,
638
+ "execution": {
639
+ "stop": 268635,
640
+ "trace_length": 224,
641
+ "trace_sha256": "20539c0e3f09272098293fe4b1fedb189c7e8331a69a68f3f48bb6e33e558d4c"
642
+ },
643
+ "input": {
644
+ "cache": null,
645
+ "expiry": 10001,
646
+ "order": [],
647
+ "points": [
648
+ [
649
+ 10.0,
650
+ 0.0,
651
+ 0.0
652
+ ],
653
+ [
654
+ 20.0,
655
+ 0.0,
656
+ 0.0
657
+ ],
658
+ [
659
+ -10.0,
660
+ 0.0,
661
+ 0.0
662
+ ]
663
+ ],
664
+ "profile": 10,
665
+ "query": [],
666
+ "tick": 10000,
667
+ "triggers": [
668
+ 0,
669
+ 0,
670
+ 0
671
+ ],
672
+ "visible": [
673
+ 1,
674
+ 1,
675
+ 1
676
+ ]
677
+ },
678
+ "pvs": [],
679
+ "queries": [
680
+ [
681
+ [
682
+ 3256877056,
683
+ 3256877056,
684
+ 3260022784
685
+ ],
686
+ [
687
+ 1109393408,
688
+ 1109393408,
689
+ 1112539136
690
+ ]
691
+ ]
692
+ ],
693
+ "selected": null
694
+ },
695
+ {
696
+ "cache": null,
697
+ "execution": {
698
+ "stop": 268635,
699
+ "trace_length": 426,
700
+ "trace_sha256": "8e19c99aecfeef03a2e9202b84f7872c09896a39be299b731c89a9a93534534e"
701
+ },
702
+ "input": {
703
+ "cache": null,
704
+ "expiry": 10001,
705
+ "order": [
706
+ 2,
707
+ 0
708
+ ],
709
+ "points": [
710
+ [
711
+ 10.0,
712
+ 0.0,
713
+ 0.0
714
+ ],
715
+ [
716
+ 20.0,
717
+ 0.0,
718
+ 0.0
719
+ ],
720
+ [
721
+ -10.0,
722
+ 0.0,
723
+ 0.0
724
+ ]
725
+ ],
726
+ "profile": 11,
727
+ "query": [],
728
+ "tick": 10000,
729
+ "triggers": [
730
+ 0,
731
+ 0,
732
+ 0
733
+ ],
734
+ "visible": [
735
+ 1,
736
+ 1,
737
+ 1
738
+ ]
739
+ },
740
+ "pvs": [
741
+ 2,
742
+ 0
743
+ ],
744
+ "queries": [
745
+ [
746
+ [
747
+ 3256877056,
748
+ 3256877056,
749
+ 3260022784
750
+ ],
751
+ [
752
+ 1109393408,
753
+ 1109393408,
754
+ 1112539136
755
+ ]
756
+ ]
757
+ ],
758
+ "selected": 0
759
+ },
760
+ {
761
+ "cache": null,
762
+ "execution": {
763
+ "stop": 268635,
764
+ "trace_length": 464,
765
+ "trace_sha256": "b090646e783e09a0ba87f240b7fbad5b31df51a5dbd9a5622d3d1261d687ed84"
766
+ },
767
+ "input": {
768
+ "cache": null,
769
+ "expiry": 10001,
770
+ "order": [
771
+ 0,
772
+ 1,
773
+ 2
774
+ ],
775
+ "points": [
776
+ [
777
+ 15000.0,
778
+ 0.0,
779
+ 0.0
780
+ ],
781
+ [
782
+ 16000.0,
783
+ 0.0,
784
+ 0.0
785
+ ],
786
+ [
787
+ 17000.0,
788
+ 0.0,
789
+ 0.0
790
+ ]
791
+ ],
792
+ "profile": 12,
793
+ "query": [],
794
+ "tick": 10000,
795
+ "triggers": [
796
+ 0,
797
+ 0,
798
+ 0
799
+ ],
800
+ "visible": [
801
+ 1,
802
+ 1,
803
+ 1
804
+ ]
805
+ },
806
+ "pvs": [],
807
+ "queries": [
808
+ [
809
+ [
810
+ 3256877056,
811
+ 3256877056,
812
+ 3260022784
813
+ ],
814
+ [
815
+ 1109393408,
816
+ 1109393408,
817
+ 1112539136
818
+ ]
819
+ ]
820
+ ],
821
+ "selected": null
822
+ },
823
+ {
824
+ "cache": null,
825
+ "execution": {
826
+ "stop": 268635,
827
+ "trace_length": 521,
828
+ "trace_sha256": "1db76a865621a9ac38d1ad2c74ecea05915d23d9fedfa3df5351e580671d7eca"
829
+ },
830
+ "input": {
831
+ "cache": null,
832
+ "expiry": 10001,
833
+ "order": [
834
+ 0,
835
+ 1,
836
+ 2
837
+ ],
838
+ "points": [
839
+ [
840
+ 10.0,
841
+ 0.0,
842
+ 0.0
843
+ ],
844
+ [
845
+ 20.0,
846
+ 0.0,
847
+ 0.0
848
+ ],
849
+ [
850
+ -10.0,
851
+ 0.0,
852
+ 0.0
853
+ ]
854
+ ],
855
+ "profile": 13,
856
+ "query": [],
857
+ "tick": 10000,
858
+ "triggers": [
859
+ 0,
860
+ 0,
861
+ 0
862
+ ],
863
+ "visible": [
864
+ 0,
865
+ 1,
866
+ 1
867
+ ]
868
+ },
869
+ "pvs": [
870
+ 0,
871
+ 1,
872
+ 2
873
+ ],
874
+ "queries": [
875
+ [
876
+ [
877
+ 3256877056,
878
+ 3256877056,
879
+ 3260022784
880
+ ],
881
+ [
882
+ 1109393408,
883
+ 1109393408,
884
+ 1112539136
885
+ ]
886
+ ]
887
+ ],
888
+ "selected": 2
889
+ },
890
+ {
891
+ "cache": null,
892
+ "execution": {
893
+ "stop": 268508,
894
+ "trace_length": 245,
895
+ "trace_sha256": "4f09f40d1c2004a8fff77c8cb27326d68bbf8929e10bb0691229131345703d7c"
896
+ },
897
+ "input": {
898
+ "cache": null,
899
+ "expiry": 10001,
900
+ "order": [
901
+ 0,
902
+ 1,
903
+ 2
904
+ ],
905
+ "points": [
906
+ [
907
+ 10.0,
908
+ 0.0,
909
+ 0.0
910
+ ],
911
+ [
912
+ 20.0,
913
+ 0.0,
914
+ 0.0
915
+ ],
916
+ [
917
+ -10.0,
918
+ 0.0,
919
+ 0.0
920
+ ]
921
+ ],
922
+ "profile": 14,
923
+ "query": [
924
+ 2
925
+ ],
926
+ "tick": 10000,
927
+ "triggers": [
928
+ 0,
929
+ 0,
930
+ 1
931
+ ],
932
+ "visible": [
933
+ 1,
934
+ 1,
935
+ 1
936
+ ]
937
+ },
938
+ "pvs": [],
939
+ "queries": [
940
+ [
941
+ [
942
+ 3256877056,
943
+ 3256877056,
944
+ 3260022784
945
+ ],
946
+ [
947
+ 1109393408,
948
+ 1109393408,
949
+ 1112539136
950
+ ]
951
+ ]
952
+ ],
953
+ "selected": 2
954
+ },
955
+ {
956
+ "cache": null,
957
+ "execution": {
958
+ "stop": 268635,
959
+ "trace_length": 521,
960
+ "trace_sha256": "f8f9dd88e1f0164b6e993925d5fe3f32fdd96b957fc36ea98077a327e42a365a"
961
+ },
962
+ "input": {
963
+ "cache": null,
964
+ "expiry": 10001,
965
+ "order": [
966
+ 1,
967
+ 0,
968
+ 2
969
+ ],
970
+ "points": [
971
+ [
972
+ 10.0,
973
+ 0.0,
974
+ 0.0
975
+ ],
976
+ [
977
+ 20.0,
978
+ 0.0,
979
+ 0.0
980
+ ],
981
+ [
982
+ -10.0,
983
+ 0.0,
984
+ 0.0
985
+ ]
986
+ ],
987
+ "profile": 15,
988
+ "query": [],
989
+ "tick": 10000,
990
+ "triggers": [
991
+ 0,
992
+ 0,
993
+ 0
994
+ ],
995
+ "visible": [
996
+ 1,
997
+ 1,
998
+ 0
999
+ ]
1000
+ },
1001
+ "pvs": [
1002
+ 1,
1003
+ 0,
1004
+ 2
1005
+ ],
1006
+ "queries": [
1007
+ [
1008
+ [
1009
+ 3256877056,
1010
+ 3256877056,
1011
+ 3260022784
1012
+ ],
1013
+ [
1014
+ 1109393408,
1015
+ 1109393408,
1016
+ 1112539136
1017
+ ]
1018
+ ]
1019
+ ],
1020
+ "selected": 0
1021
+ }
1022
+ ],
1023
+ "sha256": "a589351dfe517470a1b121dd2164714987d9e4577bf00c6486e1540035d7a79d",
1024
+ "source": {
1025
+ "archive": "zUrT43_qvm.pk3",
1026
+ "archive_sha256": "b59bf0c5bedf11d50e0edd220da7eade96de40601e98ae14c54c819047df0796",
1027
+ "member": {
1028
+ "bytes": 983300,
1029
+ "comment_hex": "",
1030
+ "compressed_bytes": 246560,
1031
+ "compression": 8,
1032
+ "crc32": "98ea1768",
1033
+ "create_system": 0,
1034
+ "create_version": 63,
1035
+ "date_time": [
1036
+ 2018,
1037
+ 6,
1038
+ 18,
1039
+ 22,
1040
+ 11,
1041
+ 50
1042
+ ],
1043
+ "directory": false,
1044
+ "entry_index": 2,
1045
+ "external_attr": 32,
1046
+ "extra_hex": "0a0020000000000001001800d1e24e974007d40116dcbf962f1fd20116dcbf962f1fd201",
1047
+ "extract_version": 20,
1048
+ "flags": 0,
1049
+ "header_offset": 221309,
1050
+ "internal_attr": 0,
1051
+ "occurrence": 0,
1052
+ "output": "assets/extracted/zUrT43_qvm.pk3/members/000002/vm/qagame.qvm",
1053
+ "path": "vm/qagame.qvm",
1054
+ "sha256": "a589351dfe517470a1b121dd2164714987d9e4577bf00c6486e1540035d7a79d",
1055
+ "type": "member",
1056
+ "volume": 0
1057
+ }
1058
+ }
1059
+ }
scripts/analyze_qvm_location_nearest.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_location_feedback_support import seed,nearest,nearest_fixtures
6
+
7
+ def main():
8
+ q,raw,h,ins=source();probes=[]
9
+ for a in nearest_fixtures():
10
+ m,b=seed(raw,h,a);m,p,b=nearest(ins,m,b,a);p['input']=a;probes.append(p)
11
+ write_json(Path('docs/research/qvm-location-nearest.json'),dict(source=q['source'],sha256=q['sha256'],probes=probes,limits='Actual268248 with actual69386 classname comparison. Engine-33 candidates and-27 PVS supplied; finite3D inputs and fixed linked identity. No native spatial-query conformance.'))
12
+ if __name__=='__main__':main()
scripts/qvm_location_feedback_oracle.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Independent bounded location-selection and text expectations."""
2
+ from qvm_move_callbacks_oracle import f32,word,signed
3
+
4
+ def nearest(a):
5
+ selected=None;queries=[];pvs=[]
6
+ if a['cache'] is not None and signed(a['tick'])<signed(a['expiry']):selected=a['cache']
7
+ else:
8
+ queries=[[[word(v) for v in [-40.,-40.,-52.]],[word(v) for v in [40.,40.,52.]]]]
9
+ for j in a['query']:
10
+ if a['triggers'][j]:selected=j;break
11
+ else:
12
+ best=201326592.
13
+ for j in a['order']:
14
+ p=a['points'][j];d=f32(f32(f32(p[0]*p[0])+f32(p[1]*p[1]))+f32(p[2]*p[2]))
15
+ if d<=best:
16
+ pvs.append(j)
17
+ if a['visible'][j]:best=d;selected=j
18
+ return dict(selected=selected,queries=queries,pvs=pvs,cache=a['cache'])
scripts/qvm_location_feedback_support.py ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Source location selection/text and their radio/allocation consumers."""
2
+ from qvm_effect_feedback_support import seed as old_seed
3
+ from qvm_client_processing_support import ROOT,ENTITY,CLIENT
4
+ from qvm_camera_world_support import run,casecmp,POOL
5
+ from qvm_byte_memory_support import write_bytes,read_bytes
6
+ from qvm_map_commands_support import put_string
7
+ from qvm_string_memory_support import cstring
8
+ from analyze_qvm_acceleration import word,number
9
+ BASE=ROOT+0x200000
10
+ LOC=[POOL+880*j for j in [5,6,7]]
11
+
12
+ def seed(raw,h,a):
13
+ m,b=old_seed(raw,h,a)
14
+ for p in [31128,31132,31136]:m[p]=int.from_bytes(raw[h['data_offset']+p:h['data_offset']+p+4],'little')
15
+ for address in [93224,93227]:put_string(m,b,address,raw[h['data_offset']+address:].split(b'\0')[0])
16
+ return m,b
17
+
18
+ def nearest_fixtures():
19
+ defaults=dict(cache=None,expiry=10001,tick=10000,query=[],order=[0,1,2],points=[[10.,0.,0.],[20.,0.,0.],[-10.,0.,0.]],visible=[1,1,1],triggers=[0,0,0])
20
+ profiles=[{},dict(cache=0),dict(cache=0,expiry=10000),dict(cache=0,expiry=9999),dict(cache=1,tick=0xffffffff,expiry=0),dict(query=[1,0],triggers=[1,1,0]),dict(query=[2,0],triggers=[1,0,0]),dict(query=[0,1]),dict(visible=[1,0,0]),dict(visible=[0,0,0]),dict(order=[]),dict(order=[2,0]),dict(points=[[15000.,0.,0.],[16000.,0.,0.],[17000.,0.,0.]]),dict(visible=[0,1,1]),dict(query=[2],triggers=[0,0,1]),dict(order=[1,0,2],visible=[1,1,0])]
21
+ return [dict(defaults,**changes,profile=j) for j,changes in enumerate(profiles)]
22
+
23
+ def nearest_seed(m,b,a):
24
+ m.update({ENTITY+848:0 if a['cache'] is None else LOC[a['cache']],34992532:a['tick'],34999640:LOC[a['order'][0]] if a['order'] else 0})
25
+ for j in range(3):
26
+ m[ENTITY+488+4*j]=word(0.);m[ENTITY+436+4*j]=word([-16.,-16.,-24.][j]);m[ENTITY+448+4*j]=word([16.,16.,32.][j])
27
+ for j,e in enumerate(LOC):
28
+ name=BASE+0x10000+128*j;node=BASE+0x11000+32*j
29
+ put_string(m,b,name,b'TRIGGER_LOCATION' if a['triggers'][j] else b'misc_location');m[e+536]=name;m[e+524]=node;m[e+596]=a['expiry'];m[node+24]=0
30
+ for k,v in enumerate(a['points'][j]):m[e+488+4*k]=word(v)
31
+ for j,index in enumerate(a['order']):m[m[LOC[index]+524]+24]=LOC[a['order'][j+1]] if j+1<len(a['order']) else 0
32
+
33
+ def nearest_run(ins,m,b,a):
34
+ queries=[];pvs=[]
35
+ def box(i,m,args,bs):
36
+ queries.append([[m[args[o]+4*k]&0xffffffff for k in range(3)] for o in [8,12]])
37
+ assert args[20]==1024
38
+ changes={args[16]+4*j+k:((5+v)>>(8*k))&255 for j,v in enumerate(a['query']) for k in range(4)};write_bytes(m,dict(bs),changes)
39
+ return m,len(a['query']),{'engine_box_response_supplied':True,'child_memory_bytes':changes}
40
+ def compare(i,m,args,bs):
41
+ m,v,p,b=casecmp(i,m,args,dict(bs),base=BASE+0x30000);return m,v,{'actual_source_child':69386}
42
+ def visible(i,m,args,bs):
43
+ j=next(j for j,e in enumerate(LOC) if args[12]==e+488);pvs.append(j);return m,a['visible'][j],{'engine_pvs_response_supplied':True}
44
+ m,v,p,b=run(ins,m,268248,268635,4228,{8:ENTITY},b,{-33:box,69386:compare,-27:visible},base=BASE)
45
+ return m,dict(selected=None if not v else LOC.index(v),queries=queries,pvs=pvs,cache=None if not m[ENTITY+848] else LOC.index(m[ENTITY+848]),execution=p['execution']),b
46
+
47
+ def nearest(ins,m,b,a):nearest_seed(m,b,a);return nearest_run(ins,m,b,a)
scripts/test_qvm_location_nearest.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json,unittest
2
+ from pathlib import Path
3
+ from qvm_location_feedback_oracle import nearest
4
+ class OriginalTests(unittest.TestCase):
5
+ def test_original_contract(self):
6
+ rows=json.loads(Path('docs/research/qvm-location-nearest.json').read_text())['probes'];self.assertEqual(len(rows),16)
7
+ for p in rows:
8
+ with self.subTest(input=p['input']):
9
+ for k,v in nearest(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-location-nearest.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
@@ -4519,3 +4519,7 @@ edge crates/urt-gameplay/src/bin/urt-effect-feedback.rs scripts/analyze_rust_eff
4519
  edge crates/urt-gameplay/src/score.rs scripts/analyze_rust_effect_defuse_complete.py
4520
  edge crates/urt-gameplay/src/transition.rs scripts/analyze_rust_effect_defuse_complete.py
4521
  edge crates/urt-gameplay/src/defuse.rs scripts/analyze_rust_effect_defuse_complete.py
 
 
 
 
 
4519
  edge crates/urt-gameplay/src/score.rs scripts/analyze_rust_effect_defuse_complete.py
4520
  edge crates/urt-gameplay/src/transition.rs scripts/analyze_rust_effect_defuse_complete.py
4521
  edge crates/urt-gameplay/src/defuse.rs scripts/analyze_rust_effect_defuse_complete.py
4522
+ report scripts/analyze_qvm_location_nearest.py docs/research/qvm-location-nearest.json
4523
+ edge docs/research/qvm-location-nearest.json scripts/test_qvm_location_nearest.py
4524
+ group qvm-location-nearest scripts/analyze_qvm_location_nearest.py
4525
+ edge scripts/analyze_qvm_location_nearest.py scripts/analyze_qvm_resumer_audit.py