nmarshall commited on
Commit
cd738dd
·
1 Parent(s): 4653a55

qvm: compose post-map session persistence

Browse files
docs/FINDINGS.md CHANGED
@@ -1667,3 +1667,6 @@ RE-813–822 replaces the scoreboard decimal assumption with actual37914 executi
1667
 
1668
 
1669
  **RE-889:** Rust matches60 actual246963 byte-for-byte cvar fixtures, preserving recovered integer formatting, booleans, pointer-indirected duplicates,64-entry scan cap,127-byte saturation and original formatter-ring advance. Checked typed indices reject malformed inputs. Native cvar storage, session restore and runtime ownership remain open. [Evidence](research/RUST_SESSION_WRITE.md).
 
 
 
 
1667
 
1668
 
1669
  **RE-889:** Rust matches60 actual246963 byte-for-byte cvar fixtures, preserving recovered integer formatting, booleans, pointer-indirected duplicates,64-entry scan cap,127-byte saturation and original formatter-ring advance. Checked typed indices reject malformed inputs. Native cvar storage, session restore and runtime ownership remain open. [Evidence](research/RUST_SESSION_WRITE.md).
1670
+
1671
+
1672
+ **RE-890:** 64 continuous249007/246963 compositions execute session cvar serialization after the captured246746 child. Supplied first-child disconnection still allows persistence; later activation affects dispatch, and changed session fields are serialized immediately. Source formatter ring carries between clients. Native first-child behavior, engine cvars and count/base changes remain open. [Evidence](research/QVM_POST_MAP_SESSION.md).
docs/PROVISIONAL_TODO.md CHANGED
@@ -1698,3 +1698,6 @@ RE-888: 60 actual246963 cases execute original70458/37914 integer formatting and
1698
 
1699
 
1700
  RE-889: Rust matches60 actual246963 byte-for-byte cvar fixtures, preserving recovered integer formatting, booleans, pointer-indirected duplicates,64-entry scan cap,127-byte saturation and original formatter-ring advance. Checked typed indices reject malformed inputs. Native cvar storage, session restore and runtime ownership remain open. Full runtime completion remains open. [Evidence](research/RUST_SESSION_WRITE.md).
 
 
 
 
1698
 
1699
 
1700
  RE-889: Rust matches60 actual246963 byte-for-byte cvar fixtures, preserving recovered integer formatting, booleans, pointer-indirected duplicates,64-entry scan cap,127-byte saturation and original formatter-ring advance. Checked typed indices reject malformed inputs. Native cvar storage, session restore and runtime ownership remain open. Full runtime completion remains open. [Evidence](research/RUST_SESSION_WRITE.md).
1701
+
1702
+
1703
+ RE-890: 64 continuous249007/246963 compositions execute session cvar serialization after the captured246746 child. Supplied first-child disconnection still allows persistence; later activation affects dispatch, and changed session fields are serialized immediately. Source formatter ring carries between clients. Native first-child behavior, engine cvars and count/base changes remain open. Full runtime completion remains open. [Evidence](research/QVM_POST_MAP_SESSION.md).
docs/RESEARCH_LEDGER.md CHANGED
@@ -2155,3 +2155,8 @@ Rust matches128 original continuous camera/queried-fallback/placement cases, inc
2155
  ## 2026-10-28 — RE-889 Rust session and bounded ignore-list serialization
2156
 
2157
  Rust matches60 actual246963 byte-for-byte cvar fixtures, preserving recovered integer formatting, booleans, pointer-indirected duplicates,64-entry scan cap,127-byte saturation and original formatter-ring advance. Checked typed indices reject malformed inputs. Native cvar storage, session restore and runtime ownership remain open. Focused `cargo xtask test-group rust-session-write` 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.
 
 
 
 
 
 
2155
  ## 2026-10-28 — RE-889 Rust session and bounded ignore-list serialization
2156
 
2157
  Rust matches60 actual246963 byte-for-byte cvar fixtures, preserving recovered integer formatting, booleans, pointer-indirected duplicates,64-entry scan cap,127-byte saturation and original formatter-ring advance. Checked typed indices reject malformed inputs. Native cvar storage, session restore and runtime ownership remain open. Focused `cargo xtask test-group rust-session-write` 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.
