nmarshall commited on
Commit
8511f2b
·
1 Parent(s): 8af2522

qvm: compose file and cvar post-map persistence

Browse files
docs/FINDINGS.md CHANGED
@@ -1715,3 +1715,6 @@ RE-813–822 replaces the scoreboard decimal assumption with actual37914 executi
1715
 
1716
 
1717
  **RE-905:** Rust matches96 original247520 initialization/load/write cases, preserving raw byte/word clears, timeout wrapping, team/capacity selection,64 ignore clears and immediate session cvar bytes. Existing coordinates survive failed/suppressed loads. Engine clock/userinfo/files and diagnostic logging remain supplied/intended; caller behavior and native lifecycle remain open. [Evidence](research/RUST_SESSION_INIT.md).
 
 
 
 
1715
 
1716
 
1717
  **RE-905:** Rust matches96 original247520 initialization/load/write cases, preserving raw byte/word clears, timeout wrapping, team/capacity selection,64 ignore clears and immediate session cvar bytes. Existing coordinates survive failed/suppressed loads. Engine clock/userinfo/files and diagnostic logging remain supplied/intended; caller behavior and native lifecycle remain open. [Evidence](research/RUST_SESSION_INIT.md).
1718
+
1719
+
1720
+ **RE-906:** 48 actual249007/246746/246963 compositions execute both post-map children on shared state. Ordered native file intentions precede each client session/ignore cvar pair; mode/enabled/zero-position/open-handle gates, pointer-indirected ignore lists and shared formatter/userinfo selectors are verified. Connected-state filtering remains original. Engine userinfo/files/cvars and native copy remain supplied/modeled/captured. [Evidence](research/QVM_POST_MAP_FILES.md).
docs/PROVISIONAL_TODO.md CHANGED
@@ -1752,3 +1752,6 @@ RE-904: 96 actual247520 compositions execute team classification, userinfo looku
1752
 
1753
 
1754
  RE-905: Rust matches96 original247520 initialization/load/write cases, preserving raw byte/word clears, timeout wrapping, team/capacity selection,64 ignore clears and immediate session cvar bytes. Existing coordinates survive failed/suppressed loads. Engine clock/userinfo/files and diagnostic logging remain supplied/intended; caller behavior and native lifecycle remain open. Full runtime completion remains open. [Evidence](research/RUST_SESSION_INIT.md).
 
 
 
 
1752
 
1753
 
1754
  RE-905: Rust matches96 original247520 initialization/load/write cases, preserving raw byte/word clears, timeout wrapping, team/capacity selection,64 ignore clears and immediate session cvar bytes. Existing coordinates survive failed/suppressed loads. Engine clock/userinfo/files and diagnostic logging remain supplied/intended; caller behavior and native lifecycle remain open. Full runtime completion remains open. [Evidence](research/RUST_SESSION_INIT.md).
1755
+
1756
+
1757
+ RE-906: 48 actual249007/246746/246963 compositions execute both post-map children on shared state. Ordered native file intentions precede each client session/ignore cvar pair; mode/enabled/zero-position/open-handle gates, pointer-indirected ignore lists and shared formatter/userinfo selectors are verified. Connected-state filtering remains original. Engine userinfo/files/cvars and native copy remain supplied/modeled/captured. Full runtime completion remains open. [Evidence](research/QVM_POST_MAP_FILES.md).
docs/RESEARCH_LEDGER.md CHANGED
@@ -2245,3 +2245,8 @@ After the tenth commit, `cargo xtask test-full --since 6e01995b` passed with the
2245
  ## 2026-10-28 — RE-905 Rust session initialization and raw-field ownership
2246
 
2247
  Rust matches96 original247520 initialization/load/write cases, preserving raw byte/word clears, timeout wrapping, team/capacity selection,64 ignore clears and immediate session cvar bytes. Existing coordinates survive failed/suppressed loads. Engine clock/userinfo/files and diagnostic logging remain supplied/intended; caller behavior and native lifecycle remain open. Focused `cargo xtask test-group rust-session-init` passes (9 Python tests); selected reports regenerate twice deterministically, with storage, documentation links and whitespace guards. Full suite deferred to task ten. Original assets unchanged; source fixtures do not establish complete native/runtime parity.
 
 
 
 
 
 
