nmarshall commited on
Commit
6542cd2
·
1 Parent(s): f3b2964

qvm: produced history rewind chain

Browse files
docs/ASSET_PIPELINE_TODO.md CHANGED
@@ -628,3 +628,6 @@ Research progress: RE-648 [report](research/QVM_HISTORY_RESET.md); remaining nat
628
 
629
 
630
  Research progress: RE-649 [report](research/QVM_HISTORY_APPEND.md); remaining native/content/runtime/platform scope stays open.
 
 
 
 
628
 
629
 
630
  Research progress: RE-649 [report](research/QVM_HISTORY_APPEND.md); remaining native/content/runtime/platform scope stays open.
631
+
632
+
633
+ Research progress: RE-650 [report](research/QVM_PRODUCED_HISTORY_REWIND.md); remaining native/content/runtime/platform scope stays open.
docs/FINDINGS.md CHANGED
@@ -974,3 +974,6 @@ Bounded qagame paths recover bomb-plant/inactivity correction requests, direct f
974
 
975
 
976
  **RE-649 — History append shift and complete newest row writer:** 142773 copies1600 history bytes to a temporary then shifts1520 bytes to rows1..19, writing a complete newest row including72/76. [Evidence](research/QVM_HISTORY_APPEND.md).
 
 
 
 
974
 
975
 
976
  **RE-649 — History append shift and complete newest row writer:** 142773 copies1600 history bytes to a temporary then shifts1520 bytes to rows1..19, writing a complete newest row including72/76. [Evidence](research/QVM_HISTORY_APPEND.md).
977
+
978
+
979
+ **RE-650 — Source-produced twenty-row history through rewind and restoration:** Reset plus25 actual append calls produce newest-first retained history consumed by complete143100 and restored by144165. [Evidence](research/QVM_PRODUCED_HISTORY_REWIND.md).
docs/PROVISIONAL_TODO.md CHANGED
@@ -948,3 +948,6 @@ Research progress: RE-648 [report](research/QVM_HISTORY_RESET.md); remaining nat
948
 
949
 
950
  Research progress: RE-649 [report](research/QVM_HISTORY_APPEND.md); remaining native/content/runtime/platform scope stays open.
 
 
 
 
948
 
949
 
950
  Research progress: RE-649 [report](research/QVM_HISTORY_APPEND.md); remaining native/content/runtime/platform scope stays open.
951
+
952
+
953
+ Research progress: RE-650 [report](research/QVM_PRODUCED_HISTORY_REWIND.md); remaining native/content/runtime/platform scope stays open.
docs/RESEARCH_LEDGER.md CHANGED
@@ -912,3 +912,8 @@ Direct285840 now composes actual allocation, event57, quantized direction/global
912
  ## 2026-10-20 — RE-649 History append shift and complete newest row writer (separate task commit)
913
 
