nmarshall commited on
Commit
8a6d738
·
1 Parent(s): 9ff198d

qvm: entity initializer

Browse files
docs/ASSET_PIPELINE_TODO.md CHANGED
@@ -490,3 +490,6 @@ Research progress: RE-601 [report](research/QVM_BASE_FIRE_GATE.md); remaining na
490
 
491
 
492
  Research progress: RE-602 [report](research/QVM_SERVER_FIRE_CHAIN.md); remaining native/content/runtime/platform scope stays open.
 
 
 
 
490
 
491
 
492
  Research progress: RE-602 [report](research/QVM_SERVER_FIRE_CHAIN.md); remaining native/content/runtime/platform scope stays open.
493
+
494
+
495
+ Research progress: RE-604 [report](research/QVM_ENTITY_INIT.md); remaining native/content/runtime/platform scope stays open.
docs/FINDINGS.md CHANGED
@@ -848,3 +848,6 @@ Bounded qagame paths recover bomb-plant/inactivity correction requests, direct f
848
 
849
 
850
  **RE-602 — Published firing event to bounded server handler chains:** Actual31 publication now chains through server reset/basis/muzzle/dispatch into selected setup; event-loop continuation resumes only recovered returns and stays suspended at opaque shot/allocation/handler boundaries. [Evidence](research/QVM_SERVER_FIRE_CHAIN.md).
 
 
 
 
848
 
849
 
850
  **RE-602 — Published firing event to bounded server handler chains:** Actual31 publication now chains through server reset/basis/muzzle/dispatch into selected setup; event-loop continuation resumes only recovered returns and stays suspended at opaque shot/allocation/handler boundaries. [Evidence](research/QVM_SERVER_FIRE_CHAIN.md).
851
+
852
+
853
+ **RE-604 — Entity initializer and preserved record fields:** 277125 writes only identity, in-use, noclass pointer/tag and owner sentinel; all other 215 words survive. [Evidence](research/QVM_ENTITY_INIT.md).
docs/PROVISIONAL_TODO.md CHANGED
@@ -810,3 +810,6 @@ The [RE-593–602 server firing batch](research/QVM_SERVER_FIRE_BATCH.md) recove
810
 
811
 
812
  Research progress: RE-602 [report](research/QVM_SERVER_FIRE_CHAIN.md); remaining native/content/runtime/platform scope stays open.
 
 
 
 
810
 
811
 
812
  Research progress: RE-602 [report](research/QVM_SERVER_FIRE_CHAIN.md); remaining native/content/runtime/platform scope stays open.
