nmarshall commited on
Commit
8d0c296
·
1 Parent(s): eba06e4

qvm: recover post-map client callback ordering

Browse files
docs/FINDINGS.md CHANGED
@@ -1631,3 +1631,6 @@ RE-813–822 replaces the scoreboard decimal assumption with actual37914 executi
1631
 
1632
 
1633
  **RE-877:** Rust matches all64 actual121987 fitness/selection/interbreed/mutation/reset transcripts, including callback activation before the counter reset. API validates supplied indices before mutation and retains inactive counters. Native bot selection and genetic mutation are explicit answer/effect boundaries, not Rust implementations of botlib. [Evidence](research/RUST_BOT_BREED.md).
 
 
 
 
1631
 
1632
 
1633
  **RE-877:** Rust matches all64 actual121987 fitness/selection/interbreed/mutation/reset transcripts, including callback activation before the counter reset. API validates supplied indices before mutation and retains inactive counters. Native bot selection and genetic mutation are explicit answer/effect boundaries, not Rust implementations of botlib. [Evidence](research/RUST_BOT_BREED.md).
1634
+
1635
+
1636
+ **RE-878:** 72 actual249007 cases recover signed live client-count iteration and connected-state2 gating. Each accepted client calls246746 then246963 unconditionally; a supplied first-child disconnect does not suppress its second child, and activation of a later slot affects subsequent dispatch. This uses level count34992524, not max-clients cvar34089604. Child bodies, native effects and callback changes to count/base pointer remain open. [Evidence](research/QVM_POST_MAP_CLIENTS.md).
docs/PROVISIONAL_TODO.md CHANGED
@@ -1659,3 +1659,6 @@ RE-876: 64 actual121987 cases recover all64 native fitness words, supplied nativ
1659
 
1660
 
1661
  RE-877: Rust matches all64 actual121987 fitness/selection/interbreed/mutation/reset transcripts, including callback activation before the counter reset. API validates supplied indices before mutation and retains inactive counters. Native bot selection and genetic mutation are explicit answer/effect boundaries, not Rust implementations of botlib. Full runtime completion remains open. [Evidence](research/RUST_BOT_BREED.md).
 
 
 
 
1659
 
1660
 
1661
  RE-877: Rust matches all64 actual121987 fitness/selection/interbreed/mutation/reset transcripts, including callback activation before the counter reset. API validates supplied indices before mutation and retains inactive counters. Native bot selection and genetic mutation are explicit answer/effect boundaries, not Rust implementations of botlib. Full runtime completion remains open. [Evidence](research/RUST_BOT_BREED.md).
1662
+
1663
+
1664
+ RE-878: 72 actual249007 cases recover signed live client-count iteration and connected-state2 gating. Each accepted client calls246746 then246963 unconditionally; a supplied first-child disconnect does not suppress its second child, and activation of a later slot affects subsequent dispatch. This uses level count34992524, not max-clients cvar34089604. Child bodies, native effects and callback changes to count/base pointer remain open. Full runtime completion remains open. [Evidence](research/QVM_POST_MAP_CLIENTS.md).
docs/RESEARCH_LEDGER.md CHANGED
@@ -2090,3 +2090,8 @@ Rust matches all64 original bot winner cases, with wrapping fitness arithmetic b
2090
  ## 2026-10-28 — RE-877 Rust bot breeding and post-callback reset
2091
 
2092
  Rust matches all64 actual121987 fitness/selection/interbreed/mutation/reset transcripts, including callback activation before the counter reset. API validates supplied indices before mutation and retains inactive counters. Native bot selection and genetic mutation are explicit answer/effect boundaries, not Rust implementations of botlib. Focused `cargo xtask test-group rust-bot-breed` 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.
 
 
 
 
 
 
2090
  ## 2026-10-28 — RE-877 Rust bot breeding and post-callback reset
2091
 
2092
  Rust matches all64 actual121987 fitness/selection/interbreed/mutation/reset transcripts, including callback activation before the counter reset. API validates supplied indices before mutation and retains inactive counters. Native bot selection and genetic mutation are explicit answer/effect boundaries, not Rust implementations of botlib. Focused `cargo xtask test-group rust-bot-breed` 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.
2093
+
2094
+
2095
+ ## 2026-10-28 — RE-878 Original post-map connected-client callbacks
2096
+
2097
+ 72 actual249007 cases recover signed live client-count iteration and connected-state2 gating. Each accepted client calls246746 then246963 unconditionally; a supplied first-child disconnect does not suppress its second child, and activation of a later slot affects subsequent dispatch. This uses level count34992524, not max-clients cvar34089604. Child bodies, native effects and callback changes to count/base pointer remain open. Focused `cargo xtask test-group qvm-post-map-clients` 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
@@ -1696,3 +1696,6 @@ Purpose: turn the supplied installation into an evidence-backed specification of
1696
 
1697
 
1698
  - [x] RE-877 Rust bot breeding and post-callback reset ([evidence](research/RUST_BOT_BREED.md)).
 
 
 
 
1696
 
1697
 
1698
  - [x] RE-877 Rust bot breeding and post-callback reset ([evidence](research/RUST_BOT_BREED.md)).
