qvm: trace response cleanup chains
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_TRACE_RESPONSE_CHAIN.md +7 -0
- docs/research/README.md +3 -0
- docs/research/qvm-trace-response-chain.json +0 -0
- scripts/analyze_qvm_trace_response_chain.py +46 -0
- scripts/test_qvm_trace_response_chain.py +22 -0
docs/ASSET_PIPELINE_TODO.md
CHANGED
|
@@ -571,3 +571,6 @@ Research progress: RE-629 [report](research/QVM_TRACE_BOUNDS_RESTORE.md); remain
|
|
| 571 |
|
| 572 |
|
| 573 |
Research progress: RE-630 [report](research/QVM_TRACE_FINALIZE.md); remaining native/content/runtime/platform scope stays open.
|
|
|
|
|
|
|
|
|
|
|
|
| 571 |
|
| 572 |
|
| 573 |
Research progress: RE-630 [report](research/QVM_TRACE_FINALIZE.md); remaining native/content/runtime/platform scope stays open.
|
| 574 |
+
|
| 575 |
+
|
| 576 |
+
Research progress: RE-631 [report](research/QVM_TRACE_RESPONSE_CHAIN.md); remaining native/content/runtime/platform scope stays open.
|
docs/FINDINGS.md
CHANGED
|
@@ -923,3 +923,6 @@ Bounded qagame paths recover bomb-plant/inactivity correction requests, direct f
|
|
| 923 |
|
| 924 |
|
| 925 |
**RE-630 — Shooter restoration gate final link and trace return:** The trace suffix requests144413 only for client shooters without424 bit8 and mode exactly1; otherwise it links the shooter and returns local96. [Evidence](research/QVM_TRACE_FINALIZE.md).
|
|
|
|
|
|
|
|
|
|
|
|
| 923 |
|
| 924 |
|
| 925 |
**RE-630 — Shooter restoration gate final link and trace return:** The trace suffix requests144413 only for client shooters without424 bit8 and mode exactly1; otherwise it links the shooter and returns local96. [Evidence](research/QVM_TRACE_FINALIZE.md).
|
| 926 |
+
|
| 927 |
+
|
| 928 |
+
**RE-631 — Complete trace retry cleanup flow under supplied response sequences:** Whole291641 now follows supplied world/entity traces through retry, ordered relinking, bound restoration and numeric return, or suspends before unrecovered consumers. [Evidence](research/QVM_TRACE_RESPONSE_CHAIN.md).
|
docs/PROVISIONAL_TODO.md
CHANGED
|
@@ -891,3 +891,6 @@ Research progress: RE-629 [report](research/QVM_TRACE_BOUNDS_RESTORE.md); remain
|
|
| 891 |
|
| 892 |
|
| 893 |
Research progress: RE-630 [report](research/QVM_TRACE_FINALIZE.md); remaining native/content/runtime/platform scope stays open.
|
|
|
|
|
|
|
|
|
|
|
|
| 891 |
|
| 892 |
|
| 893 |
Research progress: RE-630 [report](research/QVM_TRACE_FINALIZE.md); remaining native/content/runtime/platform scope stays open.
|
| 894 |
+
|
| 895 |
+
|
| 896 |
+
Research progress: RE-631 [report](research/QVM_TRACE_RESPONSE_CHAIN.md); remaining native/content/runtime/platform scope stays open.
|
docs/RESEARCH_LEDGER.md
CHANGED
|
@@ -827,3 +827,8 @@ The restoration suffix repeats eligibility gates, reverses bound arithmetic and
|
|
| 827 |
## 2026-10-20 — RE-630 Shooter restoration gate final link and trace return (separate task commit)
|
| 828 |
|
| 829 |
The trace suffix requests144413 only for client shooters without424 bit8 and mode exactly1; otherwise it links the shooter and returns local96. 24 client/flag/mode/result combinations independently verify the exact gate, native link request and numeric return. Full suite: 1004 tests pass. Report regenerates byte-identically (28647 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 827 |
## 2026-10-20 — RE-630 Shooter restoration gate final link and trace return (separate task commit)
|
| 828 |
|
| 829 |
The trace suffix requests144413 only for client shooters without424 bit8 and mode exactly1; otherwise it links the shooter and returns local96. 24 client/flag/mode/result combinations independently verify the exact gate, native link request and numeric return. Full suite: 1004 tests pass. Report regenerates byte-identically (28647 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
|
| 830 |
+
|
| 831 |
+
|
| 832 |
+
## 2026-10-20 — RE-631 Complete trace retry cleanup flow under supplied response sequences (separate task commit)
|
| 833 |
+
|
| 834 |
+
Whole291641 now follows supplied world/entity traces through retry, ordered relinking, bound restoration and numeric return, or suspends before unrecovered consumers. Nine source-order cases check full candidate restoration, ten-retry limit, link order, opaque boundaries and explicit rejection of exhausted response fixtures. Full suite: 1008 tests pass. Report regenerates byte-identically (703695 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
|
@@ -934,3 +934,6 @@ Purpose: turn the supplied installation into an evidence-backed specification of
|
|
| 934 |
|
| 935 |
|
| 936 |
- [x] RE-630 Shooter restoration gate final link and trace return ([report](research/QVM_TRACE_FINALIZE.md)).
|
|
|
|
|
|
|
|
|
|
|
|
| 934 |
|
| 935 |
|
| 936 |
- [x] RE-630 Shooter restoration gate final link and trace return ([report](research/QVM_TRACE_FINALIZE.md)).
|
| 937 |
+
|
| 938 |
+
|
| 939 |
+
- [x] RE-631 Complete trace retry cleanup flow under supplied response sequences ([report](research/QVM_TRACE_RESPONSE_CHAIN.md)).
|
docs/research/QVM_TRACE_RESPONSE_CHAIN.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Complete trace retry cleanup flow under supplied response sequences
|
| 2 |
+
|
| 3 |
+
RE-631. Reproduce with `python3 scripts/analyze_qvm_trace_response_chain.py`; check with `python3 scripts/test_qvm_trace_response_chain.py`. The [machine report](qvm-trace-response-chain.json) retains source identity and bounded fixtures.
|
| 4 |
+
|
| 5 |
+
The bounded whole-function driver executes291642–292542 using explicitly supplied56-byte native−25 records and captured−31/−32 requests. World/plain-entity, skipped-target→world, ten repeated skipped targets and a non-damaging tagged record all reach actual source return0 after cleanup. Independent tests check retry counts, relink order and complete canonical candidate records. Model-hit144766, damage211239, rewind144082 and configured144493 branches suspend before their caller proceeds; no opaque result is fabricated. Native-response exhaustion rejects instead of inventing another trace. Repeated target fixtures are synthetic and do not assert what real unlink/collision would return. This is data-flow verification under supplied trace sequences, not evidence of live collision, hit/damage or engine restoration.
|
| 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
|
@@ -492,3 +492,6 @@ The extension collector adds five focused tests for native tail calls, command-r
|
|
| 492 |
|
| 493 |
|
| 494 |
[RE-630: Shooter restoration gate final link and trace return](QVM_TRACE_FINALIZE.md). Reproduce with `python3 scripts/analyze_qvm_trace_finalize.py`; check with `python3 scripts/test_qvm_trace_finalize.py`.
|
|
|
|
|
|
|
|
|
|
|
|
| 492 |
|
| 493 |
|
| 494 |
[RE-630: Shooter restoration gate final link and trace return](QVM_TRACE_FINALIZE.md). Reproduce with `python3 scripts/analyze_qvm_trace_finalize.py`; check with `python3 scripts/test_qvm_trace_finalize.py`.
|
| 495 |
+
|
| 496 |
+
|
| 497 |
+
[RE-631: Complete trace retry cleanup flow under supplied response sequences](QVM_TRACE_RESPONSE_CHAIN.md). Reproduce with `python3 scripts/analyze_qvm_trace_response_chain.py`; check with `python3 scripts/test_qvm_trace_response_chain.py`.
|
docs/research/qvm-trace-response-chain.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
scripts/analyze_qvm_trace_response_chain.py
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Whole291641 trace control flow with supplied native response sequences."""
|
| 3 |
+
from pathlib import Path
|
| 4 |
+
from qvm_research_support import source
|
| 5 |
+
from qvm_trace_support import resume,captured
|
| 6 |
+
from analyze_qvm_shot_trace_request import fixture,LOCAL
|
| 7 |
+
from analyze_qvm_entity_init import POOL,STRIDE
|
| 8 |
+
from analyze_qvm_temp_event import record
|
| 9 |
+
from analyze_qvm_trace_classify import TAG
|
| 10 |
+
from analyze_qvm_acceleration import word
|
| 11 |
+
from analyze_qvm import write_json
|
| 12 |
+
PENDING={291701:144082,291714:144493,291986:144766,292020:211239,292213:277695,292226:60317,292528:144413}
|
| 13 |
+
|
| 14 |
+
def response_chain(ins,m,args,traces):
|
| 15 |
+
m=dict(m)
|
| 16 |
+
for o,v in args.items():m[LOCAL+144+o]=v
|
| 17 |
+
points=[POOL+m[34992592+4*j]*STRIDE for j in range(m[34992580])];before={str(p):record(m,p) for p in points};requests=[];responses=[]
|
| 18 |
+
def trace(i,m,a):
|
| 19 |
+
if len(responses)>=len(traces):raise ValueError('Supplied trace sequence exhausted')
|
| 20 |
+
index=traces[len(responses)];words=[0]*14;words[2]=word(1 if index>=1022 else .5);words[13]=index
|
| 21 |
+
for j,value in enumerate(words):m[a[8]+4*j]=value
|
| 22 |
+
e={'arguments':a,'supplied_words':words,'native_effect_not_executed':True};responses.append(e);return m,0,e
|
| 23 |
+
m,e=resume(ins,291642,292543,m,LOCAL,handlers={-32:captured(-32,requests),-31:captured(-31,requests),-25:trace},boundaries=list(PENDING))
|
| 24 |
+
return m,{'arguments':args,'supplied_entities':traces,'responses':responses,'native_requests':requests,'execution':e,'retry_count':m.get(LOCAL+52),'status':'returned' if e['return'] is not None else 'child-pending','pending_target':PENDING.get(e['stop']),'original_candidates':before,'final_candidates':{str(p):record(m,p) for p in points}}
|
| 25 |
+
|
| 26 |
+
def setup_case(raw,h,label):
|
| 27 |
+
m,a=fixture(raw,h);p=POOL+65*STRIDE;m[p+688]=0;m[p+540]=0;m[p+684]=0;m[p+760]=0;traces=[1023]
|
| 28 |
+
for index in [65,69]:
|
| 29 |
+
pointer=POOL+index*STRIDE
|
| 30 |
+
for o in [448,452]:m[pointer+o]=word(15)
|
| 31 |
+
for o in [436,440]:m[pointer+o]=word(-15)
|
| 32 |
+
if label=='plain-entity':traces=[65]
|
| 33 |
+
if label in ['retry-then-world','retry-limit','live-model']:
|
| 34 |
+
m[p+688]=1;m[p+684]=1 if label=='live-model' else 0;traces=[65] if label=='live-model' else ([65]*10 if label=='retry-limit' else [65,1023])
|
| 35 |
+
if label=='tag-damage':m[p+540]=TAG;m[p+684]=1;traces=[65]
|
| 36 |
+
if label=='tag-field760':m[p+540]=TAG;m[p+760]=1;traces=[65]
|
| 37 |
+
if label=='rewind-gate':m[a[8]+424]=0
|
| 38 |
+
if label=='configured-gate':m[34082500]=1
|
| 39 |
+
return m,a,traces
|
| 40 |
+
|
| 41 |
+
def main():
|
| 42 |
+
q,raw,h,ins=source();rows=[]
|
| 43 |
+
for label in ['world','plain-entity','retry-then-world','retry-limit','live-model','tag-damage','tag-field760','rewind-gate','configured-gate']:
|
| 44 |
+
m,a,traces=setup_case(raw,h,label);_,r=response_chain(ins,m,a,traces);r['label']=label;rows.append(r)
|
| 45 |
+
write_json(Path('docs/research/qvm-trace-response-chain.json'),{'source':q['source'],'sha256':q['sha256'],'probes':rows,'limits':'Whole291641 bounded source flow with explicitly supplied56-byte native trace records, captured native link/unlink and suspended opaque children. Repeated target sequences are synthetic; no engine collision or live-world legality inferred. No model-hit/damage result fabricated.'})
|
| 46 |
+
if __name__=='__main__':main()
|
scripts/test_qvm_trace_response_chain.py
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import json,unittest
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
class TraceResponseChainTests(unittest.TestCase):
|
| 4 |
+
@classmethod
|
| 5 |
+
def setUpClass(cls):cls.r=json.loads(Path('docs/research/qvm-trace-response-chain.json').read_text());cls.p={p['label']:p for p in cls.r['probes']}
|
| 6 |
+
def test_returning_paths_restore_candidates_and_zero_result(self):
|
| 7 |
+
for label in ['world','plain-entity','retry-then-world','retry-limit','tag-field760']:
|
| 8 |
+
p=self.p[label];self.assertEqual(p['status'],'returned');self.assertEqual(p['execution']['return'],0);self.assertEqual(p['original_candidates'],p['final_candidates'])
|
| 9 |
+
def test_independent_retry_count_and_relink_order(self):
|
| 10 |
+
for label,count in [('world',0),('plain-entity',0),('retry-then-world',1),('retry-limit',10)]:
|
| 11 |
+
p=self.p[label];self.assertEqual(p['retry_count'],count);links=[r['arguments']['8'] for r in p['native_requests'] if r['target']==-31];self.assertEqual(links,[34091368+65*880]*count+[34091368+64*880]);self.assertEqual(len(p['responses']),max(1,count) if label!='retry-then-world' else 2)
|
| 12 |
+
def test_opaque_children_suspend_before_return(self):
|
| 13 |
+
for label,target in [('live-model',144766),('tag-damage',211239),('rewind-gate',144082),('configured-gate',144493)]:
|
| 14 |
+
p=self.p[label];self.assertEqual(p['pending_target'],target);self.assertEqual(p['status'],'child-pending');self.assertIsNone(p['execution']['return']);self.assertNotIn(target,[c['target'] for c in p['execution']['calls']])
|
| 15 |
+
def test_supplied_collision_records_remain_explicit_and_bounded(self):
|
| 16 |
+
for p in self.r['probes']:
|
| 17 |
+
for r in p['responses']:self.assertEqual(len(r['supplied_words']),14);self.assertTrue(r['native_effect_not_executed'])
|
| 18 |
+
from qvm_research_support import source
|
| 19 |
+
from analyze_qvm_trace_response_chain import setup_case,response_chain
|
| 20 |
+
_,raw,h,ins=source();m,a,_=setup_case(raw,h,'world')
|
| 21 |
+
with self.assertRaisesRegex(ValueError,'Supplied trace sequence exhausted'):response_chain(ins,m,a,[])
|
| 22 |
+
if __name__=='__main__':unittest.main()
|