qvm: recover repeated assistance transitions
Browse files- docs/FINDINGS.md +2 -0
- docs/PROVISIONAL_TODO.md +2 -0
- docs/RESEARCH_LEDGER.md +4 -0
- docs/REVERSE_ENGINEERING_TODO.md +2 -0
- docs/research/QVM_ASSIST_SEQUENCE.md +5 -0
- docs/research/README.md +2 -0
- docs/research/qvm-assist-sequence.json +0 -0
- scripts/analyze_qvm_assist_sequence.py +12 -0
- scripts/qvm_assistance_oracle.py +3 -0
- scripts/qvm_assistance_support.py +9 -0
- scripts/test_qvm_assist_sequence.py +13 -0
- xtask/checks.tsv +4 -0
docs/FINDINGS.md
CHANGED
|
@@ -1959,3 +1959,5 @@ RE-1009: Rust matches24 assisted progress cases, including f32 rounding, negativ
|
|
| 1959 |
RE-1010: Sixty coherent original-QVM cases execute complete152792 with actual distance65655 and target-meter152386. Admission, cleanup, ascending candidate order, same-team/live/follow filtering, strict distance below75, ownership, acquisition/progress/cancellation and target completion are checked together. Fixtures include two competing targets, exact radius, 64-slot pools, early exits, negative/wrapped progress and stale state. Distance sqrt is modeled; publication/native completion effects remain captured or supplied. [Evidence](research/QVM_ASSIST_COMPLETE.md).
|
| 1960 |
|
| 1961 |
RE-1011: Rust composes recovered admission/cleanup, finite f32 distance, acquisition/cancellation and actual target meter policies across60 complete source cases. Candidate order and strict radius75 are preserved; typed identity and shared flags are validated. All clients and effects stage atomically, including a late invalid distance after an earlier acquisition. Tests cover radius/order, ownership retention and rollback. Native completion/publication effects remain plans. [Evidence](research/RUST_ASSIST_COMPLETE.md).
|
|
|
|
|
|
|
|
|
| 1959 |
RE-1010: Sixty coherent original-QVM cases execute complete152792 with actual distance65655 and target-meter152386. Admission, cleanup, ascending candidate order, same-team/live/follow filtering, strict distance below75, ownership, acquisition/progress/cancellation and target completion are checked together. Fixtures include two competing targets, exact radius, 64-slot pools, early exits, negative/wrapped progress and stale state. Distance sqrt is modeled; publication/native completion effects remain captured or supplied. [Evidence](research/QVM_ASSIST_COMPLETE.md).
|
| 1960 |
|
| 1961 |
RE-1011: Rust composes recovered admission/cleanup, finite f32 distance, acquisition/cancellation and actual target meter policies across60 complete source cases. Candidate order and strict radius75 are preserved; typed identity and shared flags are validated. All clients and effects stage atomically, including a late invalid distance after an earlier acquisition. Tests cover radius/order, ownership retention and rollback. Native completion/publication effects remain plans. [Evidence](research/RUST_ASSIST_COMPLETE.md).
|
| 1962 |
+
|
| 1963 |
+
RE-1012: Twenty five-call source scenarios preserve one coherent memory state across acquisition, progress, thaw completion and later cancellation/reacquisition. Competing target order, wrapped ticks, positive/negative duration and64-slot traversal are checked across100 complete callback executions. Reports compare every client word, distance, event request and allocated event state at each call. Native teleport/reset/publication/log effects remain captured; the broader frame scheduler and self-recovery callback are excluded. [Evidence](research/QVM_ASSIST_SEQUENCE.md).
|
docs/PROVISIONAL_TODO.md
CHANGED
|
@@ -2017,3 +2017,5 @@ RE-974–983 completed routing, command rewrite, inactivity, movement-parameter
|
|
| 2017 |
- [x] RE-1010 Recover complete mode10 assistance callback ([evidence](research/QVM_ASSIST_COMPLETE.md)).
|
| 2018 |
|
| 2019 |
- [x] RE-1011 Port complete mode10 assistance scan ([evidence](research/RUST_ASSIST_COMPLETE.md)).
|
|
|
|
|
|
|
|
|
| 2017 |
- [x] RE-1010 Recover complete mode10 assistance callback ([evidence](research/QVM_ASSIST_COMPLETE.md)).
|
| 2018 |
|
| 2019 |
- [x] RE-1011 Port complete mode10 assistance scan ([evidence](research/RUST_ASSIST_COMPLETE.md)).
|
| 2020 |
+
|
| 2021 |
+
- [x] RE-1012 Recover assistance transitions across repeated calls ([evidence](research/QVM_ASSIST_SEQUENCE.md)).
|
docs/RESEARCH_LEDGER.md
CHANGED
|
@@ -2719,3 +2719,7 @@ Sixty coherent original-QVM cases execute complete152792 with actual distance656
|
|
| 2719 |
## 2026-10-29 — RE-1011 Port complete mode10 assistance scan
|
| 2720 |
|
| 2721 |
Rust composes recovered admission/cleanup, finite f32 distance, acquisition/cancellation and actual target meter policies across60 complete source cases. Candidate order and strict radius75 are preserved; typed identity and shared flags are validated. All clients and effects stage atomically, including a late invalid distance after an earlier acquisition. Tests cover radius/order, ownership retention and rollback. Native completion/publication effects remain plans. Focused `cargo xtask test-group rust-assist-complete` passes with deterministic report regeneration and selected regressions. Full suite deferred to task ten. Original assets unchanged; Python uses the flake-declared Nix runtime.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2719 |
## 2026-10-29 — RE-1011 Port complete mode10 assistance scan
|
| 2720 |
|
| 2721 |
Rust composes recovered admission/cleanup, finite f32 distance, acquisition/cancellation and actual target meter policies across60 complete source cases. Candidate order and strict radius75 are preserved; typed identity and shared flags are validated. All clients and effects stage atomically, including a late invalid distance after an earlier acquisition. Tests cover radius/order, ownership retention and rollback. Native completion/publication effects remain plans. Focused `cargo xtask test-group rust-assist-complete` passes with deterministic report regeneration and selected regressions. Full suite deferred to task ten. Original assets unchanged; Python uses the flake-declared Nix runtime.
|
| 2722 |
+
|
| 2723 |
+
## 2026-10-29 — RE-1012 Recover assistance transitions across repeated calls
|
| 2724 |
+
|
| 2725 |
+
Twenty five-call source scenarios preserve one coherent memory state across acquisition, progress, thaw completion and later cancellation/reacquisition. Competing target order, wrapped ticks, positive/negative duration and64-slot traversal are checked across100 complete callback executions. Reports compare every client word, distance, event request and allocated event state at each call. Native teleport/reset/publication/log effects remain captured; the broader frame scheduler and self-recovery callback are excluded. Focused `cargo xtask test-group qvm-assist-sequence` passes with deterministic report regeneration and selected regressions. Full suite deferred to task ten. Original assets unchanged; Python uses the flake-declared Nix runtime.
|
docs/REVERSE_ENGINEERING_TODO.md
CHANGED
|
@@ -2054,3 +2054,5 @@ RE-974–983 recover routing, command rewriting, inactivity and composed setup t
|
|
| 2054 |
- [x] RE-1010 Recover complete mode10 assistance callback ([evidence](research/QVM_ASSIST_COMPLETE.md)).
|
| 2055 |
|
| 2056 |
- [x] RE-1011 Port complete mode10 assistance scan ([evidence](research/RUST_ASSIST_COMPLETE.md)).
|
|
|
|
|
|
|
|
|
| 2054 |
- [x] RE-1010 Recover complete mode10 assistance callback ([evidence](research/QVM_ASSIST_COMPLETE.md)).
|
| 2055 |
|
| 2056 |
- [x] RE-1011 Port complete mode10 assistance scan ([evidence](research/RUST_ASSIST_COMPLETE.md)).
|
| 2057 |
+
|
| 2058 |
+
- [x] RE-1012 Recover assistance transitions across repeated calls ([evidence](research/QVM_ASSIST_SEQUENCE.md)).
|
docs/research/QVM_ASSIST_SEQUENCE.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Recover assistance transitions across repeated calls
|
| 2 |
+
|
| 3 |
+
RE-1012. Focused validation: `cargo xtask test-group qvm-assist-sequence`. [Machine report](qvm-assist-sequence.json).
|
| 4 |
+
|
| 5 |
+
Twenty five-call source scenarios preserve one coherent memory state across acquisition, progress, thaw completion and later cancellation/reacquisition. Competing target order, wrapped ticks, positive/negative duration and64-slot traversal are checked across100 complete callback executions. Reports compare every client word, distance, event request and allocated event state at each call. Native teleport/reset/publication/log effects remain captured; the broader frame scheduler and self-recovery callback are excluded.
|
docs/research/README.md
CHANGED
|
@@ -1587,3 +1587,5 @@ The extension collector adds five focused tests for native tail calls, command-r
|
|
| 1587 |
- [RE-1010: Recover complete mode10 assistance callback](QVM_ASSIST_COMPLETE.md).
|
| 1588 |
|
| 1589 |
- [RE-1011: Port complete mode10 assistance scan](RUST_ASSIST_COMPLETE.md).
|
|
|
|
|
|
|
|
|
| 1587 |
- [RE-1010: Recover complete mode10 assistance callback](QVM_ASSIST_COMPLETE.md).
|
| 1588 |
|
| 1589 |
- [RE-1011: Port complete mode10 assistance scan](RUST_ASSIST_COMPLETE.md).
|
| 1590 |
+
|
| 1591 |
+
- [RE-1012: Recover assistance transitions across repeated calls](QVM_ASSIST_SEQUENCE.md).
|
docs/research/qvm-assist-sequence.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
scripts/analyze_qvm_assist_sequence.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Verified original movement-context source contract."""
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
from analyze_qvm import write_json
|
| 4 |
+
from qvm_research_support import source
|
| 5 |
+
from qvm_assistance_support import seed,sequence,sequence_fixtures
|
| 6 |
+
|
| 7 |
+
def main():
|
| 8 |
+
q,raw,h,ins=source();probes=[]
|
| 9 |
+
for a in sequence_fixtures():
|
| 10 |
+
m,b=seed(raw,h,a);m,p,b=sequence(ins,m,b,a);p['input']=a;probes.append(p)
|
| 11 |
+
write_json(Path('docs/research/qvm-assist-sequence.json'),dict(source=q['source'],sha256=q['sha256'],probes=probes,limits='Five actual152792 calls per scenario, carrying coherent memory, actual distance/meter children and captured/supplied nested effects. Fixed finite20 scenarios; no full frame scheduler or native platform execution.'))
|
| 12 |
+
if __name__=='__main__':main()
|
scripts/qvm_assistance_oracle.py
CHANGED
|
@@ -58,3 +58,6 @@ def step(a,state):
|
|
| 58 |
if own[4]&8192 and own[5] and own[6]==j:clear(own);events.append(dict(op='publish',slot=2,event=105,param=0xffffffff))
|
| 59 |
return dict(clients=copy.deepcopy(clients),events=events,distances=distances,event_entity=list(state['event_entity']))
|
| 60 |
def full(a):return step(a,initial(a))
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
if own[4]&8192 and own[5] and own[6]==j:clear(own);events.append(dict(op='publish',slot=2,event=105,param=0xffffffff))
|
| 59 |
return dict(clients=copy.deepcopy(clients),events=events,distances=distances,event_entity=list(state['event_entity']))
|
| 60 |
def full(a):return step(a,initial(a))
|
| 61 |
+
|
| 62 |
+
def sequence(a):
|
| 63 |
+
state=initial(a);return dict(frames=[step(dict(a,tick=(a['tick']+offset)&0xffffffff),state) for offset in [0,100,200,2200,2300]])
|
scripts/qvm_assistance_support.py
CHANGED
|
@@ -134,3 +134,12 @@ def full_run(ins,m,b,a):
|
|
| 134 |
return m,dict(clients=full_view(m,a),events=events,distances=distances,event_entity=[m[ALLOC+168]&0xffffffff,m[ALLOC+424]&0xffffffff],execution=p['execution']),b
|
| 135 |
|
| 136 |
def full(ins,m,b,a):full_seed(m,b,a);return full_run(ins,m,b,a)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 134 |
return m,dict(clients=full_view(m,a),events=events,distances=distances,event_entity=[m[ALLOC+168]&0xffffffff,m[ALLOC+424]&0xffffffff],execution=p['execution']),b
|
| 135 |
|
| 136 |
def full(ins,m,b,a):full_seed(m,b,a);return full_run(ins,m,b,a)
|
| 137 |
+
|
| 138 |
+
def sequence_fixtures():return [a for a in full_fixtures() if a['profile'] in [0,1,2,11,12,23,25,26,28,29]]
|
| 139 |
+
def sequence(ins,m,b,a):
|
| 140 |
+
import hashlib
|
| 141 |
+
full_seed(m,b,a);frames=[];traces=[]
|
| 142 |
+
for offset in [0,100,200,2200,2300]:
|
| 143 |
+
tick=(a['tick']+offset)&0xffffffff;write_bytes(m,b,{34992532+k:(tick>>(8*k))&255 for k in range(4)})
|
| 144 |
+
m,p,b=full_run(ins,m,b,dict(a,tick=tick));traces.append(p.pop('execution'));frames.append(p)
|
| 145 |
+
return m,dict(frames=frames,execution=dict(stop=153417,trace_length=sum(p['trace_length'] for p in traces),trace_sha256=hashlib.sha256(''.join(p['trace_sha256'] for p in traces).encode()).hexdigest())),b
|
scripts/test_qvm_assist_sequence.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import json,unittest
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
from qvm_assistance_oracle import sequence
|
| 4 |
+
class OriginalTests(unittest.TestCase):
|
| 5 |
+
def test_original_contract(self):
|
| 6 |
+
rows=json.loads(Path('docs/research/qvm-assist-sequence.json').read_text())['probes'];self.assertEqual(len(rows),20)
|
| 7 |
+
for p in rows:
|
| 8 |
+
with self.subTest(input=p['input']):
|
| 9 |
+
for k,v in sequence(p['input']).items():self.assertEqual(p[k],v,k)
|
| 10 |
+
def test_fixture_identity_and_trace(self):
|
| 11 |
+
r=json.loads(Path('docs/research/qvm-assist-sequence.json').read_text());self.assertEqual(len(r['sha256']),64)
|
| 12 |
+
self.assertTrue(all(p['execution']['trace_length']>0 for p in r['probes']))
|
| 13 |
+
if __name__=='__main__':unittest.main()
|
xtask/checks.tsv
CHANGED
|
@@ -4099,3 +4099,7 @@ edge crates/urt-gameplay/src/bin/urt-move-callbacks.rs scripts/analyze_rust_assi
|
|
| 4099 |
edge crates/urt-gameplay/src/assistance.rs scripts/analyze_rust_assist_complete.py
|
| 4100 |
edge crates/urt-gameplay/src/bin/urt-assistance.rs scripts/analyze_rust_assist_complete.py
|
| 4101 |
edge crates/urt-gameplay/src/move_callbacks.rs scripts/analyze_rust_assist_complete.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4099 |
edge crates/urt-gameplay/src/assistance.rs scripts/analyze_rust_assist_complete.py
|
| 4100 |
edge crates/urt-gameplay/src/bin/urt-assistance.rs scripts/analyze_rust_assist_complete.py
|
| 4101 |
edge crates/urt-gameplay/src/move_callbacks.rs scripts/analyze_rust_assist_complete.py
|
| 4102 |
+
report scripts/analyze_qvm_assist_sequence.py docs/research/qvm-assist-sequence.json
|
| 4103 |
+
edge docs/research/qvm-assist-sequence.json scripts/test_qvm_assist_sequence.py
|
| 4104 |
+
group qvm-assist-sequence scripts/analyze_qvm_assist_sequence.py
|
| 4105 |
+
edge scripts/analyze_qvm_assist_sequence.py scripts/analyze_qvm_resumer_audit.py
|