qvm: compose stat ratio publication
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_STAT_COMPOSITION.md +7 -0
- docs/research/README.md +3 -0
- docs/research/qvm-resumer-audit.json +7 -7
- docs/research/qvm-stat-composition.json +0 -0
- scripts/analyze_qvm_stat_composition.py +21 -0
- scripts/qvm_stat_ratio_support.py +2 -2
- scripts/qvm_stat_totals_support.py +1 -1
- scripts/qvm_stat_update_support.py +3 -3
- scripts/test_qvm_stat_composition.py +23 -0
- xtask/checks.tsv +8 -0
docs/FINDINGS.md
CHANGED
|
@@ -1391,3 +1391,6 @@ RE-780–789 exposes and bounds legacy resumer timing/byte-state flaws, migrates
|
|
| 1391 |
|
| 1392 |
|
| 1393 |
**RE-797:** Rust matches exact order, rank words and count globals for144 complete mixed/eligible caller fixtures, without reinterpreting asymmetric prefilters as Ord. [Evidence](research/RUST_RANKING_MIXED.md).
|
|
|
|
|
|
|
|
|
|
|
|
| 1391 |
|
| 1392 |
|
| 1393 |
**RE-797:** Rust matches exact order, rank words and count globals for144 complete mixed/eligible caller fixtures, without reinterpreting asymmetric prefilters as Ord. [Evidence](research/RUST_RANKING_MIXED.md).
|
| 1394 |
+
|
| 1395 |
+
|
| 1396 |
+
**RE-798:** 278834 now optionally composes actual team counters and both ratio refreshes;64 fixtures verify counter aliases, totals, divisor and float32 publication together. [Evidence](research/QVM_STAT_COMPOSITION.md).
|
docs/PROVISIONAL_TODO.md
CHANGED
|
@@ -1395,3 +1395,6 @@ RE-796: Rust reproduces source collection, first-playing identifiers and bot/tea
|
|
| 1395 |
|
| 1396 |
|
| 1397 |
RE-797: Rust matches exact order, rank words and count globals for144 complete mixed/eligible caller fixtures, without reinterpreting asymmetric prefilters as Ord. Full runtime completion remains open. [Evidence](research/RUST_RANKING_MIXED.md).
|
|
|
|
|
|
|
|
|
|
|
|
| 1395 |
|
| 1396 |
|
| 1397 |
RE-797: Rust matches exact order, rank words and count globals for144 complete mixed/eligible caller fixtures, without reinterpreting asymmetric prefilters as Ord. Full runtime completion remains open. [Evidence](research/RUST_RANKING_MIXED.md).
|
| 1398 |
+
|
| 1399 |
+
|
| 1400 |
+
RE-798: 278834 now optionally composes actual team counters and both ratio refreshes;64 fixtures verify counter aliases, totals, divisor and float32 publication together. Full runtime completion remains open. [Evidence](research/QVM_STAT_COMPOSITION.md).
|
docs/RESEARCH_LEDGER.md
CHANGED
|
@@ -1649,3 +1649,8 @@ Rust reproduces source collection, first-playing identifiers and bot/team counte
|
|
| 1649 |
## 2026-10-26 — RE-797 Rust full mixed-population ranking and positional publication words
|
| 1650 |
|
| 1651 |
Rust matches exact order, rank words and count globals for144 complete mixed/eligible caller fixtures, without reinterpreting asymmetric prefilters as Ord. Focused `cargo xtask test-group rust-ranking-mixed` passes (18 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1649 |
## 2026-10-26 — RE-797 Rust full mixed-population ranking and positional publication words
|
| 1650 |
|
| 1651 |
Rust matches exact order, rank words and count globals for144 complete mixed/eligible caller fixtures, without reinterpreting asymmetric prefilters as Ord. Focused `cargo xtask test-group rust-ranking-mixed` passes (18 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.
|
| 1652 |
+
|
| 1653 |
+
|
| 1654 |
+
## 2026-10-26 — RE-798 Composed method counters team effects and actual ratio publication
|
| 1655 |
+
|
| 1656 |
+
278834 now optionally composes actual team counters and both ratio refreshes;64 fixtures verify counter aliases, totals, divisor and float32 publication together. Focused `cargo xtask test-group stat-composition` passes (41 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
|
@@ -1441,3 +1441,6 @@ Purpose: turn the supplied installation into an evidence-backed specification of
|
|
| 1441 |
|
| 1442 |
|
| 1443 |
- [x] RE-797 Rust full mixed-population ranking and positional publication words ([evidence](research/RUST_RANKING_MIXED.md)).
|
|
|
|
|
|
|
|
|
|
|
|
| 1441 |
|
| 1442 |
|
| 1443 |
- [x] RE-797 Rust full mixed-population ranking and positional publication words ([evidence](research/RUST_RANKING_MIXED.md)).
|
| 1444 |
+
|
| 1445 |
+
|
| 1446 |
+
- [x] RE-798 Composed method counters team effects and actual ratio publication ([evidence](research/QVM_STAT_COMPOSITION.md)).
|
docs/research/QVM_STAT_COMPOSITION.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Composed method counters team effects and actual ratio publication
|
| 2 |
+
|
| 3 |
+
RE-798. Reproduce with `python3 scripts/analyze_qvm_stat_composition.py`; focused validation: `cargo xtask test-group stat-composition`. [Machine report](qvm-stat-composition.json).
|
| 4 |
+
|
| 5 |
+
The opt-in resolver interface preserves existing captured defaults. The new source composition executes279720 and279586 with actual283085/283166/283488 children, using corrected reentry and explicit child-word synchronization. Independent models apply method and same-team mutations before deriving each recipient ratio, covering self aliases and excluded aggregate fields. Awards285227 and leaderboard283622 remain captured. Positive divisor scan cost and complete stat lifecycle/native parity remain bounded.
|
| 6 |
+
|
| 7 |
+
Original executable/native runtime and complete Linux/macOS Rust/Bevy/Solari acceptance remain unverified.
|
docs/research/README.md
CHANGED
|
@@ -981,3 +981,6 @@ The extension collector adds five focused tests for native tail calls, command-r
|
|
| 981 |
|
| 982 |
|
| 983 |
[RE-797: Rust full mixed-population ranking and positional publication words](RUST_RANKING_MIXED.md).
|
|
|
|
|
|
|
|
|
|
|
|
| 981 |
|
| 982 |
|
| 983 |
[RE-797: Rust full mixed-population ranking and positional publication words](RUST_RANKING_MIXED.md).
|
| 984 |
+
|
| 985 |
+
|
| 986 |
+
[RE-798: Composed method counters team effects and actual ratio publication](QVM_STAT_COMPOSITION.md).
|
docs/research/qvm-resumer-audit.json
CHANGED
|
@@ -9127,8 +9127,8 @@
|
|
| 9127 |
283554
|
| 9128 |
],
|
| 9129 |
"path": "scripts/qvm_stat_ratio_support.py",
|
| 9130 |
-
"repeated_calls_opt_in":
|
| 9131 |
-
"repeated_calls_setting": "
|
| 9132 |
},
|
| 9133 |
{
|
| 9134 |
"backward_conditional_branches": [],
|
|
@@ -9198,8 +9198,8 @@
|
|
| 9198 |
279718
|
| 9199 |
],
|
| 9200 |
"path": "scripts/qvm_stat_ratio_support.py",
|
| 9201 |
-
"repeated_calls_opt_in":
|
| 9202 |
-
"repeated_calls_setting": "
|
| 9203 |
},
|
| 9204 |
{
|
| 9205 |
"backward_conditional_branches": [],
|
|
@@ -9209,8 +9209,8 @@
|
|
| 9209 |
"line": 18,
|
| 9210 |
"literal_range": null,
|
| 9211 |
"path": "scripts/qvm_stat_totals_support.py",
|
| 9212 |
-
"repeated_calls_opt_in":
|
| 9213 |
-
"repeated_calls_setting": "
|
| 9214 |
},
|
| 9215 |
{
|
| 9216 |
"backward_conditional_branches": [],
|
|
@@ -9388,7 +9388,7 @@
|
|
| 9388 |
"summary": {
|
| 9389 |
"call_expressions": 185,
|
| 9390 |
"files": 144,
|
| 9391 |
-
"legacy_expressions":
|
| 9392 |
"nonliteral_ranges": 22,
|
| 9393 |
"unresolved_mode_expressions": 3
|
| 9394 |
}
|
|
|
|
| 9127 |
283554
|
| 9128 |
],
|
| 9129 |
"path": "scripts/qvm_stat_ratio_support.py",
|
| 9130 |
+
"repeated_calls_opt_in": true,
|
| 9131 |
+
"repeated_calls_setting": "literal_true"
|
| 9132 |
},
|
| 9133 |
{
|
| 9134 |
"backward_conditional_branches": [],
|
|
|
|
| 9198 |
279718
|
| 9199 |
],
|
| 9200 |
"path": "scripts/qvm_stat_ratio_support.py",
|
| 9201 |
+
"repeated_calls_opt_in": true,
|
| 9202 |
+
"repeated_calls_setting": "literal_true"
|
| 9203 |
},
|
| 9204 |
{
|
| 9205 |
"backward_conditional_branches": [],
|
|
|
|
| 9209 |
"line": 18,
|
| 9210 |
"literal_range": null,
|
| 9211 |
"path": "scripts/qvm_stat_totals_support.py",
|
| 9212 |
+
"repeated_calls_opt_in": true,
|
| 9213 |
+
"repeated_calls_setting": "literal_true"
|
| 9214 |
},
|
| 9215 |
{
|
| 9216 |
"backward_conditional_branches": [],
|
|
|
|
| 9388 |
"summary": {
|
| 9389 |
"call_expressions": 185,
|
| 9390 |
"files": 144,
|
| 9391 |
+
"legacy_expressions": 156,
|
| 9392 |
"nonliteral_ranges": 22,
|
| 9393 |
"unresolved_mode_expressions": 3
|
| 9394 |
}
|
docs/research/qvm-stat-composition.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
scripts/analyze_qvm_stat_composition.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
import itertools
|
| 3 |
+
from pathlib import Path
|
| 4 |
+
from qvm_research_support import source
|
| 5 |
+
from qvm_stat_update_support import seed,update,CLIENT,A_CLIENT,OFFSETS
|
| 6 |
+
from qvm_stat_totals_support import OFFSETS as TOTALS
|
| 7 |
+
from qvm_team_counter_support import aggregate
|
| 8 |
+
from qvm_stat_ratio_support import refresh
|
| 9 |
+
from analyze_qvm import write_json
|
| 10 |
+
FIELDS=sorted(set(OFFSETS+TOTALS+[2516]))
|
| 11 |
+
def snapshot(m):return {name:{str(o):m[c+o]&0xffffffff for o in FIELDS} for name,c in [('actor',A_CLIENT),('victim',CLIENT)]}
|
| 12 |
+
|
| 13 |
+
def main():
|
| 14 |
+
q,raw,h,ins=source();rows=[]
|
| 15 |
+
for method,self_hit,same,initial in itertools.product([-1,6,12,20,22,25,34,48],[False,True],[False,True],[0,3]):
|
| 16 |
+
a={'method':method,'self':self_hit,'same':same,'initial':initial};m=seed(raw,h,**a);m[A_CLIENT+3096]=1;m[CLIENT+3096]=1 if same else 2;before=snapshot(m);ratio_calls=[];pair_calls=[]
|
| 17 |
+
def pair(i,m,args):m,v,p=aggregate(i,m,args);pair_calls.append(p);return m,v,p
|
| 18 |
+
def ratio(i,m,args):m,v,p=refresh(i,m,args);ratio_calls.append(p);return m,v,p
|
| 19 |
+
m,_,p=update(ins,m,{8:1,12:method,16:1 if self_hit else 2},{279720:pair,279586:ratio});rows.append({'input':a,'initial':before,'final':snapshot(m),'ratios':[{'arguments':r['arguments'],'initial':r['initial'],'final':r['final'],'targets':[c['target'] for c in r['execution']['calls']]} for r in ratio_calls],'pair_calls':len(pair_calls),'remaining_requests':p['requests'],'trace_sha256':p['execution']['trace_sha256']})
|
| 20 |
+
write_json(Path('docs/research/qvm-stat-composition.json'),{'source':q['source'],'sha256':q['sha256'],'probes':rows,'limits':'278834 with actual279720 and279586/283085/283166/283488 over64 finite counter/team/self fixtures. Ratio/totals helpers migrated to corrected reentry.285227 awards and283622 leaderboard remain captured; positive divisor scan cost limited by small fixture counters. Full lifecycle/native ownership remains open.'})
|
| 21 |
+
if __name__=='__main__':main()
|
scripts/qvm_stat_ratio_support.py
CHANGED
|
@@ -6,10 +6,10 @@ G=H+0x130000
|
|
| 6 |
W=H+0x140000
|
| 7 |
|
| 8 |
def divisor(ins,m,args):
|
| 9 |
-
m[G+28]=args[8];m[G+32]=args[12];m,e=resume(ins,283489,283554,m,G)
|
| 10 |
return m,e['return'],e
|
| 11 |
|
| 12 |
def refresh(ins,m,args):
|
| 13 |
m[W+72]=args[8];c=m[args[8]+520];before={str(o):m[c+o]&0xffffffff for o in [3080,3084,3088]};hs=total_handlers();hs[283488]=divisor
|
| 14 |
-
m,e=resume(ins,279587,279718,m,W,handlers=hs)
|
| 15 |
return m,0,{'arguments':args,'initial':before,'final':{str(o):m[c+o]&0xffffffff for o in [3080,3084,3088]},'execution':e}
|
|
|
|
| 6 |
W=H+0x140000
|
| 7 |
|
| 8 |
def divisor(ins,m,args):
|
| 9 |
+
m[G+28]=args[8];m[G+32]=args[12];m,e=resume(ins,283489,283554,m,G,repeated_calls=True)
|
| 10 |
return m,e['return'],e
|
| 11 |
|
| 12 |
def refresh(ins,m,args):
|
| 13 |
m[W+72]=args[8];c=m[args[8]+520];before={str(o):m[c+o]&0xffffffff for o in [3080,3084,3088]};hs=total_handlers();hs[283488]=divisor
|
| 14 |
+
m,e=resume(ins,279587,279718,m,W,handlers=hs,repeated_calls=True,sync_child_words=True)
|
| 15 |
return m,0,{'arguments':args,'initial':before,'final':{str(o):m[c+o]&0xffffffff for o in [3080,3084,3088]},'execution':e}
|
scripts/qvm_stat_totals_support.py
CHANGED
|
@@ -15,7 +15,7 @@ def seed(raw,h,values):
|
|
| 15 |
|
| 16 |
def total(ins,m,args,second=False):
|
| 17 |
start,end,frame=(283167,283242,16) if second else (283086,283165,20)
|
| 18 |
-
m[B+frame+8]=args[8];m,e=resume(ins,start,end,m,B)
|
| 19 |
return m,e['return'],e
|
| 20 |
|
| 21 |
def handlers():
|
|
|
|
| 15 |
|
| 16 |
def total(ins,m,args,second=False):
|
| 17 |
start,end,frame=(283167,283242,16) if second else (283086,283165,20)
|
| 18 |
+
m[B+frame+8]=args[8];m,e=resume(ins,start,end,m,B,repeated_calls=True)
|
| 19 |
return m,e['return'],e
|
| 20 |
|
| 21 |
def handlers():
|
scripts/qvm_stat_update_support.py
CHANGED
|
@@ -13,10 +13,10 @@ def seed(raw,h,**a):
|
|
| 13 |
for o in OFFSETS:m[c+o]=a.get('initial',0)
|
| 14 |
return m
|
| 15 |
|
| 16 |
-
def update(ins,m,args):
|
| 17 |
for o,v in args.items():m[T+52+o]=v
|
| 18 |
addresses=sorted({c+o for c in [CLIENT,A_CLIENT] for o in OFFSETS});before={a:m[a]&0xffffffff for a in addresses};requests=[]
|
| 19 |
-
hs={c:captured(c,requests) for c in [279720,279586,285227,283622]};hs[278733]=classify
|
| 20 |
-
m,e=resume(ins,278835,279584,m,T,handlers=hs,repeated_calls=True)
|
| 21 |
changes=[{'client':'actor' if a>=A_CLIENT and a<A_CLIENT+7000 else 'victim','offset':a-(A_CLIENT if a>=A_CLIENT and a<A_CLIENT+7000 else CLIENT),'before':before[a],'after':m[a]&0xffffffff} for a in addresses if before[a]!=(m[a]&0xffffffff)]
|
| 22 |
return m,0,{'arguments':args,'changes':changes,'requests':requests,'execution':e}
|
|
|
|
| 13 |
for o in OFFSETS:m[c+o]=a.get('initial',0)
|
| 14 |
return m
|
| 15 |
|
| 16 |
+
def update(ins,m,args,resolvers=None):
|
| 17 |
for o,v in args.items():m[T+52+o]=v
|
| 18 |
addresses=sorted({c+o for c in [CLIENT,A_CLIENT] for o in OFFSETS});before={a:m[a]&0xffffffff for a in addresses};requests=[]
|
| 19 |
+
hs={c:captured(c,requests) for c in [279720,279586,285227,283622]};hs[278733]=classify;hs.update(resolvers or {})
|
| 20 |
+
m,e=resume(ins,278835,279584,m,T,handlers=hs,repeated_calls=True,sync_child_words=bool(resolvers))
|
| 21 |
changes=[{'client':'actor' if a>=A_CLIENT and a<A_CLIENT+7000 else 'victim','offset':a-(A_CLIENT if a>=A_CLIENT and a<A_CLIENT+7000 else CLIENT),'before':before[a],'after':m[a]&0xffffffff} for a in addresses if before[a]!=(m[a]&0xffffffff)]
|
| 22 |
return m,0,{'arguments':args,'changes':changes,'requests':requests,'execution':e}
|
scripts/test_qvm_stat_composition.py
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import copy,json,unittest
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
from test_qvm_method_stat_updates import expected
|
| 4 |
+
from test_qvm_stat_totals import expected as totals
|
| 5 |
+
from test_qvm_stat_ratios import normalized
|
| 6 |
+
from qvm_notification_support import POOL
|
| 7 |
+
class StatCompositionTests(unittest.TestCase):
|
| 8 |
+
@classmethod
|
| 9 |
+
def setUpClass(cls):cls.ps=json.loads(Path('docs/research/qvm-stat-composition.json').read_text())['probes']
|
| 10 |
+
def test_independent_counter_and_team_mutations(self):
|
| 11 |
+
self.assertEqual(len(self.ps),64)
|
| 12 |
+
for p in self.ps:
|
| 13 |
+
a=p['input'];changes,targets=expected(a);out=copy.deepcopy(p['initial'])
|
| 14 |
+
for c in changes:out[c['client']][str(c['offset'])]=c['after']
|
| 15 |
+
if 279720 in targets and a['same'] and not a['self']:
|
| 16 |
+
for who,offset in [('actor',2444),('victim',2516)]:out[who][str(offset)]=(out[who][str(offset)]+1)&0xffffffff
|
| 17 |
+
self.assertEqual(p['final'],out,a);self.assertEqual(p['pair_calls'],int(279720 in targets));self.assertEqual([r['target'] for r in p['remaining_requests']],[285227,283622])
|
| 18 |
+
def test_actual_ratio_children_and_independent_float_integer_publication(self):
|
| 19 |
+
for p in self.ps:
|
| 20 |
+
self.assertEqual(len(p['ratios']),2)
|
| 21 |
+
for r in p['ratios']:
|
| 22 |
+
who='actor' if r['arguments']['8']==POOL+880 else 'victim';self.assertEqual(r['final'],normalized(*totals(p['final'][who])));self.assertEqual(set(r['targets']),{283085,283166,283488})
|
| 23 |
+
if __name__=='__main__':unittest.main()
|
xtask/checks.tsv
CHANGED
|
@@ -1849,3 +1849,11 @@ report scripts/analyze_rust_ranking_mixed.py docs/research/rust-ranking-mixed.js
|
|
| 1849 |
edge docs/research/rust-ranking-mixed.json scripts/test_rust_ranking_mixed.py
|
| 1850 |
group rust-ranking-mixed scripts/analyze_rust_ranking_mixed.py
|
| 1851 |
edge scripts/analyze_rust_ranking_mixed.py scripts/analyze_qvm_resumer_audit.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1849 |
edge docs/research/rust-ranking-mixed.json scripts/test_rust_ranking_mixed.py
|
| 1850 |
group rust-ranking-mixed scripts/analyze_rust_ranking_mixed.py
|
| 1851 |
edge scripts/analyze_rust_ranking_mixed.py scripts/analyze_qvm_resumer_audit.py
|
| 1852 |
+
|
| 1853 |
+
group stat-composition scripts/analyze_qvm_stat_ratios.py
|
| 1854 |
+
group stat-composition scripts/analyze_qvm_stat_totals.py
|
| 1855 |
+
group stat-composition scripts/analyze_rust_stat_totals.py
|
| 1856 |
+
report scripts/analyze_qvm_stat_composition.py docs/research/qvm-stat-composition.json
|
| 1857 |
+
edge docs/research/qvm-stat-composition.json scripts/test_qvm_stat_composition.py
|
| 1858 |
+
group stat-composition scripts/analyze_qvm_stat_composition.py
|
| 1859 |
+
edge scripts/analyze_qvm_stat_composition.py scripts/analyze_qvm_resumer_audit.py
|