nmarshall commited on
Commit
31bcd46
·
1 Parent(s): 13f8349

qvm: candidate bound restoration

Browse files
docs/ASSET_PIPELINE_TODO.md CHANGED
@@ -565,3 +565,6 @@ Research progress: RE-627 [report](research/QVM_TRACE_RETRY.md); remaining nativ
565
 
566
 
567
  Research progress: RE-628 [report](research/QVM_TRACE_RELINK.md); remaining native/content/runtime/platform scope stays open.
 
 
 
 
565
 
566
 
567
  Research progress: RE-628 [report](research/QVM_TRACE_RELINK.md); remaining native/content/runtime/platform scope stays open.
568
+
569
+
570
+ Research progress: RE-629 [report](research/QVM_TRACE_BOUNDS_RESTORE.md); remaining native/content/runtime/platform scope stays open.
docs/FINDINGS.md CHANGED
@@ -917,3 +917,6 @@ Bounded qagame paths recover bomb-plant/inactivity correction requests, direct f
917
 
918
 
919
  **RE-628 — Skipped target relink ordering and duplicate entries:** The skipped-target cleanup issues native−31 in insertion order and preserves duplicate entries; empty lists issue no relink request. [Evidence](research/QVM_TRACE_RELINK.md).
 
 
 
 
917
 
918
 
919
  **RE-628 — Skipped target relink ordering and duplicate entries:** The skipped-target cleanup issues native−31 in insertion order and preserves duplicate entries; empty lists issue no relink request. [Evidence](research/QVM_TRACE_RELINK.md).
920
+
921
+
922
+ **RE-629 — Candidate bound restoration and f32 round-trip limits:** The restoration suffix repeats eligibility gates, reverses bound arithmetic and writes fixed ±15 dimensions rather than restoring a saved record. [Evidence](research/QVM_TRACE_BOUNDS_RESTORE.md).
docs/PROVISIONAL_TODO.md CHANGED
@@ -885,3 +885,6 @@ Research progress: RE-627 [report](research/QVM_TRACE_RETRY.md); remaining nativ
885
 
886
 
887
  Research progress: RE-628 [report](research/QVM_TRACE_RELINK.md); remaining native/content/runtime/platform scope stays open.
 
 
 
 
885
 
886
 
887
  Research progress: RE-628 [report](research/QVM_TRACE_RELINK.md); remaining native/content/runtime/platform scope stays open.
888
+
889
+
890
+ Research progress: RE-629 [report](research/QVM_TRACE_BOUNDS_RESTORE.md); remaining native/content/runtime/platform scope stays open.
docs/RESEARCH_LEDGER.md CHANGED
@@ -817,3 +817,8 @@ Each retry captures unlink−32, appends the target pointer and increments count
817
  ## 2026-10-20 — RE-628 Skipped target relink ordering and duplicate entries (separate task commit)
818
 
