nmarshall commited on
Commit
055a3c0
·
1 Parent(s): 81414f0

qvm: recover leaderboard selection

Browse files
docs/ASSET_PIPELINE_TODO.md CHANGED
@@ -973,3 +973,6 @@ Research progress: RE-771 [report](research/QVM_RANKING_COMPLETE.md); original a
973
 
974
 
975
  Research progress: RE-772 [report](research/QVM_LEADERBOARD_LAYOUT.md); original assets unchanged.
 
 
 
 
973
 
974
 
975
  Research progress: RE-772 [report](research/QVM_LEADERBOARD_LAYOUT.md); original assets unchanged.
976
+
977
+
978
+ Research progress: RE-773 [report](research/QVM_LEADERBOARD_SELECTOR.md); original assets unchanged.
docs/FINDINGS.md CHANGED
@@ -1319,3 +1319,6 @@ RE-725–734 batch: [health, contact and Rust impulse findings](research/QVM_HEA
1319
 
1320
 
1321
  **RE-772 — Leaderboard slot mapping sparse layout and sentinels:** 278587 maps20 weapon-like identifiers to slots0..19;284555 initializes nine metric fields and preserves record holes. [Evidence](research/QVM_LEADERBOARD_LAYOUT.md).
 
 
 
 
1319
 
1320
 
1321
  **RE-772 — Leaderboard slot mapping sparse layout and sentinels:** 278587 maps20 weapon-like identifiers to slots0..19;284555 initializes nine metric fields and preserves record holes. [Evidence](research/QVM_LEADERBOARD_LAYOUT.md).
1322
+
1323
+
1324
+ **RE-773 — Complete leaderboard joint thresholds sentinel updates and ties:** 284610 requires every candidate metric to strictly exceed its threshold, then updates only nonsentinel fields and records the candidate entity. [Evidence](research/QVM_LEADERBOARD_SELECTOR.md).
docs/PROVISIONAL_TODO.md CHANGED
@@ -1317,3 +1317,6 @@ Research progress: RE-771 [report](research/QVM_RANKING_COMPLETE.md); full nativ
1317
 
1318
 
1319
  Research progress: RE-772 [report](research/QVM_LEADERBOARD_LAYOUT.md); full native/platform/game scope remains open.
 
 
 
 
1317
 
1318
 
1319
  Research progress: RE-772 [report](research/QVM_LEADERBOARD_LAYOUT.md); full native/platform/game scope remains open.
1320
+
1321
+
1322
+ Research progress: RE-773 [report](research/QVM_LEADERBOARD_SELECTOR.md); full native/platform/game scope remains open.
docs/RESEARCH_LEDGER.md CHANGED
@@ -1518,3 +1518,8 @@ Exactly ten task commits follow baseline `27a7f96f`. Every completed task passed
1518
  ## 2026-10-21 — RE-772 Leaderboard slot mapping sparse layout and sentinels
1519
 
1520
  278587 maps20 weapon-like identifiers to slots0..19;284555 initializes nine metric fields and preserves record holes. Focused `cargo xtask test-group leaderboard-layout` passes (3 Python tests); selected reports regenerate twice byte-identically, with storage, links and whitespace guards. New report: 14920 bytes. Full-suite validation is deferred to the tenth batch commit. No original assets, Rust runtime or shared VM evaluator changed.
 
 
 
 
 
 
1518
  ## 2026-10-21 — RE-772 Leaderboard slot mapping sparse layout and sentinels
1519
 
1520
  278587 maps20 weapon-like identifiers to slots0..19;284555 initializes nine metric fields and preserves record holes. Focused `cargo xtask test-group leaderboard-layout` passes (3 Python tests); selected reports regenerate twice byte-identically, with storage, links and whitespace guards. New report: 14920 bytes. Full-suite validation is deferred to the tenth batch commit. No original assets, Rust runtime or shared VM evaluator changed.
1521
+
1522
+
1523
+ ## 2026-10-21 — RE-773 Complete leaderboard joint thresholds sentinel updates and ties
1524
+
1525
+ 284610 requires every candidate metric to strictly exceed its threshold, then updates only nonsentinel fields and records the candidate entity. Focused `cargo xtask test-group leaderboard-selector` passes (3 Python tests); selected reports regenerate twice byte-identically, with storage, links and whitespace guards. New report: 697619 bytes. Full-suite validation is deferred to the tenth batch commit. No original assets, Rust runtime or shared VM evaluator changed.
docs/REVERSE_ENGINEERING_TODO.md CHANGED
@@ -1363,3 +1363,6 @@ Purpose: turn the supplied installation into an evidence-backed specification of
1363
 
1364
 
1365
  - [x] RE-772 Leaderboard slot mapping sparse layout and sentinels ([report](research/QVM_LEADERBOARD_LAYOUT.md)).
 
 
 
 
1363
 
1364
 
1365
  - [x] RE-772 Leaderboard slot mapping sparse layout and sentinels ([report](research/QVM_LEADERBOARD_LAYOUT.md)).
1366
+
1367
+
1368
+ - [x] RE-773 Complete leaderboard joint thresholds sentinel updates and ties ([report](research/QVM_LEADERBOARD_SELECTOR.md)).
docs/research/QVM_LEADERBOARD_SELECTOR.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # Complete leaderboard joint thresholds sentinel updates and ties
2
+
3
+ RE-773. Reproduce with `python3 scripts/analyze_qvm_leaderboard_selector.py`; validate with `cargo xtask test-group leaderboard-selector`. See the [machine report](qvm-leaderboard-selector.json).
4
+
5
+ Recovered complete284610 with actual278587 and corrected repeated-call reentry over77 configurations. All nine metrics jointly gate a candidate, including sentinel-valued inactive fields; updates preserve inactive sentinels. All-sentinel records never select despite candidates passing gates. Scan order and strict ties are explicit. Invalid keys, live-null clients and original runtime parity remain open.
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
@@ -909,3 +909,6 @@ The extension collector adds five focused tests for native tail calls, command-r
909
 
910
 
911
  [RE-772: Leaderboard slot mapping sparse layout and sentinels](QVM_LEADERBOARD_LAYOUT.md).
 
 
 
 
909
 
910
 
911
  [RE-772: Leaderboard slot mapping sparse layout and sentinels](QVM_LEADERBOARD_LAYOUT.md).
912
+
913
+
914
+ [RE-773: Complete leaderboard joint thresholds sentinel updates and ties](QVM_LEADERBOARD_SELECTOR.md).
docs/research/qvm-leaderboard-selector.json ADDED
The diff for this file is too large to render. See raw diff
 
scripts/analyze_qvm_leaderboard_selector.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Complete284610 strict joint metrics with actual lookup and sentinel rules."""
3
+ from pathlib import Path
4
+ from qvm_research_support import source
5
+ from qvm_leaderboard_support import FIELDS,RECORD
6
+ from qvm_leaderboard_selector_support import fixture,select,KEYS
7
+ from analyze_qvm import write_json
8
+
9
+ def main():
10
+ q,raw,h,ins=source();rows=[]
11
+ for active in [[o] for o in FIELDS]+[FIELDS,[]]:
12
+ for pattern in range(7):
13
+ m,candidates=fixture(ins,raw,h,active,pattern);_,_,p=select(ins,m,{8:RECORD,12:KEYS,16:2});p.update(input={'active':active,'pattern':pattern},candidates=candidates);rows.append(p)
14
+ write_json(Path('docs/research/qvm-leaderboard-selector.json'),{'source':q['source'],'sha256':q['sha256'],'probes':rows,'limits':'Complete284610 with actual278587 and corrected repeated-call tracing.64 entity slots,4 live clients,2 valid keys, finite float metrics. All nine candidate metrics must strictly exceed record thresholds; only nonsentinel fields update. Invalid keys/live-null clients and native/runtime parity remain open.'})
15
+ if __name__=='__main__':main()
scripts/qvm_leaderboard_selector_support.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """284610 source strict joint-threshold selector with repeated-call tracing."""
2
+ from qvm_health_effects_support import H
3
+ from qvm_notification_support import POOL,CPOOL
4
+ from qvm_leaderboard_support import mapping_seed,initialize,mapping,RECORD,FIELDS
5
+ from qvm_trace_support import resume
6
+ from analyze_qvm_acceleration import word
7
+ SEL=H+0x20000
8
+ KEYS=SEL+0x1000
9
+ SLOTS=[0,2,5,63]
10
+
11
+ def select(ins,m,args):
12
+ for o,v in args.items():m[SEL+48+o]=v
13
+ before={str(o):m[args[8]+o]&0xffffffff for o in FIELDS};m,e=resume(ins,284611,285141,m,SEL,handlers={278587:mapping},limit=50000,repeated_calls=True)
14
+ return m,e['return'],{'initial':before,'final':{str(o):m[args[8]+o]&0xffffffff for o in FIELDS},'selected':e['return'],'execution':e}
15
+
16
+ def fixture(ins,raw,h,active,pattern):
17
+ m=mapping_seed(raw,h);m.update({RECORD+o:0x55555555 for o in range(0,76,4)});m,_,_=initialize(ins,m,{8:RECORD})
18
+ for o in active:m[RECORD+o]=word(0) if o==56 else 0
19
+ for j in range(64):m[POOL+880*j+532]=int(j in SLOTS);m[POOL+880*j+520]=CPOOL+6336*j
20
+ for k,key in enumerate([2,3]):m[KEYS+4*k]=key
21
+ candidates=[]
22
+ for j,id in enumerate(SLOTS):
23
+ for k,slot in enumerate([9,8]):
24
+ metrics={str(o):word(j+k+1) if o==56 else j+k+1 for o in FIELDS}
25
+ if pattern==1:metrics={str(o):word(5-j-k) if o==56 else 5-j-k for o in FIELDS}
26
+ if pattern==2:metrics={str(o):word(1) if o==56 else 1 for o in FIELDS}
27
+ if pattern==3:metrics['0']=0xffffffff if j%2 else metrics['0']
28
+ if pattern==4:metrics['56']=word(-0.5 if j%2 else 0)
29
+ if pattern==5:metrics['0']=5-j;metrics['8']=j+1
30
+ if pattern==6:metrics={str(o):word(100+j) if o==56 else 0x7fffffff-j for o in FIELDS}
31
+ for o in FIELDS:m[CPOOL+6336*id+856+76*slot+o]=metrics[str(o)]
32
+ candidates.append({'entity':id,'key':2+k,'slot':slot,'metrics':metrics})
33
+ return m,candidates
scripts/test_qvm_leaderboard_selector.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json,unittest
2
+ from pathlib import Path
3
+ from test_qvm_stat_totals import signed
4
+ from test_qvm_ground import n
5
+
6
+ def expected(initial,candidates):
7
+ r=dict(initial);selected=-1
8
+ for c in candidates:
9
+ m=c['metrics']
10
+ if not all(n(m[o])>n(r[o]) if o=='56' else signed(m[o])>signed(r[o]) for o in r):continue
11
+ for o in r:
12
+ if r[o]!=(0xbf800000 if o=='56' else 0xffffffff):r[o]=m[o];selected=c['entity']
13
+ return selected,r
14
+ class LeaderboardSelectorTests(unittest.TestCase):
15
+ @classmethod
16
+ def setUpClass(cls):cls.ps=json.loads(Path('docs/research/qvm-leaderboard-selector.json').read_text())['probes']
17
+ def test_independent_joint_threshold_and_sentinel_oracle(self):
18
+ for p in self.ps:self.assertEqual((p['selected'],p['final']),expected(p['initial'],p['candidates']),p['input'])
19
+ def test_original_mapping_call_for_every_candidate(self):
20
+ for p in self.ps:self.assertEqual(len(p['execution']['calls']),8);self.assertTrue(all(c['target']==278587 for c in p['execution']['calls']));self.assertEqual(p['execution']['return'],p['selected'])
21
+ def test_sentinel_only_never_selects_and_strict_ties(self):
22
+ self.assertEqual(len(self.ps),77)
23
+ for p in self.ps:
24
+ if not p['input']['active']:self.assertEqual(p['selected'],-1);self.assertEqual(p['final'],p['initial'])
25
+ elif p['input']['pattern']==2:self.assertEqual(p['selected'],0)
26
+ if __name__=='__main__':unittest.main()
xtask/checks.tsv CHANGED
@@ -1335,3 +1335,6 @@ group ranking-complete scripts/analyze_qvm_ranking_complete.py
1335
  report scripts/analyze_qvm_leaderboard_layout.py docs/research/qvm-leaderboard-layout.json
1336
  edge docs/research/qvm-leaderboard-layout.json scripts/test_qvm_leaderboard_layout.py
1337
  group leaderboard-layout scripts/analyze_qvm_leaderboard_layout.py
 
 
 
 
1335
  report scripts/analyze_qvm_leaderboard_layout.py docs/research/qvm-leaderboard-layout.json
1336
  edge docs/research/qvm-leaderboard-layout.json scripts/test_qvm_leaderboard_layout.py
1337
  group leaderboard-layout scripts/analyze_qvm_leaderboard_layout.py
1338
+ report scripts/analyze_qvm_leaderboard_selector.py docs/research/qvm-leaderboard-selector.json
1339
+ edge docs/research/qvm-leaderboard-selector.json scripts/test_qvm_leaderboard_selector.py
1340
+ group leaderboard-selector scripts/analyze_qvm_leaderboard_selector.py