2158
+
2159
+
2160
+ ## 2026-10-28 — RE-890 Original post-map dispatch with session persistence
2161
+
2162
+ 64 continuous249007/246963 compositions execute session cvar serialization after the captured246746 child. Supplied first-child disconnection still allows persistence; later activation affects dispatch, and changed session fields are serialized immediately. Source formatter ring carries between clients. Native first-child behavior, engine cvars and count/base changes remain open. Focused `cargo xtask test-group qvm-post-map-session` 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
@@ -1735,3 +1735,6 @@ Purpose: turn the supplied installation into an evidence-backed specification of
1735
 
1736
 
1737
  - [x] RE-889 Rust session and bounded ignore-list serialization ([evidence](research/RUST_SESSION_WRITE.md)).
 
 
 
 
1735
 
1736
 
1737
  - [x] RE-889 Rust session and bounded ignore-list serialization ([evidence](research/RUST_SESSION_WRITE.md)).
1738
+
1739
+
1740
+ - [x] RE-890 Original post-map dispatch with session persistence ([evidence](research/QVM_POST_MAP_SESSION.md)).
docs/research/QVM_POST_MAP_SESSION.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # Original post-map dispatch with session persistence
2
+
3
+ RE-890. Reproduce with `python3 scripts/analyze_qvm_post_map_session.py`; focused validation: `cargo xtask test-group qvm-post-map-session`. [Machine report](qvm-post-map-session.json).
4
+
5
+ 64 continuous249007/246963 compositions execute session cvar serialization after the captured246746 child. Supplied first-child disconnection still allows persistence; later activation affects dispatch, and changed session fields are serialized immediately. Source formatter ring carries between clients. Native first-child behavior, engine cvars and count/base changes remain open.
6
+
7
+ Original executable/native runtime and complete Linux/macOS Rust/Bevy/Solari acceptance remain unverified.
docs/research/README.md CHANGED
@@ -1270,3 +1270,6 @@ The extension collector adds five focused tests for native tail calls, command-r
1270
 
1271
 
1272
  [RE-889: Rust session and bounded ignore-list serialization](RUST_SESSION_WRITE.md).
 
 
 
 
1270
 
1271
 
1272
  [RE-889: Rust session and bounded ignore-list serialization](RUST_SESSION_WRITE.md).
1273
+
1274
+
1275
+ [RE-890: Original post-map dispatch with session persistence](QVM_POST_MAP_SESSION.md).
docs/research/qvm-post-map-session.json ADDED
The diff for this file is too large to render. See raw diff
 
scripts/analyze_qvm_post_map_session.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_session_support import environment,records,post_map,FIELDS
14
+ for count,pattern,mutation,profile in itertools.product([0,1,4,8],range(2),range(4),range(2)):
15
+ m,b=environment(raw,h);values=[]
16
+ for j in range(8):
17
+ v,indices,flags=records(m,j,count,profile,profile);values.append(v);m[CPOOL+6336*j+468]=[2,1,2,0][(j+pattern)%4]
18
+ before=[m[CPOOL+6336*j+468] for j in range(8)];m,p,b=post_map(ins,m,b,mutation);p.update(input=dict(count=count,pattern=pattern,mutation=mutation,profile=profile,connections=before,values=values,indices=indices,flags=flags),connections=[m[CPOOL+6336*j+468]&0xffffffff for j in range(8)],values=[[m[CPOOL+6336*j+o]&0xffffffff for o in FIELDS] for j in range(8)],ring=m[23708]&0xffffffff);rows.append(p)
19
+
20
+ write_json(Path('docs/research/qvm-post-map-session.json'),{'source':q['source'],'sha256':q['sha256'],'root':249007,'probes':rows,'limits':'64 continuous249007/246963 compositions execute session cvar serialization after the captured246746 child. Supplied first-child disconnection still allows persistence; later activation affects dispatch, and changed session fields are serialized immediately. Source formatter ring carries between clients. Native first-child behavior, engine cvars and count/base changes remain open.'})
21
+ if __name__=='__main__':main()
scripts/qvm_session_support.py CHANGED
@@ -30,3 +30,15 @@ def session(ins,m,b,pointer):
30
  def append(i,m,a,bs):
31
  m,v,p,b=run(i,m,70031,70073,32,a,dict(bs),{36038:strlen,69338:copy_bounded,5096:warning},base=B+0x1a000);return m,0,{'actual_source_child':70031}
32
  m,v,p,b=run(ins,m,246963,247217,224,{8:pointer},b,{70458:fmt,-6:set_cvar,-101:zero,70031:append},base=BASE);p.update(sets=sets,formats=formats,warnings=warnings);return m,p,b
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  def append(i,m,a,bs):
31
  m,v,p,b=run(i,m,70031,70073,32,a,dict(bs),{36038:strlen,69338:copy_bounded,5096:warning},base=B+0x1a000);return m,0,{'actual_source_child':70031}
