qvm: repeated contacts
Browse files- docs/ASSET_PIPELINE_TODO.md +3 -0
- docs/FINDINGS.md +7 -0
- docs/PROVISIONAL_TODO.md +3 -0
- docs/RESEARCH_LEDGER.md +4 -0
- docs/REVERSE_ENGINEERING_TODO.md +6 -0
- docs/research/QVM_SLIDE_LOOP.md +3 -0
- docs/research/QVM_SLIDE_REPEATED.md +35 -0
- docs/research/README.md +3 -0
- docs/research/qvm-slide-repeated.json +0 -0
- scripts/analyze_qvm_slide_repeated.py +58 -0
- scripts/test_qvm_slide_repeated.py +98 -0
docs/ASSET_PIPELINE_TODO.md
CHANGED
|
@@ -288,3 +288,6 @@ Research progress: [QVM secondary-plane solver](research/QVM_SLIDE_SOLVER.md) co
|
|
| 288 |
|
| 289 |
|
| 290 |
Research progress: [QVM bump/common exit/second trace](research/QVM_SLIDE_LOOP.md) completes bounded RE-485–487: four-bump gate, end/saved vector precedence/flag/return policy and48 evaluated contact-to-second-request chains with complete supplied clear/allsolid exits. RE-484/488 retain repeated contact/native collision/full state/runtime/platform work; broad game/rendering milestones remain open.
|
|
|
|
|
|
|
|
|
|
|
|
| 288 |
|
| 289 |
|
| 290 |
Research progress: [QVM bump/common exit/second trace](research/QVM_SLIDE_LOOP.md) completes bounded RE-485–487: four-bump gate, end/saved vector precedence/flag/return policy and48 evaluated contact-to-second-request chains with complete supplied clear/allsolid exits. RE-484/488 retain repeated contact/native collision/full state/runtime/platform work; broad game/rendering milestones remain open.
|
| 291 |
+
|
| 292 |
+
|
| 293 |
+
Research progress: [QVM continuous repeated contacts](research/QVM_SLIDE_REPEATED.md) completes bounded RE-489–491: actual trace3/4, accumulated plane/time/end/touch/impact state and four-bump exhaustion versus early returns across76 probes. Native responses remain supplied. RE-488/492 retain native collision/full callers/legal state/runtime/platform work; broad game/rendering milestones remain open.
|
docs/FINDINGS.md
CHANGED
|
@@ -590,3 +590,10 @@ Bounded qagame paths recover bomb-plant/inactivity correction requests, direct f
|
|
| 590 |
**F-224 — Common-exit precedence:**gravity copies end velocity, then nonzero movement timer overrides it with saved velocity. Local248 zero clears2048. Return reflects nonzero bump counter, so second-trace clear can return1. Early solid/capacity/third-plane returns bypass this policy. [EXIT-001](research/QVM_SLIDE_LOOP.md).
|
| 591 |
|
| 592 |
**F-225 — Actual second request/exit:**48 chains carry evaluated first-contact/solver state into source-computed reduced-time endpoint/callback and complete supplied clear/allsolid exits. Clear copies endpoint and applies common exit; allsolid zeros only Z before copying/cleanup. Native trace consistency/repeated contacts/full caller simulation remain open. [LOOPCHAIN-001](research/QVM_SLIDE_LOOP.md).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 590 |
**F-224 — Common-exit precedence:**gravity copies end velocity, then nonzero movement timer overrides it with saved velocity. Local248 zero clears2048. Return reflects nonzero bump counter, so second-trace clear can return1. Early solid/capacity/third-plane returns bypass this policy. [EXIT-001](research/QVM_SLIDE_LOOP.md).
|
| 591 |
|
| 592 |
**F-225 — Actual second request/exit:**48 chains carry evaluated first-contact/solver state into source-computed reduced-time endpoint/callback and complete supplied clear/allsolid exits. Clear copies endpoint and applies common exit; allsolid zeros only Z before copying/cleanup. Native trace consistency/repeated contacts/full caller simulation remain open. [LOOPCHAIN-001](research/QVM_SLIDE_LOOP.md).
|
| 593 |
+
|
| 594 |
+
|
| 595 |
+
**F-226 — Repeated-contact state:**continuous57714 retains actual planes/working/end vectors, reduces already reduced remaining time and deduplicates touch entities across four callbacks. Zero time alone does not stop these supplied-response fixtures. Native/legal contact domains remain unverified. [REPEAT-001](research/QVM_SLIDE_REPEATED.md).
|
| 596 |
+
|
| 597 |
+
**F-227 — Accumulated impact/returns:**a once-supplied impact maximum persists and only increases across contacts; caller reset/consumers remain open.76 probes reach common, third-plane, allsolid and capacity exits; two return on the first contact without consuming later prepared records. [REPEAT-002](research/QVM_SLIDE_REPEATED.md).
|
| 598 |
+
|
| 599 |
+
**F-228 — Actual exhaustion:**four normal contacts reach counter4/common exit; fourth-clear reaches counter3/common exit. Both return1 and apply end/saved vector precedence. Fourth allsolid/capacity/third-plane returns bypass that suffix and leave counter3. Continuous synthetic state is verified; native collision/full callers/platform gameplay remain open. [REPEAT-003](research/QVM_SLIDE_REPEATED.md).
|
docs/PROVISIONAL_TODO.md
CHANGED
|
@@ -600,3 +600,6 @@ Research progress: [QVM secondary-plane solver](research/QVM_SLIDE_SOLVER.md) co
|
|
| 600 |
|
| 601 |
|
| 602 |
Research progress: [QVM bump/common exit/second trace](research/QVM_SLIDE_LOOP.md) completes bounded RE-485–487: four-bump gate, end/saved vector precedence/flag/return policy and48 evaluated contact-to-second-request chains with complete supplied clear/allsolid exits. RE-484/488 retain repeated contact/native collision/full state/runtime/platform work; broad game/rendering milestones remain open.
|
|
|
|
|
|
|
|
|
|
|
|
| 600 |
|
| 601 |
|
| 602 |
Research progress: [QVM bump/common exit/second trace](research/QVM_SLIDE_LOOP.md) completes bounded RE-485–487: four-bump gate, end/saved vector precedence/flag/return policy and48 evaluated contact-to-second-request chains with complete supplied clear/allsolid exits. RE-484/488 retain repeated contact/native collision/full state/runtime/platform work; broad game/rendering milestones remain open.
|
| 603 |
+
|
| 604 |
+
|
| 605 |
+
Research progress: [QVM continuous repeated contacts](research/QVM_SLIDE_REPEATED.md) completes bounded RE-489–491: actual trace3/4, accumulated plane/time/end/touch/impact state and four-bump exhaustion versus early returns across76 probes. Native responses remain supplied. RE-488/492 retain native collision/full callers/legal state/runtime/platform work; broad game/rendering milestones remain open.
|
docs/RESEARCH_LEDGER.md
CHANGED
|
@@ -371,3 +371,7 @@ Completed bounded RE-481–483 with `analyze_qvm_slide_solver.py`: verifies ship
|
|
| 371 |
## 2026-10-16 — Game-QVM bump gate, common exit and second-trace chains
|
| 372 |
|
| 373 |
Completed bounded RE-485–487 with `analyze_qvm_slide_loop.py`: verifies57714 counter initialization/59637–59707,12 increment/cap probes,24 common-exit probes and48 actual contact-to-second-trace chains. LOOP-001/EXIT-001/LOOPCHAIN-001/F-223–225 recover literal cap4/counter0, increment and strict signed counter<cap continuation; gravity end-vector copy followed by timer saved-vector override, local248 flag2048 cleanup and counter-based Boolean return; evaluated first-contact/gate/solver state through source-computed reduced-time endpoint/callback and complete supplied second clear/allsolid exits. Clear after one contact returns1; allsolid zeros only Z before endpoint copying/common cleanup. Chains retain actual first touch count without another touch. Both native trace records/roots and impact initial0 remain supplied; allsolid fixtures also supply fraction1 to establish source priority without claiming physical consistency. Repeated contact solving, third/fourth trace/exhaustion composition, native callback/legal records/impact producers-consumers and complete step/wrapper/mode/main state remain unverified. No original executable/full QVM/native collision/physics/rendering executes. Eight independent tests verify counter boundaries/literal initialization, all suffix copy/flag/return combinations, source-state transfers/previous solver oracle, rounded remaining time/endpoints/callback arguments, exact clear/allsolid state/touch retention, provenance/boundaries and supplied-effect scope. All583 tests pass. Direct slide-solver report regenerates byte-identically; new report reproduces twice byte-identically (451908 bytes). Storage/filter setup, documentation links and whitespace checks pass. No assets or existing analyzer/evaluator code changed. RE-484 remains open; RE-488 tracks accumulated repeated contact/time/plane/touch/impact state, native collision/side effects/legal records, complete slide/step/wrapper/mode/main and macOS/Linux Rust/Bevy/Solari gameplay validation. Broad game/assets/rendering/protocol milestones remain open.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 371 |
## 2026-10-16 — Game-QVM bump gate, common exit and second-trace chains
|
| 372 |
|
| 373 |
Completed bounded RE-485–487 with `analyze_qvm_slide_loop.py`: verifies57714 counter initialization/59637–59707,12 increment/cap probes,24 common-exit probes and48 actual contact-to-second-trace chains. LOOP-001/EXIT-001/LOOPCHAIN-001/F-223–225 recover literal cap4/counter0, increment and strict signed counter<cap continuation; gravity end-vector copy followed by timer saved-vector override, local248 flag2048 cleanup and counter-based Boolean return; evaluated first-contact/gate/solver state through source-computed reduced-time endpoint/callback and complete supplied second clear/allsolid exits. Clear after one contact returns1; allsolid zeros only Z before endpoint copying/common cleanup. Chains retain actual first touch count without another touch. Both native trace records/roots and impact initial0 remain supplied; allsolid fixtures also supply fraction1 to establish source priority without claiming physical consistency. Repeated contact solving, third/fourth trace/exhaustion composition, native callback/legal records/impact producers-consumers and complete step/wrapper/mode/main state remain unverified. No original executable/full QVM/native collision/physics/rendering executes. Eight independent tests verify counter boundaries/literal initialization, all suffix copy/flag/return combinations, source-state transfers/previous solver oracle, rounded remaining time/endpoints/callback arguments, exact clear/allsolid state/touch retention, provenance/boundaries and supplied-effect scope. All583 tests pass. Direct slide-solver report regenerates byte-identically; new report reproduces twice byte-identically (451908 bytes). Storage/filter setup, documentation links and whitespace checks pass. No assets or existing analyzer/evaluator code changed. RE-484 remains open; RE-488 tracks accumulated repeated contact/time/plane/touch/impact state, native collision/side effects/legal records, complete slide/step/wrapper/mode/main and macOS/Linux Rust/Bevy/Solari gameplay validation. Broad game/assets/rendering/protocol milestones remain open.
|
| 374 |
+
|
| 375 |
+
## 2026-10-16 — Game-QVM continuous repeated contacts and four-bump exhaustion
|
| 376 |
+
|
| 377 |
+
Completed bounded RE-489–491 with `analyze_qvm_slide_repeated.py`: continuous shipped57714 evaluation across76 finite probes, actual third/fourth callbacks and accumulated plane/working/end/saved/time/touch/impact state. REPEAT-001–003/F-226–228 recover repeated normal nudges versus append/capacity, current-time reduction, entity8 dedup/1022 sentinel/entity9 insertion, impact initialized once and retained through multiple source solver passes, and actual exhaustion/common-exit precedence versus early returns. Outcomes:44 common exits,14 third-plane returns,12 allsolid returns,6 capacity returns. Two third-plane probes return at contact1 without consuming later prepared records; remaining74 reach four callbacks. Four-contact exhaustion leaves counter4, fourth-clear leaves3 and both apply gravity/end then timer/saved precedence; early fourth returns leave3 and skip suffix. Two zero-timestep fixtures still issue four traces and exhaust with unchanged origin. Native roots/ordered records/interpolated positions and initial impact remain supplied; trace legality/reachability/native side effects/impact reset-consumers/full callers/runtime remain unverified. Actual39253 touch registration executes within the bounded evaluator; no original executable/full QVM/native collision/physics/rendering executes. Eight tests compare all issued request/state/contact/gate/solver/counter/suffix/final words with an independent ordered-float state machine plus exit-family/capacity/touch/time/impact/timer/zero-time/root/ABI/provenance/scope checks. All591 tests pass. Direct slide-loop report regenerates byte-identically; new report reproduces twice byte-identically (1672861 bytes, below normal-Git2MiB). Storage/filter setup, documentation links and whitespace checks pass. No assets or existing analyzer/evaluator code changed. RE-488 remains open for broader native/caller/runtime scope; RE-492 tracks actual native trace/BSP collision/side effects, legal state/record domains, impact producers/consumers, complete slide-to-step/wrapper/mode/main shared state and macOS/Linux Rust/Bevy/Solari gameplay. Broad game/assets/rendering/protocol milestones remain open.
|
docs/REVERSE_ENGINEERING_TODO.md
CHANGED
|
@@ -594,3 +594,9 @@ Purpose: turn the supplied installation into an evidence-backed specification of
|
|
| 594 |
- [x] RE-486 Recover common-exit end/saved vector precedence, contact-local flag cleanup and counter-based return ([EXIT-001](research/QVM_SLIDE_LOOP.md)).
|
| 595 |
- [x] RE-487 Carry evaluated contact/solver state into actual second trace request and complete clear/allsolid exits ([LOOPCHAIN-001](research/QVM_SLIDE_LOOP.md)).
|
| 596 |
- [ ] RE-488 Recover repeated contact solves through trace3/4/exhaustion and accumulated plane/time/touch/impact state; native collision/legal records/side effects/impact producers-consumers; complete slide/step/wrapper/mode/main composition and macOS/Linux Rust/Bevy/Solari gameplay. Continue broader game/assets/rendering/protocol work.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 594 |
- [x] RE-486 Recover common-exit end/saved vector precedence, contact-local flag cleanup and counter-based return ([EXIT-001](research/QVM_SLIDE_LOOP.md)).
|
| 595 |
- [x] RE-487 Carry evaluated contact/solver state into actual second trace request and complete clear/allsolid exits ([LOOPCHAIN-001](research/QVM_SLIDE_LOOP.md)).
|
| 596 |
- [ ] RE-488 Recover repeated contact solves through trace3/4/exhaustion and accumulated plane/time/touch/impact state; native collision/legal records/side effects/impact producers-consumers; complete slide/step/wrapper/mode/main composition and macOS/Linux Rust/Bevy/Solari gameplay. Continue broader game/assets/rendering/protocol work.
|
| 597 |
+
|
| 598 |
+
|
| 599 |
+
- [x] RE-489 Evaluate continuous57714 through repeated contacts/trace3/4 with actual plane/end/time/touch state and source solver effects ([REPEAT-001](research/QVM_SLIDE_REPEATED.md)).
|
| 600 |
+
- [x] RE-490 Retain supplied initial impact across contacts and recover accumulated max/early-return/capacity/touch-sentinel behavior with complete state checks ([REPEAT-002](research/QVM_SLIDE_REPEATED.md)).
|
| 601 |
+
- [x] RE-491 Evaluate actual four-contact exhaustion versus fourth-clear/allsolid/plane returns, preserving counter and common-exit precedence ([REPEAT-003](research/QVM_SLIDE_REPEATED.md)).
|
| 602 |
+
- [ ] RE-492 Recover native trace/BSP collision/side effects, impact reset/consumers/legal state-record domains; compose complete evaluated slide-to-step/wrapper/mode/main shared state and validate macOS/Linux Rust/Bevy/Solari gameplay. Continue broader game/assets/rendering/protocol work.
|
docs/research/QVM_SLIDE_LOOP.md
CHANGED
|
@@ -33,3 +33,6 @@ All48 chains complete helper57714 for their supplied second-record branch. They
|
|
| 33 |
Eight tests check12 increment/cap cases and literal initialization,24 suffix copy/flag/return cases,48 exact endpoint/state transfers, prior solver outputs against its independent oracle, callback arguments, no extra touch, clear/allsolid priority and output words, source provenance/boundaries and explicit supplied-effect limits. Reproducibility/full-suite/storage/link/whitespace outcomes are recorded in the research ledger.
|
| 34 |
|
| 35 |
RE-484 remains open for its broad repeated-contact/native/runtime scope. RE-488 tracks repeated contact solves through trace3/4 and exhaustion; shared plane/time/touch/impact accumulation; native collision/trace legality, actual callback side effects and impact producers/consumers; complete slide-to-step/wrapper/mode/main composition and macOS/Linux Rust/Bevy/Solari gameplay. Other game, asset, rendering and protocol milestones remain open.
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
Eight tests check12 increment/cap cases and literal initialization,24 suffix copy/flag/return cases,48 exact endpoint/state transfers, prior solver outputs against its independent oracle, callback arguments, no extra touch, clear/allsolid priority and output words, source provenance/boundaries and explicit supplied-effect limits. Reproducibility/full-suite/storage/link/whitespace outcomes are recorded in the research ledger.
|
| 34 |
|
| 35 |
RE-484 remains open for its broad repeated-contact/native/runtime scope. RE-488 tracks repeated contact solves through trace3/4 and exhaustion; shared plane/time/touch/impact accumulation; native collision/trace legality, actual callback side effects and impact producers/consumers; complete slide-to-step/wrapper/mode/main composition and macOS/Linux Rust/Bevy/Solari gameplay. Other game, asset, rendering and protocol milestones remain open.
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
Follow-up: [continuous repeated-contact recovery](QVM_SLIDE_REPEATED.md) completes bounded RE-489–491: source solver/trace3/4, accumulated planes/time/touch/impact and actual exhaustion. Native collision/legal records/full caller/runtime scope remains open under RE-488/492.
|
docs/research/QVM_SLIDE_REPEATED.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# QVM continuous repeated contacts and bump exhaustion
|
| 2 |
+
|
| 3 |
+
This batch completes bounded RE-489–491 / F-226–228 by evaluating shipped qagame helper57714 continuously through repeated supplied contacts, trace3/4, exhaustion and early returns. It extends [the isolated bump/second-trace recovery](QVM_SLIDE_LOOP.md). No original executable, full QVM, native collision, physics or rendering executes; the native trace/root responses remain supplied.
|
| 4 |
+
|
| 5 |
+
Reproduce with `python3 scripts/analyze_qvm_slide_repeated.py`; validate with `python3 scripts/test_qvm_slide_repeated.py`. The [machine report](qvm-slide-repeated.json) retains source identity, all issued callback arguments/records, state checkpoints, supplied roots, evaluated touch-child summaries and whole-helper trace hashes. Synthetic addresses keep the same local frame across every segment. Source loops and solver instructions run directly; prior slice helpers do not supply solver return/state or reinitialize the impact maximum between contacts.
|
| 6 |
+
|
| 7 |
+
## REPEAT-001 — Continuous requests and state accumulation (RE-489)
|
| 8 |
+
|
| 9 |
+
Seventy-six probes vary six four-slot record patterns, gravity, movement timer, initial ground plane and initial impact0/100, with two zero-time and two first-contact early-return additions. The100-impact variants use timer0; timer16 variants use initial impact0. Patterns include repeated X normals with fractions0 or0.5, distinct X/Y/Z/-X normals, a reclip sequence, and a clear or allsolid fourth record. These input combinations establish finite branch behavior, not physically consistent contacts or reachable gameplay states.
|
| 10 |
+
|
| 11 |
+
The first direction/optional ground planes survive into later iterations. Each partial contact registers its entity through evaluated39253, reduces current remaining time by rounded `time - time * fraction`, and enters capacity/dedup/append logic with the actual current array and velocity. Repeated normals nudge working velocity without appending; distinct normals can grow the array until a later capacity return. End/saved vectors retain their separate roles across solver iterations. Every new request computes its endpoint from current origin, current working velocity and current remaining time.
|
| 12 |
+
|
| 13 |
+
The four entity slots8,8,1022,9 exercise touch deduplication and the1022 sentinel. Four-contact duplicate fixtures finish with touches[8,9], not four entries. Every0.5 contact halves the already reduced time in ordered binary32 arithmetic. Fraction0 retains time and origin before plane/solver work. Zero initial timestep does not itself stop the loop: both zero-time probes issue four callbacks and exhaust the counter with unchanged origin. Supplied collision responses at zero time remain deliberately synthetic.
|
| 14 |
+
|
| 15 |
+
## REPEAT-002 — Retained impact and early-return priority (RE-490)
|
| 16 |
+
|
| 17 |
+
Global35024000 is supplied once at entry. The same memory word is then retained across the complete helper evaluation, including intervening duplicate contacts and multiple solver passes. Selected approach tests increase it only when the negated dot exceeds the current maximum; it never decreases in these fixtures. Initial100 remains100 throughout; selected initial0 probes retain a previously increased value into later requests. Its real caller initialization, gameplay interpretation and downstream consumers remain open.
|
| 18 |
+
|
| 19 |
+
The continuous report distinguishes all four reached exit families:44 common exits,14 third-plane returns,12 allsolid returns and6 capacity returns. Except for the two supplemental first-contact third-plane returns, every probe reaches four actual callbacks. The two supplemental probes prepare four records but return at the first contact; the remaining three records never become native requests or evaluated child effects.
|
| 20 |
+
|
| 21 |
+
Capacity is tested before duplicate detection and zeros all PS velocity components without common cleanup. Third-plane rejection likewise zeros PS velocity while leaving the original end vector uncommitted. Allsolid zeros only Z and bypasses endpoint copying and common cleanup. Tests compare final vectors, flags, end/saved state, touch list, plane array, impact, remaining time and counter for these paths against an independent state-machine oracle, rather than inferring completion from a supplied return word.
|
| 22 |
+
|
| 23 |
+
## REPEAT-003 — Fourth trace and actual exhaustion (RE-491)
|
| 24 |
+
|
| 25 |
+
Four normal contact continuations advance the actual bump counter from0 through4. The failed strict counter<4 comparison then runs the common exit. A clear fourth trace instead reaches that exit with counter3. Both return1. The exit copies end velocity when gravity is enabled, then an active movement timer restores the saved vector over it; local248 controls2048 cleanup. These policies now consume vectors and contact-local flags accumulated by repeated evaluated contacts, rather than isolated suffix inputs.
|
| 26 |
+
|
| 27 |
+
A fourth allsolid/capacity/third-plane early return leaves counter3 and skips the common-exit timer restoration, gravity copy and cleanup. Tests distinguish that behavior from ordinary exhaustion and fourth-clear outcomes, including exact signed-zero words inherited from clipping/projection.
|
| 28 |
+
|
| 29 |
+
## Validation and remaining work
|
| 30 |
+
|
| 31 |
+
Eight tests verify all76 probes against an independent ordered-float state machine: prefix preparation, every issued endpoint/interpolation, contact/time/touch update, gate/solver result, counter transition, suffix and final return/state. Additional checks require all exit families, exact fourth-slot/capacity boundaries, impact monotonicity/retention, timer override versus early return, zero-time callbacks, native request/root counts and arguments, source hash and supplied-response scope. The independent model reuses previously tested prefix/gate/solver formulas but does not execute the analyzer or shared instruction evaluator to predict state.
|
| 32 |
+
|
| 33 |
+
Native square roots come from finite math at recorded source checkpoints. Native trace records and interpolated endpoint positions come from ordered fixture slots, not a BSP collision implementation. Trace bounds/normal domains, callback side effects, exceptional/alias/control-state cases and actual runtime legality remain unverified. No complete step/wrapper/mode/main movement simulation or platform/Rust/Bevy/Solari gameplay claim follows from this bounded helper evaluation.
|
| 34 |
+
|
| 35 |
+
RE-488 remains open for its broader native/caller/runtime scope; continuous finite repeated-contact/exhaustion behavior is now covered by RE-489–491. RE-492 tracks real native trace/BSP collision and callback side effects, impact reset/consumers, legal state/normal/record domains, complete evaluated slide-to-step/wrapper/mode/main shared state and macOS/Linux Rust/Bevy/Solari gameplay. Other game/assets/rendering/protocol milestones remain open.
|
docs/research/README.md
CHANGED
|
@@ -201,3 +201,6 @@ The extension collector adds five focused tests for native tail calls, command-r
|
|
| 201 |
|
| 202 |
|
| 203 |
[QVM bump gate, common exit and second trace](QVM_SLIDE_LOOP.md) adds RE-485–487. Reproduce with `python3 scripts/analyze_qvm_slide_loop.py`; check with `python3 scripts/test_qvm_slide_loop.py`. Actual first-contact state continues into second clear/allsolid exits; repeated contact/native collision/full runtime remain open.
|
|
|
|
|
|
|
|
|
|
|
|
| 201 |
|
| 202 |
|
| 203 |
[QVM bump gate, common exit and second trace](QVM_SLIDE_LOOP.md) adds RE-485–487. Reproduce with `python3 scripts/analyze_qvm_slide_loop.py`; check with `python3 scripts/test_qvm_slide_loop.py`. Actual first-contact state continues into second clear/allsolid exits; repeated contact/native collision/full runtime remain open.
|
| 204 |
+
|
| 205 |
+
|
| 206 |
+
[QVM continuous repeated contacts and exhaustion](QVM_SLIDE_REPEATED.md) adds RE-489–491. Reproduce with `python3 scripts/analyze_qvm_slide_repeated.py`; check with `python3 scripts/test_qvm_slide_repeated.py`. The helper runs continuously with evaluated touch registration and supplied native roots/traces; full callers/native collision/runtime remain open.
|
docs/research/qvm-slide-repeated.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
scripts/analyze_qvm_slide_repeated.py
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Continuous bounded helper57714 with supplied native trace/root responses."""
|
| 3 |
+
import itertools,json
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
from analyze_bsp_references import trace_fields
|
| 6 |
+
from analyze_deferred_auth import trace_slice
|
| 7 |
+
from analyze_qvm import decode,write_json
|
| 8 |
+
from analyze_qvm_acceleration import PS,FRAME,word,number,f
|
| 9 |
+
from analyze_qvm_slide_prefix import LOCAL,seed,vec
|
| 10 |
+
from analyze_qvm_slide_planes import planes
|
| 11 |
+
from analyze_qvm_traversal_query import root_word
|
| 12 |
+
from analyze_qvm_animation_contacts import evaluate as contact_effect
|
| 13 |
+
from analyze_vm_extensions import verified
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
def state(m):
|
| 17 |
+
return {'origin':vec(m,PS+20),'velocity':vec(m,PS+32),'end':vec(m,LOCAL+148),'saved':vec(m,LOCAL+252),'planes':planes(m),'remaining':m[LOCAL+224]&0xffffffff,'impact':m[35024000]&0xffffffff,'flags':m[PS+12]&0xffffffff,'normal_xy':[m[PS+96]&0xffffffff,m[PS+100]&0xffffffff],'keep':m[LOCAL+248],'bump':m[LOCAL+240],'touches':[m[FRAME+56+4*i] for i in range(m[FRAME+52])]}
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
def run(ins,name,specs,g,timer,ground,dt,impact):
|
| 21 |
+
m=seed(flags=2080,timer=timer,plane=ground,dt=dt);m[35024000]=word(impact);m[LOCAL+352]=g;pc=57715;roots=[];requests=[];calls=[];trace=[];root=0;children=[];suffix=False
|
| 22 |
+
stops=[57936,58200,58302,58312,58476,59191,59405,59637,59648]
|
| 23 |
+
for segment in range(128):
|
| 24 |
+
t=trace_slice(ins,57715,59708,m,{},resume_at=pc,stop_targets=[s for s in stops if s!=pc],local_base=LOCAL,call_results={57979:root,59215:root,59429:root},halt_on_leave=True,capture_stack=True,limit=8192);m=t['memory'];pc=t['stop'];trace+=t['trace'];calls+=t['calls']
|
| 25 |
+
if t['trace'] and ins[t['trace'][-1]]['opcode']=='LEAVE':
|
| 26 |
+
return {'name':name,'gravity':g,'timer':timer,'ground':ground,'dt':word(dt),'initial_impact':word(impact),'specs':specs,'requests':requests,'roots':roots,'touch_children':children,'calls':calls,'common_exit':suffix,'return_word':t['stack'][-1],'leave_instruction':t['trace'][-1],'final':state(m),**trace_fields({'trace':trace},False)}
|
| 27 |
+
if pc in [57936,59191,59405]:
|
| 28 |
+
raw=vec(m,PS+32 if pc==57936 else LOCAL+100);root=root_word(list(map(number,raw)));roots.append({'checkpoint':pc,'raw':raw,'supplied_root':root})
|
| 29 |
+
elif pc==58200:
|
| 30 |
+
index=len(requests);assert index<len(specs),'Unexpected extra trace';spec=specs[index];c=t['calls'][-1];a=c['args'];start=vec(m,a[12]);end=vec(m,a[24]);point=[word(f(number(x)+f(f(number(y)-number(x))*f(spec['fraction'])))) for x,y in zip(start,end)];record=[spec.get('solid',0),0,word(spec['fraction']),*point,*map(word,spec['normal']),0,0,0,0,spec['entity']]
|
| 31 |
+
requests.append({'before':state(m),'call':c,'start':start,'end':end,'record':record})
|
| 32 |
+
for i,v in enumerate(record):m[LOCAL+164+i*4]=v
|
| 33 |
+
elif pc==58302:
|
| 34 |
+
c=t['calls'][-1];child=contact_effect(ins,39253,c['args'][8],m);m=child['memory'];children.append({'entity':c['args'][8],'calls':child['calls'],**trace_fields(child,False)})
|
| 35 |
+
elif pc==58312:requests[-1]['after_contact']=state(m)
|
| 36 |
+
elif pc==58476:requests[-1]['after_append']=state(m)
|
| 37 |
+
elif pc==59637:requests[-1]['after_solver_or_duplicate']=state(m)
|
| 38 |
+
elif pc==59648:suffix=True
|
| 39 |
+
raise AssertionError('Segment bound exceeded')
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
def specs(normals,fraction=.5,terminal=None):
|
| 43 |
+
result=[{'fraction':fraction,'normal':list(normal),'entity':entity} for normal,entity in zip(normals,[8,8,1022,9])]
|
| 44 |
+
if terminal:
|
| 45 |
+
result[-1].update({'fraction':1,'solid':int(terminal=='solid')})
|
| 46 |
+
return result
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
def main():
|
| 50 |
+
q=json.loads(Path('docs/research/qvm/qagame.json').read_text());_,ins=decode(verified(Path(q['source']['member']['output']).read_bytes(),q['sha256']))
|
| 51 |
+
patterns={'duplicate_zero':specs([(1,0,0)]*4,0),'duplicate_halves':specs([(1,0,0)]*4),'distinct':specs([(1,0,0),(0,1,0),(0,0,1),(-1,0,0)]),'reclip':specs([(-1,0,0),(0,-1,0),(-.6,.8,0),(0,0,1)]),'fourth_clear':specs([(1,0,0)]*4,terminal='clear'),'fourth_solid':specs([(1,0,0)]*4,terminal='solid')}
|
| 52 |
+
probes=[run(ins,name,records,*v) for name,records in patterns.items() for v in itertools.product([0,1],[0,16],[0,1],[.016],[0,100]) if v[4]==0 or v[1]==0]
|
| 53 |
+
probes += [run(ins,'zero_dt',patterns['duplicate_zero'],g,0,0,0,0) for g in [0,1]]
|
| 54 |
+
probes += [run(ins,'early_crease',specs([(0,0,-1)]*4),g,0,1,.016,0) for g in [0,1]]
|
| 55 |
+
out={'source':q['source'],'sha256':q['sha256'],'probes':probes,'limitations':'Continuous bounded finite evaluation of shipped helper57714 with supplied native responses; no original executable/full QVM/native collision/physics/rendering executes. Native roots and ordered trace records/interpolated endpoints are supplied, not collision-derived; normal/trace consistency and reachable domains remain unverified. Actual39253 touch registration is evaluated. Impact initialization is supplied once and retained across all contacts, not an evaluated caller reset. Four trace slots are prepared; unreachable later slots are not executed. Full step/wrapper/mode/main state, native side effects/impact consumers and macOS/Linux/Rust/Bevy/Solari gameplay remain open.'};write_json(Path('docs/research/qvm-slide-repeated.json'),out);print('Recovered continuous repeated-contact/trace/exhaustion state')
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
if __name__=='__main__':main()
|
scripts/test_qvm_slide_repeated.py
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Independent ordered state machine for continuous repeated slide evaluation."""
|
| 3 |
+
import hashlib,json,math
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
import unittest
|
| 6 |
+
from test_qvm_ground import word,n,f
|
| 7 |
+
from test_qvm_slide_prefix import prefix_oracle
|
| 8 |
+
from test_qvm_slide_planes import gate_oracle,dot
|
| 9 |
+
from test_qvm_slide_solver import solver_oracle
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
def oracle(test,p):
|
| 13 |
+
a={'velocity_float_words':list(map(word,[10,20,30])),'normal_float_words':list(map(word,[0,0,1])),'dt_float_word':p['dt'],'gravity_word':800,'plane_word':p['ground']}
|
| 14 |
+
v,end,saved,planes,_,_=prefix_oracle({'initial':a,'gravity_on_word':p['gravity']})
|
| 15 |
+
s={'origin':list(map(word,[100,200,300])),'velocity':v,'end':end,'saved':saved,'planes':planes,'remaining':p['dt'],'impact':p['initial_impact'],'flags':2080,'normal_xy':[0x12345678,0x23456789],'keep':0,'bump':0,'touches':[]}
|
| 16 |
+
def suffix():
|
| 17 |
+
if p['gravity']:s['velocity']=s['end'][:]
|
| 18 |
+
if p['timer']:s['velocity']=s['saved'][:]
|
| 19 |
+
if not s['keep']:s['flags']&=~2048
|
| 20 |
+
reason=None
|
| 21 |
+
for q,spec in zip(p['requests'],p['specs']):
|
| 22 |
+
test.assertEqual(q['before'],s);test.assertEqual(q['start'],s['origin']);end=[word(f(n(x)+f(n(v)*n(s['remaining'])))) for x,v in zip(s['origin'],s['velocity'])];test.assertEqual(q['end'],end)
|
| 23 |
+
r=q['record'];test.assertEqual(r[2],word(spec['fraction']));point=[word(f(n(x)+f(f(n(y)-n(x))*f(spec['fraction'])))) for x,y in zip(s['origin'],end)];test.assertEqual(r[3:6],point)
|
| 24 |
+
if r[0]:s['velocity']=s['velocity'][:2]+[0];reason=58212;break
|
| 25 |
+
if n(r[2])>0:s['origin']=point
|
| 26 |
+
if n(r[2])==1:suffix();reason=59707;break
|
| 27 |
+
if p['gravity'] and n(word(-.3))<n(r[8])<n(word(.3)):
|
| 28 |
+
s['keep']=1;s['flags']|=2048;s['normal_xy']=r[6:8]
|
| 29 |
+
if r[13]!=1022 and r[13] not in s['touches']:s['touches']=s['touches']+[r[13]]
|
| 30 |
+
s['remaining']=word(f(n(s['remaining'])-f(n(s['remaining'])*n(r[2]))));test.assertEqual(q['after_contact'],s)
|
| 31 |
+
status,_,array,velocity=gate_oracle({'initial_plane_float_words':s['planes'],'initial_velocity_float_words':s['velocity'],'incoming_normal_float_words':r[6:9]});s['planes']=array;s['velocity']=velocity
|
| 32 |
+
if status=='capacity_return':reason=58346;break
|
| 33 |
+
if status=='appended':
|
| 34 |
+
test.assertEqual(q['after_append'],s)
|
| 35 |
+
result=solver_oracle({'initial':{'planes_float_words':s['planes'],'velocity_float_words':s['velocity'],'end_velocity_float_words':s['end'],'impact_float_word':s['impact']}})
|
| 36 |
+
status,_,_,s['velocity'],s['end'],s['impact'],_,_=result
|
| 37 |
+
if status=='third_plane_return':reason=59589;break
|
| 38 |
+
test.assertEqual(q['after_solver_or_duplicate'],s);s['bump']+=1
|
| 39 |
+
if s['bump']==4:suffix();reason=59707;break
|
| 40 |
+
test.assertIsNotNone(reason);test.assertEqual(p['leave_instruction'],reason);test.assertEqual(p['common_exit'],reason==59707);test.assertEqual(p['return_word'],1);test.assertEqual(p['final'],s)
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
class QvmSlideRepeatedTests(unittest.TestCase):
|
| 44 |
+
@classmethod
|
| 45 |
+
def setUpClass(cls):cls.r=json.loads(Path('docs/research/qvm-slide-repeated.json').read_text())
|
| 46 |
+
|
| 47 |
+
def test_all_continuous_state_transitions_against_independent_model(self):
|
| 48 |
+
self.assertEqual(len(self.r['probes']),76)
|
| 49 |
+
for p in self.r['probes']:oracle(self,p)
|
| 50 |
+
|
| 51 |
+
def test_actual_fourth_trace_and_all_exit_families(self):
|
| 52 |
+
self.assertEqual({p['leave_instruction'] for p in self.r['probes']},{59707,58346,59589,58212})
|
| 53 |
+
for p in self.r['probes']:
|
| 54 |
+
count=1 if p['name']=='early_crease' else 4;self.assertEqual(len(p['requests']),count);self.assertEqual([q['before']['bump'] for q in p['requests']],list(range(count)));self.assertLessEqual(len(p['final']['planes']),5)
|
| 55 |
+
caps=[p for p in self.r['probes'] if p['leave_instruction']==58346];self.assertTrue(caps)
|
| 56 |
+
for p in caps:self.assertEqual(len(p['requests'][-1]['after_contact']['planes']),5);self.assertEqual(p['final']['velocity'],[0,0,0]);self.assertNotIn('after_append',p['requests'][-1])
|
| 57 |
+
|
| 58 |
+
def test_touch_dedup_sentinel_and_geometric_time_accumulation(self):
|
| 59 |
+
for p in self.r['probes']:
|
| 60 |
+
for q in p['requests']:
|
| 61 |
+
if 'after_contact' in q:self.assertLessEqual(len(q['after_contact']['touches']),2);self.assertNotIn(1022,q['after_contact']['touches'])
|
| 62 |
+
if p['name']=='duplicate_halves':
|
| 63 |
+
self.assertEqual(p['final']['touches'],[8,9]);t=n(p['dt'])
|
| 64 |
+
for _ in range(4):t=f(t-f(t*.5))
|
| 65 |
+
self.assertEqual(p['final']['remaining'],word(t))
|
| 66 |
+
|
| 67 |
+
def test_impact_is_not_reset_between_contacts(self):
|
| 68 |
+
changed=False
|
| 69 |
+
for p in self.r['probes']:
|
| 70 |
+
words=[p['initial_impact']]+[q['before']['impact'] for q in p['requests']]+[p['final']['impact']];values=list(map(n,words));self.assertEqual(values,sorted(values))
|
| 71 |
+
if n(p['initial_impact'])==100:self.assertEqual(set(words),{word(100)})
|
| 72 |
+
changed|=any(q['before']['impact']!=p['initial_impact'] for q in p['requests'][1:])
|
| 73 |
+
self.assertTrue(changed)
|
| 74 |
+
|
| 75 |
+
def test_exhaustion_and_fourth_clear_apply_suffix_but_early_return_bypasses(self):
|
| 76 |
+
for p in self.r['probes']:
|
| 77 |
+
if p['common_exit']:
|
| 78 |
+
self.assertEqual(p['final']['bump'],3 if p['name']=='fourth_clear' else 4)
|
| 79 |
+
if p['timer']:self.assertEqual(p['final']['velocity'],p['requests'][0]['before']['saved'])
|
| 80 |
+
else:self.assertEqual(p['final']['bump'],0 if p['name']=='early_crease' else 3)
|
| 81 |
+
if p['name']=='fourth_solid':self.assertFalse(p['common_exit']);self.assertEqual(p['final']['origin'],p['requests'][-1]['before']['origin']);self.assertEqual(p['final']['velocity'],p['requests'][-1]['before']['velocity'][:2]+[0])
|
| 82 |
+
|
| 83 |
+
def test_zero_time_still_requests_four_traces(self):
|
| 84 |
+
zero=[p for p in self.r['probes'] if p['name']=='zero_dt'];self.assertEqual(len(zero),2)
|
| 85 |
+
for p in zero:self.assertEqual(len(p['requests']),4);self.assertEqual(p['final']['remaining'],0);self.assertEqual(p['final']['origin'],list(map(word,[100,200,300])));self.assertEqual(p['final']['bump'],4)
|
| 86 |
+
|
| 87 |
+
def test_native_requests_and_evaluated_touch_calls(self):
|
| 88 |
+
for p in self.r['probes']:
|
| 89 |
+
self.assertEqual(sum(c['target']==-25 for c in p['calls']),len(p['requests']));self.assertEqual(sum(c['target']==-107 for c in p['calls']),len(p['roots']));self.assertEqual(sum(c['target']==39253 for c in p['calls']),len(p['touch_children']))
|
| 90 |
+
for r in p['roots']:v=list(map(n,r['raw']));self.assertEqual(r['supplied_root'],word(math.sqrt(dot(v,v))))
|
| 91 |
+
for q in p['requests']:self.assertEqual(q['call']['instruction'],58198);self.assertEqual(q['call']['args']['8'],0x550000a4);self.assertEqual(q['call']['args']['32'],0x2010001)
|
| 92 |
+
|
| 93 |
+
def test_source_and_explicit_native_runtime_limits(self):
|
| 94 |
+
q=json.loads(Path('docs/research/qvm/qagame.json').read_text());self.assertEqual(self.r['source'],q['source']);self.assertEqual(self.r['sha256'],hashlib.sha256(Path(q['source']['member']['output']).read_bytes()).hexdigest())
|
| 95 |
+
for text in ['no original executable/full QVM/native collision/physics/rendering executes','Impact initialization is supplied once','unreachable later slots are not executed','normal/trace consistency and reachable domains remain unverified']:self.assertIn(text,self.r['limitations'])
|
| 96 |
+
|
| 97 |
+
|
| 98 |
+
if __name__=='__main__':unittest.main()
|