qvm: connect health interception
Browse files- docs/ASSET_PIPELINE_TODO.md +3 -0
- docs/FINDINGS.md +3 -0
- docs/PROVISIONAL_TODO.md +3 -0
- docs/RESEARCH_LEDGER.md +7 -0
- docs/REVERSE_ENGINEERING_TODO.md +3 -0
- docs/research/QVM_HEALTH_MODE10.md +7 -0
- docs/research/README.md +3 -0
- docs/research/qvm-health-mode10.json +0 -0
- scripts/analyze_qvm_health_mode10.py +18 -0
- scripts/qvm_health_effects_support.py +8 -4
- scripts/test_qvm_health_mode10.py +19 -0
- xtask/checks.tsv +3 -0
docs/ASSET_PIPELINE_TODO.md
CHANGED
|
@@ -889,3 +889,6 @@ Research progress: RE-740 [report](research/QVM_MODE10_SCORING.md); original ass
|
|
| 889 |
|
| 890 |
|
| 891 |
Research progress: RE-741 [report](research/QVM_MODE10_COMPLETE.md); original assets unchanged.
|
|
|
|
|
|
|
|
|
|
|
|
| 889 |
|
| 890 |
|
| 891 |
Research progress: RE-741 [report](research/QVM_MODE10_COMPLETE.md); original assets unchanged.
|
| 892 |
+
|
| 893 |
+
|
| 894 |
+
Research progress: RE-742 [report](research/QVM_HEALTH_MODE10.md); original assets unchanged.
|
docs/FINDINGS.md
CHANGED
|
@@ -1235,3 +1235,6 @@ RE-725–734 batch: [health, contact and Rust impulse findings](research/QVM_HEA
|
|
| 1235 |
|
| 1236 |
|
| 1237 |
**RE-741 — Complete mode10 interception source composition:** Complete206128 now composes entry gates, protected publication, descriptor dispatch, cleanup, obituary, counters and penalty requests across56 fixtures. [Evidence](research/QVM_MODE10_COMPLETE.md).
|
|
|
|
|
|
|
|
|
|
|
|
| 1235 |
|
| 1236 |
|
| 1237 |
**RE-741 — Complete mode10 interception source composition:** Complete206128 now composes entry gates, protected publication, descriptor dispatch, cleanup, obituary, counters and penalty requests across56 fixtures. [Evidence](research/QVM_MODE10_COMPLETE.md).
|
| 1238 |
+
|
| 1239 |
+
|
| 1240 |
+
**RE-742 — Actual lethal health suffix to complete mode10 interception:** The health lethal-decision suffix now executes actual206128; a blocked round still consumes the lethal intercept without ordinary subtraction. [Evidence](research/QVM_HEALTH_MODE10.md).
|
docs/PROVISIONAL_TODO.md
CHANGED
|
@@ -1224,3 +1224,6 @@ Research progress: RE-740 [report](research/QVM_MODE10_SCORING.md); full native/
|
|
| 1224 |
|
| 1225 |
|
| 1226 |
Research progress: RE-741 [report](research/QVM_MODE10_COMPLETE.md); full native/platform/game scope remains open.
|
|
|
|
|
|
|
|
|
|
|
|
| 1224 |
|
| 1225 |
|
| 1226 |
Research progress: RE-741 [report](research/QVM_MODE10_COMPLETE.md); full native/platform/game scope remains open.
|
| 1227 |
+
|
| 1228 |
+
|
| 1229 |
+
Research progress: RE-742 [report](research/QVM_HEALTH_MODE10.md); full native/platform/game scope remains open.
|
docs/RESEARCH_LEDGER.md
CHANGED
|
@@ -1351,3 +1351,10 @@ Interception increments victim/team counters, requests score+1 and same-team -2,
|
|
| 1351 |
## 2026-10-21 — RE-741 Complete mode10 interception source composition
|
| 1352 |
|
| 1353 |
Complete206128 now composes entry gates, protected publication, descriptor dispatch, cleanup, obituary, counters and penalty requests across56 fixtures. Focused `cargo xtask test-group mode10-complete` passes (3 Python tests); selected reports regenerate twice byte-identically, with storage, links and whitespace guards. New report: 547965 bytes. Full-suite validation is deferred to the tenth batch commit. No original assets, Rust runtime or shared VM evaluator changed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1351 |
## 2026-10-21 — RE-741 Complete mode10 interception source composition
|
| 1352 |
|
| 1353 |
Complete206128 now composes entry gates, protected publication, descriptor dispatch, cleanup, obituary, counters and penalty requests across56 fixtures. Focused `cargo xtask test-group mode10-complete` passes (3 Python tests); selected reports regenerate twice byte-identically, with storage, links and whitespace guards. New report: 547965 bytes. Full-suite validation is deferred to the tenth batch commit. No original assets, Rust runtime or shared VM evaluator changed.
|
| 1354 |
+
|
| 1355 |
+
|
| 1356 |
+
## 2026-10-21 — RE-742 Actual lethal health suffix to complete mode10 interception
|
| 1357 |
+
|
| 1358 |
+
The health lethal-decision suffix now executes actual206128; a blocked round still consumes the lethal intercept without ordinary subtraction. Focused `cargo xtask test-group health-mode10` passes (3 Python tests); selected reports regenerate twice byte-identically, with storage, links and whitespace guards. New report: 456558 bytes. Full-suite validation is deferred to the tenth batch commit. Optional actual interception resolver added; prior default reports must remain byte-identical. Original assets and shared VM evaluator unchanged.
|
| 1359 |
+
|
| 1360 |
+
Additional RE-742 focused health regression: `cargo xtask test-group health` passes71 Python tests and deterministic affected report regeneration; all prior tracked reports remain unchanged.
|
docs/REVERSE_ENGINEERING_TODO.md
CHANGED
|
@@ -1267,3 +1267,6 @@ Purpose: turn the supplied installation into an evidence-backed specification of
|
|
| 1267 |
|
| 1268 |
|
| 1269 |
- [x] RE-741 Complete mode10 interception source composition ([report](research/QVM_MODE10_COMPLETE.md)).
|
|
|
|
|
|
|
|
|
|
|
|
| 1267 |
|
| 1268 |
|
| 1269 |
- [x] RE-741 Complete mode10 interception source composition ([report](research/QVM_MODE10_COMPLETE.md)).
|
| 1270 |
+
|
| 1271 |
+
|
| 1272 |
+
- [x] RE-742 Actual lethal health suffix to complete mode10 interception ([report](research/QVM_HEALTH_MODE10.md)).
|
docs/research/QVM_HEALTH_MODE10.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Actual lethal health suffix to complete mode10 interception
|
| 2 |
+
|
| 3 |
+
RE-742. Reproduce with `python3 scripts/analyze_qvm_health_mode10.py`; validate with `cargo xtask test-group health-mode10`. See the [machine report](qvm-health-mode10.json).
|
| 4 |
+
|
| 5 |
+
Composed212479..213006 with complete206128 and actual213009 over48 fixtures around equality, method6 exclusion, mode and round gates. Independent composed state/event/request oracles verify the child; ordinary subtraction remains checked on nonintercepting paths. The existing default captured handler stays compatible with prior reports. Earlier health gates/credit, child-native parity and actual score/lifecycle callback internals 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
|
@@ -825,3 +825,6 @@ The extension collector adds five focused tests for native tail calls, command-r
|
|
| 825 |
|
| 826 |
|
| 827 |
[RE-741: Complete mode10 interception source composition](QVM_MODE10_COMPLETE.md).
|
|
|
|
|
|
|
|
|
|
|
|
| 825 |
|
| 826 |
|
| 827 |
[RE-741: Complete mode10 interception source composition](QVM_MODE10_COMPLETE.md).
|
| 828 |
+
|
| 829 |
+
|
| 830 |
+
[RE-742: Actual lethal health suffix to complete mode10 interception](QVM_HEALTH_MODE10.md).
|
docs/research/qvm-health-mode10.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
scripts/analyze_qvm_health_mode10.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Health lethal-decision suffix with actual206128 interception child."""
|
| 3 |
+
import itertools
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
from qvm_research_support import source
|
| 6 |
+
from qvm_health_effects_support import seed as health_seed,run
|
| 7 |
+
from qvm_lifecycle_support import seed as lifecycle_seed,A_CLIENT,TARGET,ATTACKER
|
| 8 |
+
from analyze_qvm_health_impulse import impulse
|
| 9 |
+
from analyze_qvm_mode10_complete import intercept
|
| 10 |
+
from analyze_qvm import write_json
|
| 11 |
+
|
| 12 |
+
def main():
|
| 13 |
+
q,raw,h,ins=source();rows=[]
|
| 14 |
+
for mode,health,damage,method,blocked in itertools.product([3,10],[99,100],[99,100],[6,12,34],[0,1]):
|
| 15 |
+
a=dict(mode=mode,health=health,damage=damage,method=method,blocked=blocked);m={**lifecycle_seed(raw,h,**a),**health_seed(raw,h,**a)};m.update({34992532:10000,34087532:1,34075396:3,A_CLIENT+3096:1,TARGET+168:65,ATTACKER+168:7})
|
| 16 |
+
_,p=run(ins,m,212479,213007,impulse_resolver=impulse,intercept_resolver=intercept);p['input']=a;rows.append(p)
|
| 17 |
+
write_json(Path('docs/research/qvm-health-mode10.json'),{'source':q['source'],'sha256':q['sha256'],'probes':rows,'limits':'Actual212479 lethal decision through health211239 suffix with actual206128 and213009. Earlier damage gates/credit not rerun; lifecycle allocations and unresolved child effects remain explicit stand-ins. Original runtime parity open.'})
|
| 18 |
+
if __name__=='__main__':main()
|
scripts/qvm_health_effects_support.py
CHANGED
|
@@ -31,7 +31,7 @@ def state(m,target=TARGET):
|
|
| 31 |
client=m[target+520]
|
| 32 |
return {'entity':{str(o):m[target+o]&0xffffffff for o in ENTITY_FIELDS},'client':{str(o):m[client+o]&0xffffffff for o in CLIENT_FIELDS} if client else None,'attacker_credits':m.get(m.get(m.get(H+124,ATTACKER)+520,0)+252,0)&0xffffffff,'direction':[m[(m[H+128] or DIRECTION)+4*j]&0xffffffff for j in range(3)],'args':{str(o):m[H+o]&0xffffffff for o in [120,124,128,136,140,144,148]},'selected_damage':m[H+40]&0xffffffff,'knockback_word':m[H+32]&0xffffffff,'rng':m[21044]&0xffffffff}
|
| 33 |
|
| 34 |
-
def handlers(effects,impulse_resolver=None):
|
| 35 |
def root(i,m,a):v=word(math.sqrt(number(a[8])));return m,v,{'input_word':a[8]&0xffffffff,'result_word':v,'native_math_modeled':True}
|
| 36 |
def rng(i,m,a):m,r=random_word(i,m);return m,r['result'],r
|
| 37 |
def meter(i,m,a):
|
|
@@ -39,9 +39,13 @@ def handlers(effects,impulse_resolver=None):
|
|
| 39 |
def impulse(i,m,a):
|
| 40 |
if impulse_resolver:return impulse_resolver(i,m,a)
|
| 41 |
return captured(213009,effects['impulses'])(i,m,a)
|
| 42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
-
def run(ins,m,start,boundary,impulse_resolver=None,target=TARGET):
|
| 45 |
before=state(m,target);effects={k:[] for k in ['callbacks','intercepts','protected_updates','impulses']}
|
| 46 |
-
m,e=resume(ins,start,213007,m,H,handlers=handlers(effects,impulse_resolver),boundaries=[] if boundary==213007 else [boundary],limit=50000)
|
| 47 |
return m,{'initial':before,'final':state(m,target),'effects':effects,'execution':e}
|
|
|
|
| 31 |
client=m[target+520]
|
| 32 |
return {'entity':{str(o):m[target+o]&0xffffffff for o in ENTITY_FIELDS},'client':{str(o):m[client+o]&0xffffffff for o in CLIENT_FIELDS} if client else None,'attacker_credits':m.get(m.get(m.get(H+124,ATTACKER)+520,0)+252,0)&0xffffffff,'direction':[m[(m[H+128] or DIRECTION)+4*j]&0xffffffff for j in range(3)],'args':{str(o):m[H+o]&0xffffffff for o in [120,124,128,136,140,144,148]},'selected_damage':m[H+40]&0xffffffff,'knockback_word':m[H+32]&0xffffffff,'rng':m[21044]&0xffffffff}
|
| 33 |
|
| 34 |
+
def handlers(effects,impulse_resolver=None,intercept_resolver=None):
|
| 35 |
def root(i,m,a):v=word(math.sqrt(number(a[8])));return m,v,{'input_word':a[8]&0xffffffff,'result_word':v,'native_math_modeled':True}
|
| 36 |
def rng(i,m,a):m,r=random_word(i,m);return m,r['result'],r
|
| 37 |
def meter(i,m,a):
|
|
|
|
| 39 |
def impulse(i,m,a):
|
| 40 |
if impulse_resolver:return impulse_resolver(i,m,a)
|
| 41 |
return captured(213009,effects['impulses'])(i,m,a)
|
| 42 |
+
def intercepted(i,m,a):
|
| 43 |
+
if intercept_resolver:
|
| 44 |
+
m,value,r=intercept_resolver(i,m,a);effects['intercepts'].append({'arguments':a,'execution':r});return m,value,r
|
| 45 |
+
return captured(206128,effects['intercepts'])(i,m,a)
|
| 46 |
+
return {-107:root,33715:predicate,36717:rng,211197:meter,213009:impulse,206128:intercepted,152386:captured(152386,effects['protected_updates']),CALLBACK:captured(CALLBACK,effects['callbacks']),PAIN:captured(PAIN,effects['callbacks']),DEATH:captured(DEATH,effects['callbacks'])}
|
| 47 |
|
| 48 |
+
def run(ins,m,start,boundary,impulse_resolver=None,target=TARGET,intercept_resolver=None):
|
| 49 |
before=state(m,target);effects={k:[] for k in ['callbacks','intercepts','protected_updates','impulses']}
|
| 50 |
+
m,e=resume(ins,start,213007,m,H,handlers=handlers(effects,impulse_resolver,intercept_resolver),boundaries=[] if boundary==213007 else [boundary],limit=50000)
|
| 51 |
return m,{'initial':before,'final':state(m,target),'effects':effects,'execution':e}
|
scripts/test_qvm_health_mode10.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import json,unittest
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
from test_qvm_mode10_complete import complete_expected
|
| 4 |
+
class HealthMode10Tests(unittest.TestCase):
|
| 5 |
+
@classmethod
|
| 6 |
+
def setUpClass(cls):cls.ps=json.loads(Path('docs/research/qvm-health-mode10.json').read_text())['probes']
|
| 7 |
+
def test_lethal_decision_and_child_state_oracle(self):
|
| 8 |
+
for p in self.ps:
|
| 9 |
+
a=p['input'];selected=a['mode']==10 and a['health']-a['damage']<=0 and a['method']!=6;calls=p['effects']['intercepts'];self.assertEqual(len(calls),int(selected),a)
|
| 10 |
+
if selected:
|
| 11 |
+
child=calls[0]['execution'];r,targets=complete_expected({**child,'input':a},(0,0));self.assertEqual(child['final'],r);self.assertEqual([c['target'] for c in child['effects']['requests']],targets)
|
| 12 |
+
def test_interception_short_circuits_even_when_child_round_gate_blocks(self):
|
| 13 |
+
for p in self.ps:
|
| 14 |
+
a=p['input'];selected=bool(p['effects']['intercepts']);health=(a['health'] if a['blocked'] else 50) if selected else a['health']-a['damage'];self.assertEqual(p['final']['entity']['684'],health&0xffffffff,a)
|
| 15 |
+
if selected:self.assertEqual(p['effects']['impulses'],[]);self.assertEqual(p['effects']['callbacks'],[])
|
| 16 |
+
def test_exact_root_exit_and_domain(self):
|
| 17 |
+
self.assertEqual(len(self.ps),48)
|
| 18 |
+
for p in self.ps:self.assertEqual(p['execution']['stop'],213007)
|
| 19 |
+
if __name__=='__main__':unittest.main()
|
xtask/checks.tsv
CHANGED
|
@@ -1188,3 +1188,6 @@ group mode10-scoring scripts/analyze_qvm_mode10_scoring.py
|
|
| 1188 |
report scripts/analyze_qvm_mode10_complete.py docs/research/qvm-mode10-complete.json
|
| 1189 |
edge docs/research/qvm-mode10-complete.json scripts/test_qvm_mode10_complete.py
|
| 1190 |
group mode10-complete scripts/analyze_qvm_mode10_complete.py
|
|
|
|
|
|
|
|
|
|
|
|
| 1188 |
report scripts/analyze_qvm_mode10_complete.py docs/research/qvm-mode10-complete.json
|
| 1189 |
edge docs/research/qvm-mode10-complete.json scripts/test_qvm_mode10_complete.py
|
| 1190 |
group mode10-complete scripts/analyze_qvm_mode10_complete.py
|
| 1191 |
+
report scripts/analyze_qvm_health_mode10.py docs/research/qvm-health-mode10.json
|
| 1192 |
+
edge docs/research/qvm-health-mode10.json scripts/test_qvm_health_mode10.py
|
| 1193 |
+
group health-mode10 scripts/analyze_qvm_health_mode10.py
|