qvm: audit dense award scans
Browse files- docs/ASSET_PIPELINE_TODO.md +3 -0
- 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_AWARD_REENTRY.md +7 -0
- docs/research/README.md +3 -0
- docs/research/qvm-award-reentry.json +0 -0
- docs/research/qvm-resumer-audit.json +2 -2
- scripts/analyze_qvm_award_reentry.py +23 -0
- scripts/qvm_recent_award_support.py +1 -1
- scripts/test_qvm_award_reentry.py +18 -0
- xtask/checks.tsv +6 -0
docs/ASSET_PIPELINE_TODO.md
CHANGED
|
@@ -1006,3 +1006,6 @@ Research progress: RE-783 [report](research/QVM_EXECUTE_REENTRY.md); original as
|
|
| 1006 |
|
| 1007 |
|
| 1008 |
Research progress: RE-784 [report](research/QVM_NOTIFICATION_REENTRY.md); original assets unchanged.
|
|
|
|
|
|
|
|
|
|
|
|
| 1006 |
|
| 1007 |
|
| 1008 |
Research progress: RE-784 [report](research/QVM_NOTIFICATION_REENTRY.md); original assets unchanged.
|
| 1009 |
+
|
| 1010 |
+
|
| 1011 |
+
Research progress: RE-785 [report](research/QVM_AWARD_REENTRY.md); original assets unchanged.
|
docs/FINDINGS.md
CHANGED
|
@@ -1352,3 +1352,6 @@ RE-725–734 batch: [health, contact and Rust impulse findings](research/QVM_HEA
|
|
| 1352 |
|
| 1353 |
|
| 1354 |
**RE-784 — Audited notification reentry and 64-slot recipient dispatch:** 6369 and6439 now use corrected reentry; scaled recipient order/gates and full legacy/corrected tuples agree for captured callback fixtures through64 slots. [Evidence](research/QVM_NOTIFICATION_REENTRY.md).
|
|
|
|
|
|
|
|
|
|
|
|
| 1352 |
|
| 1353 |
|
| 1354 |
**RE-784 — Audited notification reentry and 64-slot recipient dispatch:** 6369 and6439 now use corrected reentry; scaled recipient order/gates and full legacy/corrected tuples agree for captured callback fixtures through64 slots. [Evidence](research/QVM_NOTIFICATION_REENTRY.md).
|
| 1355 |
+
|
| 1356 |
+
|
| 1357 |
+
**RE-785 — Audited dense recent-award scans timestamps and index64 alias:** 285227 uses corrected reentry;32 dense65-record fixtures preserve source scan order, signed timestamp/count gates and index64 award/count aliasing. [Evidence](research/QVM_AWARD_REENTRY.md).
|
docs/PROVISIONAL_TODO.md
CHANGED
|
@@ -1353,3 +1353,6 @@ Research progress: RE-783 [report](research/QVM_EXECUTE_REENTRY.md); full native
|
|
| 1353 |
|
| 1354 |
|
| 1355 |
Research progress: RE-784 [report](research/QVM_NOTIFICATION_REENTRY.md); full native/platform/game scope remains open.
|
|
|
|
|
|
|
|
|
|
|
|
| 1353 |
|
| 1354 |
|
| 1355 |
Research progress: RE-784 [report](research/QVM_NOTIFICATION_REENTRY.md); full native/platform/game scope remains open.
|
| 1356 |
+
|
| 1357 |
+
|
| 1358 |
+
Research progress: RE-785 [report](research/QVM_AWARD_REENTRY.md); full native/platform/game scope remains open.
|
docs/RESEARCH_LEDGER.md
CHANGED
|
@@ -1582,3 +1582,8 @@ The movement resumer also loses non-command STORE1 writes across calls in legacy
|
|
| 1582 |
## 2026-10-21 — RE-784 Audited notification reentry and 64-slot recipient dispatch
|
| 1583 |
|
| 1584 |
6369 and6439 now use corrected reentry; scaled recipient order/gates and full legacy/corrected tuples agree for captured callback fixtures through64 slots. Focused `cargo xtask test-group notification-reentry` passes (71 Python tests); selected reports regenerate twice byte-identically, with storage, links and whitespace guards. New report: 46918 bytes. Full-suite validation is deferred to the tenth batch commit. Notification source resumption migrated; shared evaluator unchanged in this task. Callback internals remain captured.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1582 |
## 2026-10-21 — RE-784 Audited notification reentry and 64-slot recipient dispatch
|
| 1583 |
|
| 1584 |
6369 and6439 now use corrected reentry; scaled recipient order/gates and full legacy/corrected tuples agree for captured callback fixtures through64 slots. Focused `cargo xtask test-group notification-reentry` passes (71 Python tests); selected reports regenerate twice byte-identically, with storage, links and whitespace guards. New report: 46918 bytes. Full-suite validation is deferred to the tenth batch commit. Notification source resumption migrated; shared evaluator unchanged in this task. Callback internals remain captured.
|
| 1585 |
+
|
| 1586 |
+
|
| 1587 |
+
## 2026-10-21 — RE-785 Audited dense recent-award scans timestamps and index64 alias
|
| 1588 |
+
|
| 1589 |
+
285227 uses corrected reentry;32 dense65-record fixtures preserve source scan order, signed timestamp/count gates and index64 award/count aliasing. Focused `cargo xtask test-group award-reentry` passes (10 Python tests); selected reports regenerate twice byte-identically, with storage, links and whitespace guards. New report: 659031 bytes. Full-suite validation is deferred to the tenth batch commit. Recent-award source resumption migrated. Existing Rust parity and source consumers remain bounded numeric contracts.
|
docs/REVERSE_ENGINEERING_TODO.md
CHANGED
|
@@ -1402,3 +1402,6 @@ Purpose: turn the supplied installation into an evidence-backed specification of
|
|
| 1402 |
|
| 1403 |
|
| 1404 |
- [x] RE-784 Audited notification reentry and 64-slot recipient dispatch ([report](research/QVM_NOTIFICATION_REENTRY.md)).
|
|
|
|
|
|
|
|
|
|
|
|
| 1402 |
|
| 1403 |
|
| 1404 |
- [x] RE-784 Audited notification reentry and 64-slot recipient dispatch ([report](research/QVM_NOTIFICATION_REENTRY.md)).
|
| 1405 |
+
|
| 1406 |
+
|
| 1407 |
+
- [x] RE-785 Audited dense recent-award scans timestamps and index64 alias ([report](research/QVM_AWARD_REENTRY.md)).
|
docs/research/QVM_AWARD_REENTRY.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Audited dense recent-award scans timestamps and index64 alias
|
| 2 |
+
|
| 3 |
+
RE-785. Reproduce with `python3 scripts/analyze_qvm_award_reentry.py`; validate with `cargo xtask test-group award-reentry`. See the [machine report](qvm-award-reentry.json).
|
| 4 |
+
|
| 5 |
+
Every entity/client slot0..64 is populated in the audit, extending the earlier five-present-record corpus. Counts39/40/41/unsigned-minus-one and ages29999/30000/30001/minus-one mix within each scan, across modes3/9/10/11, ordinary and signed-wrap timestamps and two initial award values. Tests derive eligible recipients independently and check exact log identifiers, wrap and index64 alias effects. Full legacy/corrected tuples are compared. Logging remains captured.
|
| 6 |
+
|
| 7 |
+
No original executable/full VM/native world collision or rendering runs. Supplied callback/native responses and fixture domains remain explicit; complete macOS/Linux Rust/Bevy/Solari gameplay remains open.
|
docs/research/README.md
CHANGED
|
@@ -942,3 +942,6 @@ The extension collector adds five focused tests for native tail calls, command-r
|
|
| 942 |
|
| 943 |
|
| 944 |
[RE-784: Audited notification reentry and 64-slot recipient dispatch](QVM_NOTIFICATION_REENTRY.md).
|
|
|
|
|
|
|
|
|
|
|
|
| 942 |
|
| 943 |
|
| 944 |
[RE-784: Audited notification reentry and 64-slot recipient dispatch](QVM_NOTIFICATION_REENTRY.md).
|
| 945 |
+
|
| 946 |
+
|
| 947 |
+
[RE-785: Audited dense recent-award scans timestamps and index64 alias](QVM_AWARD_REENTRY.md).
|
docs/research/qvm-award-reentry.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
docs/research/qvm-resumer-audit.json
CHANGED
|
@@ -8595,7 +8595,7 @@
|
|
| 8595 |
285484
|
| 8596 |
],
|
| 8597 |
"path": "scripts/qvm_recent_award_support.py",
|
| 8598 |
-
"repeated_calls_opt_in":
|
| 8599 |
},
|
| 8600 |
{
|
| 8601 |
"backward_conditional_branches": [],
|
|
@@ -8920,7 +8920,7 @@
|
|
| 8920 |
"summary": {
|
| 8921 |
"call_expressions": 179,
|
| 8922 |
"files": 140,
|
| 8923 |
-
"legacy_expressions":
|
| 8924 |
"nonliteral_ranges": 20
|
| 8925 |
}
|
| 8926 |
}
|
|
|
|
| 8595 |
285484
|
| 8596 |
],
|
| 8597 |
"path": "scripts/qvm_recent_award_support.py",
|
| 8598 |
+
"repeated_calls_opt_in": true
|
| 8599 |
},
|
| 8600 |
{
|
| 8601 |
"backward_conditional_branches": [],
|
|
|
|
| 8920 |
"summary": {
|
| 8921 |
"call_expressions": 179,
|
| 8922 |
"files": 140,
|
| 8923 |
+
"legacy_expressions": 169,
|
| 8924 |
"nonliteral_ranges": 20
|
| 8925 |
}
|
| 8926 |
}
|
scripts/analyze_qvm_award_reentry.py
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Dense award scans, signed timestamp boundary and index64 alias migration."""
|
| 3 |
+
from pathlib import Path
|
| 4 |
+
import itertools
|
| 5 |
+
import qvm_recent_award_support as award
|
| 6 |
+
from qvm_resumer_diff_support import compare
|
| 7 |
+
from qvm_research_support import source
|
| 8 |
+
from analyze_qvm import write_json
|
| 9 |
+
|
| 10 |
+
def snapshot(m,index):
|
| 11 |
+
return [{'slot':j,'team':m[award.RPOOL+6336*j+3096],'awards':m[award.RPOOL+6336*j+3032]&0xffffffff,'count':m[award.RPOOL+6336*j+2520+8*index]&0xffffffff,'when':m[award.RPOOL+6336*j+2524+8*index]&0xffffffff} for j in range(65)]
|
| 12 |
+
|
| 13 |
+
def main():
|
| 14 |
+
q,raw,h,ins=source();rows=[]
|
| 15 |
+
for mode,index,now,initial in itertools.product([3,9,10,11],[1,64],[40000,-2147483648],[7,0xffffffff]):
|
| 16 |
+
def invoke():
|
| 17 |
+
m=award.seed(mode=mode,index=index,now=now)
|
| 18 |
+
for j in range(65):
|
| 19 |
+
c=award.RPOOL+6336*j;m[award.POOL+880*j+520]=c;m[award.POOL+880*j+168]=j;m[c+3096]=1+j%2;m[c+3032]=initial;m[c+2520+8*index]=[39,40,41,0xffffffff][j%4];m[c+2524+8*index]=(now-[29999,30000,30001,-1][(j//4)%4])&0xffffffff
|
| 20 |
+
before=snapshot(m,index);m,_,p=award.award(ins,m,{8:index,12:2});return m,p,before,snapshot(m,index)
|
| 21 |
+
old,new,equal=compare(award,invoke);rows.append({'input':{'mode':mode,'index':index,'now':now,'initial':initial},'legacy_equal':equal,'initial':new[2],'final':new[3],'requests':new[1]['requests'],'call_count':len(new[1]['execution']['calls']),'trace_sha256':new[1]['execution']['trace_sha256']})
|
| 22 |
+
write_json(Path('docs/research/qvm-award-reentry.json'),{'source':q['source'],'sha256':q['sha256'],'probes':rows,'limits':'Corrected285227 across32 fully populated65-record fixtures; source scans slots0..63 with offender2 and accepted index64. Actual33715,7259 captured. Equality covers full returned memory/effects/traces. No live ownership/native logging parity.'})
|
| 23 |
+
if __name__=='__main__':main()
|
scripts/qvm_recent_award_support.py
CHANGED
|
@@ -22,5 +22,5 @@ def snapshot(m,index):
|
|
| 22 |
return rows
|
| 23 |
|
| 24 |
def award(ins,m,args):
|
| 25 |
-
m[A+112]=args[8];m[A+116]=args[12];before=snapshot(m,args[8]);requests=[];m,e=resume(ins,285228,285484,m,A,handlers={33715:predicate,7259:captured(7259,requests)})
|
| 26 |
return m,0,{'arguments':args,'initial':before,'final':snapshot(m,args[8]),'requests':requests,'execution':e}
|
|
|
|
| 22 |
return rows
|
| 23 |
|
| 24 |
def award(ins,m,args):
|
| 25 |
+
m[A+112]=args[8];m[A+116]=args[12];before=snapshot(m,args[8]);requests=[];m,e=resume(ins,285228,285484,m,A,handlers={33715:predicate,7259:captured(7259,requests)},repeated_calls=True)
|
| 26 |
return m,0,{'arguments':args,'initial':before,'final':snapshot(m,args[8]),'requests':requests,'execution':e}
|
scripts/test_qvm_award_reentry.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import json,unittest
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
|
| 4 |
+
def signed(n):return (n+2**31)%2**32-2**31
|
| 5 |
+
class AwardReentryTests(unittest.TestCase):
|
| 6 |
+
@classmethod
|
| 7 |
+
def setUpClass(cls):cls.ps=json.loads(Path('docs/research/qvm-award-reentry.json').read_text())['probes']
|
| 8 |
+
def test_independent_dense_award_and_alias_oracle(self):
|
| 9 |
+
for p in self.ps:
|
| 10 |
+
a=p['input'];team=p['initial'][a['index']]['team'];ids=[r['slot'] for r in p['initial'] if r['slot']<64 and r['slot']!=2 and r['team']!=team and signed(r['count'])>=40 and signed(a['now']-r['when'])<=30000] if a['mode'] in [3,10] else []
|
| 11 |
+
expected=[dict(r) for r in p['initial']]
|
| 12 |
+
for r in expected:
|
| 13 |
+
if r['slot'] in ids:r['awards']=(r['awards']+1)&0xffffffff;r['count']=r['awards'] if a['index']==64 else r['count']
|
| 14 |
+
self.assertEqual(p['final'],expected,a);self.assertEqual([r['arguments']['12'] for r in p['requests']],ids,a);self.assertTrue(p['legacy_equal'],a)
|
| 15 |
+
for r in p['requests']:self.assertEqual({k:r['arguments'][k] for k in ['8','16','20']},{'8':95461,'16':2,'20':a['index']})
|
| 16 |
+
def test_all_domains_and_both_gate_outcomes(self):
|
| 17 |
+
self.assertEqual(len(self.ps),32);self.assertTrue(any(p['requests'] for p in self.ps));self.assertTrue(any(not p['requests'] for p in self.ps));self.assertEqual({p['input']['index'] for p in self.ps},{1,64})
|
| 18 |
+
if __name__=='__main__':unittest.main()
|
xtask/checks.tsv
CHANGED
|
@@ -1735,3 +1735,9 @@ report scripts/analyze_qvm_notification_reentry.py docs/research/qvm-notificatio
|
|
| 1735 |
edge docs/research/qvm-notification-reentry.json scripts/test_qvm_notification_reentry.py
|
| 1736 |
edge scripts/analyze_qvm_notification_reentry.py scripts/analyze_qvm_resumer_audit.py
|
| 1737 |
group notification-reentry scripts/analyze_qvm_notification_reentry.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1735 |
edge docs/research/qvm-notification-reentry.json scripts/test_qvm_notification_reentry.py
|
| 1736 |
edge scripts/analyze_qvm_notification_reentry.py scripts/analyze_qvm_resumer_audit.py
|
| 1737 |
group notification-reentry scripts/analyze_qvm_notification_reentry.py
|
| 1738 |
+
|
| 1739 |
+
group award-reentry scripts/qvm_recent_award_support.py
|
| 1740 |
+
report scripts/analyze_qvm_award_reentry.py docs/research/qvm-award-reentry.json
|
| 1741 |
+
edge docs/research/qvm-award-reentry.json scripts/test_qvm_award_reentry.py
|
| 1742 |
+
edge scripts/analyze_qvm_award_reentry.py scripts/analyze_qvm_resumer_audit.py
|
| 1743 |
+
group award-reentry scripts/analyze_qvm_award_reentry.py
|