1699
+
1700
+
1701
+ - [x] RE-878 Original post-map connected-client callbacks ([evidence](research/QVM_POST_MAP_CLIENTS.md)).
docs/research/QVM_POST_MAP_CLIENTS.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # Original post-map connected-client callbacks
2
+
3
+ RE-878. Reproduce with `python3 scripts/analyze_qvm_post_map_clients.py`; focused validation: `cargo xtask test-group qvm-post-map-clients`. [Machine report](qvm-post-map-clients.json).
4
+
5
+ 72 actual249007 cases recover signed live client-count iteration and connected-state2 gating. Each accepted client calls246746 then246963 unconditionally; a supplied first-child disconnect does not suppress its second child, and activation of a later slot affects subsequent dispatch. This uses level count34992524, not max-clients cvar34089604. Child bodies, native effects and callback changes to count/base pointer remain open.
6
+
7
+ Original executable/native runtime and complete Linux/macOS Rust/Bevy/Solari acceptance remain unverified.
docs/research/README.md CHANGED
@@ -1231,3 +1231,6 @@ The extension collector adds five focused tests for native tail calls, command-r
1231
 
1232
 
1233
  [RE-877: Rust bot breeding and post-callback reset](RUST_BOT_BREED.md).
 
 
 
 
1231
 
1232
 
1233
  [RE-877: Rust bot breeding and post-callback reset](RUST_BOT_BREED.md).
1234
+
1235
+
1236
+ [RE-878: Original post-map connected-client callbacks](QVM_POST_MAP_CLIENTS.md).
docs/research/qvm-post-map-clients.json ADDED
The diff for this file is too large to render. See raw diff
 
scripts/analyze_qvm_post_map_clients.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
+ for count,pattern,mutation in itertools.product([-1,0,1,4,8,64],range(4),range(3)):
14
+ records=[(j+pattern)%4 for j in range(64)];m={34992524:count,34992496:CPOOL};m.update({CPOOL+6336*j+468:v for j,v in enumerate(records)});calls=[]
15
+ def capture(t):
16
+ def call(i,m,a,b):
17
+ j=(a[8]-CPOOL)//6336;calls.append([t,j,m[a[8]+468]&0xffffffff])
18
+ if t==246746:
19
+ if mutation==1:m[a[8]+468]=0
20
+ if mutation==2 and j+1<64:m[CPOOL+6336*(j+1)+468]=2
21
+ return m,0,{'native_child_captured':True,'connection_change_supplied':mutation}
22
+ return call
23
+ m,v,p,b=run(ins,m,249007,249058,16,handlers={246746:capture(246746),246963:capture(246963)});p.update(input=dict(count=count,records=records,mutation=mutation),calls=calls,after=[m[CPOOL+6336*j+468]&0xffffffff for j in range(64)]);rows.append(p)
24
+
25
+ write_json(Path('docs/research/qvm-post-map-clients.json'),{'source':q['source'],'sha256':q['sha256'],'root':249007,'probes':rows,'limits':'72 actual249007 cases recover signed live client-count iteration and connected-state2 gating. Each accepted client calls246746 then246963 unconditionally; a supplied first-child disconnect does not suppress its second child, and activation of a later slot affects subsequent dispatch. This uses level count34992524, not max-clients cvar34089604. Child bodies, native effects and callback changes to count/base pointer remain open.'})
26
+ if __name__=='__main__':main()
scripts/test_qvm_post_map_clients.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-clients.json').read_text())['probes']
6
+ self.assertEqual(len(rows),72)
7
+ for p in rows:
8
+ a=p['input'];end=list(a['records']);calls=[]
9
+ for j in range(max(0,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<64:end[j+1]=2
14
+ calls.append([246963,j,end[j]])
15
+ self.assertEqual(p['calls'],calls);self.assertEqual(p['after'],end)
16
+ self.assertTrue(any([c for c in p['calls'] if c[0]==246963 and c[2]==0] for p in rows))
17
+
18
+ if __name__=='__main__':unittest.main()
xtask/checks.tsv CHANGED
@@ -2552,3 +2552,7 @@ report scripts/analyze_rust_bot_breed.py docs/research/rust-bot-breed.json
2552
  edge docs/research/rust-bot-breed.json scripts/test_rust_bot_breed.py
2553
  group rust-bot-breed scripts/analyze_rust_bot_breed.py
2554
  edge scripts/analyze_rust_bot_breed.py scripts/analyze_qvm_resumer_audit.py
 
 
 
 
 
2552
  edge docs/research/rust-bot-breed.json scripts/test_rust_bot_breed.py
2553
  group rust-bot-breed scripts/analyze_rust_bot_breed.py
2554
  edge scripts/analyze_rust_bot_breed.py scripts/analyze_qvm_resumer_audit.py
2555
+ report scripts/analyze_qvm_post_map_clients.py docs/research/qvm-post-map-clients.json
2556
+ edge docs/research/qvm-post-map-clients.json scripts/test_qvm_post_map_clients.py
2557
+ group qvm-post-map-clients scripts/analyze_qvm_post_map_clients.py
2558
+ edge scripts/analyze_qvm_post_map_clients.py scripts/analyze_qvm_resumer_audit.py