813
+
814
+
815
+ Research progress: RE-604 [report](research/QVM_ENTITY_INIT.md); remaining native/content/runtime/platform scope stays open.
docs/RESEARCH_LEDGER.md CHANGED
@@ -702,3 +702,8 @@ Actual outer31 publication reaches server151634, which writes client4140=0 and43
702
  Actual31 publication now chains through server reset/basis/muzzle/dispatch into selected setup; event-loop continuation resumes only recovered returns and stays suspended at opaque shot/allocation/handler boundaries. 12 independent compositions verify all state/vector/record handoffs, queue re-entry and retained window, exact pending-call stacks and explicit engine-response contracts. Full suite: 919 tests pass. Report regenerates byte-identically (603514 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
703
 
704
  RE-602 additional regression:19 related reports from RE-582–591 and RE-593–601 regenerate byte-identically. Storage/filter, documentation-link and whitespace checks pass; actual engine allocation/link/query effects and opaque firing/damage continuations remain open rather than supplied successful outcomes.
 
 
 
 
 
 
702
  Actual31 publication now chains through server reset/basis/muzzle/dispatch into selected setup; event-loop continuation resumes only recovered returns and stays suspended at opaque shot/allocation/handler boundaries. 12 independent compositions verify all state/vector/record handoffs, queue re-entry and retained window, exact pending-call stacks and explicit engine-response contracts. Full suite: 919 tests pass. Report regenerates byte-identically (603514 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
703
 
704
  RE-602 additional regression:19 related reports from RE-582–591 and RE-593–601 regenerate byte-identically. Storage/filter, documentation-link and whitespace checks pass; actual engine allocation/link/query effects and opaque firing/damage continuations remain open rather than supplied successful outcomes.
705
+
706
+
707
+ ## 2026-10-20 — RE-604 Entity initializer and preserved record fields (separate task commit)
708
+
709
+ 277125 writes only identity, in-use, noclass pointer/tag and owner sentinel; all other 215 words survive. Independent full-record oracles cover 18 slot/canary combinations. Full suite: 922 tests pass. Report regenerates byte-identically (194019 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
@@ -853,3 +853,6 @@ Purpose: turn the supplied installation into an evidence-backed specification of
853
 
854
 
855
  - [x] RE-602 Published firing event to bounded server handler chains ([report](research/QVM_SERVER_FIRE_CHAIN.md)).
 
 
 
 
853
 
854
 
855
  - [x] RE-602 Published firing event to bounded server handler chains ([report](research/QVM_SERVER_FIRE_CHAIN.md)).
856
+
857
+
858
+ - [x] RE-604 Entity initializer and preserved record fields ([report](research/QVM_ENTITY_INIT.md)).
docs/research/QVM_ENTITY_INIT.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # Entity initializer and preserved record fields
2
+
3
+ RE-604. Reproduce with `python3 scripts/analyze_qvm_entity_init.py`; check with `python3 scripts/test_qvm_entity_init.py`. The [machine report](qvm-entity-init.json) retains source identity and bounded fixtures.
4
+
5
+ Actual instructions 277126–277162 set record532=1,536=97243 (`noclass`),540=3226498489,0=(pointer−34091368)/880 and512=1023. The wrapper stops before the void PUSH/LEAVE epilogue. No memset occurs here: stale client pointers, positions, callbacks and free time survive this initializer. The fixed source pool base and 880-byte stride are retained. Eighteen fixtures cover slots 0,63,64,65,1022,1023 and three complete-record canaries; independent tests compare all 220 words. Allocation callers must establish any clearing policy separately.
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
@@ -411,3 +411,6 @@ The extension collector adds five focused tests for native tail calls, command-r
411
 
412
 
413
  [RE-602: Published firing event to bounded server handler chains](QVM_SERVER_FIRE_CHAIN.md). Reproduce with `python3 scripts/analyze_qvm_server_fire_chain.py`; check with `python3 scripts/test_qvm_server_fire_chain.py`.
 
 
 
 
411
 
412
 
413
  [RE-602: Published firing event to bounded server handler chains](QVM_SERVER_FIRE_CHAIN.md). Reproduce with `python3 scripts/analyze_qvm_server_fire_chain.py`; check with `python3 scripts/test_qvm_server_fire_chain.py`.
414
+
415
+
416
+ [RE-604: Entity initializer and preserved record fields](QVM_ENTITY_INIT.md). Reproduce with `python3 scripts/analyze_qvm_entity_init.py`; check with `python3 scripts/test_qvm_entity_init.py`.
docs/research/qvm-entity-init.json ADDED
The diff for this file is too large to render. See raw diff
 
scripts/analyze_qvm_entity_init.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Recover the complete 277125 entity initializer without inventing zeroing."""
3
+ from pathlib import Path
4
+ from qvm_research_support import source,execute
5
+ from analyze_qvm_temp_event import record
6
+ from analyze_qvm import write_json
7
+ POOL=34091368
8
+ STRIDE=880
9
+ LOCAL=0x79000000
10
+
11
+ def initialize(ins,m,pointer):
12
+ m=dict(m);before=record(m,pointer);m[LOCAL+20]=pointer
13
+ m,_,r=execute(ins,277126,277163,m,(0,0,0),LOCAL)
14
+ return m,{'pointer':pointer,'initial':before,'execution':r,'final':record(m,pointer)}
15
+
16
+ def main():
17
+ q,raw,h,ins=source();rows=[]
18
+ for index in [0,63,64,65,1022,1023]:
19
+ for canary in [0,0x12345678,0xffffffff]:
20
+ p=POOL+index*STRIDE;m={p+o:canary for o in range(0,STRIDE,4)};rows.append(initialize(ins,m,p)[1])
21
+ address=97243;text=raw[h['data_offset']+address:].split(b'\0',1)[0].decode()
22
+ write_json(Path('docs/research/qvm-entity-init.json'),{'source':q['source'],'sha256':q['sha256'],'classname':{'address':address,'text':text},'probes':rows,'limits':'Actual complete initializer277125. Pool base34091368/stride880 are source literals. No allocator, zeroing, native registration or lifetime inferred.'})
23
+ if __name__=='__main__':main()
scripts/test_qvm_entity_init.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json,unittest
2
+ from pathlib import Path
3
+ class EntityInitTests(unittest.TestCase):
4
+ @classmethod
5
+ def setUpClass(cls):cls.r=json.loads(Path('docs/research/qvm-entity-init.json').read_text())
6
+ def test_full_record_oracle(self):
7
+ self.assertEqual(len(self.r['probes']),18)
8
+ for p in self.r['probes']:
9
+ expected=dict(p['initial']);expected.update({'0':(p['pointer']-34091368)//880,'532':1,'536':97243,'540':(-1068468807)&0xffffffff,'512':1023});self.assertEqual(p['final'],expected)
10
+ def test_no_calls_or_clear(self):
11
+ for p in self.r['probes']:self.assertEqual(p['execution']['calls'],[]);self.assertEqual(len(p['final']),220);self.assertEqual(p['final']['520'],p['initial']['520'])
12
+ def test_file_string(self):self.assertEqual(self.r['classname']['text'],'noclass')
13
+ if __name__=='__main__':unittest.main()