914
  142773 copies1600 history bytes to a temporary then shifts1520 bytes to rows1..19, writing a complete newest row including72/76. 13 time/animation/null-client cases independently reconstruct the whole shifted table and validate both native-copy ABIs and guard preservation. Full suite: 1066 tests pass. Report regenerates byte-identically (368096 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
 
 
 
 
 
 
912
  ## 2026-10-20 — RE-649 History append shift and complete newest row writer (separate task commit)
913
 
914
  142773 copies1600 history bytes to a temporary then shifts1520 bytes to rows1..19, writing a complete newest row including72/76. 13 time/animation/null-client cases independently reconstruct the whole shifted table and validate both native-copy ABIs and guard preservation. Full suite: 1066 tests pass. Report regenerates byte-identically (368096 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
915
+
916
+
917
+ ## 2026-10-20 — RE-650 Source-produced twenty-row history through rewind and restoration (separate task commit)
918
+
919
+ Reset plus25 actual append calls produce newest-first retained history consumed by complete143100 and restored by144165. Five target-time compositions independently reconstruct every producer transition, retained20 timestamps, full rewind state and restore round trip. Full suite: 1070 tests pass. Report regenerates byte-identically (1131284 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
@@ -991,3 +991,6 @@ Purpose: turn the supplied installation into an evidence-backed specification of
991
 
992
 
993
  - [x] RE-649 History append shift and complete newest row writer ([report](research/QVM_HISTORY_APPEND.md)).
 
 
 
 
991
 
992
 
993
  - [x] RE-649 History append shift and complete newest row writer ([report](research/QVM_HISTORY_APPEND.md)).
994
+
995
+
996
+ - [x] RE-650 Source-produced twenty-row history through rewind and restoration ([report](research/QVM_PRODUCED_HISTORY_REWIND.md)).
docs/research/QVM_PRODUCED_HISTORY_REWIND.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # Source-produced twenty-row history through rewind and restoration
2
+
3
+ RE-650. Reproduce with `python3 scripts/analyze_qvm_produced_history_rewind.py`; check with `python3 scripts/test_qvm_produced_history_rewind.py`. The [machine report](qvm-produced-history-rewind.json) retains source identity and bounded fixtures.
4
+
5
+ The fixture invokes the recovered reset at time1000 and25 recovered append calls at ten-unit intervals, with changing position/velocity/angles/client fields. An independent state machine reconstructs all rows, confirming retained timestamps1250..1060 and eviction of older entries. Actual complete rewind consumes these produced records at five target times, including oldest/equality/interpolation/fallback/extrapolation boundaries, followed by actual snapshot restoration. Full-state pure oracles check each result and expected animation-byte truncation. Invocation times are explicit harness sequencing, not recovered live scheduling or reset-trigger evidence. Native copying remains modeled and native linking remains captured.
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
@@ -549,3 +549,6 @@ The extension collector adds five focused tests for native tail calls, command-r
549
 
550
 
551
  [RE-649: History append shift and complete newest row writer](QVM_HISTORY_APPEND.md). Reproduce with `python3 scripts/analyze_qvm_history_append.py`; check with `python3 scripts/test_qvm_history_append.py`.
 
 
 
 
549
 
550
 
551
  [RE-649: History append shift and complete newest row writer](QVM_HISTORY_APPEND.md). Reproduce with `python3 scripts/analyze_qvm_history_append.py`; check with `python3 scripts/test_qvm_history_append.py`.
552
+
553
+
554
+ [RE-650: Source-produced twenty-row history through rewind and restoration](QVM_PRODUCED_HISTORY_REWIND.md). Reproduce with `python3 scripts/analyze_qvm_produced_history_rewind.py`; check with `python3 scripts/test_qvm_produced_history_rewind.py`.
docs/research/qvm-produced-history-rewind.json ADDED
The diff for this file is too large to render. See raw diff
 
scripts/analyze_qvm_produced_history_rewind.py ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Source reset→25 append calls→actual history rewind→actual restore."""
3
+ from pathlib import Path
4
+ from qvm_research_support import source
5
+ from qvm_history_support import history
6
+ from analyze_qvm_history_reset import reset
7
+ from analyze_qvm_history_append import append
8
+ from analyze_qvm_rewind_history_select import history_fixture
9
+ from analyze_qvm_complete_rewind import rewind
10
+ from analyze_qvm_rewind_restore import restore_player
11
+ from qvm_server_fire_support import ENTITY
12
+ from analyze_qvm_acceleration import word
13
+ from analyze_qvm import write_json
14
+
15
+ def produce(ins,raw,h):
16
+ m=history_fixture(raw,h,[0]*20);m[34992532]=1000;m,r=reset(ins,m);client=m[ENTITY+520];steps=[]
17
+ for tick in range(1,26):
18
+ m[34992532]=1000+tick*10
19
+ for base,values in [(24,(tick,tick*.5,-tick)),(488,(tick,tick*.5,-tick)),(36,(tick*.25,-tick*.5,1)),(60,(tick*5,350-tick*20,tick*30))]:
20
+ for j,v in enumerate(values):m[ENTITY+base+4*j]=word(v)
21
+ m[ENTITY+196]=256+tick;m[ENTITY+200]=512+tick
22
+ for o in [4380,4384,4388,4392,6204,6256]:m[client+o]=tick*100+o
23
+ m,e=append(ins,m);steps.append({'time':e['time'],'entity':{str(o):e['entity'][str(o)] for o in [24,28,32,36,40,44,60,64,68,196,200]},'client':e['initial_client'],'head':e['final'][0],'execution':e['execution']})
24
+ return m,{'reset':r,'steps':steps,'produced_history':history(m,client)}
25
+
26
+ def main():
27
+ q,raw,h,ins=source();m,p=produce(ins,raw,h);rows=[]
28
+ for time in [1050,1060,1135,1250,1300]:
29
+ state,r=rewind(ins,m,ENTITY,time);_,restored=restore_player(ins,state,ENTITY);rows.append({'producer':p,'rewind':r,'restore':restored})
30
+ write_json(Path('docs/research/qvm-produced-history-rewind.json'),{'source':q['source'],'sha256':q['sha256'],'probes':rows,'limits':'Actual reset/append/rewind/restore source under explicitly sequenced25 ticks. Native copy modeled; native linking captured. Producer scheduling/reset callers and original timestamp semantics remain unverified; no live engine execution.'})
31
+ if __name__=='__main__':main()
scripts/test_qvm_produced_history_rewind.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json,unittest
2
+ from pathlib import Path
3
+ from test_qvm_history_reset import written
4
+ from test_qvm_complete_rewind import expected
5
+ class ProducedHistoryRewindTests(unittest.TestCase):
6
+ @classmethod
7
+ def setUpClass(cls):cls.r=json.loads(Path('docs/research/qvm-produced-history-rewind.json').read_text())
8
+ def test_independent_producer_state_machine(self):
9
+ p=self.r['probes'][0]['producer'];reset=p['reset'];rows=[written(old,reset['entity'],reset['initial_client'],1000) for old in reset['initial']]
10
+ for step in p['steps']:rows=[written(rows[0],step['entity'],step['client'],step['time'],tail=True)]+rows[:19];self.assertEqual(rows[0],step['head'])
11
+ self.assertEqual(rows,p['produced_history'])
12
+ def test_oldest_twenty_updates_and_descending_times(self):
13
+ for p in self.r['probes']:self.assertEqual([r['68'] for r in p['producer']['produced_history']],[1250-10*j for j in range(20)]);self.assertEqual(p['rewind']['history'],{str(j):r for j,r in enumerate(p['producer']['produced_history'])})
14
+ def test_independent_complete_rewind_from_produced_rows(self):
15
+ for p in self.r['probes']:
16
+ r=p['rewind'];state,selection=expected(r);self.assertEqual((r['final_entity'],r['final_client']),state);self.assertEqual((r['lower_index'],r['upper_index'],r['fraction']),selection)
17
+ def test_original_live_record_restored_with_animation_truncation(self):
18
+ for p in self.r['probes']:
19
+ want=dict(p['rewind']['initial_entity']);want['196']&=255;want['200']&=255;self.assertEqual(p['restore']['final_entity'],want)
20
+ if __name__=='__main__':unittest.main()