qvm: allocated temporary events
Browse files- docs/ASSET_PIPELINE_TODO.md +3 -0
- 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_ALLOCATED_EVENT.md +7 -0
- docs/research/README.md +3 -0
- docs/research/qvm-allocated-event.json +0 -0
- scripts/analyze_qvm_allocated_event.py +41 -0
- scripts/test_qvm_allocated_event.py +16 -0
docs/ASSET_PIPELINE_TODO.md
CHANGED
|
@@ -499,3 +499,6 @@ Research progress: RE-605 [report](research/QVM_ENTITY_REUSE.md); remaining nati
|
|
| 499 |
|
| 500 |
|
| 501 |
Research progress: RE-606 [report](research/QVM_ENTITY_ALLOCATE.md); remaining native/content/runtime/platform scope stays open.
|
|
|
|
|
|
|
|
|
|
|
|
| 499 |
|
| 500 |
|
| 501 |
Research progress: RE-606 [report](research/QVM_ENTITY_ALLOCATE.md); remaining native/content/runtime/platform scope stays open.
|
| 502 |
+
|
| 503 |
+
|
| 504 |
+
Research progress: RE-607 [report](research/QVM_ALLOCATED_EVENT.md); remaining native/content/runtime/platform scope stays open.
|
docs/FINDINGS.md
CHANGED
|
@@ -857,3 +857,6 @@ Bounded qagame paths recover bomb-plant/inactivity correction requests, direct f
|
|
| 857 |
|
| 858 |
|
| 859 |
**RE-606 — Allocator capacity retry and native registration request:** Full-pool retry relaxes the recent-free guard; source count1022 enters diagnostics while1023 may extend to1024. Native−16 publishes entity/client layout. [Evidence](research/QVM_ENTITY_ALLOCATE.md).
|
|
|
|
|
|
|
|
|
|
|
|
| 857 |
|
| 858 |
|
| 859 |
**RE-606 — Allocator capacity retry and native registration request:** Full-pool retry relaxes the recent-free guard; source count1022 enters diagnostics while1023 may extend to1024. Native−16 publishes entity/client layout. [Evidence](research/QVM_ENTITY_ALLOCATE.md).
|
| 860 |
+
|
| 861 |
+
|
| 862 |
+
**RE-607 — Temporary event with actual entity allocation:** 277695 now composes actual277165/277125 and278138, returning fixed pool slot64 through both reuse and extension paths. [Evidence](research/QVM_ALLOCATED_EVENT.md).
|
docs/PROVISIONAL_TODO.md
CHANGED
|
@@ -819,3 +819,6 @@ Research progress: RE-605 [report](research/QVM_ENTITY_REUSE.md); remaining nati
|
|
| 819 |
|
| 820 |
|
| 821 |
Research progress: RE-606 [report](research/QVM_ENTITY_ALLOCATE.md); remaining native/content/runtime/platform scope stays open.
|
|
|
|
|
|
|
|
|
|
|
|
| 819 |
|
| 820 |
|
| 821 |
Research progress: RE-606 [report](research/QVM_ENTITY_ALLOCATE.md); remaining native/content/runtime/platform scope stays open.
|
| 822 |
+
|
| 823 |
+
|
| 824 |
+
Research progress: RE-607 [report](research/QVM_ALLOCATED_EVENT.md); remaining native/content/runtime/platform scope stays open.
|
docs/RESEARCH_LEDGER.md
CHANGED
|
@@ -717,3 +717,8 @@ The allocator scans from slot64, skips in-use records and delays recent frees on
|
|
| 717 |
## 2026-10-20 — RE-606 Allocator capacity retry and native registration request (separate task commit)
|
| 718 |
|
| 719 |
Full-pool retry relaxes the recent-free guard; source count1022 enters diagnostics while1023 may extend to1024. Native−16 publishes entity/client layout. Seven allocator fixtures cover reuse, extension, retry and both source error boundaries with independent expected slots/counts/ABI. Full suite: 929 tests pass. Report regenerates byte-identically (102931 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 717 |
## 2026-10-20 — RE-606 Allocator capacity retry and native registration request (separate task commit)
|
| 718 |
|
| 719 |
Full-pool retry relaxes the recent-free guard; source count1022 enters diagnostics while1023 may extend to1024. Native−16 publishes entity/client layout. Seven allocator fixtures cover reuse, extension, retry and both source error boundaries with independent expected slots/counts/ABI. Full suite: 929 tests pass. Report regenerates byte-identically (102931 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
|
| 720 |
+
|
| 721 |
+
|
| 722 |
+
## 2026-10-20 — RE-607 Temporary event with actual entity allocation (separate task commit)
|
| 723 |
+
|
| 724 |
+
277695 now composes actual277165/277125 and278138, returning fixed pool slot64 through both reuse and extension paths. Eight fixtures independently reconstruct full event records and verify registration/link call order and preserved stale fields. Full suite: 932 tests pass. Report regenerates byte-identically (717103 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
|
@@ -862,3 +862,6 @@ Purpose: turn the supplied installation into an evidence-backed specification of
|
|
| 862 |
|
| 863 |
|
| 864 |
- [x] RE-606 Allocator capacity retry and native registration request ([report](research/QVM_ENTITY_ALLOCATE.md)).
|
|
|
|
|
|
|
|
|
|
|
|
| 862 |
|
| 863 |
|
| 864 |
- [x] RE-606 Allocator capacity retry and native registration request ([report](research/QVM_ENTITY_ALLOCATE.md)).
|
| 865 |
+
|
| 866 |
+
|
| 867 |
+
- [x] RE-607 Temporary event with actual entity allocation ([report](research/QVM_ALLOCATED_EVENT.md)).
|
docs/research/QVM_ALLOCATED_EVENT.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Temporary event with actual entity allocation
|
| 2 |
+
|
| 3 |
+
RE-607. Reproduce with `python3 scripts/analyze_qvm_allocated_event.py`; check with `python3 scripts/test_qvm_allocated_event.py`. The [machine report](qvm-allocated-event.json) retains source identity and bounded fixtures.
|
| 4 |
+
|
| 5 |
+
The new composition removes the supplied allocation pointer from the temporary-event research path. Actual277165 returns a source-pool address after reuse or extension; actual277125 establishes identity/in-use/owner metadata, then277695 writes event+19, classname/time/free flags and the truncated origin via278138. Native−16 registration and−31 linking remain explicit captured requests. Tests reconstruct all220 words from the initialized record and independently calculated event fields, including negative position truncation. Both paths return34147688, slot64. The source does not clear old client pointers or callbacks in this chain: canaries remain in520/648. This is a finding about these functions, not proof those values are legal during live server spawning. Allocation error paths stop instead of supplying a replacement entity.
|
| 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
|
@@ -420,3 +420,6 @@ The extension collector adds five focused tests for native tail calls, command-r
|
|
| 420 |
|
| 421 |
|
| 422 |
[RE-606: Allocator capacity retry and native registration request](QVM_ENTITY_ALLOCATE.md). Reproduce with `python3 scripts/analyze_qvm_entity_allocate.py`; check with `python3 scripts/test_qvm_entity_allocate.py`.
|
|
|
|
|
|
|
|
|
|
|
|
| 420 |
|
| 421 |
|
| 422 |
[RE-606: Allocator capacity retry and native registration request](QVM_ENTITY_ALLOCATE.md). Reproduce with `python3 scripts/analyze_qvm_entity_allocate.py`; check with `python3 scripts/test_qvm_entity_allocate.py`.
|
| 423 |
+
|
| 424 |
+
|
| 425 |
+
[RE-607: Temporary event with actual entity allocation](QVM_ALLOCATED_EVENT.md). Reproduce with `python3 scripts/analyze_qvm_allocated_event.py`; check with `python3 scripts/test_qvm_allocated_event.py`.
|
docs/research/qvm-allocated-event.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
scripts/analyze_qvm_allocated_event.py
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Compose actual allocator, tempEntity constructor and origin setter."""
|
| 3 |
+
import itertools
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
from qvm_research_support import source,execute
|
| 6 |
+
from qvm_server_fire_support import seed,MUZZLE
|
| 7 |
+
from analyze_qvm_entity_reuse import fixture
|
| 8 |
+
from analyze_qvm_entity_allocate import allocate
|
| 9 |
+
from analyze_qvm_entity_init import POOL,STRIDE
|
| 10 |
+
from analyze_qvm_temp_event import record,set_origin
|
| 11 |
+
from analyze_qvm_acceleration import word
|
| 12 |
+
from analyze_qvm_slide_prefix import vec
|
| 13 |
+
from analyze_qvm import write_json
|
| 14 |
+
LOCAL=0x79300000
|
| 15 |
+
|
| 16 |
+
def event(ins,m,event_id):
|
| 17 |
+
m=dict(m);point=vec(m,MUZZLE);m[LOCAL+44]=MUZZLE;m[LOCAL+48]=event_id;allocations=[];links=[]
|
| 18 |
+
def allocated(i,m,a,c):
|
| 19 |
+
m,r=allocate(i,m);allocations.append(r)
|
| 20 |
+
if r['selected'] is None:raise ValueError('Constructor allocation did not return')
|
| 21 |
+
return m,c,r['selected'],r
|
| 22 |
+
def position(i,m,a,c):m,r=set_origin(i,m,a);return m,c,0,r
|
| 23 |
+
def link(i,m,a,c):r={'arguments':a,'record':record(m,a[8]),'native_effect_not_executed':True};links.append(r);return m,c,0,r
|
| 24 |
+
m,_,r=execute(ins,277696,277777,m,(0,0,0),LOCAL,{277165:allocated,278138:position,-31:link});p=r['return']
|
| 25 |
+
return m,{'event':event_id,'input_origin':point,'time':m[34992532],'initial_record':allocations[0]['record'],'allocation':allocations[0],'execution':r,'link_requests':links,'final_record':record(m,p)}
|
| 26 |
+
|
| 27 |
+
def setup(raw,h,reuse=False):
|
| 28 |
+
m=seed(raw,h);m.update(fixture(65 if reuse else 64,slots=[(64,0,0)] if reuse else []))
|
| 29 |
+
for index in [64,65]:
|
| 30 |
+
p=POOL+index*STRIDE
|
| 31 |
+
for o in range(0,STRIDE,4):m.setdefault(p+o,0x12345678)
|
| 32 |
+
return m
|
| 33 |
+
|
| 34 |
+
def main():
|
| 35 |
+
q,raw,h,ins=source();rows=[]
|
| 36 |
+
for reused,point,event_id in itertools.product([False,True],[(1.9,-2.9,3.1),(-.5,.5,-.0)],[0,57]):
|
| 37 |
+
m=setup(raw,h,reused)
|
| 38 |
+
for j,v in enumerate(point):m[MUZZLE+4*j]=word(v)
|
| 39 |
+
_,r=event(ins,m,event_id);r['reuse']=reused;rows.append(r)
|
| 40 |
+
write_json(Path('docs/research/qvm-allocated-event.json'),{'source':q['source'],'sha256':q['sha256'],'probes':rows,'limits':'Actual277695→277165→277125 and278138;−16 registration and−31 linking captured without native effects. Allocation errors reject composition. No world/lifetime parity.'})
|
| 41 |
+
if __name__=='__main__':main()
|
scripts/test_qvm_allocated_event.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import json,unittest
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
from test_qvm_temp_event import event_record
|
| 4 |
+
class AllocatedEventTests(unittest.TestCase):
|
| 5 |
+
@classmethod
|
| 6 |
+
def setUpClass(cls):cls.r=json.loads(Path('docs/research/qvm-allocated-event.json').read_text())
|
| 7 |
+
def test_composed_record_independent_oracle(self):
|
| 8 |
+
self.assertEqual(len(self.r['probes']),8)
|
| 9 |
+
for p in self.r['probes']:
|
| 10 |
+
self.assertEqual(p['final_record'],event_record(p));self.assertEqual(p['execution']['return'],34147688);self.assertEqual(p['final_record']['0'],64);self.assertEqual(p['final_record']['532'],1);self.assertEqual(p['final_record']['512'],1023)
|
| 11 |
+
def test_source_children_and_native_requests(self):
|
| 12 |
+
for p in self.r['probes']:
|
| 13 |
+
self.assertEqual([c['target'] for c in p['execution']['calls']],[277165,278138,-31]);self.assertEqual(len(p['allocation']['registrations']),0 if p['reuse'] else 1);self.assertEqual(p['link_requests'][0]['arguments'],{'8':34147688});self.assertEqual(p['link_requests'][0]['record'],p['final_record'])
|
| 14 |
+
def test_stale_words_are_preserved(self):
|
| 15 |
+
for p in self.r['probes']:self.assertEqual(p['final_record']['648'],0x12345678);self.assertEqual(p['final_record']['520'],0x12345678)
|
| 16 |
+
if __name__=='__main__':unittest.main()
|