qvm: special target health classes
Browse files- docs/ASSET_PIPELINE_TODO.md +3 -0
- docs/FINDINGS.md +3 -0
- docs/PROVISIONAL_TODO.md +3 -0
- docs/RESEARCH_LEDGER.md +5 -0
- docs/REVERSE_ENGINEERING_TODO.md +3 -0
- docs/research/QVM_HEALTH_SPECIAL_TARGET.md +7 -0
- docs/research/README.md +3 -0
- docs/research/qvm-health-special-target.json +0 -0
- scripts/analyze_qvm_health_special_target.py +17 -0
- scripts/test_qvm_health_special_target.py +36 -0
- xtask/checks.tsv +2 -0
docs/ASSET_PIPELINE_TODO.md
CHANGED
|
@@ -844,3 +844,6 @@ Research progress: RE-725 [report](research/QVM_HEALTH_ROUTING.md); original ass
|
|
| 844 |
|
| 845 |
|
| 846 |
Research progress: RE-726 [report](research/QVM_HEALTH_CREDIT.md); original assets unchanged.
|
|
|
|
|
|
|
|
|
|
|
|
| 844 |
|
| 845 |
|
| 846 |
Research progress: RE-726 [report](research/QVM_HEALTH_CREDIT.md); original assets unchanged.
|
| 847 |
+
|
| 848 |
+
|
| 849 |
+
Research progress: RE-727 [report](research/QVM_HEALTH_SPECIAL_TARGET.md); original assets unchanged.
|
docs/FINDINGS.md
CHANGED
|
@@ -1190,3 +1190,6 @@ RE-714–723 batch complete: [complete contact and health prefixes](research/QVM
|
|
| 1190 |
|
| 1191 |
|
| 1192 |
**RE-726 — Health attacker credit and client damage records:** Health bookkeeping adjusts attacker client252, clamps incoming integer damage to at least1 and publishes per-client damage, direction/origin, attacker and method fields before health subtraction. [Evidence](research/QVM_HEALTH_CREDIT.md).
|
|
|
|
|
|
|
|
|
|
|
|
| 1190 |
|
| 1191 |
|
| 1192 |
**RE-726 — Health attacker credit and client damage records:** Health bookkeeping adjusts attacker client252, clamps incoming integer damage to at least1 and publishes per-client damage, direction/origin, attacker and method fields before health subtraction. [Evidence](research/QVM_HEALTH_CREDIT.md).
|
| 1193 |
+
|
| 1194 |
+
|
| 1195 |
+
**RE-727 — Special target health classes and actual RNG:** The magic checksum routes method34 directly to health−999; class0–4 can choose1/2/3 damage through actual36717, while classes5–10 filter methods22/25 and selected classes halve method25 damage. [Evidence](research/QVM_HEALTH_SPECIAL_TARGET.md).
|
docs/PROVISIONAL_TODO.md
CHANGED
|
@@ -1179,3 +1179,6 @@ Research progress: RE-725 [report](research/QVM_HEALTH_ROUTING.md); full native/
|
|
| 1179 |
|
| 1180 |
|
| 1181 |
Research progress: RE-726 [report](research/QVM_HEALTH_CREDIT.md); full native/platform/game scope remains open.
|
|
|
|
|
|
|
|
|
|
|
|
| 1179 |
|
| 1180 |
|
| 1181 |
Research progress: RE-726 [report](research/QVM_HEALTH_CREDIT.md); full native/platform/game scope remains open.
|
| 1182 |
+
|
| 1183 |
+
|
| 1184 |
+
Research progress: RE-727 [report](research/QVM_HEALTH_SPECIAL_TARGET.md); full native/platform/game scope remains open.
|
docs/RESEARCH_LEDGER.md
CHANGED
|
@@ -1273,3 +1273,8 @@ Null inflictor/attacker become world34990728; target kind4 with a nonmagic check
|
|
| 1273 |
## 2026-10-21 — RE-726 Health attacker credit and client damage records
|
| 1274 |
|
| 1275 |
Health bookkeeping adjusts attacker client252, clamps incoming integer damage to at least1 and publishes per-client damage, direction/origin, attacker and method fields before health subtraction. Focused `cargo xtask test-group health` passes (16 Python tests); selected reports regenerate twice byte-identically, with storage, links and whitespace guards. New report: 735718 bytes. Full-suite validation is deferred to the tenth batch commit. No original assets, Rust runtime or shared VM evaluator changed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1273 |
## 2026-10-21 — RE-726 Health attacker credit and client damage records
|
| 1274 |
|
| 1275 |
Health bookkeeping adjusts attacker client252, clamps incoming integer damage to at least1 and publishes per-client damage, direction/origin, attacker and method fields before health subtraction. Focused `cargo xtask test-group health` passes (16 Python tests); selected reports regenerate twice byte-identically, with storage, links and whitespace guards. New report: 735718 bytes. Full-suite validation is deferred to the tenth batch commit. No original assets, Rust runtime or shared VM evaluator changed.
|
| 1276 |
+
|
| 1277 |
+
|
| 1278 |
+
## 2026-10-21 — RE-727 Special target health classes and actual RNG
|
| 1279 |
+
|
| 1280 |
+
The magic checksum routes method34 directly to health−999; class0–4 can choose1/2/3 damage through actual36717, while classes5–10 filter methods22/25 and selected classes halve method25 damage. Focused `cargo xtask test-group health` passes (20 Python tests); selected reports regenerate twice byte-identically, with storage, links and whitespace guards. New report: 1189392 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
|
@@ -1222,3 +1222,6 @@ Purpose: turn the supplied installation into an evidence-backed specification of
|
|
| 1222 |
|
| 1223 |
|
| 1224 |
- [x] RE-726 Health attacker credit and client damage records ([report](research/QVM_HEALTH_CREDIT.md)).
|
|
|
|
|
|
|
|
|
|
|
|
| 1222 |
|
| 1223 |
|
| 1224 |
- [x] RE-726 Health attacker credit and client damage records ([report](research/QVM_HEALTH_CREDIT.md)).
|
| 1225 |
+
|
| 1226 |
+
|
| 1227 |
+
- [x] RE-727 Special target health classes and actual RNG ([report](research/QVM_HEALTH_SPECIAL_TARGET.md)).
|
docs/research/QVM_HEALTH_SPECIAL_TARGET.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Special target health classes and actual RNG
|
| 2 |
+
|
| 3 |
+
RE-727. Reproduce with `python3 scripts/analyze_qvm_health_special_target.py`; validate with `cargo xtask test-group health`. See the [machine report](qvm-health-special-target.json).
|
| 4 |
+
|
| 5 |
+
Actual212158–212478 checks the signed magic checksum−1514181943. Locked targets accept only method34; method34 stores health−999 and attacker pointer then issues the supplied callback. Original29808 class table maps0–4 to a random1/2/3 branch for methods outside13/25/22/12/24; actual36717 updates the global seed, then low15-bit result modulo100 uses thresholds50/85. Classes5/7/9 accept22 or25 and halve25 integer damage;6/8/10 accept22 only. Out-of-range classes skip filtering. Accepted subtraction floors at−999 and captures the callback ABI. Ordinary checksums continue without these effects. Callback/class gameplay meanings and valid live inputs remain unproven.
|
| 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
|
@@ -780,3 +780,6 @@ The extension collector adds five focused tests for native tail calls, command-r
|
|
| 780 |
|
| 781 |
|
| 782 |
[RE-726: Health attacker credit and client damage records](QVM_HEALTH_CREDIT.md).
|
|
|
|
|
|
|
|
|
|
|
|
| 780 |
|
| 781 |
|
| 782 |
[RE-726: Health attacker credit and client damage records](QVM_HEALTH_CREDIT.md).
|
| 783 |
+
|
| 784 |
+
|
| 785 |
+
[RE-727: Special target health classes and actual RNG](QVM_HEALTH_SPECIAL_TARGET.md).
|
docs/research/qvm-health-special-target.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
scripts/analyze_qvm_health_special_target.py
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Special checksum/class health rules with actual source RNG and captured callback."""
|
| 3 |
+
import itertools
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
from qvm_research_support import source
|
| 6 |
+
from qvm_health_effects_support import seed,run,MAGIC
|
| 7 |
+
from analyze_qvm import write_json
|
| 8 |
+
|
| 9 |
+
def main():
|
| 10 |
+
q,raw,h,ins=source();rows=[];m=seed(raw,h);table=[m[29808+4*c] for c in range(11)]
|
| 11 |
+
cases=[dict(checksum=MAGIC,**{'class':cls},method=method,rng=rng,damage=101,callback=True) for cls,method,rng in itertools.product(range(-1,12),[12,13,22,24,25,34,99],[0,1,12345])]
|
| 12 |
+
cases += [dict(checksum=MAGIC,locked=locked,method=method,health=health,damage=2000,callback=True) for locked,method,health in itertools.product([0,1],[22,34],[-1000,100])]
|
| 13 |
+
cases += [dict(checksum=0,method=method) for method in [12,34]]
|
| 14 |
+
for a in cases:
|
| 15 |
+
_,p=run(ins,seed(raw,h,**a),212158,212479);p['input']=a;rows.append(p)
|
| 16 |
+
write_json(Path('docs/research/qvm-health-special-target.json'),{'source':q['source'],'sha256':q['sha256'],'class_jump_table':table,'probes':rows,'limits':'Actual212158..212478 and actual36717 RNG. Callback target is a supplied synthetic pointer captured without effects. Checksum/class meanings and live callback registration remain unresolved.'})
|
| 17 |
+
if __name__=='__main__':main()
|
scripts/test_qvm_health_special_target.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import json,unittest
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
from qvm_health_effects_support import MAGIC,ATTACKER,TARGET
|
| 4 |
+
|
| 5 |
+
def rng(seed):
|
| 6 |
+
v=seed&0xffffffff;v=(v^(v<<5))&0xffffffff;v=(v^(v<<21))&0xffffffff;v^=v>>27;return v,v&32767
|
| 7 |
+
|
| 8 |
+
def oracle(a):
|
| 9 |
+
health=a.get('health',100);method=a.get('method',12);take=a.get('damage',100);seed=a.get('rng',1);used=False;called=False
|
| 10 |
+
if a.get('checksum',0)!=MAGIC:return health,take,seed,False,212479
|
| 11 |
+
if method==34:return -999,take,seed,True,213007
|
| 12 |
+
if a.get('locked',0):return health,take,seed,False,213007
|
| 13 |
+
cls=a.get('class',0)
|
| 14 |
+
if 0<=cls<=4 and method not in (13,25,22,12,24):
|
| 15 |
+
seed,value=rng(seed);used=True;v=value%100;take=3 if v>=85 else 2 if v>=50 else 1
|
| 16 |
+
elif cls in (5,7,9):
|
| 17 |
+
if method not in (22,25):return health,take,seed,False,213007
|
| 18 |
+
if method==25:take=int(take/2)
|
| 19 |
+
elif cls in (6,8,10) and method!=22:return health,take,seed,False,213007
|
| 20 |
+
return max(-999,health-take),take,seed,True,213007
|
| 21 |
+
class SpecialTargetHealthTests(unittest.TestCase):
|
| 22 |
+
@classmethod
|
| 23 |
+
def setUpClass(cls):cls.r=json.loads(Path('docs/research/qvm-health-special-target.json').read_text());cls.ps=cls.r['probes']
|
| 24 |
+
def test_independent_class_method_rng_and_health(self):
|
| 25 |
+
for p in self.ps:
|
| 26 |
+
health,take,seed,called,stop=oracle(p['input']);self.assertEqual((p['final']['entity']['684'],p['final']['selected_damage'],p['final']['rng'],len(p['effects']['callbacks']),p['execution']['stop']),(health&0xffffffff,take&0xffffffff,seed,int(called),stop),p['input'])
|
| 27 |
+
def test_original_jump_table(self):self.assertEqual(self.r['class_jump_table'],[212269]*5+[212326,212352,212358,212384,212390,212416])
|
| 28 |
+
def test_callback_abi_and_attacker_attribution(self):
|
| 29 |
+
for p in self.ps:
|
| 30 |
+
called=bool(p['effects']['callbacks']);self.assertEqual(p['final']['entity']['720'],ATTACKER if called else 0)
|
| 31 |
+
for c in p['effects']['callbacks']:self.assertEqual(c['arguments'],{'8':TARGET,'12':0,'16':0})
|
| 32 |
+
def test_ordinary_targets_do_not_invoke_rng_or_callback(self):
|
| 33 |
+
self.assertEqual(len(self.ps),283)
|
| 34 |
+
for p in self.ps:
|
| 35 |
+
if p['input']['checksum']!=MAGIC:self.assertEqual(p['execution']['calls'],[])
|
| 36 |
+
if __name__=='__main__':unittest.main()
|
xtask/checks.tsv
CHANGED
|
@@ -1147,3 +1147,5 @@ report scripts/analyze_qvm_health_routing.py docs/research/qvm-health-routing.js
|
|
| 1147 |
edge docs/research/qvm-health-routing.json scripts/test_qvm_health_routing.py
|
| 1148 |
report scripts/analyze_qvm_health_credit.py docs/research/qvm-health-credit.json
|
| 1149 |
edge docs/research/qvm-health-credit.json scripts/test_qvm_health_credit.py
|
|
|
|
|
|
|
|
|
| 1147 |
edge docs/research/qvm-health-routing.json scripts/test_qvm_health_routing.py
|
| 1148 |
report scripts/analyze_qvm_health_credit.py docs/research/qvm-health-credit.json
|
| 1149 |
edge docs/research/qvm-health-credit.json scripts/test_qvm_health_credit.py
|
| 1150 |
+
report scripts/analyze_qvm_health_special_target.py docs/research/qvm-health-special-target.json
|
| 1151 |
+
edge docs/research/qvm-health-special-target.json scripts/test_qvm_health_special_target.py
|