qvm: contact eligibility gates
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_CONTACT_GATES.md +7 -0
- docs/research/README.md +3 -0
- docs/research/qvm-contact-gates.json +0 -0
- scripts/analyze_qvm_contact_gates.py +32 -0
- scripts/test_qvm_contact_gates.py +20 -0
docs/ASSET_PIPELINE_TODO.md
CHANGED
|
@@ -766,3 +766,6 @@ Research progress: RE-698 [report](research/MD3_ORIGINAL_MODEL_HIT.md); remainin
|
|
| 766 |
|
| 767 |
|
| 768 |
Research progress: RE-699 [report](research/MD3_GEOMETRY_AUDIT.md); remaining native/content/runtime/platform scope stays open.
|
|
|
|
|
|
|
|
|
|
|
|
| 766 |
|
| 767 |
|
| 768 |
Research progress: RE-699 [report](research/MD3_GEOMETRY_AUDIT.md); remaining native/content/runtime/platform scope stays open.
|
| 769 |
+
|
| 770 |
+
|
| 771 |
+
Research progress: RE-700 [report](research/QVM_CONTACT_GATES.md); remaining native/content/runtime/platform scope stays open.
|
docs/FINDINGS.md
CHANGED
|
@@ -1112,3 +1112,6 @@ Bounded qagame paths recover bomb-plant/inactivity correction requests, direct f
|
|
| 1112 |
|
| 1113 |
|
| 1114 |
**RE-699 — Original-asset numerical geometry comparison audit:** Original-asset runs retain measurable source-point differences from conventional ray points and localized fourth-row differences; native/reference validation remains necessary. [Evidence](research/MD3_GEOMETRY_AUDIT.md).
|
|
|
|
|
|
|
|
|
|
|
|
| 1112 |
|
| 1113 |
|
| 1114 |
**RE-699 — Original-asset numerical geometry comparison audit:** Original-asset runs retain measurable source-point differences from conventional ray points and localized fourth-row differences; native/reference validation remains necessary. [Evidence](research/MD3_GEOMETRY_AUDIT.md).
|
| 1115 |
+
|
| 1116 |
+
|
| 1117 |
+
**RE-700 — Contact eligibility gates with original-model hit contexts:** 292545 gates client contact on damageable/special mode, nonempty hit context and team/friendly-fire rules before reached damage calculation. [Evidence](research/QVM_CONTACT_GATES.md).
|
docs/PROVISIONAL_TODO.md
CHANGED
|
@@ -1098,3 +1098,6 @@ Research progress: RE-698 [report](research/MD3_ORIGINAL_MODEL_HIT.md); remainin
|
|
| 1098 |
|
| 1099 |
|
| 1100 |
Research progress: RE-699 [report](research/MD3_GEOMETRY_AUDIT.md); remaining native/content/runtime/platform scope stays open.
|
|
|
|
|
|
|
|
|
|
|
|
| 1098 |
|
| 1099 |
|
| 1100 |
Research progress: RE-699 [report](research/MD3_GEOMETRY_AUDIT.md); remaining native/content/runtime/platform scope stays open.
|
| 1101 |
+
|
| 1102 |
+
|
| 1103 |
+
Research progress: RE-700 [report](research/QVM_CONTACT_GATES.md); remaining native/content/runtime/platform scope stays open.
|
docs/RESEARCH_LEDGER.md
CHANGED
|
@@ -1142,3 +1142,8 @@ Complete144766 now uses original Athena/Orion lower/upper/head/helmet buffers, a
|
|
| 1142 |
## 2026-10-21 — RE-699 Original-asset numerical geometry comparison audit (separate task commit)
|
| 1143 |
|
| 1144 |
Original-asset runs retain measurable source-point differences from conventional ray points and localized fourth-row differences; native/reference validation remains necessary. Four audit checks retain exact input report hashes, independently recompute all point distances, localize matrix differences and reconcile evidence totals. Full suite: 1251 tests pass. Report regenerates byte-identically (38388 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1142 |
## 2026-10-21 — RE-699 Original-asset numerical geometry comparison audit (separate task commit)
|
| 1143 |
|
| 1144 |
Original-asset runs retain measurable source-point differences from conventional ray points and localized fourth-row differences; native/reference validation remains necessary. Four audit checks retain exact input report hashes, independently recompute all point distances, localize matrix differences and reconcile evidence totals. Full suite: 1251 tests pass. Report regenerates byte-identically (38388 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
|
| 1145 |
+
|
| 1146 |
+
|
| 1147 |
+
## 2026-10-21 — RE-700 Contact eligibility gates with original-model hit contexts (separate task commit)
|
| 1148 |
+
|
| 1149 |
+
292545 gates client contact on damageable/special mode, nonempty hit context and team/friendly-fire rules before reached damage calculation. 288 branch fixtures independently check the complete prefix truth table, mode-call order, original context provenance and unchanged external state. Full suite: 1255 tests pass. Report regenerates byte-identically (245882 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
|
@@ -1141,3 +1141,6 @@ Purpose: turn the supplied installation into an evidence-backed specification of
|
|
| 1141 |
|
| 1142 |
|
| 1143 |
- [x] RE-699 Original-asset numerical geometry comparison audit ([report](research/MD3_GEOMETRY_AUDIT.md)).
|
|
|
|
|
|
|
|
|
|
|
|
| 1141 |
|
| 1142 |
|
| 1143 |
- [x] RE-699 Original-asset numerical geometry comparison audit ([report](research/MD3_GEOMETRY_AUDIT.md)).
|
| 1144 |
+
|
| 1145 |
+
|
| 1146 |
+
- [x] RE-700 Contact eligibility gates with original-model hit contexts ([report](research/QVM_CONTACT_GATES.md)).
|
docs/research/QVM_CONTACT_GATES.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Contact eligibility gates with original-model hit contexts
|
| 2 |
+
|
| 3 |
+
RE-700. Reproduce with `python3 scripts/analyze_qvm_contact_gates.py`; check with `python3 scripts/test_qvm_contact_gates.py`. The [machine report](qvm-contact-gates.json) retains source identity and bounded fixtures.
|
| 4 |
+
|
| 5 |
+
Actual292546 executes target selection, the weapon4/nonzero flag override, damageable688 gate, client/context/count checks and actual33715 mode predicate. Same-team contact in an enabled mode returns zero when friendly-fire34087532 is zero. Other reached client paths stop at292675; nonclient and impact-only branches stop at their actual continuations. The contexts are source-produced original-model hits/misses with exact report hash provenance. Damageable/team/client/weapon flags remain explicit probes, and no damage outcome is invented. Later armor/location/damage and impact side effects remain open.
|
| 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
|
@@ -699,3 +699,6 @@ The extension collector adds five focused tests for native tail calls, command-r
|
|
| 699 |
|
| 700 |
|
| 701 |
[RE-699: Original-asset numerical geometry comparison audit](MD3_GEOMETRY_AUDIT.md). Reproduce with `python3 scripts/analyze_md3_geometry_audit.py`; check with `python3 scripts/test_md3_geometry_audit.py`.
|
|
|
|
|
|
|
|
|
|
|
|
| 699 |
|
| 700 |
|
| 701 |
[RE-699: Original-asset numerical geometry comparison audit](MD3_GEOMETRY_AUDIT.md). Reproduce with `python3 scripts/analyze_md3_geometry_audit.py`; check with `python3 scripts/test_md3_geometry_audit.py`.
|
| 702 |
+
|
| 703 |
+
|
| 704 |
+
[RE-700: Contact eligibility gates with original-model hit contexts](QVM_CONTACT_GATES.md). Reproduce with `python3 scripts/analyze_qvm_contact_gates.py`; check with `python3 scripts/test_qvm_contact_gates.py`.
|
docs/research/qvm-contact-gates.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
scripts/analyze_qvm_contact_gates.py
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""292545 eligibility prefix with source-produced original-model hit contexts."""
|
| 3 |
+
import hashlib,itertools,json
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
from qvm_research_support import source
|
| 6 |
+
from qvm_trace_support import resume
|
| 7 |
+
from analyze_qvm_victim_stats import mode
|
| 8 |
+
from analyze_qvm_entity_init import POOL,STRIDE
|
| 9 |
+
from analyze_qvm import write_json
|
| 10 |
+
LOCAL=0x79c00000
|
| 11 |
+
ATTACKER=LOCAL+4096
|
| 12 |
+
ATTACKER_CLIENT=LOCAL+8192
|
| 13 |
+
VICTIM_CLIENT=LOCAL+12288
|
| 14 |
+
TRACE=LOCAL+16384
|
| 15 |
+
CONTEXT=LOCAL+20480
|
| 16 |
+
TARGET=POOL+65*STRIDE
|
| 17 |
+
|
| 18 |
+
def gates(ins,m,args):
|
| 19 |
+
m=dict(m)
|
| 20 |
+
for o,v in args.items():m[LOCAL+124+o]=v
|
| 21 |
+
def predicate(i,m,a):m,r=mode(i,m,a[8]);return m,r['result'],r
|
| 22 |
+
m,e=resume(ins,292546,293730,m,LOCAL,handlers={33715:predicate},boundaries=[292675,293362,293630]);status='return-zero' if e['return']==0 else {292675:'eligible-client-continuation',293362:'nonclient-continuation',293630:'impact-only-continuation'}[e['stop']]
|
| 23 |
+
return m,{'target_pointer':m[LOCAL+48],'special_flag':m[LOCAL+52],'status':status,'execution':e}
|
| 24 |
+
|
| 25 |
+
def main():
|
| 26 |
+
q,raw,h,ins=source();path=Path('docs/research/md3-original-model-hit.json');data=path.read_bytes();models=json.loads(data)['probes'];hit=next(i for i,p in enumerate(models) if p['context'][16]);miss=next(i for i,p in enumerate(models) if not p['context'][16]);rows=[]
|
| 27 |
+
for context_kind,damageable,special,client,game,same,friendly in itertools.product(['none','miss','hit'],[0,1],[False,True],[False,True],[2,3,9],[False,True],[0,1]):
|
| 28 |
+
source_row=hit if context_kind=='hit' else miss;context=models[source_row]['context'];m={TRACE+52:65,TARGET+688:damageable,TARGET+520:VICTIM_CLIENT if client else 0,ATTACKER+520:ATTACKER_CLIENT,ATTACKER_CLIENT+3096:1,VICTIM_CLIENT+3096:1 if same else 2,34090788:game,34087532:friendly}
|
| 29 |
+
for j,v in enumerate(context):m[CONTEXT+4*j]=v
|
| 30 |
+
before=[m[TARGET+688],m[TARGET+520],m[ATTACKER+520]];m,r=gates(ins,m,{8:ATTACKER,12:TRACE,16:4 if special else 3,20:0 if context_kind=='none' else CONTEXT,24:int(special),28:0});r.update({'input':{'context_kind':context_kind,'context_source_row':source_row,'context_count':0 if context_kind=='none' else context[16],'damageable':damageable,'special':special,'client':client,'mode':game,'same_team':same,'friendly_fire':friendly},'external_entity_fields_unchanged':before==[m[TARGET+688],m[TARGET+520],m[ATTACKER+520]],'context_unchanged':all(m[CONTEXT+4*j]==v for j,v in enumerate(context))});rows.append(r)
|
| 31 |
+
write_json(Path('docs/research/qvm-contact-gates.json'),{'source':q['source'],'sha256':q['sha256'],'context_report':str(path),'context_report_sha256':hashlib.sha256(data).hexdigest(),'probes':rows,'limits':'Actual292546 prefix and actual33715 mode predicate using cached source-produced original-model contexts. Client/nonclient/damageable/team flags are explicit branch fixtures. Stops before damage/impact/client continuation; no damage result supplied.'})
|
| 32 |
+
if __name__=='__main__':main()
|
scripts/test_qvm_contact_gates.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import hashlib,json,unittest
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
class ContactGateTests(unittest.TestCase):
|
| 4 |
+
@classmethod
|
| 5 |
+
def setUpClass(cls):cls.r=json.loads(Path('docs/research/qvm-contact-gates.json').read_text())
|
| 6 |
+
def test_independent_gate_truth_table(self):
|
| 7 |
+
self.assertEqual(len(self.r['probes']),288)
|
| 8 |
+
for p in self.r['probes']:
|
| 9 |
+
a=p['input'];expected='eligible-client-continuation'
|
| 10 |
+
if not a['damageable'] and not a['special']:expected='impact-only-continuation'
|
| 11 |
+
elif not a['client']:expected='nonclient-continuation'
|
| 12 |
+
elif not a['context_count'] or (a['mode']==3 and a['same_team'] and not a['friendly_fire']):expected='return-zero'
|
| 13 |
+
self.assertEqual(p['status'],expected);self.assertEqual(p['special_flag'],int(a['special']));self.assertEqual(p['target_pointer'],34091368+65*880)
|
| 14 |
+
def test_mode_predicate_only_after_live_context_gates(self):
|
| 15 |
+
for p in self.r['probes']:
|
| 16 |
+
a=p['input'];called=bool((a['damageable'] or a['special']) and a['client'] and a['context_count']);self.assertEqual([c['target'] for c in p['execution']['calls']],[33715] if called else [])
|
| 17 |
+
def test_source_original_model_contexts_have_exact_identity(self):self.assertEqual(hashlib.sha256(Path(self.r['context_report']).read_bytes()).hexdigest(),self.r['context_report_sha256'])
|
| 18 |
+
def test_no_external_state_writes_or_damage_calls(self):
|
| 19 |
+
for p in self.r['probes']:self.assertTrue(p['context_unchanged']);self.assertTrue(p['external_entity_fields_unchanged']);self.assertNotIn(211239,[c['target'] for c in p['execution']['calls']])
|
| 20 |
+
if __name__=='__main__':unittest.main()
|