2245
  ## 2026-10-28 — RE-905 Rust session initialization and raw-field ownership
2246
 
2247
  Rust matches96 original247520 initialization/load/write cases, preserving raw byte/word clears, timeout wrapping, team/capacity selection,64 ignore clears and immediate session cvar bytes. Existing coordinates survive failed/suppressed loads. Engine clock/userinfo/files and diagnostic logging remain supplied/intended; caller behavior and native lifecycle remain open. Focused `cargo xtask test-group rust-session-init` passes (9 Python tests); selected reports regenerate twice deterministically, with storage, documentation links and whitespace guards. Full suite deferred to task ten. Original assets unchanged; source fixtures do not establish complete native/runtime parity.
2248
+
2249
+
2250
+ ## 2026-10-28 — RE-906 Original post-map file and cvar persistence
2251
+
2252
+ 48 actual249007/246746/246963 compositions execute both post-map children on shared state. Ordered native file intentions precede each client session/ignore cvar pair; mode/enabled/zero-position/open-handle gates, pointer-indirected ignore lists and shared formatter/userinfo selectors are verified. Connected-state filtering remains original. Engine userinfo/files/cvars and native copy remain supplied/modeled/captured. Focused `cargo xtask test-group qvm-post-map-files` passes (4 Python tests); selected reports regenerate twice deterministically, with storage, documentation links and whitespace guards. Full suite deferred to task ten. Original assets unchanged; source fixtures do not establish complete native/runtime parity.
docs/REVERSE_ENGINEERING_TODO.md CHANGED
@@ -1789,3 +1789,6 @@ Purpose: turn the supplied installation into an evidence-backed specification of
1789
 
1790
 
1791
  - [x] RE-905 Rust session initialization and raw-field ownership ([evidence](research/RUST_SESSION_INIT.md)).
 
 
 
 
1789
 
1790
 
1791
  - [x] RE-905 Rust session initialization and raw-field ownership ([evidence](research/RUST_SESSION_INIT.md)).
1792
+
1793
+
1794
+ - [x] RE-906 Original post-map file and cvar persistence ([evidence](research/QVM_POST_MAP_FILES.md)).
docs/research/QVM_POST_MAP_FILES.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # Original post-map file and cvar persistence
2
+
3
+ RE-906. Reproduce with `python3 scripts/analyze_qvm_post_map_files.py`; focused validation: `cargo xtask test-group qvm-post-map-files`. [Machine report](qvm-post-map-files.json).
4
+
5
+ 48 actual249007/246746/246963 compositions execute both post-map children on shared state. Ordered native file intentions precede each client session/ignore cvar pair; mode/enabled/zero-position/open-handle gates, pointer-indirected ignore lists and shared formatter/userinfo selectors are verified. Connected-state filtering remains original. Engine userinfo/files/cvars and native copy remain supplied/modeled/captured.
6
+
7
+ Original executable/native runtime and complete Linux/macOS Rust/Bevy/Solari acceptance remain unverified.
docs/research/README.md CHANGED
@@ -1324,3 +1324,6 @@ The extension collector adds five focused tests for native tail calls, command-r
1324
 
1325
 
1326
  [RE-905: Rust session initialization and raw-field ownership](RUST_SESSION_INIT.md).
 
 
 
 
1324
 
1325
 
1326
  [RE-905: Rust session initialization and raw-field ownership](RUST_SESSION_INIT.md).
1327
+
1328
+
1329
+ [RE-906: Original post-map file and cvar persistence](QVM_POST_MAP_FILES.md).
docs/research/qvm-post-map-files.json ADDED
The diff for this file is too large to render. See raw diff
 
