qvm: history append producer
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_HISTORY_APPEND.md +7 -0
- docs/research/README.md +3 -0
- docs/research/qvm-history-append.json +0 -0
- scripts/analyze_qvm_history_append.py +25 -0
- scripts/test_qvm_history_append.py +16 -0
docs/ASSET_PIPELINE_TODO.md
CHANGED
|
@@ -625,3 +625,6 @@ Research progress: RE-646 [report](research/QVM_EVENT57_WORLD_RETURN.md); remain
|
|
| 625 |
|
| 626 |
|
| 627 |
Research progress: RE-648 [report](research/QVM_HISTORY_RESET.md); remaining native/content/runtime/platform scope stays open.
|
|
|
|
|
|
|
|
|
|
|
|
| 625 |
|
| 626 |
|
| 627 |
Research progress: RE-648 [report](research/QVM_HISTORY_RESET.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.
|
docs/FINDINGS.md
CHANGED
|
@@ -971,3 +971,6 @@ Bounded qagame paths recover bomb-plant/inactivity correction requests, direct f
|
|
| 971 |
|
| 972 |
|
| 973 |
**RE-648 — History reset writer and preserved row fields:** 142502 resets all20 history rows from live state/time and clears4408, but does not initialize row72/76 or header words. [Evidence](research/QVM_HISTORY_RESET.md).
|
|
|
|
|
|
|
|
|
|
|
|
| 971 |
|
| 972 |
|
| 973 |
**RE-648 — History reset writer and preserved row fields:** 142502 resets all20 history rows from live state/time and clears4408, but does not initialize row72/76 or header words. [Evidence](research/QVM_HISTORY_RESET.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).
|
docs/PROVISIONAL_TODO.md
CHANGED
|
@@ -945,3 +945,6 @@ Research progress: RE-646 [report](research/QVM_EVENT57_WORLD_RETURN.md); remain
|
|
| 945 |
|
| 946 |
|
| 947 |
Research progress: RE-648 [report](research/QVM_HISTORY_RESET.md); remaining native/content/runtime/platform scope stays open.
|
|
|
|
|
|
|
|
|
|
|
|
| 945 |
|
| 946 |
|
| 947 |
Research progress: RE-648 [report](research/QVM_HISTORY_RESET.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.
|
docs/RESEARCH_LEDGER.md
CHANGED
|
@@ -907,3 +907,8 @@ Direct285840 now composes actual allocation, event57, quantized direction/global
|
|
| 907 |
## 2026-10-20 — RE-648 History reset writer and preserved row fields (separate task commit)
|
| 908 |
|
| 909 |
142502 resets all20 history rows from live state/time and clears4408, but does not initialize row72/76 or header words. 12 time/animation fixtures independently compare every row word, byte packing, omitted-field preservation and client guard effects. Full suite: 1062 tests pass. Report regenerates byte-identically (380952 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 907 |
## 2026-10-20 — RE-648 History reset writer and preserved row fields (separate task commit)
|
| 908 |
|
| 909 |
142502 resets all20 history rows from live state/time and clears4408, but does not initialize row72/76 or header words. 12 time/animation fixtures independently compare every row word, byte packing, omitted-field preservation and client guard effects. Full suite: 1062 tests pass. Report regenerates byte-identically (380952 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
|
| 910 |
+
|
| 911 |
+
|
| 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.
|
docs/REVERSE_ENGINEERING_TODO.md
CHANGED
|
@@ -988,3 +988,6 @@ Purpose: turn the supplied installation into an evidence-backed specification of
|
|
| 988 |
|
| 989 |
|
| 990 |
- [x] RE-648 History reset writer and preserved row fields ([report](research/QVM_HISTORY_RESET.md)).
|
|
|
|
|
|
|
|
|
|
|
|
| 988 |
|
| 989 |
|
| 990 |
- [x] RE-648 History reset writer and preserved row fields ([report](research/QVM_HISTORY_RESET.md)).
|
| 991 |
+
|
| 992 |
+
|
| 993 |
+
- [x] RE-649 History append shift and complete newest row writer ([report](research/QVM_HISTORY_APPEND.md)).
|
docs/research/QVM_HISTORY_APPEND.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# History append shift and complete newest row writer
|
| 2 |
+
|
| 3 |
+
RE-649. Reproduce with `python3 scripts/analyze_qvm_history_append.py`; check with `python3 scripts/test_qvm_history_append.py`. The [machine report](qvm-history-append.json) retains source identity and bounded fixtures.
|
| 4 |
+
|
| 5 |
+
Complete142774–143028 guards null client, copies the20-row table to a source local buffer, copies its first19 rows back starting at row1, then writes row0. The source temporary makes the two copies nonoverlapping. Native−102 is modeled as explicit bounded aligned word copies, including packed animation bytes; original library code is not executed. The new head includes client6204/6256 at72/76, unlike reset, and preserves omitted header/padding words. Client4408 is preserved. Independent tests compare every word and exact copy sizes1600/1520. Call scheduling, time origin and reset triggers remain unresolved.
|
| 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
|
@@ -546,3 +546,6 @@ The extension collector adds five focused tests for native tail calls, command-r
|
|
| 546 |
|
| 547 |
|
| 548 |
[RE-648: History reset writer and preserved row fields](QVM_HISTORY_RESET.md). Reproduce with `python3 scripts/analyze_qvm_history_reset.py`; check with `python3 scripts/test_qvm_history_reset.py`.
|
|
|
|
|
|
|
|
|
|
|
|
| 546 |
|
| 547 |
|
| 548 |
[RE-648: History reset writer and preserved row fields](QVM_HISTORY_RESET.md). Reproduce with `python3 scripts/analyze_qvm_history_reset.py`; check with `python3 scripts/test_qvm_history_reset.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`.
|
docs/research/qvm-history-append.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
scripts/analyze_qvm_history_append.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""142773 shifts history through a source temporary, then writes row zero."""
|
| 3 |
+
import itertools
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
from qvm_research_support import source
|
| 6 |
+
from qvm_trace_support import resume
|
| 7 |
+
from qvm_history_support import history,merge_bytes,memcpy_words
|
| 8 |
+
from analyze_qvm_rewind_history_select import history_fixture
|
| 9 |
+
from analyze_qvm_rewind_snapshot import client_state
|
| 10 |
+
from analyze_qvm_temp_event import record
|
| 11 |
+
from qvm_server_fire_support import ENTITY
|
| 12 |
+
from analyze_qvm import write_json
|
| 13 |
+
LOCAL=0x78010000
|
| 14 |
+
|
| 15 |
+
def append(ins,m,pointer=ENTITY):
|
| 16 |
+
m=dict(m);client=m[pointer+520];before=history(m,client) if client else None;prior=client_state(m,client) if client else None;entity=record(m,pointer);m[LOCAL+1676]=pointer;m,e=resume(ins,142774,143029,m,LOCAL,handlers={-102:memcpy_words});merge_bytes(m,e['byte_writes'])
|
| 17 |
+
return m,{'pointer':pointer,'time':m[34992532],'entity':entity,'initial_client':prior,'final_client':client_state(m,client) if client else None,'initial':before,'final':history(m,client) if client else None,'execution':e,'status':'void-epilogue'}
|
| 18 |
+
|
| 19 |
+
def main():
|
| 20 |
+
q,raw,h,ins=source();rows=[]
|
| 21 |
+
for time,animation in itertools.product([0,5000,0x7fffffff],[0,255,256,0x12345678]):
|
| 22 |
+
m=history_fixture(raw,h,[2000-50*j for j in range(20)]);m[34992532]=time;m[ENTITY+200]=animation;m[ENTITY+196]=animation^255;rows.append(append(ins,m)[1])
|
| 23 |
+
m=history_fixture(raw,h,[1500]*20);m[ENTITY+520]=0;rows.append(append(ins,m)[1])
|
| 24 |
+
write_json(Path('docs/research/qvm-history-append.json'),{'source':q['source'],'sha256':q['sha256'],'probes':rows,'limits':'Complete142774–143028. Native−102 modeled as explicit aligned bounded word copies, preserving packed bytes; original library not executed. History invocation schedule and timestamp legality unverified. Null client exits without copies.'})
|
| 25 |
+
if __name__=='__main__':main()
|
scripts/test_qvm_history_append.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import json,unittest
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
from test_qvm_history_reset import written
|
| 4 |
+
class HistoryAppendTests(unittest.TestCase):
|
| 5 |
+
@classmethod
|
| 6 |
+
def setUpClass(cls):cls.r=json.loads(Path('docs/research/qvm-history-append.json').read_text())
|
| 7 |
+
def test_independent_head_and_entire_shift(self):
|
| 8 |
+
for p in self.r['probes'][:-1]:self.assertEqual(p['final'],[written(p['initial'][0],p['entity'],p['initial_client'],p['time'],tail=True)]+p['initial'][:19]);self.assertEqual(p['initial_client'],p['final_client'])
|
| 9 |
+
def test_copy_sizes_and_nonoverlapping_source_temporary(self):
|
| 10 |
+
for p in self.r['probes'][:-1]:
|
| 11 |
+
calls=p['execution']['calls'];self.assertEqual([c['target'] for c in calls],[-102,-102]);self.assertEqual([c['args']['16'] for c in calls],[1600,1520]);self.assertEqual(calls[0]['args']['8'],calls[1]['args']['12']);self.assertEqual(calls[0]['args']['12']+80,calls[1]['args']['8'])
|
| 12 |
+
def test_head_tail_fields_are_updated_unlike_reset(self):
|
| 13 |
+
for p in self.r['probes'][:-1]:self.assertEqual(p['final'][0]['72'],p['initial_client']['6204']);self.assertEqual(p['final'][0]['76'],p['initial_client']['6256']);self.assertEqual(len(p['execution']['byte_writes']),2)
|
| 14 |
+
def test_null_client_no_native_copy(self):
|
| 15 |
+
p=self.r['probes'][-1];self.assertIsNone(p['final']);self.assertEqual(p['execution']['calls'],[])
|
| 16 |
+
if __name__=='__main__':unittest.main()
|