qvm: integrate overlap queries into camera fallback
Browse files- docs/FINDINGS.md +3 -0
- docs/PROVISIONAL_TODO.md +3 -0
- docs/RESEARCH_LEDGER.md +5 -0
- docs/REVERSE_ENGINEERING_TODO.md +3 -0
- docs/research/QVM_QUERIED_CAMERA.md +7 -0
- docs/research/README.md +3 -0
- docs/research/qvm-queried-camera.json +0 -0
- scripts/analyze_qvm_queried_camera.py +50 -0
- scripts/test_qvm_queried_camera.py +14 -0
- xtask/checks.tsv +5 -0
docs/FINDINGS.md
CHANGED
|
@@ -1655,3 +1655,6 @@ RE-813–822 replaces the scoreboard decimal assumption with actual37914 executi
|
|
| 1655 |
|
| 1656 |
|
| 1657 |
**RE-885:** Rust matches64 original168114/167638 compositions and their ordered box query transcripts. The typed spatial-query callback runs only after class filtering and before each candidate distance. Existing boolean-based callers retain behavior. Query/domain errors preserve RNG; native broadphase/math and external callback effects remain open. [Evidence](research/RUST_QUERIED_SPAWN.md).
|
|
|
|
|
|
|
|
|
|
|
|
| 1655 |
|
| 1656 |
|
| 1657 |
**RE-885:** Rust matches64 original168114/167638 compositions and their ordered box query transcripts. The typed spatial-query callback runs only after class filtering and before each candidate distance. Existing boolean-based callers retain behavior. Query/domain errors preserve RNG; native broadphase/math and external callback effects remain open. [Evidence](research/RUST_QUERIED_SPAWN.md).
|
| 1658 |
+
|
| 1659 |
+
|
| 1660 |
+
**RE-886:** 128 coherent6717/168114/167638/6575 cases execute box construction and client filtering inside camera fallback. Existing primary cameras issue no spatial queries; fallback class matches issue ordered native -33 requests. Result/view/player fields and checked math match the prior boolean-boundary fixtures. Native broadphase and math remain supplied; respawn and complete intermission/runtime remain open. [Evidence](research/QVM_QUERIED_CAMERA.md).
|
docs/PROVISIONAL_TODO.md
CHANGED
|
@@ -1686,3 +1686,6 @@ RE-884: 64 actual168114/167638 compositions replace supplied telefrag booleans w
|
|
| 1686 |
|
| 1687 |
|
| 1688 |
RE-885: Rust matches64 original168114/167638 compositions and their ordered box query transcripts. The typed spatial-query callback runs only after class filtering and before each candidate distance. Existing boolean-based callers retain behavior. Query/domain errors preserve RNG; native broadphase/math and external callback effects remain open. Full runtime completion remains open. [Evidence](research/RUST_QUERIED_SPAWN.md).
|
|
|
|
|
|
|
|
|
|
|
|
| 1686 |
|
| 1687 |
|
| 1688 |
RE-885: Rust matches64 original168114/167638 compositions and their ordered box query transcripts. The typed spatial-query callback runs only after class filtering and before each candidate distance. Existing boolean-based callers retain behavior. Query/domain errors preserve RNG; native broadphase/math and external callback effects remain open. Full runtime completion remains open. [Evidence](research/RUST_QUERIED_SPAWN.md).
|
| 1689 |
+
|
| 1690 |
+
|
| 1691 |
+
RE-886: 128 coherent6717/168114/167638/6575 cases execute box construction and client filtering inside camera fallback. Existing primary cameras issue no spatial queries; fallback class matches issue ordered native -33 requests. Result/view/player fields and checked math match the prior boolean-boundary fixtures. Native broadphase and math remain supplied; respawn and complete intermission/runtime remain open. Full runtime completion remains open. [Evidence](research/QVM_QUERIED_CAMERA.md).
|
docs/RESEARCH_LEDGER.md
CHANGED
|
@@ -2135,3 +2135,8 @@ After the tenth commit, `cargo xtask test-full --since 40af75ff` passed with the
|
|
| 2135 |
## 2026-10-28 — RE-885 Rust queried fallback spawn policy
|
| 2136 |
|
| 2137 |
Rust matches64 original168114/167638 compositions and their ordered box query transcripts. The typed spatial-query callback runs only after class filtering and before each candidate distance. Existing boolean-based callers retain behavior. Query/domain errors preserve RNG; native broadphase/math and external callback effects remain open. Focused `cargo xtask test-group rust-queried-spawn` passes (11 Python tests); selected reports regenerate twice deterministically, with storage, documentation links and whitespace guards. Full suite deferred to task ten. Original assets unchanged; source fixtures do not establish complete native/runtime parity.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2135 |
## 2026-10-28 — RE-885 Rust queried fallback spawn policy
|
| 2136 |
|
| 2137 |
Rust matches64 original168114/167638 compositions and their ordered box query transcripts. The typed spatial-query callback runs only after class filtering and before each candidate distance. Existing boolean-based callers retain behavior. Query/domain errors preserve RNG; native broadphase/math and external callback effects remain open. Focused `cargo xtask test-group rust-queried-spawn` passes (11 Python tests); selected reports regenerate twice deterministically, with storage, documentation links and whitespace guards. Full suite deferred to task ten. Original assets unchanged; source fixtures do not establish complete native/runtime parity.
|
| 2138 |
+
|
| 2139 |
+
|
| 2140 |
+
## 2026-10-28 — RE-886 Original camera placement with queried fallback
|
| 2141 |
+
|
| 2142 |
+
128 coherent6717/168114/167638/6575 cases execute box construction and client filtering inside camera fallback. Existing primary cameras issue no spatial queries; fallback class matches issue ordered native -33 requests. Result/view/player fields and checked math match the prior boolean-boundary fixtures. Native broadphase and math remain supplied; respawn and complete intermission/runtime remain open. Focused `cargo xtask test-group qvm-queried-camera` passes (4 Python tests); selected reports regenerate twice deterministically, with storage, documentation links and whitespace guards. Full suite deferred to task ten. Original assets unchanged; source fixtures do not establish complete native/runtime parity.
|
docs/REVERSE_ENGINEERING_TODO.md
CHANGED
|
@@ -1723,3 +1723,6 @@ Purpose: turn the supplied installation into an evidence-backed specification of
|
|
| 1723 |
|
| 1724 |
|
| 1725 |
- [x] RE-885 Rust queried fallback spawn policy ([evidence](research/RUST_QUERIED_SPAWN.md)).
|
|
|
|
|
|
|
|
|
|
|
|
| 1723 |
|
| 1724 |
|
| 1725 |
- [x] RE-885 Rust queried fallback spawn policy ([evidence](research/RUST_QUERIED_SPAWN.md)).
|
| 1726 |
+
|
| 1727 |
+
|
| 1728 |
+
- [x] RE-886 Original camera placement with queried fallback ([evidence](research/QVM_QUERIED_CAMERA.md)).
|
docs/research/QVM_QUERIED_CAMERA.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Original camera placement with queried fallback
|
| 2 |
+
|
| 3 |
+
RE-886. Reproduce with `python3 scripts/analyze_qvm_queried_camera.py`; focused validation: `cargo xtask test-group qvm-queried-camera`. [Machine report](qvm-queried-camera.json).
|
| 4 |
+
|
| 5 |
+
128 coherent6717/168114/167638/6575 cases execute box construction and client filtering inside camera fallback. Existing primary cameras issue no spatial queries; fallback class matches issue ordered native -33 requests. Result/view/player fields and checked math match the prior boolean-boundary fixtures. Native broadphase and math remain supplied; respawn and complete intermission/runtime remain open.
|
| 6 |
+
|
| 7 |
+
Original executable/native runtime and complete Linux/macOS Rust/Bevy/Solari acceptance remain unverified.
|
docs/research/README.md
CHANGED
|
@@ -1258,3 +1258,6 @@ The extension collector adds five focused tests for native tail calls, command-r
|
|
| 1258 |
|
| 1259 |
|
| 1260 |
[RE-885: Rust queried fallback spawn policy](RUST_QUERIED_SPAWN.md).
|
|
|
|
|
|
|
|
|
|
|
|
| 1258 |
|
| 1259 |
|
| 1260 |
[RE-885: Rust queried fallback spawn policy](RUST_QUERIED_SPAWN.md).
|
| 1261 |
+
|
| 1262 |
+
|
| 1263 |
+
[RE-886: Original camera placement with queried fallback](QVM_QUERIED_CAMERA.md).
|
docs/research/qvm-queried-camera.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
scripts/analyze_qvm_queried_camera.py
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
import itertools
|
| 3 |
+
from pathlib import Path
|
| 4 |
+
from qvm_research_support import source
|
| 5 |
+
from qvm_camera_world_support import run,find_class,pick_target,vector_angles,string,POOL,S,B
|
| 6 |
+
from qvm_transition_support import ENTITY,PCLIENT,POSITION,ANGLES,vector,words
|
| 7 |
+
from analyze_qvm_camera_place import EF,CF
|
| 8 |
+
from analyze_qvm_acceleration import word
|
| 9 |
+
from analyze_qvm import write_json
|
| 10 |
+
PRIMARY=(-2104846030)&0xffffffff
|
| 11 |
+
|
| 12 |
+
from analyze_qvm_camera_world import scene as camera_scene
|
| 13 |
+
from qvm_spawn_support import entities as spawns,select as select_spawn
|
| 14 |
+
from qvm_spawn_query_support import seed_query,child
|
| 15 |
+
|
| 16 |
+
def scene(layout,profile,count,blocked):
|
| 17 |
+
c,fallback=camera_scene(layout,profile)
|
| 18 |
+
for e in spawns(count,2 if blocked else 0):c.append(dict(e,aim=None,label=None))
|
| 19 |
+
return c,fallback
|
| 20 |
+
|
| 21 |
+
def main():
|
| 22 |
+
q,raw,h,ins=source();rows=[]
|
| 23 |
+
for layout,profile,seed,slot,count,blocked in itertools.product([0,1,3,5],range(2),[0,1],range(2),[1,8],[False,True]):
|
| 24 |
+
c,fallback=scene(layout,profile,count,blocked);m={34992508:len(c),21044:seed,ENTITY+520:PCLIENT+6336*slot};b={};effects=[];class_index=-1;target_index=-1;matches=[];diagnostic=None;math=[];spawn_index=-1;spawn_candidates=[];queries=[];bounds=seed_query(m,raw,h)
|
| 25 |
+
vector(m,21348,[0,0,0])
|
| 26 |
+
for j,e in enumerate(c):
|
| 27 |
+
p=POOL+880*j;m.update({p+532:e['active'],p+536:e['name'],p+540:e['hash'],p+604:0 if e['aim'] is None else S+j*512,p+608:0 if e['label'] is None else S+j*512+256});vector(m,p+92,e['origin']);vector(m,p+116,e['angles'])
|
| 28 |
+
if e['aim'] is not None:string(m,b,S+j*512,e['aim'])
|
| 29 |
+
if e['label'] is not None:string(m,b,S+j*512+256,e['label'])
|
| 30 |
+
for o in EF:m[ENTITY+o]=0x12345678
|
| 31 |
+
for j in range(2):
|
| 32 |
+
for o in CF:m[PCLIENT+6336*j+o]=0xaabbccdd
|
| 33 |
+
vector(m,POSITION,[word(77)]*3);vector(m,ANGLES,[word(88)]*3)
|
| 34 |
+
def search(i,m,a,bs):
|
| 35 |
+
nonlocal class_index
|
| 36 |
+
effects.append(276433);m,v,p,b=find_class(i,m,a,bs);class_index=-1 if v==0 else (v-POOL)//880;return m,v,{'actual_source_child':276433}
|
| 37 |
+
def target(i,m,a,bs):
|
| 38 |
+
nonlocal target_index,matches,diagnostic
|
| 39 |
+
effects.append(276586);m,v,p,b=pick_target(i,m,a,bs);target_index=-1 if v==0 else (v-POOL)//880;matches=p['matches'];diagnostic='missing' if p['diagnostics'] else None;return m,v,{'actual_source_child':276586}
|
| 40 |
+
def aim(i,m,a,bs):
|
| 41 |
+
nonlocal math
|
| 42 |
+
effects.append(62944);m,v,p,b=vector_angles(i,m,a,bs);math=p['math'];return m,0,{'actual_source_child':62944}
|
| 43 |
+
def supply(i,m,a,bs):
|
| 44 |
+
nonlocal math,spawn_index,spawn_candidates
|
| 45 |
+
effects.append(168114);m,v,p,b=select_spawn(i,m,a,bs,telefrag_child=child(2 if blocked else 0,queries));assert not p['fatal'];spawn_index=(v-POOL)//880;spawn_candidates=p['candidates'];math=p['math'];return m,v,{'actual_source_child':168114}
|
| 46 |
+
m,v,p,b=run(ins,m,6717,6823,52,b=b,handlers={276433:search,276586:target,62944:aim,168114:supply},base=B+0xa000)
|
| 47 |
+
view={'origin':words(m,POSITION,3),'angles':words(m,ANGLES,3)};m,v,place,b=run(ins,m,6575,6715,20,{8:ENTITY},b,base=B+0xc000)
|
| 48 |
+
rows.append({'input':dict(layout=layout,profile=profile,seed=seed,slot=slot,spawns=count,blocked=blocked),'queries':queries,'bounds':bounds,'spawn_index':spawn_index,'spawn_candidates':spawn_candidates,'class_index':class_index,'target_index':target_index,'matches':matches,'diagnostic':diagnostic,'rng_state':m[21044]&0xffffffff,'effects':effects,'view':view,'entity':{str(o):m[ENTITY+o]&0xffffffff for o in EF},'clients':[{str(o):m[PCLIENT+6336*j+o]&0xffffffff for o in CF} for j in range(2)],'math':math,'setup':p,'placement':place})
|
| 49 |
+
write_json(Path('docs/research/qvm-queried-camera.json'),{'source':q['source'],'sha256':q['sha256'],'probes':rows,'limits':'128 continuous actual-overlap 6717->6575 cases with actual168114 fallback, searches, RNG and angle body. Actual167638 boxes and client filtering execute; native spatial result lists and finite sqrt/atan2 remain supplied. Native collision/math, respawn and complete runtime integration unverified.'})
|
| 50 |
+
if __name__=='__main__':main()
|
scripts/test_qvm_queried_camera.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import json,unittest
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
class QueriedCameraTests(unittest.TestCase):
|
| 4 |
+
def test_existing_camera_state_and_lazy_queries(self):
|
| 5 |
+
rows=json.loads(Path('docs/research/qvm-queried-camera.json').read_text())['probes'];old=json.loads(Path('docs/research/qvm-camera-spawn.json').read_text())['probes'];self.assertEqual(len(rows),128)
|
| 6 |
+
from analyze_qvm_camera_spawn import scene
|
| 7 |
+
from qvm_spawn_support import SPAWN
|
| 8 |
+
for p,baseline in zip(rows,old):
|
| 9 |
+
self.assertEqual(p['input'],baseline['input'])
|
| 10 |
+
for key in ['spawn_index','spawn_candidates','class_index','target_index','matches','diagnostic','rng_state','effects','view','entity','clients','math']:self.assertEqual(p[key],baseline[key])
|
| 11 |
+
a=p['input'];c,_=scene(a['layout'],a['profile'],a['spawns'],a['blocked']);expected=[j for j,e in enumerate(c) if e['active'] and e['name'] and e['hash']==SPAWN] if 168114 in p['effects'] else [];self.assertEqual([q['index'] for q in p['queries']],expected)
|
| 12 |
+
for q in p['queries']:self.assertEqual(q['blocked'],int(a['blocked']));self.assertEqual(q['capacity'],1024);self.assertEqual(len(q['trace_sha256']),64)
|
| 13 |
+
self.assertTrue(any(not p['queries'] for p in rows));self.assertTrue(any(p['queries'] for p in rows))
|
| 14 |
+
if __name__=='__main__':unittest.main()
|
xtask/checks.tsv
CHANGED
|
@@ -2627,3 +2627,8 @@ report scripts/analyze_rust_queried_spawn.py docs/research/rust-queried-spawn.js
|
|
| 2627 |
edge docs/research/rust-queried-spawn.json scripts/test_rust_queried_spawn.py
|
| 2628 |
group rust-queried-spawn scripts/analyze_rust_queried_spawn.py
|
| 2629 |
edge scripts/analyze_rust_queried_spawn.py scripts/analyze_qvm_resumer_audit.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2627 |
edge docs/research/rust-queried-spawn.json scripts/test_rust_queried_spawn.py
|
| 2628 |
group rust-queried-spawn scripts/analyze_rust_queried_spawn.py
|
| 2629 |
edge scripts/analyze_rust_queried_spawn.py scripts/analyze_qvm_resumer_audit.py
|
| 2630 |
+
edge docs/research/qvm-camera-spawn.json scripts/test_qvm_queried_camera.py
|
| 2631 |
+
report scripts/analyze_qvm_queried_camera.py docs/research/qvm-queried-camera.json
|
| 2632 |
+
edge docs/research/qvm-queried-camera.json scripts/test_qvm_queried_camera.py
|
| 2633 |
+
group qvm-queried-camera scripts/analyze_qvm_queried_camera.py
|
| 2634 |
+
edge scripts/analyze_qvm_queried_camera.py scripts/analyze_qvm_resumer_audit.py
|