qvm: entity free and reset
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_ENTITY_FREE.md +7 -0
- docs/research/README.md +3 -0
- docs/research/qvm-entity-free.json +0 -0
- scripts/analyze_qvm_entity_free.py +34 -0
- scripts/test_qvm_entity_free.py +31 -0
docs/ASSET_PIPELINE_TODO.md
CHANGED
|
@@ -673,3 +673,6 @@ Research progress: RE-664 [report](research/QVM_POSE_PUBLICATION.md); remaining
|
|
| 673 |
|
| 674 |
|
| 675 |
Research progress: RE-665 [report](research/QVM_COMPLETE_POSE.md); remaining native/content/runtime/platform scope stays open.
|
|
|
|
|
|
|
|
|
|
|
|
| 673 |
|
| 674 |
|
| 675 |
Research progress: RE-665 [report](research/QVM_COMPLETE_POSE.md); remaining native/content/runtime/platform scope stays open.
|
| 676 |
+
|
| 677 |
+
|
| 678 |
+
Research progress: RE-666 [report](research/QVM_ENTITY_FREE.md); remaining native/content/runtime/platform scope stays open.
|
docs/FINDINGS.md
CHANGED
|
@@ -1019,3 +1019,6 @@ Bounded qagame paths recover bomb-plant/inactivity correction requests, direct f
|
|
| 1019 |
|
| 1020 |
|
| 1021 |
**RE-665 — Complete finite pose routine with recovered source children:** Complete32254 now reaches its void output boundary with actual swing, vector-angle and interpolation children across stationary/movement/animation-mask cases. [Evidence](research/QVM_COMPLETE_POSE.md).
|
|
|
|
|
|
|
|
|
|
|
|
| 1019 |
|
| 1020 |
|
| 1021 |
**RE-665 — Complete finite pose routine with recovered source children:** Complete32254 now reaches its void output boundary with actual swing, vector-angle and interpolation children across stationary/movement/animation-mask cases. [Evidence](research/QVM_COMPLETE_POSE.md).
|
| 1022 |
+
|
| 1023 |
+
|
| 1024 |
+
**RE-666 — Entity free control flow and conditional record reset:** 277400 unlinks, requests ordered resource releases and clears nine pointer fields before deciding whether548 suppresses the whole880-byte reset. [Evidence](research/QVM_ENTITY_FREE.md).
|
docs/PROVISIONAL_TODO.md
CHANGED
|
@@ -996,3 +996,6 @@ Research progress: RE-664 [report](research/QVM_POSE_PUBLICATION.md); remaining
|
|
| 996 |
|
| 997 |
|
| 998 |
Research progress: RE-665 [report](research/QVM_COMPLETE_POSE.md); remaining native/content/runtime/platform scope stays open.
|
|
|
|
|
|
|
|
|
|
|
|
| 996 |
|
| 997 |
|
| 998 |
Research progress: RE-665 [report](research/QVM_COMPLETE_POSE.md); remaining native/content/runtime/platform scope stays open.
|
| 999 |
+
|
| 1000 |
+
|
| 1001 |
+
Research progress: RE-666 [report](research/QVM_ENTITY_FREE.md); remaining native/content/runtime/platform scope stays open.
|
docs/RESEARCH_LEDGER.md
CHANGED
|
@@ -987,3 +987,8 @@ One direct append caller156173 and three direct reset callers174399/203011/21963
|
|
| 987 |
## 2026-10-20 — RE-665 Complete finite pose routine with recovered source children (separate task commit)
|
| 988 |
|
| 989 |
Complete32254 now reaches its void output boundary with actual swing, vector-angle and interpolation children across stationary/movement/animation-mask cases. 110 fixtures independently compose all nine output angles, external state mutations and optional numeric flag output, with exact child coverage and zero/long elapsed cases. Full suite: 1125 tests pass. Report regenerates byte-identically (905274 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 987 |
## 2026-10-20 — RE-665 Complete finite pose routine with recovered source children (separate task commit)
|
| 988 |
|
| 989 |
Complete32254 now reaches its void output boundary with actual swing, vector-angle and interpolation children across stationary/movement/animation-mask cases. 110 fixtures independently compose all nine output angles, external state mutations and optional numeric flag output, with exact child coverage and zero/long elapsed cases. Full suite: 1125 tests pass. Report regenerates byte-identically (905274 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
|
| 990 |
+
|
| 991 |
+
|
| 992 |
+
## 2026-10-20 — RE-666 Entity free control flow and conditional record reset (separate task commit)
|
| 993 |
+
|
| 994 |
+
277400 unlinks, requests ordered resource releases and clears nine pointer fields before deciding whether548 suppresses the whole880-byte reset. 49 fixtures independently check every final record word, null/protected exits, resource ordering, aliased release requests and exact zero-fill gating. Full suite: 1129 tests pass. Report regenerates byte-identically (808034 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
|
@@ -1039,3 +1039,6 @@ Purpose: turn the supplied installation into an evidence-backed specification of
|
|
| 1039 |
|
| 1040 |
|
| 1041 |
- [x] RE-665 Complete finite pose routine with recovered source children ([report](research/QVM_COMPLETE_POSE.md)).
|
|
|
|
|
|
|
|
|
|
|
|
| 1039 |
|
| 1040 |
|
| 1041 |
- [x] RE-665 Complete finite pose routine with recovered source children ([report](research/QVM_COMPLETE_POSE.md)).
|
| 1042 |
+
|
| 1043 |
+
|
| 1044 |
+
- [x] RE-666 Entity free control flow and conditional record reset ([report](research/QVM_ENTITY_FREE.md)).
|
docs/research/QVM_ENTITY_FREE.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Entity free control flow and conditional record reset
|
| 2 |
+
|
| 3 |
+
RE-666. Reproduce with `python3 scripts/analyze_qvm_entity_free.py`; check with `python3 scripts/test_qvm_entity_free.py`. The [machine report](qvm-entity-free.json) retains source identity and bounded fixtures.
|
| 4 |
+
|
| 5 |
+
Complete277401–277692 returns immediately for null, otherwise requests−32 unlink. Optional528 object child+8 is released before its parent via16934. Nine nonnull fields are passed in source order to249639 and then cleared. Only afterward does nonzero548 suppress the880-byte reset. Unprotected records become zero except classname pointer97202, integer tag155463540 and free-time564 from34992532; in-use532 is zero. Protected records retain528 and532 even after their release requests, a distinction preserved without assigning unverified ownership semantics. Resource helpers and unlink are captured without external effects; memset is an explicit bounded model. No original resource allocator, live expiry schedule or engine unlink runs.
|
| 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
|
@@ -597,3 +597,6 @@ The extension collector adds five focused tests for native tail calls, command-r
|
|
| 597 |
|
| 598 |
|
| 599 |
[RE-665: Complete finite pose routine with recovered source children](QVM_COMPLETE_POSE.md). Reproduce with `python3 scripts/analyze_qvm_complete_pose.py`; check with `python3 scripts/test_qvm_complete_pose.py`.
|
|
|
|
|
|
|
|
|
|
|
|
| 597 |
|
| 598 |
|
| 599 |
[RE-665: Complete finite pose routine with recovered source children](QVM_COMPLETE_POSE.md). Reproduce with `python3 scripts/analyze_qvm_complete_pose.py`; check with `python3 scripts/test_qvm_complete_pose.py`.
|
| 600 |
+
|
| 601 |
+
|
| 602 |
+
[RE-666: Entity free control flow and conditional record reset](QVM_ENTITY_FREE.md). Reproduce with `python3 scripts/analyze_qvm_entity_free.py`; check with `python3 scripts/test_qvm_entity_free.py`.
|
docs/research/qvm-entity-free.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
scripts/analyze_qvm_entity_free.py
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""277400 unlink/resource-release requests and conditional whole-record reset."""
|
| 3 |
+
import itertools
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
from qvm_research_support import source,execute
|
| 6 |
+
from analyze_qvm_temp_event import record
|
| 7 |
+
from analyze_qvm import write_json
|
| 8 |
+
LOCAL=0x78110000
|
| 9 |
+
ENTITY=0x78111000
|
| 10 |
+
OBJECT=0x78112000
|
| 11 |
+
FIELDS=[556,536,560,604,608,592,612,616,620]
|
| 12 |
+
|
| 13 |
+
def release(ins,m,pointer):
|
| 14 |
+
m=dict(m);before=record(m,pointer) if pointer else None;object_child=m.get(m.get(pointer+528,0)+8,0) if pointer else 0;m[LOCAL+28]=pointer;requests=[]
|
| 15 |
+
def capture(target):
|
| 16 |
+
def child(i,m,a,c):
|
| 17 |
+
r={'target':target,'arguments':a,'external_effect_not_executed':True};requests.append(r);return m,c,0,r
|
| 18 |
+
return child
|
| 19 |
+
def zero(i,m,a,c):
|
| 20 |
+
assert a=={8:pointer,12:0,16:880}
|
| 21 |
+
for o in range(0,880,4):m[pointer+o]=0
|
| 22 |
+
return m,c,0,{'modeled_zero_fill':a,'original_native_executed':False}
|
| 23 |
+
m,_,e=execute(ins,277401,277693,m,(0,0,0),LOCAL,{-32:capture(-32),16934:capture(16934),249639:capture(249639),-101:zero})
|
| 24 |
+
return m,{'pointer':pointer,'time':m[34992532],'object_child':object_child,'initial_record':before,'final_record':record(m,pointer) if pointer else None,'requests':requests,'execution':e}
|
| 25 |
+
|
| 26 |
+
def main():
|
| 27 |
+
q,raw,h,ins=source();rows=[]
|
| 28 |
+
for protected,pattern,object_kind,time in itertools.product([0,1],['none','all','alternating','alias'],['none','single','nested'],[0,5000]):
|
| 29 |
+
m={ENTITY+o:0x12340000+o for o in range(0,880,4)};m[ENTITY+548]=protected;m[ENTITY+532]=1;m[ENTITY+528]=0 if object_kind=='none' else OBJECT;m[OBJECT+8]=OBJECT+64 if object_kind=='nested' else 0;m[34992532]=time
|
| 30 |
+
for j,o in enumerate(FIELDS):m[ENTITY+o]=0 if pattern=='none' or (pattern=='alternating' and j%2) else (OBJECT+128 if pattern=='alias' else OBJECT+128+16*j)
|
| 31 |
+
rows.append(release(ins,m,ENTITY)[1])
|
| 32 |
+
rows.append(release(ins,{34992532:5000},0)[1])
|
| 33 |
+
write_json(Path('docs/research/qvm-entity-free.json'),{'source':q['source'],'sha256':q['sha256'],'probes':rows,'limits':'Complete277401–277692 control/data flow; native unlink−32 and resource helpers16934/249639 are captured requests without resource/engine effects. Zero fill880 is modeled. No allocator/lifetime/reference parity claim.'})
|
| 34 |
+
if __name__=='__main__':main()
|
scripts/test_qvm_entity_free.py
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import json,unittest
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
FIELDS=[556,536,560,604,608,592,612,616,620]
|
| 4 |
+
class EntityFreeTests(unittest.TestCase):
|
| 5 |
+
@classmethod
|
| 6 |
+
def setUpClass(cls):cls.rows=json.loads(Path('docs/research/qvm-entity-free.json').read_text())['probes']
|
| 7 |
+
def test_independent_entire_record_reset_or_protected_preservation(self):
|
| 8 |
+
self.assertEqual(len(self.rows),49)
|
| 9 |
+
for p in self.rows:
|
| 10 |
+
if not p['pointer']:self.assertIsNone(p['final_record']);continue
|
| 11 |
+
old=p['initial_record'];expected=old.copy()
|
| 12 |
+
for o in FIELDS:expected[str(o)]=0
|
| 13 |
+
if not old['548']:expected={str(o):0 for o in range(0,880,4)};expected.update({'536':97202,'540':155463540,'564':p['time']})
|
| 14 |
+
self.assertEqual(p['final_record'],expected)
|
| 15 |
+
def test_exact_release_order_and_alias_requests(self):
|
| 16 |
+
for p in self.rows:
|
| 17 |
+
if not p['pointer']:self.assertEqual(p['requests'],[]);continue
|
| 18 |
+
old=p['initial_record'];expected=[(-32,p['pointer'])]
|
| 19 |
+
if old['528']:
|
| 20 |
+
if p['object_child']:expected.append((16934,p['object_child']))
|
| 21 |
+
expected.append((16934,old['528']))
|
| 22 |
+
expected += [(249639,old[str(o)]) for o in FIELDS if old[str(o)]];self.assertEqual([(r['target'],r['arguments']['8']) for r in p['requests']],expected)
|
| 23 |
+
def test_zero_fill_only_after_resource_calls_and_if_unprotected(self):
|
| 24 |
+
for p in self.rows:
|
| 25 |
+
calls=p['execution']['calls'];reset=bool(p['pointer'] and not p['initial_record']['548']);self.assertEqual(sum(c['target']==-101 for c in calls),int(reset))
|
| 26 |
+
if reset:self.assertEqual(calls[-1]['args'],{'8':p['pointer'],'12':0,'16':880})
|
| 27 |
+
def test_protected_object_pointer_and_used_flag_preserved(self):
|
| 28 |
+
for p in self.rows:
|
| 29 |
+
if p['pointer'] and p['initial_record']['548']:
|
| 30 |
+
for o in ['528','532','548','564']:self.assertEqual(p['initial_record'][o],p['final_record'][o])
|
| 31 |
+
if __name__=='__main__':unittest.main()
|