qvm: recover repeated bomb defuse 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_DEFUSE_SEQUENCE.md +5 -0
- docs/research/README.md +2 -0
- docs/research/qvm-defuse-sequence.json +0 -0
- scripts/analyze_qvm_defuse_sequence.py +12 -0
- scripts/qvm_defuse_oracle.py +13 -1
- scripts/qvm_defuse_support.py +14 -0
- scripts/test_qvm_defuse_sequence.py +13 -0
- xtask/checks.tsv +4 -0
docs/FINDINGS.md
CHANGED
|
@@ -1981,3 +1981,5 @@ RE-1019: Rust matches32 active source completion cases with signed wrapped elaps
|
|
| 1981 |
RE-1020: Ninety-six source scenarios connect original admission/teammate scan to actual276433 bomb hash lookup and65655 distance, then start/wait/cancel/complete transitions. Three selectors, radius75 equality, zero/64 teammate counts, inactive/classless/hash-mismatched decoys, wrapped time, completed latch and missing bomb are covered. Missing lookup stops before original2319 fatal handler. Native sqrt is modeled; event/native effect feedback is captured or supplied, not executed. [Evidence](research/QVM_DEFUSE_COMPLETE.md).
|
| 1982 |
|
| 1983 |
RE-1021: Rust composes verified eligibility, first eligible bomb hash lookup, finite f32 distance and start/cancel/finish across96 source cases. Missing bomb returns the source fatal boundary diagnostic without inventing subsequent behavior. Radius equality does not start defusing; decoy identity and selector semantics match source. State and effect plans stage before commit, with missing/invalid geometry unit tests preserving prior state. Native effects remain captured plans. [Evidence](research/RUST_DEFUSE_COMPLETE.md).
|
|
|
|
|
|
|
|
|
| 1981 |
RE-1020: Ninety-six source scenarios connect original admission/teammate scan to actual276433 bomb hash lookup and65655 distance, then start/wait/cancel/complete transitions. Three selectors, radius75 equality, zero/64 teammate counts, inactive/classless/hash-mismatched decoys, wrapped time, completed latch and missing bomb are covered. Missing lookup stops before original2319 fatal handler. Native sqrt is modeled; event/native effect feedback is captured or supplied, not executed. [Evidence](research/QVM_DEFUSE_COMPLETE.md).
|
| 1982 |
|
| 1983 |
RE-1021: Rust composes verified eligibility, first eligible bomb hash lookup, finite f32 distance and start/cancel/finish across96 source cases. Missing bomb returns the source fatal boundary diagnostic without inventing subsequent behavior. Radius equality does not start defusing; decoy identity and selector semantics match source. State and effect plans stage before commit, with missing/invalid geometry unit tests preserving prior state. Native effects remain captured plans. [Evidence](research/RUST_DEFUSE_COMPLETE.md).
|
| 1984 |
+
|
| 1985 |
+
RE-1022: Thirty coherent source scenarios replay up to five complete callbacks, producing138 snapshots. Scripted motion, held-button changes and teammate release test cancellation/restart; shared state persists through waiting and exact completion. Completed latch prevents repeated allocation/log/award. Missing-bomb boundary stops after one call. Actual lookup/distance bodies execute, while native effect feedback and scheduling remain modeled/captured inputs. [Evidence](research/QVM_DEFUSE_SEQUENCE.md).
|
docs/PROVISIONAL_TODO.md
CHANGED
|
@@ -2040,3 +2040,5 @@ RE-974–983 completed routing, command rewrite, inactivity, movement-parameter
|
|
| 2040 |
- [x] RE-1020 Recover complete mode8 bomb-defuse callback ([evidence](research/QVM_DEFUSE_COMPLETE.md)).
|
| 2041 |
|
| 2042 |
- [x] RE-1021 Port complete bomb-defuse lookup and state policy ([evidence](research/RUST_DEFUSE_COMPLETE.md)).
|
|
|
|
|
|
|
|
|
| 2040 |
- [x] RE-1020 Recover complete mode8 bomb-defuse callback ([evidence](research/QVM_DEFUSE_COMPLETE.md)).
|
| 2041 |
|
| 2042 |
- [x] RE-1021 Port complete bomb-defuse lookup and state policy ([evidence](research/RUST_DEFUSE_COMPLETE.md)).
|
| 2043 |
+
|
| 2044 |
+
- [x] RE-1022 Recover bomb-defuse sequences and completion latching ([evidence](research/QVM_DEFUSE_SEQUENCE.md)).
|
docs/RESEARCH_LEDGER.md
CHANGED
|
@@ -2759,3 +2759,7 @@ Ninety-six source scenarios connect original admission/teammate scan to actual27
|
|
| 2759 |
## 2026-10-29 — RE-1021 Port complete bomb-defuse lookup and state policy
|
| 2760 |
|
| 2761 |
Rust composes verified eligibility, first eligible bomb hash lookup, finite f32 distance and start/cancel/finish across96 source cases. Missing bomb returns the source fatal boundary diagnostic without inventing subsequent behavior. Radius equality does not start defusing; decoy identity and selector semantics match source. State and effect plans stage before commit, with missing/invalid geometry unit tests preserving prior state. Native effects remain captured plans. Focused `cargo xtask test-group rust-defuse-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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2759 |
## 2026-10-29 — RE-1021 Port complete bomb-defuse lookup and state policy
|
| 2760 |
|
| 2761 |
Rust composes verified eligibility, first eligible bomb hash lookup, finite f32 distance and start/cancel/finish across96 source cases. Missing bomb returns the source fatal boundary diagnostic without inventing subsequent behavior. Radius equality does not start defusing; decoy identity and selector semantics match source. State and effect plans stage before commit, with missing/invalid geometry unit tests preserving prior state. Native effects remain captured plans. Focused `cargo xtask test-group rust-defuse-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.
|
| 2762 |
+
|
| 2763 |
+
## 2026-10-29 — RE-1022 Recover bomb-defuse sequences and completion latching
|
| 2764 |
+
|
| 2765 |
+
Thirty coherent source scenarios replay up to five complete callbacks, producing138 snapshots. Scripted motion, held-button changes and teammate release test cancellation/restart; shared state persists through waiting and exact completion. Completed latch prevents repeated allocation/log/award. Missing-bomb boundary stops after one call. Actual lookup/distance bodies execute, while native effect feedback and scheduling remain modeled/captured inputs. Focused `cargo xtask test-group qvm-defuse-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
|
@@ -2077,3 +2077,5 @@ RE-974–983 recover routing, command rewriting, inactivity and composed setup t
|
|
| 2077 |
- [x] RE-1020 Recover complete mode8 bomb-defuse callback ([evidence](research/QVM_DEFUSE_COMPLETE.md)).
|
| 2078 |
|
| 2079 |
- [x] RE-1021 Port complete bomb-defuse lookup and state policy ([evidence](research/RUST_DEFUSE_COMPLETE.md)).
|
|
|
|
|
|
|
|
|
| 2077 |
- [x] RE-1020 Recover complete mode8 bomb-defuse callback ([evidence](research/QVM_DEFUSE_COMPLETE.md)).
|
| 2078 |
|
| 2079 |
- [x] RE-1021 Port complete bomb-defuse lookup and state policy ([evidence](research/RUST_DEFUSE_COMPLETE.md)).
|
| 2080 |
+
|
| 2081 |
+
- [x] RE-1022 Recover bomb-defuse sequences and completion latching ([evidence](research/QVM_DEFUSE_SEQUENCE.md)).
|
docs/research/QVM_DEFUSE_SEQUENCE.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Recover bomb-defuse sequences and completion latching
|
| 2 |
+
|
| 3 |
+
RE-1022. Focused validation: `cargo xtask test-group qvm-defuse-sequence`. [Machine report](qvm-defuse-sequence.json).
|
| 4 |
+
|
| 5 |
+
Thirty coherent source scenarios replay up to five complete callbacks, producing138 snapshots. Scripted motion, held-button changes and teammate release test cancellation/restart; shared state persists through waiting and exact completion. Completed latch prevents repeated allocation/log/award. Missing-bomb boundary stops after one call. Actual lookup/distance bodies execute, while native effect feedback and scheduling remain modeled/captured inputs.
|
docs/research/README.md
CHANGED
|
@@ -1609,3 +1609,5 @@ The extension collector adds five focused tests for native tail calls, command-r
|
|
| 1609 |
- [RE-1020: Recover complete mode8 bomb-defuse callback](QVM_DEFUSE_COMPLETE.md).
|
| 1610 |
|
| 1611 |
- [RE-1021: Port complete bomb-defuse lookup and state policy](RUST_DEFUSE_COMPLETE.md).
|
|
|
|
|
|
|
|
|
| 1609 |
- [RE-1020: Recover complete mode8 bomb-defuse callback](QVM_DEFUSE_COMPLETE.md).
|
| 1610 |
|
| 1611 |
- [RE-1021: Port complete bomb-defuse lookup and state policy](RUST_DEFUSE_COMPLETE.md).
|
| 1612 |
+
|
| 1613 |
+
- [RE-1022: Recover bomb-defuse sequences and completion latching](QVM_DEFUSE_SEQUENCE.md).
|
docs/research/qvm-defuse-sequence.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
scripts/analyze_qvm_defuse_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_defuse_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-defuse-sequence.json'),dict(source=q['source'],sha256=q['sha256'],probes=probes,limits='Up to five actual153419 calls with coherent state, actual hash/distance children, scripted button/motion/teammate updates and captured/supplied native effects. Missing-bomb fatal boundary stops replay; no scheduler/native runtime conformance.'))
|
| 12 |
+
if __name__=='__main__':main()
|
scripts/qvm_defuse_oracle.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
"""Independent expectations for source mode8 objective transitions."""
|
| 2 |
from qvm_move_callbacks_oracle import signed
|
| 3 |
|
| 4 |
-
def initial(a):return {**{k:a[k] for k in ['flags','flags104','busy','clock','complete','animation','weapon']},'event':[7,0x80000001],'guards':[0xaabbccdd,0x11223344]}
|
| 5 |
def begin(a):
|
| 6 |
out=initial(a)
|
| 7 |
if a['flags']&32:out['flags']&=~96;out['animation']=2
|
|
@@ -31,3 +31,15 @@ def full(a):
|
|
| 31 |
elif a['busy']:out.update(finish(a))
|
| 32 |
else:out.update(begin(a))
|
| 33 |
return out
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
"""Independent expectations for source mode8 objective transitions."""
|
| 2 |
from qvm_move_callbacks_oracle import signed
|
| 3 |
|
| 4 |
+
def initial(a):return {**{k:a[k] for k in ['flags','flags104','busy','clock','complete','animation','weapon']},'event':list(a.get('event',[7,0x80000001])),'guards':[0xaabbccdd,0x11223344]}
|
| 5 |
def begin(a):
|
| 6 |
out=initial(a)
|
| 7 |
if a['flags']&32:out['flags']&=~96;out['animation']=2
|
|
|
|
| 31 |
elif a['busy']:out.update(finish(a))
|
| 32 |
else:out.update(begin(a))
|
| 33 |
return out
|
| 34 |
+
|
| 35 |
+
def sequence(a):
|
| 36 |
+
import copy
|
| 37 |
+
current=copy.deepcopy(a);state=initial(a);frames=[]
|
| 38 |
+
for index,offset in enumerate([0,1000,2000,5000,6000]):
|
| 39 |
+
current.update({k:copy.deepcopy(state[k]) for k in ['flags','flags104','busy','clock','complete','animation','weapon','event']});current['tick']=(a['tick']+offset)&0xffffffff
|
| 40 |
+
if index==1 and a['profile']==3:current['distance']=10.
|
| 41 |
+
if index==1 and a['profile']==5:current['flags']|=32768
|
| 42 |
+
if index==1 and a['profile']==16:current['other_busy']=0
|
| 43 |
+
state=full(current);frames.append(state)
|
| 44 |
+
if state['missing']:break
|
| 45 |
+
return dict(frames=frames)
|
scripts/qvm_defuse_support.py
CHANGED
|
@@ -120,3 +120,17 @@ def full_run(ins,m,b,a):
|
|
| 120 |
m,p=resume(ins,153420,154088,m,BASE,boundaries=(153612,154087),handlers={**handlers(events),276433:lookup,65655:distance},byte_inputs=b,repeated_calls=True,sync_child_words=True,coherent_memory=True,byte_handlers=True,capture_byte_memory=True,limit=32768)
|
| 121 |
return m,dict(**view(m,a),events=events,lookups=lookups,distances=distances,missing=p['stop']==153612,execution={k:p[k] for k in ['stop','trace_length','trace_sha256']}),p['byte_memory']
|
| 122 |
def full(ins,m,b,a):full_seed(m,b,a);return full_run(ins,m,b,a)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 120 |
m,p=resume(ins,153420,154088,m,BASE,boundaries=(153612,154087),handlers={**handlers(events),276433:lookup,65655:distance},byte_inputs=b,repeated_calls=True,sync_child_words=True,coherent_memory=True,byte_handlers=True,capture_byte_memory=True,limit=32768)
|
| 121 |
return m,dict(**view(m,a),events=events,lookups=lookups,distances=distances,missing=p['stop']==153612,execution={k:p[k] for k in ['stop','trace_length','trace_sha256']}),p['byte_memory']
|
| 122 |
def full(ins,m,b,a):full_seed(m,b,a);return full_run(ins,m,b,a)
|
| 123 |
+
|
| 124 |
+
def sequence_fixtures():return [a for a in full_fixtures() if a['profile'] in [0,1,2,3,5,16,23,26,27,29]]
|
| 125 |
+
def sequence(ins,m,b,a):
|
| 126 |
+
import hashlib
|
| 127 |
+
full_seed(m,b,a);frames=[];traces=[]
|
| 128 |
+
def store(address,value):write_bytes(m,b,{address+k:(value>>(8*k))&255 for k in range(4)})
|
| 129 |
+
for index,offset in enumerate([0,1000,2000,5000,6000]):
|
| 130 |
+
tick=(a['tick']+offset)&0xffffffff;store(34992532,tick)
|
| 131 |
+
if index==1 and a['profile']==3:store(BOMB+24,word(10.))
|
| 132 |
+
if index==1 and a['profile']==5:store(CLIENT+220,(m[CLIENT+220]&0xffffffff)|32768)
|
| 133 |
+
if index==1 and a['profile']==16:store(CPOOL+6336*a['busy_slot']+6164,0)
|
| 134 |
+
m,p,b=full_run(ins,m,b,dict(a,tick=tick));traces.append(p.pop('execution'));frames.append(p)
|
| 135 |
+
if p['missing']:break
|
| 136 |
+
return m,dict(frames=frames,execution=dict(stop=traces[-1]['stop'],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_defuse_sequence.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import json,unittest
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
from qvm_defuse_oracle import sequence
|
| 4 |
+
class OriginalTests(unittest.TestCase):
|
| 5 |
+
def test_original_contract(self):
|
| 6 |
+
rows=json.loads(Path('docs/research/qvm-defuse-sequence.json').read_text())['probes'];self.assertEqual(len(rows),30)
|
| 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-defuse-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
|
@@ -4278,3 +4278,7 @@ edge crates/urt-gameplay/src/move_callbacks.rs scripts/analyze_rust_defuse_compl
|
|
| 4278 |
edge crates/urt-gameplay/src/defuse.rs scripts/analyze_rust_defuse_complete.py
|
| 4279 |
edge crates/urt-gameplay/src/bin/urt-defuse.rs scripts/analyze_rust_defuse_complete.py
|
| 4280 |
edge crates/urt-gameplay/src/move_callbacks.rs scripts/analyze_rust_defuse_complete.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4278 |
edge crates/urt-gameplay/src/defuse.rs scripts/analyze_rust_defuse_complete.py
|
| 4279 |
edge crates/urt-gameplay/src/bin/urt-defuse.rs scripts/analyze_rust_defuse_complete.py
|
| 4280 |
edge crates/urt-gameplay/src/move_callbacks.rs scripts/analyze_rust_defuse_complete.py
|
| 4281 |
+
report scripts/analyze_qvm_defuse_sequence.py docs/research/qvm-defuse-sequence.json
|
| 4282 |
+
edge docs/research/qvm-defuse-sequence.json scripts/test_qvm_defuse_sequence.py
|
| 4283 |
+
group qvm-defuse-sequence scripts/analyze_qvm_defuse_sequence.py
|
| 4284 |
+
edge scripts/analyze_qvm_defuse_sequence.py scripts/analyze_qvm_resumer_audit.py
|