scripts/analyze_qvm_post_map_files.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Execute the verified original QVM body; native effects are supplied or captured."""
3
+ import itertools
4
+ from pathlib import Path
5
+ from qvm_research_support import source,constants
6
+ from qvm_camera_world_support import B,run
7
+ from qvm_exit_rules_support import POOL,CPOOL
8
+ from analyze_qvm_acceleration import word,number
9
+ from analyze_qvm import write_json
10
+
11
+ def main():
12
+ q,raw,h,ins=source();rows=[]
13
+ from qvm_persistence_support import environment
14
+ from qvm_lifecycle_support import post_full
15
+ from qvm_session_support import records
16
+ from qvm_map_commands_support import put_string
17
+ for mode,count,pattern,enabled,opened in itertools.product([0,9],[0,1,4],range(2),[0,1],[False,True]):
18
+ m,b=environment(raw,h);m.update({34090788:mode,34064148:enabled});clients=[];infos=[];names=[];handles=[]
19
+ for j in range(4):
20
+ vals,indices,flags=records(m,j,count,0,pattern);connection=([2,1,2,0] if pattern==0 else [1,2,0,2])[j];m[CPOOL+6336*j+468]=connection;origin=[word(v) for v in ([0]*6 if j==0 else [1.25+j,-2.5,3,90,180,-45.5])];info=b'\\cl_guid\\ID'+str(j).encode();name=b'player'+str(j).encode();handle=7+j if opened else 0;put_string(m,b,CPOOL+6336*j+504,name)
21
+ for k,v in enumerate(origin):m[CPOOL+6336*j+3716+4*k]=v
22
+ clients.append(dict(connection=connection,values=vals,origin=origin));infos.append(info);names.append(name);handles.append(handle)
23
+ m,p,b=post_full(ins,m,b,infos,names,handles);p.update(input=dict(mode=mode,count=count,enabled=enabled,pattern=pattern,opened=opened,clients=clients,indices=indices,flags=flags,infos=[v.hex() for v in infos],names=[v.hex() for v in names],handles=handles),ring=m[23708]&0xffffffff,info_ring=m[23712]&0xffffffff);rows.append(p)
24
+
25
+ write_json(Path('docs/research/qvm-post-map-files.json'),{'source':q['source'],'sha256':q['sha256'],'root':249007,'probes':rows,'limits':'48 actual249007/246746/246963 compositions execute both post-map children on shared state. Ordered native file intentions precede each client session/ignore cvar pair; mode/enabled/zero-position/open-handle gates, pointer-indirected ignore lists and shared formatter/userinfo selectors are verified. Connected-state filtering remains original. Engine userinfo/files/cvars and native copy remain supplied/modeled/captured.'})
26
+ if __name__=='__main__':main()
scripts/qvm_lifecycle_support.py CHANGED
@@ -26,3 +26,11 @@ def initialize(ins,m,b,pointer,userinfo,handle,ticks):
26
  m,v,p,b=run(ins,m,247520,247806,40,{8:pointer,12:INFO},b,{33715:classify,70503:lookup,-3:clock,69338:copy,246554:load,246963:write,7259:diagnostic},base=INIT);p.update(parts=parts,diagnostics=diagnostics);return m,p,b
27
 
28
  def raw_state(m,b,pointer):return read_bytes(m,b,pointer+3096,SIZE).hex()
 
 
 
 
 
 
 
 
 
26
  m,v,p,b=run(ins,m,247520,247806,40,{8:pointer,12:INFO},b,{33715:classify,70503:lookup,-3:clock,69338:copy,246554:load,246963:write,7259:diagnostic},base=INIT);p.update(parts=parts,diagnostics=diagnostics);return m,p,b
27
 
28
  def raw_state(m,b,pointer):return read_bytes(m,b,pointer+3096,SIZE).hex()
29
+
30
+ def post_full(ins,m,b,userinfos,names,handles):
31
+ calls=[];files=[];sets=[];actions=[]
32
+ def save(i,m,a,bs):
33
+ j=(a[8]-CPOOL)//6336;calls.append([246746,j]);m,p,b=save_position(i,m,dict(bs),a[8],userinfos[j],b'ut4_test',handles[j],-7);files.append([j,p['events']]);actions.extend(dict(e,kind='file',slot=j) for e in p['events']);return m,0,{'actual_source_child':246746}
34
+ def write(i,m,a,bs):
35
+ j=(a[8]-CPOOL)//6336;calls.append([246963,j]);m,p,b=session(i,m,dict(bs),a[8]);sets.extend(p['sets']);actions.extend(dict(kind='cvar',slot=j,key=k,value=v) for k,v in p['sets']);return m,0,{'actual_source_child':246963}
36
+ m,v,p,b=run(ins,m,249007,249058,16,b=b,handlers={246746:save,246963:write},base=B+0x54000);p.update(calls=calls,files=files,sets=sets,actions=actions);return m,p,b
scripts/test_qvm_post_map_files.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json,unittest
2
+ from pathlib import Path
3
+ class OriginalTests(unittest.TestCase):
4
+ def test_instruction_results(self):
5
+ rows=json.loads(Path('docs/research/qvm-post-map-files.json').read_text())['probes']
6
+ self.assertEqual(len(rows),48)
7
+ from test_qvm_format_float import float_text
8
+ for p in rows:
9
+ a=p['input'];actions=[];sets=[];files=[];calls=[];ring=ir=0
10
+ for j,c in enumerate(a['clients'][:a['count']]):
11
+ if c['connection']!=2:continue
12
+ calls.extend([[246746,j],[246963,j]]);events=[]
13
+ if a['mode']==9:
14
+ ir^=1;events.append(dict(op='userinfo',slot=j))
15
+ if a['enabled'] and j!=0:
16
+ events.extend([dict(op='map'),dict(op='open',path=(b'positions/ut4_test/ID'+str(j).encode()+b'.pos').hex(),mode=1)]);ring+=1
17
+ if a['handles'][j]:
18
+ data=b','.join(float_text(v,0,-1) for v in c['origin'])+b'\n'+bytes.fromhex(a['names'][j]);events.extend([dict(op='write',handle=a['handles'][j],length=len(data),data=data.hex()),dict(op='close',handle=a['handles'][j])])
19
+ files.append([j,events]);actions.extend(dict(e,kind='file',slot=j) for e in events);ignored=[i for i in a['indices'][:a['count']] if a['flags'][i]==1];pair=[[f'session{j}'.encode().hex(),b'0,0,0,0,0,0,0,0,0'.hex()],[f'sessIgnore{j}'.encode().hex(),b''.join(str(i).encode()+b',' for i in ignored).hex()]];sets.extend(pair);actions.extend(dict(kind='cvar',slot=j,key=k,value=v) for k,v in pair);ring+=3+len(ignored)
20
+ self.assertEqual(p['calls'],calls);self.assertEqual(p['files'],files);self.assertEqual(p['sets'],sets);self.assertEqual(p['actions'],actions);self.assertEqual(p['ring'],ring);self.assertEqual(p['info_ring'],ir)
21
+
22
+ if __name__=='__main__':unittest.main()
xtask/checks.tsv CHANGED
@@ -2822,3 +2822,7 @@ report scripts/analyze_rust_session_init.py docs/research/rust-session-init.json
2822
  edge docs/research/rust-session-init.json scripts/test_rust_session_init.py
2823
  group rust-session-init scripts/analyze_rust_session_init.py
2824
  edge scripts/analyze_rust_session_init.py scripts/analyze_qvm_resumer_audit.py
 
 
 
 
 
2822
  edge docs/research/rust-session-init.json scripts/test_rust_session_init.py
2823
  group rust-session-init scripts/analyze_rust_session_init.py
2824
  edge scripts/analyze_rust_session_init.py scripts/analyze_qvm_resumer_audit.py
2825
+ report scripts/analyze_qvm_post_map_files.py docs/research/qvm-post-map-files.json
2826
+ edge docs/research/qvm-post-map-files.json scripts/test_qvm_post_map_files.py
2827
+ group qvm-post-map-files scripts/analyze_qvm_post_map_files.py
2828
+ edge scripts/analyze_qvm_post_map_files.py scripts/analyze_qvm_resumer_audit.py