32
  m,v,p,b=run(ins,m,246963,247217,224,{8:pointer},b,{70458:fmt,-6:set_cvar,-101:zero,70031:append},base=BASE);p.update(sets=sets,formats=formats,warnings=warnings);return m,p,b
33
+
34
+ def post_map(ins,m,b,mutation):
35
+ calls=[];sets=[];sessions=[]
36
+ def first(i,m,a,bs):
37
+ j=(a[8]-CPOOL)//6336;calls.append([246746,j,m[a[8]+468]&0xffffffff])
38
+ if mutation==1:m[a[8]+468]=0
39
+ if mutation==2 and j+1<8:m[CPOOL+6336*(j+1)+468]=2
40
+ if mutation==3:m[a[8]+3096]=777+j
41
+ return m,0,{'first_child_effect_supplied':True}
42
+ def second(i,m,a,bs):
43
+ j=(a[8]-CPOOL)//6336;calls.append([246963,j,m[a[8]+468]&0xffffffff]);m,p,b=session(i,m,dict(bs),a[8]);sets.extend(p['sets']);sessions.append([j,p['execution']['trace_sha256']]);return m,0,{'actual_source_child':246963}
44
+ m,v,p,b=run(ins,m,249007,249058,16,b=b,handlers={246746:first,246963:second},base=B+0x1c000);p.update(calls=calls,sets=sets,sessions=sessions);return m,p,b
scripts/test_qvm_post_map_session.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-session.json').read_text())['probes']
6
+ self.assertEqual(len(rows),64)
7
+ for p in rows:
8
+ a=p['input'];end=list(a['connections']);values=[[v&0xffffffff for v in row] for row in a['values']];calls=[];sets=[];ring=0
9
+ for j in range(a['count']):
10
+ if end[j]!=2:continue
11
+ calls.append([246746,j,end[j]])
12
+ if a['mutation']==1:end[j]=0
13
+ if a['mutation']==2 and j+1<8:end[j+1]=2
14
+ if a['mutation']==3:values[j][0]=777+j
15
+ calls.append([246963,j,end[j]]);v=values[j];signed=lambda x:x if x<2**31 else x-2**32;dec=lambda x:b'-./,),(-*,(' if x==-2147483648 else str(x).encode();text=b','.join([dec(signed(x)) for x in v[:5]]+[str(int(x!=0)).encode() for x in v[5:]]);ignored=[x for x in a['indices'][:a['count']] if a['flags'][x]==1];ignore=''.join(str(x)+',' for x in ignored).encode()[:127];sets.extend([[f'session{j}'.encode().hex(),text.hex()],[f'sessIgnore{j}'.encode().hex(),ignore.hex()]]);ring+=3+len(ignored)
16
+ self.assertEqual(p['calls'],calls);self.assertEqual(p['sets'],sets);self.assertEqual(p['connections'],end);self.assertEqual(p['values'],values);self.assertEqual(p['ring'],ring);self.assertEqual([j for j,h in p['sessions']],[c[1] for c in calls if c[0]==246963])
17
+
18
+ if __name__=='__main__':unittest.main()
xtask/checks.tsv CHANGED
@@ -2667,3 +2667,7 @@ report scripts/analyze_rust_session_write.py docs/research/rust-session-write.js
2667
  edge docs/research/rust-session-write.json scripts/test_rust_session_write.py
2668
  group rust-session-write scripts/analyze_rust_session_write.py
2669
  edge scripts/analyze_rust_session_write.py scripts/analyze_qvm_resumer_audit.py
 
 
 
 
 
2667
  edge docs/research/rust-session-write.json scripts/test_rust_session_write.py
2668
  group rust-session-write scripts/analyze_rust_session_write.py
2669
  edge scripts/analyze_rust_session_write.py scripts/analyze_qvm_resumer_audit.py
2670
+ report scripts/analyze_qvm_post_map_session.py docs/research/qvm-post-map-session.json
2671
+ edge docs/research/qvm-post-map-session.json scripts/test_qvm_post_map_session.py
2672
+ group qvm-post-map-session scripts/analyze_qvm_post_map_session.py
2673
+ edge scripts/analyze_qvm_post_map_session.py scripts/analyze_qvm_resumer_audit.py