nmarshall commited on
Commit
65208e6
·
1 Parent(s): e1e058d

qvm: resolve complete connect callback children

Browse files
docs/FINDINGS.md CHANGED
@@ -1787,3 +1787,6 @@ RE-813–822 replaces the scoreboard decimal assumption with actual37914 executi
1787
 
1788
 
1789
  **RE-929:** Rust matches144 original suffix compositions with actual161744/182896 policies, retaining caller mutations/messages while adding precise bot records, drop requests, announcement bytes and selector/counter carry. The wrapper stages typed errors and preserves ordinary rejection mutations. Native bot setup/userinfo/ranking/network/logging remain open. [Evidence](research/RUST_RESOLVED_CONNECT_TAIL.md).
 
 
 
 
1787
 
1788
 
1789
  **RE-929:** Rust matches144 original suffix compositions with actual161744/182896 policies, retaining caller mutations/messages while adding precise bot records, drop requests, announcement bytes and selector/counter carry. The wrapper stages typed errors and preserves ordinary rejection mutations. Native bot setup/userinfo/ranking/network/logging remain open. [Evidence](research/RUST_RESOLVED_CONNECT_TAIL.md).
1790
+
1791
+
1792
+ **RE-930:** 96 complete173979 executions replace supplied161744 booleans and captured182896 with actual bot settings/drop and announcement bodies. Parent decisions, client/entity bytes and persistence timing are preserved; setup records, exact broadcasts and extra selector/formatter carry are verified. Native125185 setup,171668 mutation, ranking/logging/network/IO remain supplied/captured. [Evidence](research/QVM_RESOLVED_CONNECT_COMPLETE.md).
docs/PROVISIONAL_TODO.md CHANGED
@@ -1830,3 +1830,6 @@ RE-928: 144 original173979 suffix cases execute actual161744 settings/drop wrapp
1830
 
1831
 
1832
  RE-929: Rust matches144 original suffix compositions with actual161744/182896 policies, retaining caller mutations/messages while adding precise bot records, drop requests, announcement bytes and selector/counter carry. The wrapper stages typed errors and preserves ordinary rejection mutations. Native bot setup/userinfo/ranking/network/logging remain open. Full runtime completion remains open. [Evidence](research/RUST_RESOLVED_CONNECT_TAIL.md).
 
 
 
 
1830
 
1831
 
1832
  RE-929: Rust matches144 original suffix compositions with actual161744/182896 policies, retaining caller mutations/messages while adding precise bot records, drop requests, announcement bytes and selector/counter carry. The wrapper stages typed errors and preserves ordinary rejection mutations. Native bot setup/userinfo/ranking/network/logging remain open. Full runtime completion remains open. [Evidence](research/RUST_RESOLVED_CONNECT_TAIL.md).
1833
+
1834
+
1835
+ RE-930: 96 complete173979 executions replace supplied161744 booleans and captured182896 with actual bot settings/drop and announcement bodies. Parent decisions, client/entity bytes and persistence timing are preserved; setup records, exact broadcasts and extra selector/formatter carry are verified. Native125185 setup,171668 mutation, ranking/logging/network/IO remain supplied/captured. Full runtime completion remains open. [Evidence](research/QVM_RESOLVED_CONNECT_COMPLETE.md).
docs/RESEARCH_LEDGER.md CHANGED
@@ -2375,3 +2375,8 @@ Rust matches162 original182896 payload/counter cases, retaining exact ccprint/sp
2375
  ## 2026-10-28 — RE-929 Rust connect suffix with recovered bot and announcement children
2376
 
