qvm: damage location flags
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_DAMAGE_LOCATION_FLAGS.md +7 -0
- docs/research/README.md +3 -0
- docs/research/qvm-damage-location-flags.json +0 -0
- scripts/analyze_qvm_damage_location_flags.py +14 -0
- scripts/test_qvm_damage_location_flags.py +20 -0
docs/ASSET_PIPELINE_TODO.md
CHANGED
|
@@ -790,3 +790,6 @@ Research progress: RE-707 [report](research/QVM_DAMAGE_WOUNDS.md); remaining nat
|
|
| 790 |
|
| 791 |
|
| 792 |
Research progress: RE-708 [report](research/QVM_DAMAGE_ATTRIBUTION.md); remaining native/content/runtime/platform scope stays open.
|
|
|
|
|
|
|
|
|
|
|
|
| 790 |
|
| 791 |
|
| 792 |
Research progress: RE-708 [report](research/QVM_DAMAGE_ATTRIBUTION.md); remaining native/content/runtime/platform scope stays open.
|
| 793 |
+
|
| 794 |
+
|
| 795 |
+
Research progress: RE-709 [report](research/QVM_DAMAGE_LOCATION_FLAGS.md); remaining native/content/runtime/platform scope stays open.
|
docs/FINDINGS.md
CHANGED
|
@@ -1136,3 +1136,6 @@ Bounded qagame paths recover bomb-plant/inactivity correction requests, direct f
|
|
| 1136 |
|
| 1137 |
|
| 1138 |
**RE-708 — Active wound attribution and counter cap:** Active wounds record attacker pointer at target836 and weapon at client4300; counter4304 increments only below4 and resets4316 there, while client220 bit256 is always set. [Evidence](research/QVM_DAMAGE_ATTRIBUTION.md).
|
|
|
|
|
|
|
|
|
|
|
|
| 1136 |
|
| 1137 |
|
| 1138 |
**RE-708 — Active wound attribution and counter cap:** Active wounds record attacker pointer at target836 and weapon at client4300; counter4304 increments only below4 and resets4316 there, while client220 bit256 is always set. [Evidence](research/QVM_DAMAGE_ATTRIBUTION.md).
|
| 1139 |
+
|
| 1140 |
+
|
| 1141 |
+
**RE-709 — Damage location jump table and client flags:** The original32796 jump table ORs client192 bit4 for locations1/2, bit1 for3/4/7/8, and bit2 for5/6/9–14; signed out-of-range locations bypass it. [Evidence](research/QVM_DAMAGE_LOCATION_FLAGS.md).
|
docs/PROVISIONAL_TODO.md
CHANGED
|
@@ -1125,3 +1125,6 @@ Research progress: RE-707 [report](research/QVM_DAMAGE_WOUNDS.md); remaining nat
|
|
| 1125 |
|
| 1126 |
|
| 1127 |
Research progress: RE-708 [report](research/QVM_DAMAGE_ATTRIBUTION.md); remaining native/content/runtime/platform scope stays open.
|
|
|
|
|
|
|
|
|
|
|
|
| 1125 |
|
| 1126 |
|
| 1127 |
Research progress: RE-708 [report](research/QVM_DAMAGE_ATTRIBUTION.md); remaining native/content/runtime/platform scope stays open.
|
| 1128 |
+
|
| 1129 |
+
|
| 1130 |
+
Research progress: RE-709 [report](research/QVM_DAMAGE_LOCATION_FLAGS.md); remaining native/content/runtime/platform scope stays open.
|
docs/RESEARCH_LEDGER.md
CHANGED
|
@@ -1182,3 +1182,8 @@ Mode9, entity flag16 or protection suppress the wound word. Active client wounds
|
|
| 1182 |
## 2026-10-21 — RE-708 Active wound attribution and counter cap (separate task commit)
|
| 1183 |
|
| 1184 |
Active wounds record attacker pointer at target836 and weapon at client4300; counter4304 increments only below4 and resets4316 there, while client220 bit256 is always set. 120 counter/weapon/flag combinations pass independent attribution, cap, reset and bit-preservation checks. Full suite: 1283 tests pass. Report regenerates byte-identically (179647 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1182 |
## 2026-10-21 — RE-708 Active wound attribution and counter cap (separate task commit)
|
| 1183 |
|
| 1184 |
Active wounds record attacker pointer at target836 and weapon at client4300; counter4304 increments only below4 and resets4316 there, while client220 bit256 is always set. 120 counter/weapon/flag combinations pass independent attribution, cap, reset and bit-preservation checks. Full suite: 1283 tests pass. Report regenerates byte-identically (179647 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
|
| 1185 |
+
|
| 1186 |
+
|
| 1187 |
+
## 2026-10-21 — RE-709 Damage location jump table and client flags (separate task commit)
|
| 1188 |
+
|
| 1189 |
+
The original32796 jump table ORs client192 bit4 for locations1/2, bit1 for3/4/7/8, and bit2 for5/6/9–14; signed out-of-range locations bypass it. 133 location/initial-flag fixtures verify every original branch target, signed bypass and preservation of unrelated fields. Full suite: 1287 tests pass. Report regenerates byte-identically (195933 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
|
@@ -1168,3 +1168,6 @@ Purpose: turn the supplied installation into an evidence-backed specification of
|
|
| 1168 |
|
| 1169 |
|
| 1170 |
- [x] RE-708 Active wound attribution and counter cap ([report](research/QVM_DAMAGE_ATTRIBUTION.md)).
|
|
|
|
|
|
|
|
|
|
|
|
| 1168 |
|
| 1169 |
|
| 1170 |
- [x] RE-708 Active wound attribution and counter cap ([report](research/QVM_DAMAGE_ATTRIBUTION.md)).
|
| 1171 |
+
|
| 1172 |
+
|
| 1173 |
+
- [x] RE-709 Damage location jump table and client flags ([report](research/QVM_DAMAGE_LOCATION_FLAGS.md)).
|
docs/research/QVM_DAMAGE_LOCATION_FLAGS.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Damage location jump table and client flags
|
| 2 |
+
|
| 3 |
+
RE-709. Reproduce with `python3 scripts/analyze_qvm_damage_location_flags.py`; check with `python3 scripts/test_qvm_damage_location_flags.py`. The [machine report](qvm-damage-location-flags.json) retains source identity and bounded fixtures.
|
| 4 |
+
|
| 5 |
+
Actual290298–290373 checks signed location1–14 before reading the original file-backed32796+4×location jump table. Locations1/2 dispatch290357 and set bit4 at client192. Locations3/4/7/8 dispatch290319 and set bit1. Locations5/6/9–14 dispatch290338 and set bit2. OR operations preserve existing bits, including high-bit fixtures. Negative, zero and above14 locations bypass all writes. This slice assumes a nonnull client for accepted locations, matching its explicit fixtures; null-client legality remains unproven. No child calls or health damage occur.
|
| 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
|
@@ -726,3 +726,6 @@ The extension collector adds five focused tests for native tail calls, command-r
|
|
| 726 |
|
| 727 |
|
| 728 |
[RE-708: Active wound attribution and counter cap](QVM_DAMAGE_ATTRIBUTION.md). Reproduce with `python3 scripts/analyze_qvm_damage_attribution.py`; check with `python3 scripts/test_qvm_damage_attribution.py`.
|
|
|
|
|
|
|
|
|
|
|
|
| 726 |
|
| 727 |
|
| 728 |
[RE-708: Active wound attribution and counter cap](QVM_DAMAGE_ATTRIBUTION.md). Reproduce with `python3 scripts/analyze_qvm_damage_attribution.py`; check with `python3 scripts/test_qvm_damage_attribution.py`.
|
| 729 |
+
|
| 730 |
+
|
| 731 |
+
[RE-709: Damage location jump table and client flags](QVM_DAMAGE_LOCATION_FLAGS.md). Reproduce with `python3 scripts/analyze_qvm_damage_location_flags.py`; check with `python3 scripts/test_qvm_damage_location_flags.py`.
|
docs/research/qvm-damage-location-flags.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
scripts/analyze_qvm_damage_location_flags.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Original jump-table routing of hit locations into persistent client flags."""
|
| 3 |
+
import itertools
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
from qvm_research_support import source
|
| 6 |
+
from qvm_damage_support import seed,run
|
| 7 |
+
from analyze_qvm import write_json
|
| 8 |
+
|
| 9 |
+
def main():
|
| 10 |
+
q,raw,h,ins=source();rows=[];m=seed(raw,h);table={str(loc):m[32796+4*loc] for loc in range(1,15)}
|
| 11 |
+
for loc,flags in itertools.product([-1,*range(17),2147483647],[0,1,2,4,7,16,0x80000000]):
|
| 12 |
+
a=dict(location=loc,location_flags=flags);_,p=run(ins,seed(raw,h,**a),290298,290374);p['input']=a;rows.append(p)
|
| 13 |
+
write_json(Path('docs/research/qvm-damage-location-flags.json'),{'source':q['source'],'sha256':q['sha256'],'jump_table':table,'probes':rows,'limits':'Actual290298..290373 with original location jump-table words; explicit nonnull client. Flag meanings are structural groups, not invented anatomy semantics.'})
|
| 14 |
+
if __name__=='__main__':main()
|
scripts/test_qvm_damage_location_flags.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import json,unittest
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
class DamageLocationFlagTests(unittest.TestCase):
|
| 4 |
+
@classmethod
|
| 5 |
+
def setUpClass(cls):cls.r=json.loads(Path('docs/research/qvm-damage-location-flags.json').read_text());cls.ps=cls.r['probes']
|
| 6 |
+
def test_independent_location_groups(self):
|
| 7 |
+
for p in self.ps:
|
| 8 |
+
a=p['input'];loc=a['location'];bit=4 if loc in (1,2) else 1 if loc in (3,4,7,8) else 2 if loc in (5,6,9,10,11,12,13,14) else 0
|
| 9 |
+
self.assertEqual(p['final']['client']['192'],a['location_flags']|bit)
|
| 10 |
+
def test_exact_original_table_routing(self):
|
| 11 |
+
for loc,target in self.r['jump_table'].items():self.assertEqual(target,290357 if int(loc) in (1,2) else 290319 if int(loc) in (3,4,7,8) else 290338)
|
| 12 |
+
def test_other_tracked_fields_unchanged(self):
|
| 13 |
+
for p in self.ps:
|
| 14 |
+
a=dict(p['initial']['client']);b=dict(p['final']['client']);a.pop('192');b.pop('192');self.assertEqual(a,b);self.assertEqual(p['initial']['extra'],p['final']['extra']);self.assertEqual(p['initial']['attacker_pointer'],p['final']['attacker_pointer'])
|
| 15 |
+
def test_invalid_signed_locations_bypass_and_no_calls(self):
|
| 16 |
+
self.assertEqual(len(self.ps),133)
|
| 17 |
+
for p in self.ps:
|
| 18 |
+
if not 1<=p['input']['location']<=14:self.assertEqual(p['initial'],p['final'])
|
| 19 |
+
self.assertEqual(p['execution']['calls'],[]);self.assertEqual(p['execution']['stop'],290374)
|
| 20 |
+
if __name__=='__main__':unittest.main()
|