nmarshall commited on
Commit
3e6cd09
·
1 Parent(s): 16c1385

qvm: compose finite ranking publication

Browse files
docs/ASSET_PIPELINE_TODO.md CHANGED
@@ -967,3 +967,6 @@ Research progress: RE-769 [report](research/QVM_RANK_COMPARATOR.md); original as
967
 
968
 
969
  Research progress: RE-770 [report](research/QVM_RANK_SMALL_SORT.md); original assets unchanged.
 
 
 
 
967
 
968
 
969
  Research progress: RE-770 [report](research/QVM_RANK_SMALL_SORT.md); original assets unchanged.
970
+
971
+
972
+ Research progress: RE-771 [report](research/QVM_RANKING_COMPLETE.md); original assets unchanged.
docs/FINDINGS.md CHANGED
@@ -1313,3 +1313,6 @@ RE-725–734 batch: [health, contact and Rust impulse findings](research/QVM_HEA
1313
 
1314
 
1315
  **RE-770 — Actual aligned small rank sorting with dynamic comparator:** 35095 aligned four-byte insertion sorting now executes actual5441 callbacks for fewer than7 entries. [Evidence](research/QVM_RANK_SMALL_SORT.md).
 
 
 
 
1313
 
1314
 
1315
  **RE-770 — Actual aligned small rank sorting with dynamic comparator:** 35095 aligned four-byte insertion sorting now executes actual5441 callbacks for fewer than7 entries. [Evidence](research/QVM_RANK_SMALL_SORT.md).
1316
+
1317
+
1318
+ **RE-771 — Complete finite ranking sort tie flags and publication requests:** 5864 now executes actual aligned small sorting and publishes team/individual rank words with tie bit16384 before explicit publication requests. [Evidence](research/QVM_RANKING_COMPLETE.md).
docs/PROVISIONAL_TODO.md CHANGED
@@ -1311,3 +1311,6 @@ Research progress: RE-769 [report](research/QVM_RANK_COMPARATOR.md); full native
1311
 
1312
 
1313
  Research progress: RE-770 [report](research/QVM_RANK_SMALL_SORT.md); full native/platform/game scope remains open.
 
 
 
 
1311
 
1312
 
1313
  Research progress: RE-770 [report](research/QVM_RANK_SMALL_SORT.md); full native/platform/game scope remains open.
1314
+
1315
+
1316
+ Research progress: RE-771 [report](research/QVM_RANKING_COMPLETE.md); full native/platform/game scope remains open.
docs/RESEARCH_LEDGER.md CHANGED
@@ -1508,3 +1508,8 @@ Exactly ten task commits follow baseline `27a7f96f`. Every completed task passed
1508
  ## 2026-10-21 — RE-770 Actual aligned small rank sorting with dynamic comparator
1509
 
1510
  35095 aligned four-byte insertion sorting now executes actual5441 callbacks for fewer than7 entries. Focused `cargo xtask test-group rank-small-sort` passes (4 Python tests); selected reports regenerate twice byte-identically, with storage, links and whitespace guards. New report: 142955 bytes. Full-suite validation is deferred to the tenth batch commit. Optional explicit result-offset mapping added to trace resumption; default instruction evaluation unchanged. Focused actual sort checks validate dynamic callback return placement. Correct repeated-call reentry is opt-in for this sort; legacy repeated-call analyses require an explicit audit. Broader full regression remains deferred until task ten.
 
 
 
 
 
 
1508
  ## 2026-10-21 — RE-770 Actual aligned small rank sorting with dynamic comparator
1509
 
1510
  35095 aligned four-byte insertion sorting now executes actual5441 callbacks for fewer than7 entries. Focused `cargo xtask test-group rank-small-sort` passes (4 Python tests); selected reports regenerate twice byte-identically, with storage, links and whitespace guards. New report: 142955 bytes. Full-suite validation is deferred to the tenth batch commit. Optional explicit result-offset mapping added to trace resumption; default instruction evaluation unchanged. Focused actual sort checks validate dynamic callback return placement. Correct repeated-call reentry is opt-in for this sort; legacy repeated-call analyses require an explicit audit. Broader full regression remains deferred until task ten.
1511
+
1512
+
1513
+ ## 2026-10-21 — RE-771 Complete finite ranking sort tie flags and publication requests
1514
+
1515
+ 5864 now executes actual aligned small sorting and publishes team/individual rank words with tie bit16384 before explicit publication requests. Focused `cargo xtask test-group ranking-complete` passes (3 Python tests); selected reports regenerate twice byte-identically, with storage, links and whitespace guards. New report: 334757 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
@@ -1357,3 +1357,6 @@ Purpose: turn the supplied installation into an evidence-backed specification of
1357
 
1358
 
1359
  - [ ] Audit legacy `qvm_trace_support.resume` consumers for repeated visits to the same call-site return boundary; migrate with corrected reentry semantics and regenerate/review each affected oracle before broader parity claims. See [RE-770](research/QVM_RANK_SMALL_SORT.md).
 
 
 
 
1357
 
1358
 
1359
  - [ ] Audit legacy `qvm_trace_support.resume` consumers for repeated visits to the same call-site return boundary; migrate with corrected reentry semantics and regenerate/review each affected oracle before broader parity claims. See [RE-770](research/QVM_RANK_SMALL_SORT.md).
1360
+
1361
+
1362
+ - [x] RE-771 Complete finite ranking sort tie flags and publication requests ([report](research/QVM_RANKING_COMPLETE.md)).
docs/research/QVM_RANKING_COMPLETE.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # Complete finite ranking sort tie flags and publication requests
2
+
3
+ RE-771. Reproduce with `python3 scripts/analyze_qvm_ranking_complete.py`; validate with `cargo xtask test-group ranking-complete`. See the [machine report](qvm-ranking-complete.json).
4
+
5
+ Recovered complete5864 across48 eligible connected n<7 cases with actual35095/5441/33715. Independent order/rank oracles cover mode9 time ties, mode11 class ties, ordinary score ties and global team-result rank words.7805/6328 remain captured; large sort paths, deferred/spectator ordering and original native/runtime parity remain open. Correct repeated-call tracing is enabled for this new composition.
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
@@ -903,3 +903,6 @@ The extension collector adds five focused tests for native tail calls, command-r
903
 
904
 
905
  [RE-770: Actual aligned small rank sorting with dynamic comparator](QVM_RANK_SMALL_SORT.md).
 
 
 
 
903
 
904
 
905
  [RE-770: Actual aligned small rank sorting with dynamic comparator](QVM_RANK_SMALL_SORT.md).
906
+
907
+
908
+ [RE-771: Complete finite ranking sort tie flags and publication requests](QVM_RANKING_COMPLETE.md).
docs/research/qvm-ranking-complete.json ADDED
The diff for this file is too large to render. See raw diff
 
scripts/analyze_qvm_ranking_complete.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Complete5864 finite ranking with actual small sort and comparator."""
3
+ import itertools
4
+ from pathlib import Path
5
+ from qvm_research_support import source
6
+ from qvm_rank_compare_support import seed
7
+ from qvm_rank_sort_support import sort
8
+ from qvm_notification_support import CPOOL,POOL
9
+ from qvm_contact_support import predicate
10
+ from qvm_trace_support import resume,captured
11
+ from analyze_qvm_ranking_setup import R,GLOBALS
12
+ from analyze_qvm import write_json
13
+
14
+ def main():
15
+ q,raw,h,ins=source();rows=[];profiles=[{'248':5,'280':0,'3032':3,'308':3,'696':2},{'248':5,'280':1,'3032':2,'308':3,'696':2},{'248':1,'280':2,'3032':1,'308':0,'696':1}]
16
+ cases=[(mode,list(order),0) for mode,order in itertools.product([0,3,9,11],itertools.permutations(range(3)))]+[(mode,[j%3 for j in range(n)],blocked) for mode,n,blocked in itertools.product([0,3,9,11],[0,1,6],[0,1])]
17
+ for case,(mode,profile_ids,blocked) in enumerate(cases):
18
+ clients=[profiles[j] for j in profile_ids];scores=[(2,1),(1,2),(1,1)][case%3];m=seed(mode,clients);m.update({34992524:len(clients),34999596:blocked,34992556:scores[0],34992560:scores[1]})
19
+ for j in range(len(clients)):m[POOL+880*j+424]=0;m[CPOOL+6336*j+256]=77
20
+ requests=[];m,e=resume(ins,5865,6326,m,R,handlers={35095:sort,33715:predicate,7805:captured(7805,requests),6328:captured(6328,requests)},repeated_calls=True)
21
+ rows.append({'input':{'mode':mode,'clients':clients,'blocked':blocked,'team_scores':scores},'order':[m[34992592+4*j] for j in range(len(clients))],'ranks':[m[CPOOL+6336*j+256]&0xffffffff for j in range(len(clients))],'globals':{str(a):m[a] for a in GLOBALS},'requests':requests,'execution':e})
22
+ write_json(Path('docs/research/qvm-ranking-complete.json'),{'source':q['source'],'sha256':q['sha256'],'probes':rows,'limits':'Complete5864 over48 eligible connected non-spectator n<7 fixtures, actual35095 aligned insertion branch/5441/33715.7805 and6328 publication requests captured. Large quicksort and invalid-prefilter ordering/native parity remain open.'})
23
+ if __name__=='__main__':main()
scripts/test_qvm_ranking_complete.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import functools,json,unittest
2
+ from pathlib import Path
3
+ from test_qvm_rank_comparator import compare
4
+ class CompleteRankingTests(unittest.TestCase):
5
+ @classmethod
6
+ def setUpClass(cls):cls.ps=json.loads(Path('docs/research/qvm-ranking-complete.json').read_text())['probes']
7
+ def test_independent_order_and_rank_publication_words(self):
8
+ for p in self.ps:
9
+ a=p['input'];mode=a['mode'];c=a['clients'];order=sorted(range(len(c)),key=functools.cmp_to_key(lambda x,y:compare(mode,c[x],c[y])));self.assertEqual(p['order'],order);r=[77]*len(c)
10
+ if mode>=3 and mode not in [9,11]:
11
+ left,right=a['team_scores'];r=[2 if left==right else 0 if left>right else 1]*len(c)
12
+ else:
13
+ field='308' if mode==9 else '696' if mode==11 else '248';base=0;previous=None
14
+ for j,id in enumerate(order):
15
+ key=c[id][field]
16
+ if j==0 or key!=previous:base=j;r[id]=base
17
+ else:r[order[j-1]]=base|16384;r[id]=base|16384
18
+ previous=key
19
+ self.assertEqual(p['ranks'],r,a)
20
+ def test_actual_sort_child_and_remaining_publication_boundaries(self):
21
+ for p in self.ps:self.assertEqual([r['target'] for r in p['requests']],[7805]+([6328] if p['input']['blocked'] else []));self.assertEqual(p['execution']['children'][0]['call']['target'],35095);self.assertEqual(p['execution']['stop'],6326)
22
+ def test_fixture_counts_and_tie_flags(self):self.assertEqual(len(self.ps),48);self.assertTrue(any(r&16384 for p in self.ps for r in p['ranks']))
23
+ if __name__=='__main__':unittest.main()
xtask/checks.tsv CHANGED
@@ -1329,3 +1329,6 @@ group rank-comparator scripts/analyze_qvm_rank_comparator.py
1329
  report scripts/analyze_qvm_rank_small_sort.py docs/research/qvm-rank-small-sort.json
1330
  edge docs/research/qvm-rank-small-sort.json scripts/test_qvm_rank_small_sort.py
1331
  group rank-small-sort scripts/analyze_qvm_rank_small_sort.py
 
 
 
 
1329
  report scripts/analyze_qvm_rank_small_sort.py docs/research/qvm-rank-small-sort.json
1330
  edge docs/research/qvm-rank-small-sort.json scripts/test_qvm_rank_small_sort.py
1331
  group rank-small-sort scripts/analyze_qvm_rank_small_sort.py
1332
+ report scripts/analyze_qvm_ranking_complete.py docs/research/qvm-ranking-complete.json
1333
+ edge docs/research/qvm-ranking-complete.json scripts/test_qvm_ranking_complete.py
1334
+ group ranking-complete scripts/analyze_qvm_ranking_complete.py