qvm: firing availability failure
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_FIRE_AVAILABILITY.md +11 -0
- docs/research/README.md +3 -0
- docs/research/qvm-fire-availability.json +0 -0
- scripts/analyze_qvm_fire_availability.py +19 -0
- scripts/test_qvm_fire_availability.py +29 -0
docs/ASSET_PIPELINE_TODO.md
CHANGED
|
@@ -433,3 +433,6 @@ Research progress: RE-580 [report](research/QVM_WEAPON_RETURN_CHAINS.md); remain
|
|
| 433 |
|
| 434 |
|
| 435 |
Research progress: RE-582 [report](research/QVM_FIRE_GATE.md); remaining native/content/runtime/platform scope stays open.
|
|
|
|
|
|
|
|
|
|
|
|
| 433 |
|
| 434 |
|
| 435 |
Research progress: RE-582 [report](research/QVM_FIRE_GATE.md); remaining native/content/runtime/platform scope stays open.
|
| 436 |
+
|
| 437 |
+
|
| 438 |
+
Research progress: RE-583 [report](research/QVM_FIRE_AVAILABILITY.md); remaining native/content/runtime/platform scope stays open.
|
docs/FINDINGS.md
CHANGED
|
@@ -791,3 +791,6 @@ Bounded qagame paths recover bomb-plant/inactivity correction requests, direct f
|
|
| 791 |
|
| 792 |
|
| 793 |
**RE-582 — Firing charge hold release and ordinary input gate:** 51802..52084 uses mode flag8 to availability-gate a state32/64 charge latch and event1, handles requested-ID exceptions11/12, and otherwise lets nonzero burst counters bypass absent button1. [Evidence](research/QVM_FIRE_GATE.md).
|
|
|
|
|
|
|
|
|
|
|
|
| 791 |
|
| 792 |
|
| 793 |
**RE-582 — Firing charge hold release and ordinary input gate:** 51802..52084 uses mode flag8 to availability-gate a state32/64 charge latch and event1, handles requested-ID exceptions11/12, and otherwise lets nonzero burst counters bypass absent button1. [Evidence](research/QVM_FIRE_GATE.md).
|
| 794 |
+
|
| 795 |
+
|
| 796 |
+
**RE-583 — Availability failure event and timer exception:** 52085..52153 exits state1 before querying availability; unavailable ID27 returns unchanged, while other unavailable weapons zero counter204, queue29 and add500 to the timer. [Evidence](research/QVM_FIRE_AVAILABILITY.md).
|
docs/PROVISIONAL_TODO.md
CHANGED
|
@@ -749,3 +749,6 @@ Research progress: RE-580 [report](research/QVM_WEAPON_RETURN_CHAINS.md); remain
|
|
| 749 |
|
| 750 |
|
| 751 |
Research progress: RE-582 [report](research/QVM_FIRE_GATE.md); remaining native/content/runtime/platform scope stays open.
|
|
|
|
|
|
|
|
|
|
|
|
| 749 |
|
| 750 |
|
| 751 |
Research progress: RE-582 [report](research/QVM_FIRE_GATE.md); remaining native/content/runtime/platform scope stays open.
|
| 752 |
+
|
| 753 |
+
|
| 754 |
+
Research progress: RE-583 [report](research/QVM_FIRE_AVAILABILITY.md); remaining native/content/runtime/platform scope stays open.
|
docs/RESEARCH_LEDGER.md
CHANGED
|
@@ -603,3 +603,8 @@ RE-580 additional regression: all19 reports from RE-560–569 and RE-571–579 r
|
|
| 603 |
## 2026-10-20 — RE-582 Firing charge hold release and ordinary input gate (separate task commit)
|
| 604 |
|
| 605 |
51802..52084 uses mode flag8 to availability-gate a state32/64 charge latch and event1, handles requested-ID exceptions11/12, and otherwise lets nonzero burst counters bypass absent button1. 203 independent fixtures check charge start/hold/release/cancel, flags4 availability, command mismatch exceptions and signed nonzero counters without altering ammo or published request fields. Full suite: 843 tests pass. Report regenerates byte-identically (1209597 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 603 |
## 2026-10-20 — RE-582 Firing charge hold release and ordinary input gate (separate task commit)
|
| 604 |
|
| 605 |
51802..52084 uses mode flag8 to availability-gate a state32/64 charge latch and event1, handles requested-ID exceptions11/12, and otherwise lets nonzero burst counters bypass absent button1. 203 independent fixtures check charge start/hold/release/cancel, flags4 availability, command mismatch exceptions and signed nonzero counters without altering ammo or published request fields. Full suite: 843 tests pass. Report regenerates byte-identically (1209597 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
|
| 606 |
+
|
| 607 |
+
|
| 608 |
+
## 2026-10-20 — RE-583 Availability failure event and timer exception (separate task commit)
|
| 609 |
+
|
| 610 |
+
52085..52153 exits state1 before querying availability; unavailable ID27 returns unchanged, while other unavailable weapons zero counter204, queue29 and add500 to the timer. 110 probes check actual50309/39238 order, flag4 versus magazine, state1 priority, ID27, signed timer overflow and queue wrap without ammo/request writes. Full suite: 847 tests pass. Report regenerates byte-identically (661634 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
|
@@ -790,3 +790,6 @@ Purpose: turn the supplied installation into an evidence-backed specification of
|
|
| 790 |
|
| 791 |
|
| 792 |
- [x] RE-582 Firing charge hold release and ordinary input gate ([report](research/QVM_FIRE_GATE.md)).
|
|
|
|
|
|
|
|
|
|
|
|
| 790 |
|
| 791 |
|
| 792 |
- [x] RE-582 Firing charge hold release and ordinary input gate ([report](research/QVM_FIRE_GATE.md)).
|
| 793 |
+
|
| 794 |
+
|
| 795 |
+
- [x] RE-583 Availability failure event and timer exception ([report](research/QVM_FIRE_AVAILABILITY.md)).
|
docs/research/QVM_FIRE_AVAILABILITY.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Availability failure event and timer exception
|
| 2 |
+
|
| 3 |
+
RE-583. Reproduce with `python3 scripts/analyze_qvm_fire_availability.py`; check with `python3 scripts/test_qvm_fire_availability.py`. The [machine report](qvm-fire-availability.json) retains source identity and bounded fixtures.
|
| 4 |
+
|
| 5 |
+
State1 exits immediately. Otherwise actual50309 reads packed mode flags4 or magazine>0. Available proceeds52154. Unavailable selectedID27 exits without mutation; other IDs zero PS204, emit29 with parameter0 and add500 to PS44 using32-bit arithmetic before returning53046. Timer addition is not a replacement or clamp.
|
| 6 |
+
|
| 7 |
+
110 fixtures cover IDs1/22/27, empty/nonempty magazines, mode flag4, state0/1/3, negative and near-overflow timers and sequence wrap. The body publishes no firing request and consumes no ammunition. Numeric event29 is not assumed to correspond to a specific sound asset until its consumers/assets are mapped.
|
| 8 |
+
|
| 9 |
+
These are standalone slice entries; earlier gates can prevent some supplied states. Next: magazine debit and animation dispatch only on the source paths that reach52154.
|
| 10 |
+
|
| 11 |
+
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
|
@@ -350,3 +350,6 @@ The extension collector adds five focused tests for native tail calls, command-r
|
|
| 350 |
|
| 351 |
|
| 352 |
[RE-582: Firing charge hold release and ordinary input gate](QVM_FIRE_GATE.md). Reproduce with `python3 scripts/analyze_qvm_fire_gate.py`; check with `python3 scripts/test_qvm_fire_gate.py`.
|
|
|
|
|
|
|
|
|
|
|
|
| 350 |
|
| 351 |
|
| 352 |
[RE-582: Firing charge hold release and ordinary input gate](QVM_FIRE_GATE.md). Reproduce with `python3 scripts/analyze_qvm_fire_gate.py`; check with `python3 scripts/test_qvm_fire_gate.py`.
|
| 353 |
+
|
| 354 |
+
|
| 355 |
+
[RE-583: Availability failure event and timer exception](QVM_FIRE_AVAILABILITY.md). Reproduce with `python3 scripts/analyze_qvm_fire_availability.py`; check with `python3 scripts/test_qvm_fire_availability.py`.
|
docs/research/qvm-fire-availability.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
scripts/analyze_qvm_fire_availability.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""52085..52153 availability failure and ID27/event/timer exceptions."""
|
| 3 |
+
import itertools
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
from qvm_research_support import source
|
| 6 |
+
from qvm_firing_support import seed,segment
|
| 7 |
+
from analyze_qvm_acceleration import PS
|
| 8 |
+
from analyze_qvm import write_json
|
| 9 |
+
|
| 10 |
+
def availability(ins,m,cmd=(0,0,0),preserve_locals=False):return segment(ins,m,52085,[52154],cmd,preserve_locals)
|
| 11 |
+
|
| 12 |
+
def main():
|
| 13 |
+
q,raw,h,ins=source();rows=[]
|
| 14 |
+
for ident,mag,flags,ws,timer in itertools.product([1,22,27],[0,1],[0,4],[0,1,3],[0,-1,0x7fffffff-100]):
|
| 15 |
+
m=seed(raw,h,ident,mag);m.update({4244+432*ident+4:flags,PS+148:ws,PS+44:timer,PS+204:7});rows.append(availability(ins,m)[1])
|
| 16 |
+
for seq in [1,0xffffffff]:
|
| 17 |
+
m=seed(raw,h,22,0);m.update({4244+432*22+4:0,PS+108:seq,PS+204:7});rows.append(availability(ins,m)[1])
|
| 18 |
+
write_json(Path('docs/research/qvm-fire-availability.json'),{'source':q['source'],'sha256':q['sha256'],'probes':rows,'limits':'Finite52085..52153; actual50309/39238. Standalone negative/overflow timer and state1 isolate literal source behavior; caller legality and audible empty-weapon effect unverified.'})
|
| 19 |
+
if __name__=='__main__':main()
|
scripts/test_qvm_fire_availability.py
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import json,unittest,copy
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
from test_qvm_water_events import enqueue
|
| 4 |
+
|
| 5 |
+
def availability_state(p):
|
| 6 |
+
a=copy.deepcopy(p['initial'])
|
| 7 |
+
if a['weapon_state']==1:return a,53046
|
| 8 |
+
available=bool(a['packed']&65280 or p['config']['packed_flags']&4)
|
| 9 |
+
if available:return a,52154
|
| 10 |
+
if a['packed']&255!=27:a['counter204']=0;a['queue']=enqueue(a['queue'],[29]);a['weapon_timer']=(a['weapon_timer']+500)&0xffffffff
|
| 11 |
+
return a,53046
|
| 12 |
+
class FireAvailabilityTests(unittest.TestCase):
|
| 13 |
+
@classmethod
|
| 14 |
+
def setUpClass(cls):cls.r=json.loads(Path('docs/research/qvm-fire-availability.json').read_text())
|
| 15 |
+
def test_exact_availability_and_state(self):
|
| 16 |
+
self.assertEqual(len(self.r['probes']),110)
|
| 17 |
+
for p in self.r['probes']:a,stop=availability_state(p);self.assertEqual(p['final'],a);self.assertEqual(p['execution']['stop'],stop)
|
| 18 |
+
def test_actual_child_order_and_parameter_zero(self):
|
| 19 |
+
for p in self.r['probes']:
|
| 20 |
+
calls=[] if p['initial']['weapon_state']==1 else [50309]
|
| 21 |
+
if p['initial']['queue']!=p['final']['queue']:calls.append(39238);self.assertEqual(p['final']['queue']['parameters'][(p['initial']['queue']['sequence'])&1],0)
|
| 22 |
+
self.assertEqual([c['target'] for c in p['execution']['calls']],calls)
|
| 23 |
+
def test_id27_no_failure_side_effect(self):
|
| 24 |
+
rows=[p for p in self.r['probes'] if p['initial']['packed']&255==27 and p['execution']['stop']==53046];self.assertTrue(rows)
|
| 25 |
+
for p in rows:self.assertEqual(p['initial'],p['final'])
|
| 26 |
+
def test_no_ammo_consumption_and_request_publication(self):
|
| 27 |
+
for p in self.r['probes']:
|
| 28 |
+
for k in ['weapons','request260','request264','resource','field216']:self.assertEqual(p['initial'][k],p['final'][k])
|
| 29 |
+
if __name__=='__main__':unittest.main()
|