819
  The skipped-target cleanup issues native−31 in insertion order and preserves duplicate entries; empty lists issue no relink request. Eight empty/reordered/duplicate/ten-entry cases independently verify pointer order, loop cursor and untouched list contents. Full suite: 997 tests pass. Report regenerates byte-identically (24991 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
 
 
 
 
 
 
817
  ## 2026-10-20 — RE-628 Skipped target relink ordering and duplicate entries (separate task commit)
818
 
819
  The skipped-target cleanup issues native−31 in insertion order and preserves duplicate entries; empty lists issue no relink request. Eight empty/reordered/duplicate/ten-entry cases independently verify pointer order, loop cursor and untouched list contents. Full suite: 997 tests pass. Report regenerates byte-identically (24991 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
820
+
821
+
822
+ ## 2026-10-20 — RE-629 Candidate bound restoration and f32 round-trip limits (separate task commit)
823
+
824
+ The restoration suffix repeats eligibility gates, reverses bound arithmetic and writes fixed ±15 dimensions rather than restoring a saved record. Six canonical/arbitrary/large-magnitude fixtures independently compare all six candidate records and demonstrate exact and lossy round trips. Full suite: 1001 tests pass. Report regenerates byte-identically (647300 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
docs/REVERSE_ENGINEERING_TODO.md CHANGED
@@ -928,3 +928,6 @@ Purpose: turn the supplied installation into an evidence-backed specification of
928
 
929
 
930
  - [x] RE-628 Skipped target relink ordering and duplicate entries ([report](research/QVM_TRACE_RELINK.md)).
 
 
 
 
928
 
929
 
930
  - [x] RE-628 Skipped target relink ordering and duplicate entries ([report](research/QVM_TRACE_RELINK.md)).
931
+
932
+
933
+ - [x] RE-629 Candidate bound restoration and f32 round-trip limits ([report](research/QVM_TRACE_BOUNDS_RESTORE.md)).
docs/research/QVM_TRACE_BOUNDS_RESTORE.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # Candidate bound restoration and f32 round-trip limits
2
+
3
+ RE-629. Reproduce with `python3 scripts/analyze_qvm_trace_bounds_restore.py`; check with `python3 scripts/test_qvm_trace_bounds_restore.py`. The [machine report](qvm-trace-bounds-restore.json) retains source identity and bounded fixtures.
4
+
5
+ Actual292326–292503 revisits the candidate index list and the same self/client3096/4324/3740 gates. It subtracts the widening constant from476/480/484, adds it to464/468, subtracts15 from456 and sets448/452=15 and436/440=−15. Fields472/444 remain untouched. This is arithmetic plus canonical-dimension writes, not a snapshot copy. The full-record oracle verifies all220 words for each candidate. Ordinary canonical dimensions round-trip exactly in the low-magnitude fixture; arbitrary prior dimensions and some large f32 values do not. Mid-trace state changes could alter restoration eligibility and remain unresolved until real trace/damage flow is recovered. No native effects or live-world/legal-input parity is claimed.
6
+
7
+ No original executable/full QVM/native collision/physics/rendering executes. Native responses and legal input domains are supplied or unverified where stated; full runtime/macOS/Linux Rust/Bevy/Solari gameplay remains open.
docs/research/README.md CHANGED
@@ -486,3 +486,6 @@ The extension collector adds five focused tests for native tail calls, command-r
486
 
487
 
488
  [RE-628: Skipped target relink ordering and duplicate entries](QVM_TRACE_RELINK.md). Reproduce with `python3 scripts/analyze_qvm_trace_relink.py`; check with `python3 scripts/test_qvm_trace_relink.py`.
 
 
 
 
486
 
487
 
488
  [RE-628: Skipped target relink ordering and duplicate entries](QVM_TRACE_RELINK.md). Reproduce with `python3 scripts/analyze_qvm_trace_relink.py`; check with `python3 scripts/test_qvm_trace_relink.py`.
489
+
490
+
491
+ [RE-629: Candidate bound restoration and f32 round-trip limits](QVM_TRACE_BOUNDS_RESTORE.md). Reproduce with `python3 scripts/analyze_qvm_trace_bounds_restore.py`; check with `python3 scripts/test_qvm_trace_bounds_restore.py`.
docs/research/qvm-trace-bounds-restore.json ADDED
The diff for this file is too large to render. See raw diff
 
scripts/analyze_qvm_trace_bounds_restore.py ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Actual candidate-bound restoration after the previously recovered widening."""
3
+ import itertools
4
+ from pathlib import Path
5
+ from qvm_research_support import source,execute
6
+ from analyze_qvm_shot_trace_request import fixture,first_trace,LOCAL
7
+ from analyze_qvm_entity_init import POOL,STRIDE
8
+ from analyze_qvm_temp_event import record
9
+ from analyze_qvm_acceleration import word
10
+ from analyze_qvm import write_json
11
+
12
+ def restore(ins,m):
13
+ points=[POOL+m[34992592+4*j]*STRIDE for j in range(m[34992580])];before={str(p):record(m,p) for p in points};m,_,e=execute(ins,292326,292504,m,(0,0,0),LOCAL)
14
+ return m,{'initial':before,'final':{str(p):record(m,p) for p in points},'execution':e}
15
+
16
+ def main():
17
+ q,raw,h,ins=source();rows=[]
18
+ for canonical,magnitude in itertools.product([False,True],[1.25,16777216.0,1e9]):
19
+ m,a=fixture(raw,h)
20
+ for index in [65,69]:
21
+ p=POOL+index*STRIDE
22
+ for o in [464,468,476,480,484,456]:m[p+o]=word(magnitude)
23
+ if canonical:
24
+ for o in [448,452]:m[p+o]=word(15)
25
+ for o in [436,440]:m[p+o]=word(-15)
26
+ original={str(POOL+i*STRIDE):record(m,POOL+i*STRIDE) for i in range(64,70)};m,pre=first_trace(ins,m,a);m,r=restore(ins,m);r.update({'original':original,'canonical_fixture':canonical,'magnitude':magnitude,'prelude_execution':pre['prelude'],'exact_original_restored':r['final']==original});rows.append(r)
27
+ write_json(Path('docs/research/qvm-trace-bounds-restore.json'),{'source':q['source'],'sha256':q['sha256'],'probes':rows,'limits':'Actual widening291642 prefix followed by292326–292503 restoration under unchanged candidate/client gates. Native requests captured. Restoration uses fixed dimensions and f32 inverse arithmetic, not saved-record restoration. Mid-trace candidate/state mutations and legal world domains remain unverified.'})
28
+ if __name__=='__main__':main()
scripts/test_qvm_trace_bounds_restore.py ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json,unittest
2
+ from pathlib import Path
3
+ from test_qvm_ground import word,n,f
4
+
5
+ def restored(r):
6
+ r=dict(r)
7
+ for o in [476,480,484]:r[str(o)]=word(f(n(r[str(o)])-n(1103626240)))
8
+ for o in [464,468]:r[str(o)]=word(f(n(r[str(o)])+n(1103626240)))
9
+ for o in [448,452]:r[str(o)]=1097859072
10
+ r['456']=word(f(n(r['456'])-n(1097859072)))
11
+ for o in [436,440]:r[str(o)]=(-1049624576)&0xffffffff
12
+ return r
13
+ class TraceBoundsRestoreTests(unittest.TestCase):
14
+ @classmethod
15
+ def setUpClass(cls):cls.r=json.loads(Path('docs/research/qvm-trace-bounds-restore.json').read_text())
16
+ def test_independent_full_record_oracle(self):
17
+ for p in self.r['probes']:
18
+ for address,r in p['initial'].items():self.assertEqual(p['final'][address],restored(r) if (int(address)-34091368)//880 in [65,69] else r)
19
+ def test_canonical_low_magnitude_round_trip(self):
20
+ p=next(p for p in self.r['probes'] if p['canonical_fixture'] and p['magnitude']==1.25);self.assertTrue(p['exact_original_restored'])
21
+ def test_arbitrary_extents_are_not_snapshots(self):
22
+ for p in self.r['probes']:
23
+ if not p['canonical_fixture']:self.assertFalse(p['exact_original_restored'])
24
+ self.assertTrue(any(not p['exact_original_restored'] for p in self.r['probes'] if p['canonical_fixture']))
25
+ def test_no_native_or_extra_field_restoration(self):
26
+ for p in self.r['probes']:
27
+ self.assertEqual(p['execution']['calls'],[])
28
+ for address,r in p['final'].items():self.assertEqual(r['472'],p['original'][address]['472']);self.assertEqual(r['444'],p['original'][address]['444'])
29
+ if __name__=='__main__':unittest.main()