qvm: action probes
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_ACTION_PROBE.md +37 -0
- docs/research/QVM_COMBINED_GROUND.md +3 -0
- docs/research/QVM_GROUND_CALLEES.md +3 -0
- docs/research/README.md +3 -0
- docs/research/qvm-action-probe.json +0 -0
- scripts/analyze_qvm_action_probe.py +63 -0
- scripts/analyze_qvm_main_contact.py +5 -3
- scripts/test_qvm_action_probe.py +105 -0
docs/ASSET_PIPELINE_TODO.md
CHANGED
|
@@ -315,3 +315,6 @@ Research progress: [QVM allsolid recovery](research/QVM_RECOVERY.md) completes b
|
|
| 315 |
|
| 316 |
|
| 317 |
Research progress: [QVM combined posture/ground callees](research/QVM_COMBINED_GROUND.md) completes bounded RE-521–523: source-ordered shared posture/recovery/lost/landing/animation/touch state, temporal timers/hulls and reached movement/post environment across18 fixtures. RE-520/524 retain native/action/query/other modes/consumers/full runtime/platform work and broad game/rendering milestones.
|
|
|
|
|
|
|
|
|
|
|
|
| 315 |
|
| 316 |
|
| 317 |
Research progress: [QVM combined posture/ground callees](research/QVM_COMBINED_GROUND.md) completes bounded RE-521–523: source-ordered shared posture/recovery/lost/landing/animation/touch state, temporal timers/hulls and reached movement/post environment across18 fixtures. RE-520/524 retain native/action/query/other modes/consumers/full runtime/platform work and broad game/rendering milestones.
|
| 318 |
+
|
| 319 |
+
|
| 320 |
+
Research progress: [QVM54981 forward traces/rebase/main routing](research/QVM_ACTION_PROBE.md) completes bounded RE-525–527: contact-bit geometry/retrace, recursive origin/landing and actual post-timer main producer across42 standalone/16 main cases. RE-524/528 retain nested ground-loss action/query/other modes/native/consumers/full runtime/platform work and broad game/rendering milestones.
|
docs/FINDINGS.md
CHANGED
|
@@ -653,3 +653,10 @@ Bounded qagame paths recover bomb-plant/inactivity correction requests, direct f
|
|
| 653 |
**F-251 — Cross-helper temporal state:**ground-loss animation can reset posture's new leg timer200 before main aging; later landing/kick animation changes do not recompute earlier posture bounds/viewheight. Numeric queue/resource effects remain live into final content sampling. [COMBGROUND-002](research/QVM_COMBINED_GROUND.md).
|
| 654 |
|
| 655 |
**F-252 — Unified ground-to-motion-to-ground:**15 reached41768 fixtures evaluate30 slide children, then evaluate newly reached post-ground callees before final content sampling. Full recorded ground state and parent stores match independent formulas; native collision/full main/runtime remain open. [COMBGROUND-003](research/QVM_COMBINED_GROUND.md).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 653 |
**F-251 — Cross-helper temporal state:**ground-loss animation can reset posture's new leg timer200 before main aging; later landing/kick animation changes do not recompute earlier posture bounds/viewheight. Numeric queue/resource effects remain live into final content sampling. [COMBGROUND-002](research/QVM_COMBINED_GROUND.md).
|
| 654 |
|
| 655 |
**F-252 — Unified ground-to-motion-to-ground:**15 reached41768 fixtures evaluate30 slide children, then evaluate newly reached post-ground callees before final content sampling. Full recorded ground state and parent stores match independent formulas; native collision/full main/runtime remain open. [COMBGROUND-003](research/QVM_COMBINED_GROUND.md).
|
| 656 |
+
|
| 657 |
+
|
| 658 |
+
**F-253 — Forward contact-bit producer:**54981 clears flags12 behind an existing12/32 gate, normalizes planar forward input, probes viewpoint/feet and can retry excluding a returned entity. Supplied trace surface8 can set PS8/4; roots/native contacts/legal domains remain unverified. [ACTIONPROBE-001](research/QVM_ACTION_PROBE.md).
|
| 659 |
+
|
| 660 |
+
**F-254 — Recursive origin policy:**argument1 can rebase to supplied trace end Z+24, recursively evaluate argument0 and invoke actual landing with the parent entity if flags12 remain. Clear child suppresses landing while preserving the rebase. [ACTIONPROBE-002](research/QVM_ACTION_PROBE.md).
|
| 661 |
+
|
| 662 |
+
**F-255 — Actual main54981 routing:**16 post-timer action chains select eight evaluated41768, six omitted55465 and two omitted43626 requests from actual produced flags. Ground-loss's nested54981 request, query/other modes/native/full runtime remain open. [ACTIONPROBE-003](research/QVM_ACTION_PROBE.md).
|
docs/PROVISIONAL_TODO.md
CHANGED
|
@@ -627,3 +627,6 @@ Research progress: [QVM allsolid recovery](research/QVM_RECOVERY.md) completes b
|
|
| 627 |
|
| 628 |
|
| 629 |
Research progress: [QVM combined posture/ground callees](research/QVM_COMBINED_GROUND.md) completes bounded RE-521–523: source-ordered shared posture/recovery/lost/landing/animation/touch state, temporal timers/hulls and reached movement/post environment across18 fixtures. RE-520/524 retain native/action/query/other modes/consumers/full runtime/platform work and broad game/rendering milestones.
|
|
|
|
|
|
|
|
|
|
|
|
| 627 |
|
| 628 |
|
| 629 |
Research progress: [QVM combined posture/ground callees](research/QVM_COMBINED_GROUND.md) completes bounded RE-521–523: source-ordered shared posture/recovery/lost/landing/animation/touch state, temporal timers/hulls and reached movement/post environment across18 fixtures. RE-520/524 retain native/action/query/other modes/consumers/full runtime/platform work and broad game/rendering milestones.
|
| 630 |
+
|
| 631 |
+
|
| 632 |
+
Research progress: [QVM54981 forward traces/rebase/main routing](research/QVM_ACTION_PROBE.md) completes bounded RE-525–527: contact-bit geometry/retrace, recursive origin/landing and actual post-timer main producer across42 standalone/16 main cases. RE-524/528 retain nested ground-loss action/query/other modes/native/consumers/full runtime/platform work and broad game/rendering milestones.
|
docs/RESEARCH_LEDGER.md
CHANGED
|
@@ -407,3 +407,7 @@ Completed bounded RE-517–519 with `analyze_qvm_recovery.py`:34 standalone46296
|
|
| 407 |
## 2026-10-19 — Game-QVM combined posture and recovered ground callees
|
| 408 |
|
| 409 |
Completed bounded RE-521–523 with `analyze_qvm_combined_ground.py`:18 shared-state main fixtures combine actual posture with36 ground invocations, reached46296 recovery(6),46527 ground loss(6),45912 landing(15), direct39525 ground animation(3) and39253 touches(15). COMBGROUND-001–003/F-250–252 recover source-order child/caller interactions at both main ground boundaries, including posture leg timer200 reset by later ground-loss animation before aging versus retained200→184 paths, landing/main250→234 movement timer, event queue/resource retention and later animation without recomputing earlier posture hull/viewheight. Fifteen selected41768 fixtures evaluate30 slide children through actual step/wrapper/mode then post-ground/final contents; three41848 requests retain omitted effects. Independent child formulas and separate parent-store state machine verify full extended ground snapshots and live timer/mode inputs. Native contents/stand/ground/recovery/deep/slide/down/overlap/root responses and initial state remain supplied; action54981/logging/query/alternative-mode/other suffix/native consumers, legal collision domains/full53418/scheduler/platform gameplay remain omitted or unverified. No original executable/full QVM/native collision/physics/rendering executes. Eight tests verify all posture/helper/ground/caller states, exact source child order, temporal timer/hull/resource/event effects,30 independent slide predictions/step-wrapper-mode outputs, final content persistence, source identity and scope. All655 tests pass. Prior main-posture report regenerates byte-identically; new combined report reproduces twice byte-identically (1506360 bytes, below normal-Git2MiB). Storage/filter setup, documentation links and whitespace checks pass. No assets or existing analyzer/evaluator code changed. RE-520 remains open for broader scope; RE-524 tracks remaining action/query/mode/suffix/event consumers/native/legal/real producers and complete main/scheduler/macOS/Linux Rust/Bevy/Solari gameplay. Broad game/assets/rendering/protocol milestones remain open.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 407 |
## 2026-10-19 — Game-QVM combined posture and recovered ground callees
|
| 408 |
|
| 409 |
Completed bounded RE-521–523 with `analyze_qvm_combined_ground.py`:18 shared-state main fixtures combine actual posture with36 ground invocations, reached46296 recovery(6),46527 ground loss(6),45912 landing(15), direct39525 ground animation(3) and39253 touches(15). COMBGROUND-001–003/F-250–252 recover source-order child/caller interactions at both main ground boundaries, including posture leg timer200 reset by later ground-loss animation before aging versus retained200→184 paths, landing/main250→234 movement timer, event queue/resource retention and later animation without recomputing earlier posture hull/viewheight. Fifteen selected41768 fixtures evaluate30 slide children through actual step/wrapper/mode then post-ground/final contents; three41848 requests retain omitted effects. Independent child formulas and separate parent-store state machine verify full extended ground snapshots and live timer/mode inputs. Native contents/stand/ground/recovery/deep/slide/down/overlap/root responses and initial state remain supplied; action54981/logging/query/alternative-mode/other suffix/native consumers, legal collision domains/full53418/scheduler/platform gameplay remain omitted or unverified. No original executable/full QVM/native collision/physics/rendering executes. Eight tests verify all posture/helper/ground/caller states, exact source child order, temporal timer/hull/resource/event effects,30 independent slide predictions/step-wrapper-mode outputs, final content persistence, source identity and scope. All655 tests pass. Prior main-posture report regenerates byte-identically; new combined report reproduces twice byte-identically (1506360 bytes, below normal-Git2MiB). Storage/filter setup, documentation links and whitespace checks pass. No assets or existing analyzer/evaluator code changed. RE-520 remains open for broader scope; RE-524 tracks remaining action/query/mode/suffix/event consumers/native/legal/real producers and complete main/scheduler/macOS/Linux Rust/Bevy/Solari gameplay. Broad game/assets/rendering/protocol milestones remain open.
|
| 410 |
+
|
| 411 |
+
## 2026-10-19 — Game-QVM54981 forward probes, recursive rebase and actual main producer
|
| 412 |
+
|
| 413 |
+
Completed bounded RE-525–527 with `analyze_qvm_action_probe.py`:42 standalone54981 probes and16 actual main post-timer chains. ACTIONPROBE-001–003/F-253–255 recover existing12/32 entry and16 exit gates, clearing12, planar supplied-basis normalization/root/zero path, viewheight first trace and conditional entity-exclusion retry with mask65537, feet probe mask33619969 and trace-surface8-driven PS8/4 stores. Argument1 uses Z−24/ten-unit geometry, qualifying supplied endpoint rebase Z+24, actual disjoint-frame argument0 recursion and conditional45912 with parent entity/current snapshot state. Explicit rebase fixtures preserve[101,202,304] whether landing is suppressed or reached; native endpoint validity remains unverified. Actual main54981(0) consumes live aged posture/ground state before query/routing, producing eight evaluated41768, six omitted55465 and two omitted43626 requests. Main bridge adds optional action effect with byte-identical defaults. Ground-loss nested54981(1), query/alternative modes/other suffix effects remain omitted in reused chains. Native roots/records/positions/basis/state remain supplied; no original executable/full QVM/native collision/physics/rendering executes. Eight independent tests verify all guard/normalization/geometry/retry/flag/recursion/landing outputs and entry handoffs, parent entity/rebase persistence, source pointer/mask/root arguments/zero basis,16 posture-ground-timer-action snapshots, query/mode counts and reached slide/mode/post-ground states, provenance and scope. All663 tests pass. Prior main-contact and combined-ground reports regenerate byte-identically; new action report reproduces twice byte-identically (924731 bytes). Storage/filter setup, documentation links and whitespace checks pass. No assets or shared instruction evaluator changed. RE-524 remains open for broader scope; RE-528 tracks nested ground-loss action/query/other modes/native/legal/consumers/real producers and complete main/scheduler/macOS/Linux Rust/Bevy/Solari gameplay. Broad game/assets/rendering/protocol milestones remain open.
|
docs/REVERSE_ENGINEERING_TODO.md
CHANGED
|
@@ -648,3 +648,9 @@ Purpose: turn the supplied installation into an evidence-backed specification of
|
|
| 648 |
- [x] RE-522 Verify cross-helper timer/animation/event/resource order, including posture200 overwritten before aging and later animation without hull recomputation ([COMBGROUND-002](research/QVM_COMBINED_GROUND.md)).
|
| 649 |
- [x] RE-523 Carry unified ground state through reached mode/step/wrapper/slide and post-ground/final-content extended state ([COMBGROUND-003](research/QVM_COMBINED_GROUND.md)).
|
| 650 |
- [ ] RE-524 Recover54981/action/query, alternative-mode/suffix and event/PS216 consumers; native trace/content/root/collision ABI/legal domains and real input/basis/environment producers; complete53418/scheduler/macOS/Linux Rust/Bevy/Solari gameplay and broader game/assets/rendering/protocol work.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 648 |
- [x] RE-522 Verify cross-helper timer/animation/event/resource order, including posture200 overwritten before aging and later animation without hull recomputation ([COMBGROUND-002](research/QVM_COMBINED_GROUND.md)).
|
| 649 |
- [x] RE-523 Carry unified ground state through reached mode/step/wrapper/slide and post-ground/final-content extended state ([COMBGROUND-003](research/QVM_COMBINED_GROUND.md)).
|
| 650 |
- [ ] RE-524 Recover54981/action/query, alternative-mode/suffix and event/PS216 consumers; native trace/content/root/collision ABI/legal domains and real input/basis/environment producers; complete53418/scheduler/macOS/Linux Rust/Bevy/Solari gameplay and broader game/assets/rendering/protocol work.
|
| 651 |
+
|
| 652 |
+
|
| 653 |
+
- [x] RE-525 Recover54981 guard/bit clearing, planar normalization/viewpoint/feet geometry and entity-exclusion retrace/source flags ([ACTIONPROBE-001](research/QVM_ACTION_PROBE.md)).
|
| 654 |
+
- [x] RE-526 Evaluate argument1 origin rebase/argument0 recursion and conditional actual landing with parent entity and live snapshot state ([ACTIONPROBE-002](research/QVM_ACTION_PROBE.md)).
|
| 655 |
+
- [x] RE-527 Evaluate actual main54981(0) after timer aging and derive query/mode routing plus selected movement/post-ground outputs ([ACTIONPROBE-003](research/QVM_ACTION_PROBE.md)).
|
| 656 |
+
- [ ] RE-528 Compose54981 inside ground loss, actual56639/query and alternative55465/41848/other modes, remaining suffix/event/PS216 consumers/real basis-input-environment/native collision ABI/legal domains; complete main/scheduler/macOS/Linux Rust/Bevy/Solari gameplay and broader game/assets/rendering/protocol work.
|
docs/research/QVM_ACTION_PROBE.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# QVM helper54981 forward traces, contact bits and origin rebase
|
| 2 |
+
|
| 3 |
+
This batch completes bounded RE-525–527 / F-253–255, recovering54981 and applying its argument0 effects at the actual main post-timer boundary. It extends [combined main ground state](QVM_COMBINED_GROUND.md). The helper name remains numeric: its recovered behavior is trace-driven flag/origin policy, with semantic/legal domains still open.
|
| 4 |
+
|
| 5 |
+
Reproduce with `python3 scripts/analyze_qvm_action_probe.py`; validate with `python3 scripts/test_qvm_action_probe.py`. The [machine report](qvm-action-probe.json) retains source identity, the complete helper instruction partition,42 standalone probes,16 main chains, native request geometry/records and reached recursive/landing children. No original executable, full QVM, native collision, physics or rendering executes.
|
| 6 |
+
|
| 7 |
+
## ACTIONPROBE-001 — Entry, normalization and exclusion retrace (RE-525)
|
| 8 |
+
|
| 9 |
+
Source54981 runs when existing PS flags contain12 or32. It then clears12; flag16 exits after that clearing. Other inputs exit without requests or state changes. The remaining path normalizes supplied globals35023892/35023896 with Z explicitly0 and an actual root request. Zero norm retains a zero direction rather than dividing.
|
| 10 |
+
|
| 11 |
+
Argument0 first probes one normalized unit forward from current origin plus integer viewheight, with mask65537. A fraction<1 and surface bit8 sets PS bit8. Otherwise, a fraction<1 with nonzero returned entity and zero contents triggers another trace with that returned entity as the exclusion selector. The retry uses the same start/end/bounds/mask; another fraction<1/surface8 response can set bit8. Nonzero contents suppresses this retry.
|
| 12 |
+
|
| 13 |
+
The helper then probes one normalized unit forward from the current feet origin with mask33619969 and the PS entity selector. A fraction<1/surface8 response sets PS bit4. Bounds, normalized geometry, source argument order, first/retry/feet masks and strict comparisons are checked independently. Supplied basis(3,4) and zero basis exercise normalization and zero-length paths; the unused Z-basis value does not enter this planar direction.
|
| 14 |
+
|
| 15 |
+
Native fractions, surface/contents/entity words and end positions are supplied at actual call boundaries. The analysis does not derive them from geometry, establish legal entity IDs or assert a real contact surface.
|
| 16 |
+
|
| 17 |
+
## ACTIONPROBE-002 — Argument1 rebase, recursive argument0 and landing (RE-526)
|
| 18 |
+
|
| 19 |
+
Argument1 skips viewpoint/retry probing. It probes from origin Z−24, ten normalized units forward, with the feet mask. A qualifying fraction<1/surface8 response copies its supplied end position into PS origin and raises Z by24. It then recursively evaluates54981(0) in a disjoint local frame with the same live state and basis. Only argument1 creates this recursive request; the reached argument0 child cannot recurse further through that branch.
|
| 20 |
+
|
| 21 |
+
After the child returns, any remaining flag12 causes an actual45912 call using the **parent** trace's entity selector. The recovered landing body, animation/event children and queue effects evaluate before parent completion. If the child clears the flags, landing is skipped; the rebased origin remains and is not rolled back.
|
| 22 |
+
|
| 23 |
+
Two explicit fixtures supply parent endpoint[101,202,280], producing PS origin[101,202,304]. A clear recursive child skips landing, while a flag-producing child reaches it with parent entity8 and actual current-minus-clock-snapshot deltaZ4. The endpoint is deliberately supplied to establish source arithmetic; physical consistency with the requested trace is unverified. Caller gravity/snapshot/health/level/event inputs remain finite synthetic state.
|
| 24 |
+
|
| 25 |
+
## ACTIONPROBE-003 — Actual main post-timer producer and routing (RE-527)
|
| 26 |
+
|
| 27 |
+
Sixteen main chains combine entered/standing posture, flat/steep first ground, and no-hit/first-surface/retry-surface/feet-surface patterns. Recovered posture and ground children execute first, followed by actual main timer aging. At reached main54981(0), the new body consumes that live origin/viewheight/bounds/flags/timer state and produces the flags subsequently read by query gating and mode routing.
|
| 28 |
+
|
| 29 |
+
The source selects eight evaluated41768 chains, six recorded55465 requests and two recorded43626 requests. Existing128 takes precedence over new contact bits; without128, bits4/8 select55465 and suppress the main query. No-hit flat controls select43626. The selected41768 cases run the earlier first-clear slide/wrapper/gravity path, then combined post-ground callees/final environment. Alternative mode and query effects remain omitted.
|
| 30 |
+
|
| 31 |
+
The main bridge exposes an optional reached action effect while preserving old default reports byte-for-byte. Standalone54981(1) is recovered here, but reused ground-loss46527 still records that nested action request with omitted effects; attaching it there remains separate work. Full53418/scheduler, real basis/input producers, native collision/content/root ABI/legal domains and macOS/Linux Rust/Bevy/Solari gameplay remain open.
|
| 32 |
+
|
| 33 |
+
## Validation and next tasks
|
| 34 |
+
|
| 35 |
+
Eight tests independently verify all42 standalone guards/normalization/geometries/retry/flag/recursion/landing outcomes, zero basis, source masks/pointers, recursive origin persistence and parent argument,16 actual main entry snapshots and reached posture/ground state, action-derived mode/query counts, selected slide/mode/post-ground outputs, source hash/partition and supplied/omitted-effect scope. Reproducibility/full-suite/storage/link/whitespace results are recorded in the ledger.
|
| 36 |
+
|
| 37 |
+
RE-524 remains open for its broader query/mode/native/consumer/runtime scope. RE-528 tracks actual54981 effects inside ground-loss callers,56639/query and alternative55465/41848/other movement bodies, remaining suffix/event/PS216 consumers, real basis/input/environment/native collision/legal domains and complete main/scheduler/macOS/Linux Rust/Bevy/Solari gameplay. Other game/assets/rendering/protocol milestones remain open.
|
docs/research/QVM_COMBINED_GROUND.md
CHANGED
|
@@ -33,3 +33,6 @@ Native traces/contents/roots are supplied, not collision-derived. The clock-to-m
|
|
| 33 |
Eight tests independently verify all18 posture outputs and actual handoffs; every reached recovery/lost/landing/animation/touch child; all36 complete recorded ground states and source request order; reset-versus-retained timer200 behavior;15 reached modes and30 slide children with step/wrapper/gravity outputs; resource/event/animation persistence into final contents; unchanged earlier hull despite later animation; source identity and scope. They reuse independent helper formulas while predicting parent stores separately. Reproducibility/full-suite/storage/link/whitespace results are recorded in the ledger.
|
| 34 |
|
| 35 |
RE-520 remains open for broader native/action/main/runtime scope; this bounded shared-state combination is covered by RE-521–523. RE-524 tracks54981/action/query and alternative-mode/suffix effects, numeric event/PS216 consumers, native trace/content/root/collision ABI/legal domains, real input/basis/environment producers and complete53418/scheduler/macOS/Linux Rust/Bevy/Solari gameplay. Other game/assets/rendering/protocol milestones remain open.
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
Eight tests independently verify all18 posture outputs and actual handoffs; every reached recovery/lost/landing/animation/touch child; all36 complete recorded ground states and source request order; reset-versus-retained timer200 behavior;15 reached modes and30 slide children with step/wrapper/gravity outputs; resource/event/animation persistence into final contents; unchanged earlier hull despite later animation; source identity and scope. They reuse independent helper formulas while predicting parent stores separately. Reproducibility/full-suite/storage/link/whitespace results are recorded in the ledger.
|
| 34 |
|
| 35 |
RE-520 remains open for broader native/action/main/runtime scope; this bounded shared-state combination is covered by RE-521–523. RE-524 tracks54981/action/query and alternative-mode/suffix effects, numeric event/PS216 consumers, native trace/content/root/collision ABI/legal domains, real input/basis/environment producers and complete53418/scheduler/macOS/Linux Rust/Bevy/Solari gameplay. Other game/assets/rendering/protocol milestones remain open.
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
Follow-up: [actual main54981 producer](QVM_ACTION_PROBE.md) completes bounded RE-525–527, evaluating forward trace/recheck/flag effects after main timer and separately recovering recursive argument1/landing. Reused ground-loss nested54981 effects and broader query/mode/native/runtime scope remain open.
|
docs/research/QVM_GROUND_CALLEES.md
CHANGED
|
@@ -38,3 +38,6 @@ RE-508 remains open for its broader ground/native/producer/runtime scope. RE-512
|
|
| 38 |
|
| 39 |
|
| 40 |
Follow-up: [complete bounded landing body](QVM_LANDING.md) completes RE-513–515, extending this prefix through severity/queue/suffix and actual ground/main caller stores.29913 is now verified as a two-slot numeric event writer; external damage semantics are not established. Recovery/action/native/full runtime scope remains open under RE-512/516.
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
|
| 39 |
|
| 40 |
Follow-up: [complete bounded landing body](QVM_LANDING.md) completes RE-513–515, extending this prefix through severity/queue/suffix and actual ground/main caller stores.29913 is now verified as a two-slot numeric event writer; external damage semantics are not established. Recovery/action/native/full runtime scope remains open under RE-512/516.
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
Follow-up: [helper54981 body](QVM_ACTION_PROBE.md) completes bounded RE-525–527 for standalone argument1 and actual main argument0. This report retains its omitted54981 effects inside46527; attaching the recovered child there remains explicit follow-up work.
|
docs/research/README.md
CHANGED
|
@@ -228,3 +228,6 @@ The extension collector adds five focused tests for native tail calls, command-r
|
|
| 228 |
|
| 229 |
|
| 230 |
[QVM combined posture and ground callees](QVM_COMBINED_GROUND.md) adds RE-521–523. Reproduce with `python3 scripts/analyze_qvm_combined_ground.py`; check with `python3 scripts/test_qvm_combined_ground.py`. Recovered children compose at both main ground boundaries; native/action/other mode/full runtime scope remains open.
|
|
|
|
|
|
|
|
|
|
|
|
| 228 |
|
| 229 |
|
| 230 |
[QVM combined posture and ground callees](QVM_COMBINED_GROUND.md) adds RE-521–523. Reproduce with `python3 scripts/analyze_qvm_combined_ground.py`; check with `python3 scripts/test_qvm_combined_ground.py`. Recovered children compose at both main ground boundaries; native/action/other mode/full runtime scope remains open.
|
| 231 |
+
|
| 232 |
+
|
| 233 |
+
[QVM54981 forward probes and main producer](QVM_ACTION_PROBE.md) adds RE-525–527. Reproduce with `python3 scripts/analyze_qvm_action_probe.py`; check with `python3 scripts/test_qvm_action_probe.py`. Actual main argument0 effects and standalone recursive argument1 evaluate; nested ground-loss integration/query/other modes/native/full runtime remain open.
|
docs/research/qvm-action-probe.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
scripts/analyze_qvm_action_probe.py
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Helper54981 geometry/retrace/recursive rebase and reached main action effects."""
|
| 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
|
| 9 |
+
from analyze_qvm_traversal_query import root_word
|
| 10 |
+
from analyze_qvm_landing import seed,landing
|
| 11 |
+
from analyze_qvm_combined_ground import state,ground_all
|
| 12 |
+
from analyze_qvm_main_environment import contents
|
| 13 |
+
from analyze_qvm_main_posture import posture
|
| 14 |
+
from analyze_qvm_main_contact import probe
|
| 15 |
+
from analyze_vm_extensions import verified
|
| 16 |
+
|
| 17 |
+
LOCAL=0x5d000000
|
| 18 |
+
PATTERNS={'none':{},'first':{'first':{'fraction':.5,'surface':8}},'retry':{'first':{'fraction':.5},'retry':{'fraction':.5,'surface':8}},'contents':{'first':{'fraction':.5,'contents':1}},'feet':{'feet':{'fraction':.5,'surface':8}},'recurse_clear':{'feet':{'fraction':.5,'surface':8,'end':[101,202,280]},'child':{}},'recurse_flags':{'feet':{'fraction':.5,'surface':8,'end':[101,202,280]},'child':{'first':{'fraction':.5,'surface':8},'feet':{'fraction':.5,'surface':8}}}}
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
def memory(flags=32,basis=(3,4)):
|
| 22 |
+
m=seed(flags=flags);m.update({PS+164:38,PS+184:4000,PS+92:123,PS+68:7,PS+72:0,FRAME+240:0,FRAME+228:-26,FRAME+208:99,35023892:word(basis[0]),35023896:word(basis[1]),35023900:word(9)});return m
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
def action(ins,m,arg,pattern,depth=0):
|
| 26 |
+
assert depth<=1;base=LOCAL+depth*0x10000;m=dict(m);m[base+152]=arg;initial=state(m);basis=[m[35023892]&0xffffffff,m[35023896]&0xffffffff];root=root_word(list(map(number,basis))+[0]);pc=54982;calls=[];trace=[];requests=[];recursive=None;land=None
|
| 27 |
+
while True:
|
| 28 |
+
t=trace_slice(ins,54982,55463,m,{},resume_at=pc,stop_targets=[s for s in [55225,55296,55385,55426,55463] if s!=pc],local_base=base,call_results={55066:root},limit=2048);m=t['memory'];pc=t['stop'];calls+=t['calls'];trace+=t['trace']
|
| 29 |
+
if pc in [55225,55296,55385]:
|
| 30 |
+
stage={55225:'first',55296:'retry',55385:'feet'}[pc];c=t['calls'][-1];a=c['args'];spec=pattern.get(stage,{});start=[m[a[12]+4*i]&0xffffffff for i in range(3)];end=[m[a[24]+4*i]&0xffffffff for i in range(3)]
|
| 31 |
+
point=list(map(word,spec['end'])) if 'end' in spec else end;record=[0,0,word(spec.get('fraction',1)),*point,0,0,word(1),0,0,spec.get('surface',0),spec.get('contents',0),spec.get('entity',8)];requests.append({'stage':stage,'call':c,'start':start,'end':end,'bounds':[m[a[16]+4*i]&0xffffffff for i in range(3)]+[m[a[20]+4*i]&0xffffffff for i in range(3)],'record':record})
|
| 32 |
+
for i,v in enumerate(record):m[a[8]+4*i]=v
|
| 33 |
+
elif pc==55426:
|
| 34 |
+
before=state(m);m,recursive=action(ins,m,0,pattern.get('child',{}),depth+1);recursive={'before':before,'probe':recursive,'after':state(m)}
|
| 35 |
+
elif pc==55463:
|
| 36 |
+
if t['calls'] and t['calls'][-1]['target']==45912:m,land=landing(ins,m,t['calls'][-1]['args'][8])
|
| 37 |
+
break
|
| 38 |
+
else:raise AssertionError('Unexpected action boundary')
|
| 39 |
+
return m,{'argument':arg,'depth':depth,'initial':initial,'basis':basis,'supplied_root':root,'requests':requests,'recursive':recursive,'landing':land,'final':state(m),'calls':calls,**trace_fields({'trace':trace},False)}
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
def standalone(ins,flags,arg,basis,name):return action(ins,memory(flags,basis),arg,PATTERNS[name])[1]
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
def main_case(ins,posture_name,kind,pattern):
|
| 46 |
+
up=-1 if posture_name=='enter' else 0;flags=160 if posture_name=='enter' else 161
|
| 47 |
+
def env(ins,m,target,phase):
|
| 48 |
+
if target==47217:m,r=contents(ins,m,[0,0,0]);r['combined_after']=state(m)
|
| 49 |
+
else:m,r=ground_all(ins,m,kind if phase=='before' else 'flat')
|
| 50 |
+
r['phase']=phase;return m,r
|
| 51 |
+
def post(ins,m):return posture(ins,m,up,0)
|
| 52 |
+
def effect(ins,m):return action(ins,m,0,PATTERNS[pattern])
|
| 53 |
+
p=probe(ins,1016,0,flags,'clear',initial_memory=memory(flags),environment_effect=env,posture_effect=post,action_effect=effect);p.update({'posture_variant':posture_name,'ground_kind':kind,'pattern':pattern});return p
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
def main():
|
| 57 |
+
q=json.loads(Path('docs/research/qvm/qagame.json').read_text());_,ins=decode(verified(Path(q['source']['member']['output']).read_bytes(),q['sha256']))
|
| 58 |
+
probes=[standalone(ins,*v,'none') for v in itertools.product([0,4,8,12,16,32,36,48,60],[0,1],[(0,0),(3,4)])]
|
| 59 |
+
probes += [standalone(ins,32,a,(3,4),p) for a,p in [(0,'first'),(0,'retry'),(0,'contents'),(0,'feet'),(1,'recurse_clear'),(1,'recurse_flags')]]
|
| 60 |
+
out={'source':q['source'],'sha256':q['sha256'],'instructions':ins[54981:55465],'probes':probes,'main_chains':[main_case(ins,*v) for v in itertools.product(['enter','stand_clear'],['flat','steep'],['none','first','retry','feet'])],'limitations':'Bounded finite shipped-QVM helper54981 and main composition; no original executable/full QVM/native collision/physics/rendering executes. Actual guards/normalization/native-request geometry/retrace/recursive origin rebase/flags and reached landing child evaluate. Native roots and ordered trace records/end positions are supplied, not collision-derived; unused prepared records are not called. Horizontal basis/initial state/input remain supplied. Actual main54981(0) runs after timer aging and before query/routing with actual posture/ground state. Ground-lost54981(1), logging/query/alternative modes/other suffix effects remain omitted in reused ground/main paths; complete53418/scheduler/legal native domains/macOS/Linux/Rust/Bevy/Solari gameplay remain open.'};write_json(Path('docs/research/qvm-action-probe.json'),out);print('Recovered54981 probe geometry, recheck, recursive rebase and actual main routing')
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
if __name__=='__main__':main()
|
scripts/analyze_qvm_main_contact.py
CHANGED
|
@@ -15,14 +15,15 @@ from analyze_vm_extensions import verified
|
|
| 15 |
def timer_state(m):return {'flags':m[PS+12]&0xffffffff,'movement':m[PS+16],'leg':m[PS+72],'torso':m[PS+80],'dt':m[35023932]}
|
| 16 |
|
| 17 |
|
| 18 |
-
def probe(ins,requested,timer,flags,pattern,initial_memory=None,environment_effect=None,posture_effect=None):
|
| 19 |
m=seed(flags=flags,timer=timer) if initial_memory is None else dict(initial_memory);m.update({PS:1000,FRAME+4:requested,PS+4:0,PS+72:m.get(PS+72,200),PS+80:m.get(PS+80,17),PS+220:0,FRAME+212:0,35023936:1,35024000:word(0)});initial=snapshot(m)
|
| 20 |
clock=trace_slice(ins,53723,53789,m,{104:FRAME},local_base=MAIN_LOCAL);m=clock['memory'];clock_report={'old_time':1000,'requested':requested,'result_time':m[PS],'elapsed':m[35023932],'ps_elapsed':m[PS+284],'float_dt':m[35023928]&0xffffffff,'origin_snapshot':vec(m,35024004),'velocity_snapshot':vec(m,35024016),**trace_fields(clock,False)}
|
| 21 |
-
pc=54244;calls=[];trace=[];timers=None;mode=None;at_mode=None;environment=[];posture=None;policy='overlap_solid' if requested==1016 else 'clear'
|
| 22 |
while True:
|
| 23 |
-
t=trace_slice(ins,54244,54473,m,{104:FRAME},resume_at=pc,stop_targets=[s for s in ([54274,54382,54438]+([54247,54260,54441,54444] if environment_effect else [])+([54257] if posture_effect else [])) if s!=pc],local_base=MAIN_LOCAL,call_results={54313:0},limit=1024);m=t['memory'];calls+=t['calls'];trace+=t['trace'];pc=t['stop']
|
| 24 |
if environment_effect and pc in [54247,54260,54441,54444]:
|
| 25 |
target=47217 if pc in [54247,54444] else 46773;phase='before' if pc<54438 else 'after';m,effect=environment_effect(ins,m,target,phase);environment.append(effect)
|
|
|
|
| 26 |
elif posture_effect and pc==54257:m,posture=posture_effect(ins,m)
|
| 27 |
elif pc==54274:
|
| 28 |
before=timer_state(m);tt=trace_slice(ins,53049,53184,m,{},local_base=TIMER_LOCAL);m=tt['memory'];timers={'before':before,'after':timer_state(m),'calls':tt['calls'],**trace_fields(tt,False)}
|
|
@@ -36,6 +37,7 @@ def probe(ins,requested,timer,flags,pattern,initial_memory=None,environment_effe
|
|
| 36 |
report={'requested':requested,'initial':initial,'pattern':pattern,'policy':policy,'clock':clock_report,'timer':timers,'selected_mode':selected[0],'at_mode':at_mode,'mode':mode,'after_dispatch':after_dispatch,'final':snapshot(m),'final_timers':timer_state(m),'final_time':m[PS],'saved_level':m[35024028],'calls':calls,**trace_fields({'trace':trace},False)}
|
| 37 |
if environment_effect:report['environment']=environment
|
| 38 |
if posture_effect:report['posture']=posture
|
|
|
|
| 39 |
return report
|
| 40 |
|
| 41 |
|
|
|
|
| 15 |
def timer_state(m):return {'flags':m[PS+12]&0xffffffff,'movement':m[PS+16],'leg':m[PS+72],'torso':m[PS+80],'dt':m[35023932]}
|
| 16 |
|
| 17 |
|
| 18 |
+
def probe(ins,requested,timer,flags,pattern,initial_memory=None,environment_effect=None,posture_effect=None,action_effect=None):
|
| 19 |
m=seed(flags=flags,timer=timer) if initial_memory is None else dict(initial_memory);m.update({PS:1000,FRAME+4:requested,PS+4:0,PS+72:m.get(PS+72,200),PS+80:m.get(PS+80,17),PS+220:0,FRAME+212:0,35023936:1,35024000:word(0)});initial=snapshot(m)
|
| 20 |
clock=trace_slice(ins,53723,53789,m,{104:FRAME},local_base=MAIN_LOCAL);m=clock['memory'];clock_report={'old_time':1000,'requested':requested,'result_time':m[PS],'elapsed':m[35023932],'ps_elapsed':m[PS+284],'float_dt':m[35023928]&0xffffffff,'origin_snapshot':vec(m,35024004),'velocity_snapshot':vec(m,35024016),**trace_fields(clock,False)}
|
| 21 |
+
pc=54244;calls=[];trace=[];timers=None;mode=None;at_mode=None;environment=[];posture=None;action=None;policy='overlap_solid' if requested==1016 else 'clear'
|
| 22 |
while True:
|
| 23 |
+
t=trace_slice(ins,54244,54473,m,{104:FRAME},resume_at=pc,stop_targets=[s for s in ([54274,54382,54438]+([54247,54260,54441,54444] if environment_effect else [])+([54257] if posture_effect else [])+([54279] if action_effect else [])) if s!=pc],local_base=MAIN_LOCAL,call_results={54313:0},limit=1024);m=t['memory'];calls+=t['calls'];trace+=t['trace'];pc=t['stop']
|
| 24 |
if environment_effect and pc in [54247,54260,54441,54444]:
|
| 25 |
target=47217 if pc in [54247,54444] else 46773;phase='before' if pc<54438 else 'after';m,effect=environment_effect(ins,m,target,phase);environment.append(effect)
|
| 26 |
+
elif action_effect and pc==54279:m,action=action_effect(ins,m)
|
| 27 |
elif posture_effect and pc==54257:m,posture=posture_effect(ins,m)
|
| 28 |
elif pc==54274:
|
| 29 |
before=timer_state(m);tt=trace_slice(ins,53049,53184,m,{},local_base=TIMER_LOCAL);m=tt['memory'];timers={'before':before,'after':timer_state(m),'calls':tt['calls'],**trace_fields(tt,False)}
|
|
|
|
| 37 |
report={'requested':requested,'initial':initial,'pattern':pattern,'policy':policy,'clock':clock_report,'timer':timers,'selected_mode':selected[0],'at_mode':at_mode,'mode':mode,'after_dispatch':after_dispatch,'final':snapshot(m),'final_timers':timer_state(m),'final_time':m[PS],'saved_level':m[35024028],'calls':calls,**trace_fields({'trace':trace},False)}
|
| 38 |
if environment_effect:report['environment']=environment
|
| 39 |
if posture_effect:report['posture']=posture
|
| 40 |
+
if action_effect:report['action']=action
|
| 41 |
return report
|
| 42 |
|
| 43 |
|
scripts/test_qvm_action_probe.py
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Independent54981 guard/geometry/retrace/rebase and actual main checks."""
|
| 3 |
+
import hashlib,json,math
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
import unittest
|
| 6 |
+
from test_qvm_ground import f,n,word
|
| 7 |
+
from test_qvm_landing import expected as landing_expected
|
| 8 |
+
from test_qvm_main_posture import expected_posture
|
| 9 |
+
from test_qvm_combined_ground import ground_expected
|
| 10 |
+
from test_qvm_slide_repeated import oracle as slide_oracle
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
def check_action(test,p):
|
| 14 |
+
s=dict(p['initial']);flags=s['flags'];rows=p['requests'];stages=[];calls=[c for c in p['calls'] if c['target']==-25];root_calls=[c for c in p['calls'] if c['target']==-107]
|
| 15 |
+
if not flags&12 and not flags&32:
|
| 16 |
+
test.assertEqual(rows,[]);test.assertEqual(p['calls'],[]);test.assertEqual(p['final'],s);return s
|
| 17 |
+
flags&=~12;s['flags']=flags
|
| 18 |
+
if flags&16:
|
| 19 |
+
test.assertEqual(rows,[]);test.assertEqual(p['calls'],[]);test.assertEqual(p['final'],s);return s
|
| 20 |
+
x,y=map(n,p['basis']);square=f(f(x*x)+f(y*y));root=f(math.sqrt(square));test.assertEqual(p['supplied_root'],word(root));test.assertEqual(root_calls,[{'instruction':55066,'target':-107,'args':{'8':word(square)}}]);direction=[f(x*f(1/root)),f(y*f(1/root)),0] if root else [0,0,0]
|
| 21 |
+
index=0
|
| 22 |
+
def request(stage,start,multiplier,mask,entity):
|
| 23 |
+
nonlocal index
|
| 24 |
+
r=rows[index];index+=1;stages.append(stage);test.assertEqual(r['stage'],stage);test.assertEqual(r['start'],list(map(word,start)));test.assertEqual(r['end'],[word(f(v+f(d*multiplier))) for v,d in zip(start,direction)]);test.assertEqual(r['call']['args']['32'],mask);test.assertEqual(r['call']['args']['28'],entity);test.assertEqual(r['bounds'],s['bounds']);return r['record']
|
| 25 |
+
origin=list(map(n,s['origin']))
|
| 26 |
+
if not p['argument']:
|
| 27 |
+
start=origin[:2]+[f(origin[2]+f(s['height']))];r=request('first',start,1,65537,7)
|
| 28 |
+
if n(r[2])<1 and r[11]&8:s['flags']|=8
|
| 29 |
+
elif n(r[2])<1 and r[13]!=0 and r[12]==0:
|
| 30 |
+
r=request('retry',start,1,65537,r[13])
|
| 31 |
+
if n(r[2])<1 and r[11]&8:s['flags']|=8
|
| 32 |
+
start=origin;multiplier=1
|
| 33 |
+
else:start=origin[:2]+[f(origin[2]-24)];multiplier=10
|
| 34 |
+
r=request('feet',start,multiplier,33619969,7)
|
| 35 |
+
if n(r[2])<1 and r[11]&8:
|
| 36 |
+
if p['argument']:
|
| 37 |
+
s['origin']=r[3:5]+[word(f(n(r[5])+24))];test.assertIsNotNone(p['recursive']);test.assertEqual(p['recursive']['before'],s);test.assertEqual(p['recursive']['probe']['initial'],s);s=check_action(test,p['recursive']['probe']);test.assertEqual(p['recursive']['after'],s)
|
| 38 |
+
else:s['flags']|=4;test.assertIsNone(p['recursive'])
|
| 39 |
+
else:test.assertIsNone(p['recursive'])
|
| 40 |
+
if p['argument'] and s['flags']&12:
|
| 41 |
+
test.assertIsNotNone(p['landing']);test.assertEqual(p['landing']['entity'],r[13])
|
| 42 |
+
for k,v in p['landing']['initial'].items():test.assertEqual(v,s[k])
|
| 43 |
+
v,_,_,_=landing_expected(p['landing'])
|
| 44 |
+
for k in ['velocity','flags','legs','leg_timer','state220','field440','field216','field8','entity_flags','queue']:s[k]=v[k]
|
| 45 |
+
else:test.assertIsNone(p['landing'])
|
| 46 |
+
test.assertEqual(index,len(rows));test.assertEqual(len(calls),len(rows));test.assertEqual(p['final'],s);return s
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
class QvmActionProbeTests(unittest.TestCase):
|
| 50 |
+
@classmethod
|
| 51 |
+
def setUpClass(cls):cls.r=json.loads(Path('docs/research/qvm-action-probe.json').read_text())
|
| 52 |
+
|
| 53 |
+
def test_all_standalone_guards_geometry_flags_and_children(self):
|
| 54 |
+
self.assertEqual(len(self.r['probes']),42)
|
| 55 |
+
for p in self.r['probes']:check_action(self,p)
|
| 56 |
+
|
| 57 |
+
def test_retry_exclusion_and_contents_guard(self):
|
| 58 |
+
retried=blocked=False
|
| 59 |
+
for p in self.r['probes']:
|
| 60 |
+
stages=[r['stage'] for r in p['requests']]
|
| 61 |
+
if stages==['first','retry','feet']:self.assertEqual(p['requests'][1]['call']['args']['28'],p['requests'][0]['record'][13]);retried=True
|
| 62 |
+
if p['requests'] and p['requests'][0]['stage']=='first' and p['requests'][0]['record'][12]:self.assertNotIn('retry',stages);blocked=True
|
| 63 |
+
self.assertTrue(retried and blocked)
|
| 64 |
+
|
| 65 |
+
def test_recursive_rebase_is_not_rolled_back_and_parent_entity_survives(self):
|
| 66 |
+
clear=land=False
|
| 67 |
+
for p in self.r['probes']:
|
| 68 |
+
if not p['recursive']:continue
|
| 69 |
+
self.assertEqual(p['recursive']['before']['origin'],list(map(word,[101,202,304])));self.assertEqual(p['final']['origin'],list(map(word,[101,202,304])));self.assertEqual(p['recursive']['probe']['argument'],0);self.assertEqual(p['recursive']['probe']['depth'],1)
|
| 70 |
+
if p['landing']:self.assertEqual(p['landing']['delta'],word(4));self.assertEqual(p['landing']['entity'],8);land=True
|
| 71 |
+
else:self.assertEqual(p['final']['flags']&12,0);clear=True
|
| 72 |
+
self.assertTrue(clear and land)
|
| 73 |
+
|
| 74 |
+
def test_actual_main_action_entry_after_aged_posture_ground_state(self):
|
| 75 |
+
self.assertEqual(len(self.r['main_chains']),16)
|
| 76 |
+
for p in self.r['main_chains']:
|
| 77 |
+
self.assertEqual(p['posture']['final'],expected_posture(p)[0]);g=p['environment'][1];self.assertEqual(g['after'],ground_expected(g,p['clock']['velocity_snapshot'][2]));expected=dict(g['after']);expected.update({'flags':p['timer']['after']['flags'],'timer':p['timer']['after']['movement'],'leg_timer':p['timer']['after']['leg']});self.assertEqual(p['action']['initial'],expected);check_action(self,p['action']);self.assertEqual(sum(c['target']==54981 for c in p['calls']),1)
|
| 78 |
+
|
| 79 |
+
def test_actual_action_flags_choose_mode_and_query_gate(self):
|
| 80 |
+
counts={41768:0,55465:0,43626:0}
|
| 81 |
+
for p in self.r['main_chains']:
|
| 82 |
+
a=p['action']['final'];mode=41768 if a['flags']&128 else 55465 if a['flags']&12 else 43626;self.assertEqual(p['selected_mode'],mode);counts[mode]+=1;self.assertEqual(any(c['target']==56639 for c in p['calls']),not bool(a['flags']&12));self.assertEqual(p['mode'] is not None,mode==41768)
|
| 83 |
+
self.assertEqual(counts,{41768:8,55465:6,43626:2})
|
| 84 |
+
|
| 85 |
+
def test_selected_movement_and_post_ground_consume_action_state(self):
|
| 86 |
+
for p in self.r['main_chains']:
|
| 87 |
+
if p['mode']:
|
| 88 |
+
mode=p['mode'];a=p['action']['final'];self.assertEqual(mode['initial']['flags'],a['flags']);self.assertEqual(mode['initial']['origin'],a['origin']);self.assertEqual(mode['initial']['velocity'],a['velocity']);w=mode['wrapper'];entry=dict(w['before']);entry['ground_normal']=a['normal'];slide_oracle(self,w['first_slide'],entry);self.assertIsNone(w['step']);expected=dict(w['final']);vz=f(n(expected['velocity'][2])-f(f(800)*n(p['clock']['float_dt'])));expected['velocity']=expected['velocity'][:2]+[word(vz)]
|
| 89 |
+
if vz<0:expected['flags']&=~192;expected['timer']=0
|
| 90 |
+
self.assertEqual(mode['mode_final'],expected)
|
| 91 |
+
g=p['environment'][2];self.assertEqual(g['after'],ground_expected(g,p['clock']['velocity_snapshot'][2]));self.assertEqual(g['before']['flags'],p['after_dispatch']['flags'])
|
| 92 |
+
|
| 93 |
+
def test_native_trace_output_pointer_masks_and_zero_basis(self):
|
| 94 |
+
zero=False
|
| 95 |
+
for p in self.r['probes']:
|
| 96 |
+
for r in p['requests']:self.assertEqual(r['call']['args']['8'],0x5d00003c);self.assertEqual(r['call']['args']['16'],0x300b8);self.assertEqual(r['call']['args']['20'],0x300c4)
|
| 97 |
+
if p['basis']==[0,0] and p['requests']:self.assertEqual(p['supplied_root'],0);self.assertTrue(all(r['start']==r['end'] for r in p['requests']));zero=True
|
| 98 |
+
self.assertTrue(zero)
|
| 99 |
+
|
| 100 |
+
def test_source_full_partition_and_remaining_native_runtime_scope(self):
|
| 101 |
+
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());self.assertEqual(self.r['instructions'][0]['index'],54981);self.assertEqual(self.r['instructions'][-1]['index'],55464)
|
| 102 |
+
for text in ['no original executable/full QVM/native collision/physics/rendering executes','not collision-derived','Ground-lost54981(1)','complete53418/scheduler/legal native domains']:self.assertIn(text,self.r['limitations'])
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
if __name__=='__main__':unittest.main()
|