qvm: compose stateful scoreboard broadcasts
Browse files- 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_SCOREBOARD_STREAM.md +7 -0
- docs/research/README.md +3 -0
- docs/research/qvm-scoreboard-stream.json +0 -0
- scripts/analyze_qvm_scoreboard_stream.py +20 -0
- scripts/qvm_scoreboard_broadcast_support.py +2 -2
- scripts/test_qvm_scoreboard_stream.py +22 -0
- xtask/checks.tsv +4 -0
docs/FINDINGS.md
CHANGED
|
@@ -1424,3 +1424,6 @@ RE-791–800 adds exact Rust source-sort/ranking parity, mixed count/prefix sema
|
|
| 1424 |
|
| 1425 |
|
| 1426 |
**RE-808:** Rust matches exact modeled scoreboard bytes, accepted/attempted counts, rejected-row cache mutations and output-ring wrap for18 source compositions. [Evidence](research/RUST_SCOREBOARD_PACKET.md).
|
|
|
|
|
|
|
|
|
|
|
|
| 1424 |
|
| 1425 |
|
| 1426 |
**RE-808:** Rust matches exact modeled scoreboard bytes, accepted/attempted counts, rejected-row cache mutations and output-ring wrap for18 source compositions. [Evidence](research/RUST_SCOREBOARD_PACKET.md).
|
| 1427 |
+
|
| 1428 |
+
|
| 1429 |
+
**RE-809:** 6328 now composes actual scoreboard bodies for successive recipients, preserving cache mutations, refreshed frame arguments and alternating output pointers. [Evidence](research/QVM_SCOREBOARD_STREAM.md).
|
docs/PROVISIONAL_TODO.md
CHANGED
|
@@ -1431,3 +1431,6 @@ RE-807: Rust reproduces every attempted source scoreboard row and cache update w
|
|
| 1431 |
|
| 1432 |
|
| 1433 |
RE-808: Rust matches exact modeled scoreboard bytes, accepted/attempted counts, rejected-row cache mutations and output-ring wrap for18 source compositions. Full runtime completion remains open. [Evidence](research/RUST_SCOREBOARD_PACKET.md).
|
|
|
|
|
|
|
|
|
|
|
|
| 1431 |
|
| 1432 |
|
| 1433 |
RE-808: Rust matches exact modeled scoreboard bytes, accepted/attempted counts, rejected-row cache mutations and output-ring wrap for18 source compositions. Full runtime completion remains open. [Evidence](research/RUST_SCOREBOARD_PACKET.md).
|
| 1434 |
+
|
| 1435 |
+
|
| 1436 |
+
RE-809: 6328 now composes actual scoreboard bodies for successive recipients, preserving cache mutations, refreshed frame arguments and alternating output pointers. Full runtime completion remains open. [Evidence](research/QVM_SCOREBOARD_STREAM.md).
|
docs/RESEARCH_LEDGER.md
CHANGED
|
@@ -1706,3 +1706,8 @@ Rust reproduces every attempted source scoreboard row and cache update while pre
|
|
| 1706 |
## 2026-10-26 — RE-808 Rust scoreboard packet admission cache and ring-buffer policy
|
| 1707 |
|
| 1708 |
Rust matches exact modeled scoreboard bytes, accepted/attempted counts, rejected-row cache mutations and output-ring wrap for18 source compositions. Focused `cargo xtask test-group rust-scoreboard-packet` 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1706 |
## 2026-10-26 — RE-808 Rust scoreboard packet admission cache and ring-buffer policy
|
| 1707 |
|
| 1708 |
Rust matches exact modeled scoreboard bytes, accepted/attempted counts, rejected-row cache mutations and output-ring wrap for18 source compositions. Focused `cargo xtask test-group rust-scoreboard-packet` 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.
|
| 1709 |
+
|
| 1710 |
+
|
| 1711 |
+
## 2026-10-26 — RE-809 Source scoreboard broadcast with shared packet and cache state
|
| 1712 |
+
|
| 1713 |
+
6328 now composes actual scoreboard bodies for successive recipients, preserving cache mutations, refreshed frame arguments and alternating output pointers. Focused `cargo xtask test-group scoreboard-stream` passes (5 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
|
@@ -1474,3 +1474,6 @@ Purpose: turn the supplied installation into an evidence-backed specification of
|
|
| 1474 |
|
| 1475 |
|
| 1476 |
- [x] RE-808 Rust scoreboard packet admission cache and ring-buffer policy ([evidence](research/RUST_SCOREBOARD_PACKET.md)).
|
|
|
|
|
|
|
|
|
|
|
|
| 1474 |
|
| 1475 |
|
| 1476 |
- [x] RE-808 Rust scoreboard packet admission cache and ring-buffer policy ([evidence](research/RUST_SCOREBOARD_PACKET.md)).
|
| 1477 |
+
|
| 1478 |
+
|
| 1479 |
+
- [x] RE-809 Source scoreboard broadcast with shared packet and cache state ([evidence](research/QVM_SCOREBOARD_STREAM.md)).
|
docs/research/QVM_SCOREBOARD_STREAM.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Source scoreboard broadcast with shared packet and cache state
|
| 2 |
+
|
| 3 |
+
RE-809. Reproduce with `python3 scripts/analyze_qvm_scoreboard_stream.py`; focused validation: `cargo xtask test-group scoreboard-stream`. [Machine report](qvm-scoreboard-stream.json).
|
| 4 |
+
|
| 5 |
+
Ten finite populations with zero..32 clients and at most two connected recipients exercise repeated bodies in original scan order. An independent sequential model carries cache state and ring wrap between packets, checks every C string and confirms capacity-prefix effects. Existing captured-body defaults remain available. Native format/copy/send behavior and exit-rule7805 effects remain explicit limits.
|
| 6 |
+
|
| 7 |
+
Original executable/native runtime and complete Linux/macOS Rust/Bevy/Solari acceptance remain unverified.
|
docs/research/README.md
CHANGED
|
@@ -1014,3 +1014,6 @@ The extension collector adds five focused tests for native tail calls, command-r
|
|
| 1014 |
|
| 1015 |
|
| 1016 |
[RE-808: Rust scoreboard packet admission cache and ring-buffer policy](RUST_SCOREBOARD_PACKET.md).
|
|
|
|
|
|
|
|
|
|
|
|
| 1014 |
|
| 1015 |
|
| 1016 |
[RE-808: Rust scoreboard packet admission cache and ring-buffer policy](RUST_SCOREBOARD_PACKET.md).
|
| 1017 |
+
|
| 1018 |
+
|
| 1019 |
+
[RE-809: Source scoreboard broadcast with shared packet and cache state](QVM_SCOREBOARD_STREAM.md).
|
docs/research/qvm-scoreboard-stream.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
scripts/analyze_qvm_scoreboard_stream.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
import itertools
|
| 3 |
+
from pathlib import Path
|
| 4 |
+
from qvm_research_support import source
|
| 5 |
+
from qvm_scoreboard_body_support import seed,CPOOL,S,POOL
|
| 6 |
+
from qvm_scoreboard_wire_support import wire
|
| 7 |
+
from qvm_scoreboard_broadcast_support import broadcast
|
| 8 |
+
from qvm_string_memory_support import frame_args
|
| 9 |
+
from analyze_qvm import write_json
|
| 10 |
+
|
| 11 |
+
def main():
|
| 12 |
+
q,raw,h,ins=source();rows=[]
|
| 13 |
+
for n,ring in itertools.product([0,1,3,8,32],[0,0xffffffff]):
|
| 14 |
+
clients=[{'468':2 if j in [0,n-1] else 1,'452':50+j,'6160':100+j,'4324':j%2,'12':1024 if j%2 else 0,'name_hex':([b'A',b'AB',b'long %s name',bytes([255,254])][j%4]).hex(),'696':21-j,'flags':8 if j%3==0 else 0} for j in range(n)];order=list(reversed(range(n)));m,b=seed(clients,order);m.update({34992524:n,23708:ring});packets=[]
|
| 15 |
+
def body(i,m,a,bs):
|
| 16 |
+
m,bs=frame_args(m,bs,{S+2588:a[8]});before=[m[CPOOL+6336*j+6160]&0xffffffff for j in range(n)];m,p=wire(i,m,bs,raw,h);p.update(cache_before=before,cache_after=[m[CPOOL+6336*j+6160]&0xffffffff for j in range(n)]);packets.append(p)
|
| 17 |
+
send=p['sends'][0];data=bytes.fromhex(send['cstring_hex']);return m,0,{'child_memory_bytes':{send['pointer']+j:v for j,v in enumerate(data)},'scoreboard_body_executed':True,'body_trace_sha256':p['execution']['trace_sha256']}
|
| 18 |
+
m,_,e=broadcast(ins,m,{},body_resolver=body,byte_inputs=b);rows.append({'clients':clients,'order':order,'now':121000,'scores':[2,1],'ring_before':ring,'ring_after':m[23708]&0xffffffff,'packets':packets,'final_cache':[m[CPOOL+6336*j+6160]&0xffffffff for j in range(n)],'broadcast_trace_sha256':e['execution']['trace_sha256']})
|
| 19 |
+
write_json(Path('docs/research/qvm-scoreboard-stream.json'),{'source':q['source'],'sha256':q['sha256'],'probes':rows,'limits':'Actual6328 executes actual179363/string/format wrappers for each selected state2 recipient with shared caches/ring across10 finite populations.37914/native strncpy modeled and send captured. At most two recipients per case bounds focused execution cost; large population admission includes rejected candidates.7805 effects and full ranking caller/native wire acceptance remain open.'})
|
| 20 |
+
if __name__=='__main__':main()
|
scripts/qvm_scoreboard_broadcast_support.py
CHANGED
|
@@ -4,8 +4,8 @@ from qvm_notification_support import CPOOL,POOL
|
|
| 4 |
from qvm_trace_support import resume,captured
|
| 5 |
B=H+0x170000
|
| 6 |
|
| 7 |
-
def broadcast(ins,m,args):
|
| 8 |
if not -1<=m[34992524]<=64:raise ValueError('unsupported scoreboard broadcast count')
|
| 9 |
-
before=dict(m);requests=[];m,e=resume(ins,6329,6367,m,B,handlers={179363:captured(179363,requests)},repeated_calls=True,sync_child_words=True)
|
| 10 |
writes=[{'address':a,'before':before.get(a),'after':v} for a,v in sorted(m.items()) if before.get(a)!=v and not B<=a<B+32]
|
| 11 |
return m,0,{'requests':requests,'external_writes':writes,'execution':e}
|
|
|
|
| 4 |
from qvm_trace_support import resume,captured
|
| 5 |
B=H+0x170000
|
| 6 |
|
| 7 |
+
def broadcast(ins,m,args,body_resolver=None,byte_inputs=None):
|
| 8 |
if not -1<=m[34992524]<=64:raise ValueError('unsupported scoreboard broadcast count')
|
| 9 |
+
before=dict(m);requests=[];m,e=resume(ins,6329,6367,m,B,handlers={179363:body_resolver or captured(179363,requests)},repeated_calls=True,sync_child_words=True,byte_inputs=byte_inputs,coherent_memory=body_resolver is not None,byte_handlers=body_resolver is not None)
|
| 10 |
writes=[{'address':a,'before':before.get(a),'after':v} for a,v in sorted(m.items()) if before.get(a)!=v and not B<=a<B+32]
|
| 11 |
return m,0,{'requests':requests,'external_writes':writes,'execution':e}
|
scripts/test_qvm_scoreboard_stream.py
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import json,unittest
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
from test_qvm_scoreboard_rows import project
|
| 4 |
+
from analyze_qvm_recipient_wire import copy_model
|
| 5 |
+
class ScoreboardStreamTests(unittest.TestCase):
|
| 6 |
+
def test_stateful_recipient_order_payloads_cache_and_ring(self):
|
| 7 |
+
ps=json.loads(Path('docs/research/qvm-scoreboard-stream.json').read_text())['probes'];self.assertEqual(len(ps),10)
|
| 8 |
+
for p in ps:
|
| 9 |
+
recipients=[j for j,c in enumerate(p['clients']) if c['468']==2];self.assertEqual([s['sends'][0]['recipient'] for s in p['packets']],recipients);cache=[c['6160'] for c in p['clients']];ring=p['ring_before']
|
| 10 |
+
for packet in p['packets']:
|
| 11 |
+
self.assertEqual(packet['cache_before'],cache);payload=b'';accepted=0
|
| 12 |
+
for id in p['order']:
|
| 13 |
+
c={**p['clients'][id],'6160':cache[id]};cache[id],nums=project(c,id,p['now']);name=copy_model(bytes.fromhex(c['name_hex'])).split(b'\0')[0];row=b''.join(b' '+str(v).encode() for v in nums)+b' '+name
|
| 14 |
+
if len(payload)+len(row)>1024:break
|
| 15 |
+
payload+=row;accepted+=1
|
| 16 |
+
self.assertEqual(packet['cache_after'],cache);self.assertEqual(packet['sends'][0]['cstring_hex'],(f'scores {accepted} 2 1'.encode()+payload+b'\0').hex());self.assertEqual(packet['sends'][0]['pointer'],35032232+(ring&1)*32000);ring=(ring+1)&0xffffffff;self.assertEqual(packet['ring_counter'],ring)
|
| 17 |
+
self.assertEqual(p['ring_after'],ring);self.assertEqual(p['final_cache'],cache)
|
| 18 |
+
def test_scratch_arguments_and_output_pointers_refresh_per_recipient(self):
|
| 19 |
+
ps=json.loads(Path('docs/research/qvm-scoreboard-stream.json').read_text())['probes'];self.assertTrue(any(len(p['packets'])==2 for p in ps))
|
| 20 |
+
for p in ps:
|
| 21 |
+
if len(p['packets'])==2:self.assertNotEqual(p['packets'][0]['sends'][0]['pointer'],p['packets'][1]['sends'][0]['pointer'])
|
| 22 |
+
if __name__=='__main__':unittest.main()
|
xtask/checks.tsv
CHANGED
|
@@ -1944,3 +1944,7 @@ report scripts/analyze_rust_scoreboard_packet.py docs/research/rust-scoreboard-p
|
|
| 1944 |
edge docs/research/rust-scoreboard-packet.json scripts/test_rust_scoreboard_packet.py
|
| 1945 |
group rust-scoreboard-packet scripts/analyze_rust_scoreboard_packet.py
|
| 1946 |
edge scripts/analyze_rust_scoreboard_packet.py scripts/analyze_qvm_resumer_audit.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1944 |
edge docs/research/rust-scoreboard-packet.json scripts/test_rust_scoreboard_packet.py
|
| 1945 |
group rust-scoreboard-packet scripts/analyze_rust_scoreboard_packet.py
|
| 1946 |
edge scripts/analyze_rust_scoreboard_packet.py scripts/analyze_qvm_resumer_audit.py
|
| 1947 |
+
report scripts/analyze_qvm_scoreboard_stream.py docs/research/qvm-scoreboard-stream.json
|
| 1948 |
+
edge docs/research/qvm-scoreboard-stream.json scripts/test_qvm_scoreboard_stream.py
|
| 1949 |
+
group scoreboard-stream scripts/analyze_qvm_scoreboard_stream.py
|
| 1950 |
+
edge scripts/analyze_qvm_scoreboard_stream.py scripts/analyze_qvm_resumer_audit.py
|