2377
  Rust matches144 original suffix compositions with actual161744/182896 policies, retaining caller mutations/messages while adding precise bot records, drop requests, announcement bytes and selector/counter carry. The wrapper stages typed errors and preserves ordinary rejection mutations. Native bot setup/userinfo/ranking/network/logging remain open. Focused `cargo xtask test-group rust-resolved-connect-tail` passes (11 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.
 
 
 
 
 
 
2375
  ## 2026-10-28 — RE-929 Rust connect suffix with recovered bot and announcement children
2376
 
2377
  Rust matches144 original suffix compositions with actual161744/182896 policies, retaining caller mutations/messages while adding precise bot records, drop requests, announcement bytes and selector/counter carry. The wrapper stages typed errors and preserves ordinary rejection mutations. Native bot setup/userinfo/ranking/network/logging remain open. Focused `cargo xtask test-group rust-resolved-connect-tail` passes (11 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.
2378
+
2379
+
2380
+ ## 2026-10-28 — RE-930 Complete original connect with bot/announcement children
2381
+
2382
+ 96 complete173979 executions replace supplied161744 booleans and captured182896 with actual bot settings/drop and announcement bodies. Parent decisions, client/entity bytes and persistence timing are preserved; setup records, exact broadcasts and extra selector/formatter carry are verified. Native125185 setup,171668 mutation, ranking/logging/network/IO remain supplied/captured. Focused `cargo xtask test-group qvm-resolved-connect-complete` passes (7 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
@@ -1867,3 +1867,6 @@ Purpose: turn the supplied installation into an evidence-backed specification of
1867
 
1868
 
1869
  - [x] RE-929 Rust connect suffix with recovered bot and announcement children ([evidence](research/RUST_RESOLVED_CONNECT_TAIL.md)).
 
 
 
 
1867
 
1868
 
1869
  - [x] RE-929 Rust connect suffix with recovered bot and announcement children ([evidence](research/RUST_RESOLVED_CONNECT_TAIL.md)).
1870
+
1871
+
1872
+ - [x] RE-930 Complete original connect with bot/announcement children ([evidence](research/QVM_RESOLVED_CONNECT_COMPLETE.md)).
docs/research/QVM_RESOLVED_CONNECT_COMPLETE.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # Complete original connect with bot/announcement children
2
+
3
+ RE-930. Reproduce with `python3 scripts/analyze_qvm_resolved_connect_complete.py`; focused validation: `cargo xtask test-group qvm-resolved-connect-complete`. [Machine report](qvm-resolved-connect-complete.json).
4
+
5
+ 96 complete173979 executions replace supplied161744 booleans and captured182896 with actual bot settings/drop and announcement bodies. Parent decisions, client/entity bytes and persistence timing are preserved; setup records, exact broadcasts and extra selector/formatter carry are verified. Native125185 setup,171668 mutation, ranking/logging/network/IO remain supplied/captured.
6
+
7
+ Original executable/native runtime and complete Linux/macOS Rust/Bevy/Solari acceptance remain unverified.
docs/research/README.md CHANGED
@@ -1402,3 +1402,6 @@ The extension collector adds five focused tests for native tail calls, command-r
1402
 
1403
 
1404
  [RE-929: Rust connect suffix with recovered bot and announcement children](RUST_RESOLVED_CONNECT_TAIL.md).
 
 
 
 
1402
 
1403
 
1404
  [RE-929: Rust connect suffix with recovered bot and announcement children](RUST_RESOLVED_CONNECT_TAIL.md).
1405
+
1406
+
1407
+ [RE-930: Complete original connect with bot/announcement children](QVM_RESOLVED_CONNECT_COMPLETE.md).
docs/research/qvm-resolved-connect-complete.json ADDED
The diff for this file is too large to render. See raw diff
 
scripts/analyze_qvm_resolved_connect_complete.py ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_connect_policy_support import filters,checksum,WATCH
14
+ from qvm_connect_callback_support import environment,resolved_complete
15
+ from qvm_persistence_support import RESTORE,SCRATCH
16
+ from qvm_map_commands_support import put_string
17
+ from qvm_byte_memory_support import read_bytes
18
+ scenarios=[(0,1,b'1.2.3.4',b'secret',b'secret',False),(0,1,b'1.2.3.4',b'SECRET',b'secret',False),(0,1,b'1.2.3.4',b'secret',b'secret',True),(0,1,b'localhost',b'wrong',b'none',False),(1,0,b'1.2.3.4',b'wrong',b'secret',True),(1,1,b'1.2.3.4',b'wrong',b'secret',True),(-1,1,b'8.8.8.8',b'wrong',b'secret',False),(0,1,b'1.2',b'secret',b'secret',False)]
19
+ for mode,first,new,scenario in itertools.product([0,3,9],[0,1],[0,-1],range(8)):
20
+ bot,answer,ip,pw,password,matching=scenarios[scenario];info=b'\\ip\\'+ip+b'\\password\\'+pw+b'\\team\\S\\cl_guid\\ID';m,b=environment(raw,h);slot=3;pointer=CPOOL+6336*slot;entity=POOL+880*slot
21
+ for o in range(0,6336,4):m[pointer+o]=0xaabbccdd
22
+ put_string(m,b,pointer+504,b'old');put_string(m,b,34087240,password);m.update({34090788:mode,35000468:1,34089308:2,34992584:1,34085460:0,34992532:100,34992524:0,34064148:1,34992572:new,entity+520:0,entity+764:0xaabbccdd,entity+768:0xaabbccdd,entity+424:32,entity+532:0});scratch=0x7fffffff if scenario%2 else 0
23
+ for o in SCRATCH:m[RESTORE+o]=scratch
24
+ table=[(0xffffffff,0x04030201)] if matching else [];filters(m,table,1,0xaabbccdd if scenario==7 else 0);m,p,b=resolved_complete(ins,m,b,slot,first,bot,info,answer,2 if scenario%2 else None,scratch);part=p['parts'];sets=part.get('parts',{}).get('session',{}).get('sets',[]);reads=part.get('cvars',[]);p.update(input=dict(mode=mode,first=first,new=new,scenario=scenario,bot=bot,answer=answer,ip=ip.hex(),provided=pw.hex(),password=password.hex(),userinfo=info.hex(),entries=table,filter_scratch=0xaabbccdd if scenario==7 else 0,scratch=scratch,changed=bool(scenario%2)),raw=read_bytes(m,b,pointer+3096,944).hex(),client_checksum=checksum(read_bytes(m,b,pointer,6336)),words={str(o):m[pointer+o]&0xffffffff for o in WATCH},entity=[m[entity+424]&0xffffffff,m[entity+532]&0xffffffff,m[entity+764]&0xffffffff,m[entity+768]&0xffffffff,int(m[entity+520]==pointer)],sets=sets,reads=reads,ring=m[23708]&0xffffffff,info_ring=m[23712]&0xffffffff);rows.append(p)
25
+
26
+ write_json(Path('docs/research/qvm-resolved-connect-complete.json'),{'source':q['source'],'sha256':q['sha256'],'root':173979,'probes':rows,'limits':'96 complete173979 executions replace supplied161744 booleans and captured182896 with actual bot settings/drop and announcement bodies. Parent decisions, client/entity bytes and persistence timing are preserved; setup records, exact broadcasts and extra selector/formatter carry are verified. Native125185 setup,171668 mutation, ranking/logging/network/IO remain supplied/captured.'})
27
+ if __name__=='__main__':main()
scripts/qvm_connect_callback_support.py CHANGED
@@ -49,3 +49,7 @@ def resolved_tail(ins,m,b,slot,first,bot,userinfo,answer,after_team,name):
49
  import hashlib,json
50
  events=[];children={};m[TAIL+20]=CPOOL+6336*slot;m[TAIL+24]=POOL+880*slot
51
  m,v,p,b=run(ins,m,174173,174397,1080,{8:slot,12:first,16:bot},b,resolved_handlers(slot,userinfo,answer,after_team,name,events,children),base=TAIL);changes=p.pop('changes');p.update(change_count=len(changes),changes_sha256=hashlib.sha256(json.dumps(changes,sort_keys=True).encode()).hexdigest(),events=events,children=children,accepted=v==0,message=None if v==0 else cstring(m,b,v).hex());return m,p,b
 
 
 
 
 
49
  import hashlib,json
50
  events=[];children={};m[TAIL+20]=CPOOL+6336*slot;m[TAIL+24]=POOL+880*slot
51
  m,v,p,b=run(ins,m,174173,174397,1080,{8:slot,12:first,16:bot},b,resolved_handlers(slot,userinfo,answer,after_team,name,events,children),base=TAIL);changes=p.pop('changes');p.update(change_count=len(changes),changes_sha256=hashlib.sha256(json.dumps(changes,sort_keys=True).encode()).hexdigest(),events=events,children=children,accepted=v==0,message=None if v==0 else cstring(m,b,v).hex());return m,p,b
52
+
53
+ def resolved_complete(ins,m,b,slot,first,bot,userinfo,answer,after_team,scratch):
54
+ from qvm_connect_policy_support import complete_connect
55
+ return complete_connect(ins,m,b,slot,first,bot,userinfo,answer,after_team,scratch,resolver=lambda events,children:resolved_handlers(slot,userinfo,answer,after_team,b'new^1name',events,children))
scripts/qvm_connect_policy_support.py CHANGED
@@ -76,7 +76,7 @@ def checksum(data):
76
  for byte in data:value=((value^byte)*1099511628211)&0xffffffffffffffff
77
  return value
78
 
79
- def complete_connect(ins,m,b,slot,first,bot,userinfo,bot_answer,after_team,scratch):
80
  import hashlib,json
81
  from qvm_session_lifecycle_support import initialize
82
  from qvm_persistence_support import restore_session
@@ -85,4 +85,8 @@ def complete_connect(ins,m,b,slot,first,bot,userinfo,bot_answer,after_team,scrat
85
  choice.append(247520);m,p,b=initialize(i,m,dict(bs),a[8],userinfo,7,17);parts.update(p);return m,0,{'actual_source_child':247520}
86
  def restored(i,m,a,bs):
87
  choice.append(247219);data=b'9,8,7,6,5,4';m,p,b=restore_session(i,m,dict(bs),a[8],b'1,-2,3,4,5,1,1,1,1',b'1,3,',userinfo,b'ut4_test',7,len(data),data);parts.update(p);return m,0,{'actual_source_child':247219}
88
- handlers.update({247520:fresh,247219:restored});m,v,p,b=run(ins,m,173979,174397,1080,{8:slot,12:first,16:bot},b,handlers,base=AUTH);changes=p.pop('changes');p.update(change_count=len(changes),changes_sha256=hashlib.sha256(json.dumps(changes,sort_keys=True).encode()).hexdigest(),steps=steps,filter=state,events=events,choice=choice,parts=parts,accepted=v==0,message=None if v==0 else cstring(m,b,v).hex());return m,p,b
 
 
 
 
 
76
  for byte in data:value=((value^byte)*1099511628211)&0xffffffffffffffff
77
  return value
78
 
79
+ def complete_connect(ins,m,b,slot,first,bot,userinfo,bot_answer,after_team,scratch,resolver=None):
80
  import hashlib,json
81
  from qvm_session_lifecycle_support import initialize
82
  from qvm_persistence_support import restore_session
 
85
  choice.append(247520);m,p,b=initialize(i,m,dict(bs),a[8],userinfo,7,17);parts.update(p);return m,0,{'actual_source_child':247520}
86
  def restored(i,m,a,bs):
87
  choice.append(247219);data=b'9,8,7,6,5,4';m,p,b=restore_session(i,m,dict(bs),a[8],b'1,-2,3,4,5,1,1,1,1',b'1,3,',userinfo,b'ut4_test',7,len(data),data);parts.update(p);return m,0,{'actual_source_child':247219}
88
+ handlers.update({247520:fresh,247219:restored});resolved={}
89
+ if resolver:handlers.update(resolver(events,resolved))
90
+ m,v,p,b=run(ins,m,173979,174397,1080,{8:slot,12:first,16:bot},b,handlers,base=AUTH);changes=p.pop('changes');p.update(change_count=len(changes),changes_sha256=hashlib.sha256(json.dumps(changes,sort_keys=True).encode()).hexdigest(),steps=steps,filter=state,events=events,choice=choice,parts=parts,accepted=v==0,message=None if v==0 else cstring(m,b,v).hex());
91
+ if resolver:p['resolved']=resolved
92
+ return m,p,b
scripts/test_qvm_resolved_connect_complete.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json,unittest
2
+ from pathlib import Path
3
+ class ResolvedCompleteTests(unittest.TestCase):
4
+ def test_nested_children_and_carried_state(self):
5
+ rows=json.loads(Path('docs/research/qvm-resolved-connect-complete.json').read_text())['probes'];old=json.loads(Path('docs/research/qvm-connect-complete.json').read_text())['probes'];self.assertEqual(len(rows),96)
6
+ for p,prior in zip(rows,old):
7
+ for k in ['input','accepted','message','steps','filter','events','choice','raw','client_checksum','words','entity','sets','reads']:self.assertEqual(p[k],prior[k])
8
+ a=p['input'];bot=p['resolved'].get('bot');self.assertEqual(bot is not None,bool(a['bot']));self.assertEqual(p['info_ring'],prior['info_ring']^int(bool(a['bot'])))
9
+ if bot:self.assertEqual(bot['settings'],[(b'\0'*148+b'S'+b'\0'*143).hex()]);self.assertEqual(bot['calls'][1],dict(op='setup',slot=3,restart=int(not a['first'])))
10
+ notice=p['resolved'].get('announcements',[]);joined=any(e['op']=='join' for e in p['events']);team=p['words']['3096'];expected=[dict(recipient=-1,text=(b'ccprint "5" "new^1name" "'+str(team).encode()+b'"').hex())] if joined else [];self.assertEqual(notice,expected);self.assertEqual(p['ring'],prior['ring']+int(joined))
11
+ if __name__=='__main__':unittest.main()
xtask/checks.tsv CHANGED
@@ -3063,3 +3063,9 @@ report scripts/analyze_rust_resolved_connect_tail.py docs/research/rust-resolved
3063
  edge docs/research/rust-resolved-connect-tail.json scripts/test_rust_resolved_connect_tail.py
3064
  group rust-resolved-connect-tail scripts/analyze_rust_resolved_connect_tail.py
3065
  edge scripts/analyze_rust_resolved_connect_tail.py scripts/analyze_qvm_resumer_audit.py
 
 
 
 
 
 
 
3063
  edge docs/research/rust-resolved-connect-tail.json scripts/test_rust_resolved_connect_tail.py
3064
  group rust-resolved-connect-tail scripts/analyze_rust_resolved_connect_tail.py
3065
  edge scripts/analyze_rust_resolved_connect_tail.py scripts/analyze_qvm_resumer_audit.py
3066
+ edge docs/research/qvm-connect-complete.json scripts/test_qvm_resolved_connect_complete.py
3067
+ group qvm-resolved-connect-complete scripts/analyze_qvm_connect_complete.py
3068
+ report scripts/analyze_qvm_resolved_connect_complete.py docs/research/qvm-resolved-connect-complete.json
3069
+ edge docs/research/qvm-resolved-connect-complete.json scripts/test_qvm_resolved_connect_complete.py
3070
+ group qvm-resolved-connect-complete scripts/analyze_qvm_resolved_connect_complete.py
3071
+ edge scripts/analyze_qvm_resolved_connect_complete.py scripts/analyze_qvm_resumer_audit.py