nmarshall commited on
Commit
676aef6
·
1 Parent(s): 90dbc97

qvm: combined ground state

Browse files
docs/ASSET_PIPELINE_TODO.md CHANGED
@@ -312,3 +312,6 @@ Research progress: [QVM landing severity/event queue/caller](research/QVM_LANDIN
312
 
313
 
314
  Research progress: [QVM allsolid recovery](research/QVM_RECOVERY.md) completes bounded RE-517–519: ordered27-point search, original-origin retrace/record priority and16 ground/main continuations. Trace responses remain supplied; RE-516/520 retain native collision/legal/combined main/runtime/platform work and broad game/rendering milestones.
 
 
 
 
312
 
313
 
314
  Research progress: [QVM allsolid recovery](research/QVM_RECOVERY.md) completes bounded RE-517–519: ordered27-point search, original-origin retrace/record priority and16 ground/main continuations. Trace responses remain supplied; RE-516/520 retain native collision/legal/combined main/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.
docs/FINDINGS.md CHANGED
@@ -646,3 +646,10 @@ Bounded qagame paths recover bomb-plant/inactivity correction requests, direct f
646
  **F-248 — Free candidate is not committed:**first clear triggers a new original-origin Z−0.25 trace, full56-byte copy and return1 without retesting follow-up allsolid. Actual46773 classifies that updated record or exits on evaluated return0. Native physical consistency remains unverified. [RECOVER-002](research/QVM_RECOVERY.md).
647
 
648
  **F-249 — Recovery-to-main connection:**16 actual caller fixtures derive plane/normal/touch inputs, select ten evaluated41768 chains and six omitted43626 requests, then continue post environment. Full native/main/runtime gameplay remains open. [RECOVERCHAIN-001](research/QVM_RECOVERY.md).
 
 
 
 
 
 
 
 
646
  **F-248 — Free candidate is not committed:**first clear triggers a new original-origin Z−0.25 trace, full56-byte copy and return1 without retesting follow-up allsolid. Actual46773 classifies that updated record or exits on evaluated return0. Native physical consistency remains unverified. [RECOVER-002](research/QVM_RECOVERY.md).
647
 
648
  **F-249 — Recovery-to-main connection:**16 actual caller fixtures derive plane/normal/touch inputs, select ten evaluated41768 chains and six omitted43626 requests, then continue post environment. Full native/main/runtime gameplay remains open. [RECOVERCHAIN-001](research/QVM_RECOVERY.md).
649
+
650
+
651
+ **F-250 — Unified reached ground children:**18 main fixtures combine actual posture with36 ground invocations and reached recovery/lost/landing/animation/touch children in source order, preserving shared state and conditional skips. Native responses/action/other mode effects remain supplied or omitted. [COMBGROUND-001](research/QVM_COMBINED_GROUND.md).
652
+
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).
docs/PROVISIONAL_TODO.md CHANGED
@@ -624,3 +624,6 @@ Research progress: [QVM landing severity/event queue/caller](research/QVM_LANDIN
624
 
625
 
626
  Research progress: [QVM allsolid recovery](research/QVM_RECOVERY.md) completes bounded RE-517–519: ordered27-point search, original-origin retrace/record priority and16 ground/main continuations. Trace responses remain supplied; RE-516/520 retain native collision/legal/combined main/runtime/platform work and broad game/rendering milestones.
 
 
 
 
624
 
625
 
626
  Research progress: [QVM allsolid recovery](research/QVM_RECOVERY.md) completes bounded RE-517–519: ordered27-point search, original-origin retrace/record priority and16 ground/main continuations. Trace responses remain supplied; RE-516/520 retain native collision/legal/combined main/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.
docs/RESEARCH_LEDGER.md CHANGED
@@ -403,3 +403,7 @@ Completed bounded RE-513–515 with `analyze_qvm_landing.py`:82 landing-body fix
403
  ## 2026-10-19 — Game-QVM allsolid recovery and actual ground/main caller
404
 
405
  Completed bounded RE-517–519 with `analyze_qvm_recovery.py`:34 standalone46296 probes cover every first-clear rank0–26, full27-trial exhaustion and rank0/13/26 follow-up-solid/air controls;16 actual ground/main chains connect evaluated recovery state/return/record. RECOVER-001–002/RECOVERCHAIN-001/F-247–249 recover X/Y/Z ordered offsets−1/0/+1, first-zero-allsolid short circuit, failure ground1023/plane-walk0 without PS position/velocity changes, and success retrace from original origin to Z−0.25 rather than committing the free candidate. Source copies56-byte follow-up to globals and returns1 without retesting allsolid; caller classifies updated local record or exits on0, preserving local/global record distinctions on failure. Repeated native-call checkpoints are explicitly re-enabled after evaluating each consumed allsolid branch. Main outcomes:ten evaluated41768 first-clear/wrapper/gravity chains and six omitted43626 requests, then actual post environment. Candidate/follow-up/native responses remain supplied, including deliberately inconsistent follow-up-allsolid controls; logging/other ground-posture-action-query-mode-suffix/native/legal/full runtime effects remain omitted or unverified. No original executable/full QVM/native collision/physics/rendering executes. Eight independent tests verify every search coordinate/order/count/argument, native bounds/mask/pointers, unchanged PS vectors, original-origin retrace/copy/allsolid priority, actual caller classification/touch/return state, derived routing/reached slide/mode/post-environment handoffs, full source partition/hash and scope. All647 tests pass. Prior main-environment report regenerates byte-identically; new recovery report reproduces twice byte-identically (1540584 bytes, below normal-Git2MiB). Storage/filter setup, documentation links and whitespace checks pass. No assets or existing analyzer/evaluator code changed. RE-516 remains open for broader scope; RE-520 tracks native collision/consistent contact-escape/logging/ABI domains, combined posture/recovery/landing/lost/animation/action/alternative-mode/suffix state, event/PS216 consumers and complete main/scheduler/macOS/Linux Rust/Bevy/Solari gameplay. Broad game/assets/rendering/protocol milestones remain open.
 
 
 
 
 
403
  ## 2026-10-19 — Game-QVM allsolid recovery and actual ground/main caller
404
 
405
  Completed bounded RE-517–519 with `analyze_qvm_recovery.py`:34 standalone46296 probes cover every first-clear rank0–26, full27-trial exhaustion and rank0/13/26 follow-up-solid/air controls;16 actual ground/main chains connect evaluated recovery state/return/record. RECOVER-001–002/RECOVERCHAIN-001/F-247–249 recover X/Y/Z ordered offsets−1/0/+1, first-zero-allsolid short circuit, failure ground1023/plane-walk0 without PS position/velocity changes, and success retrace from original origin to Z−0.25 rather than committing the free candidate. Source copies56-byte follow-up to globals and returns1 without retesting allsolid; caller classifies updated local record or exits on0, preserving local/global record distinctions on failure. Repeated native-call checkpoints are explicitly re-enabled after evaluating each consumed allsolid branch. Main outcomes:ten evaluated41768 first-clear/wrapper/gravity chains and six omitted43626 requests, then actual post environment. Candidate/follow-up/native responses remain supplied, including deliberately inconsistent follow-up-allsolid controls; logging/other ground-posture-action-query-mode-suffix/native/legal/full runtime effects remain omitted or unverified. No original executable/full QVM/native collision/physics/rendering executes. Eight independent tests verify every search coordinate/order/count/argument, native bounds/mask/pointers, unchanged PS vectors, original-origin retrace/copy/allsolid priority, actual caller classification/touch/return state, derived routing/reached slide/mode/post-environment handoffs, full source partition/hash and scope. All647 tests pass. Prior main-environment report regenerates byte-identically; new recovery report reproduces twice byte-identically (1540584 bytes, below normal-Git2MiB). Storage/filter setup, documentation links and whitespace checks pass. No assets or existing analyzer/evaluator code changed. RE-516 remains open for broader scope; RE-520 tracks native collision/consistent contact-escape/logging/ABI domains, combined posture/recovery/landing/lost/animation/action/alternative-mode/suffix state, event/PS216 consumers and complete main/scheduler/macOS/Linux Rust/Bevy/Solari gameplay. Broad game/assets/rendering/protocol milestones remain open.
406
+
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.
docs/REVERSE_ENGINEERING_TODO.md CHANGED
@@ -642,3 +642,9 @@ Purpose: turn the supplied installation into an evidence-backed specification of
642
  - [x] RE-518 Recover original-origin follow-up/full trace copy/unretested allsolid and actual46773 return/local/global record classification priority ([RECOVER-002](research/QVM_RECOVERY.md)).
643
  - [x] RE-519 Carry actual recovery/caller plane/normal/flags/touch state through main timer/routing, reached clear-slide mode and post environment ([RECOVERCHAIN-001](research/QVM_RECOVERY.md)).
644
  - [ ] RE-520 Recover native collision/consistent escape-contact domains/logging/ABI effects; combine posture/recovery/landing/lost/animation/action/alternative-mode/suffix state and event/PS216 consumers; complete main/scheduler/macOS/Linux Rust/Bevy/Solari gameplay and broader game/assets/rendering/protocol work.
 
 
 
 
 
 
 
642
  - [x] RE-518 Recover original-origin follow-up/full trace copy/unretested allsolid and actual46773 return/local/global record classification priority ([RECOVER-002](research/QVM_RECOVERY.md)).
643
  - [x] RE-519 Carry actual recovery/caller plane/normal/flags/touch state through main timer/routing, reached clear-slide mode and post environment ([RECOVERCHAIN-001](research/QVM_RECOVERY.md)).
644
  - [ ] RE-520 Recover native collision/consistent escape-contact domains/logging/ABI effects; combine posture/recovery/landing/lost/animation/action/alternative-mode/suffix state and event/PS216 consumers; complete main/scheduler/macOS/Linux Rust/Bevy/Solari gameplay and broader game/assets/rendering/protocol work.
645
+
646
+
647
+ - [x] RE-521 Combine actual posture with reached recovery/lost/landing/ground-animation/touch children at both main ground boundaries ([COMBGROUND-001](research/QVM_COMBINED_GROUND.md)).
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.
docs/research/QVM_COMBINED_GROUND.md ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # QVM combined posture and reached ground callees
2
+
3
+ This batch completes bounded RE-521–523 / F-250–252, combining the previously separate posture, recovery, ground-loss, landing, ground-animation and touch studies at their actual main/caller boundaries. It builds on [posture](QVM_MAIN_POSTURE.md), [recovery](QVM_RECOVERY.md), [ground loss](QVM_GROUND_CALLEES.md) and [landing/event writers](QVM_LANDING.md). Native responses and remaining omissions stay explicit.
4
+
5
+ Reproduce with `python3 scripts/analyze_qvm_combined_ground.py`; validate with `python3 scripts/test_qvm_combined_ground.py`. The [machine report](qvm-combined-ground.json) retains source identity, child-before/after snapshots, evaluated helper reports, native requests and the reached main/movement state. No original executable, full QVM, native collision, physics or rendering executes.
6
+
7
+ ## COMBGROUND-001 — Shared posture and recovered ground children (RE-521)
8
+
9
+ Eighteen fixtures combine three posture variants with six scenarios: high-speed landing followed by upward classification, ground loss followed by later landing, successful recovery into air/ground loss, failed recovery, steep-plane contact and a level3 no-landing control. Entry flags, animation/resource/input/state and ordered native content/stand/ground/recovery/deep/slide/down/overlap responses remain supplied.
10
+
11
+ Actual main content sampling precedes posture47422 and its animation children. Both46773 calls then evaluate recovered children at their reached source boundaries:46296 before testing its result local,46527 before caller plane/walk clearing,45912 before caller movement-timer/ground stores,39525 before upward-classification continuation, and39253 at terminal touch registration. Posture and every live parent/helper use disjoint local frames; source call ordering and shared PS/frame/global/queue state are retained.
12
+
13
+ Across36 ground invocations the reached children are six recovery calls, six ground-loss calls,15 landing calls, three direct ground-animation calls and15 touch calls. Conditional skips do not receive prepared child effects. Action54981 inside ground loss, disabled logging, main query/alternative modes and other suffix/native consumers remain omitted or unverified; composing these recovered bodies does not fill those gaps.
14
+
15
+ ## COMBGROUND-002 — Cross-helper timer, animation and event ordering (RE-522)
16
+
17
+ The unified fixtures show why separately recovered outputs cannot simply be overlaid. Entered posture can store leg timer200, after which an actual ground-loss animation can reset it to0 before main timer aging. Other paths preserve200 and age it to184. A source ground caller can likewise store movement timer250 after landing, and main ages that value to234. Tests predict each boundary from the appropriate earlier state rather than re-seeding timers for individual consumers.
18
+
19
+ High-speed landing fixtures use saved previous Z−1500, content level2 and old ground1023. Reached landing can record numeric event87 and set Z300; the later ground invocation then enters its positive-Z kick branch and evaluates the selected forced animation. The event/parameter queue remains live through that animation and final content sampling. Numeric event/PS216 consumers and gameplay/health/damage semantics remain unverified.
20
+
21
+ A later animation change does **not** rerun earlier posture bounds selection. In one fixture posture's unchanged animation25 selected maxZ10/height−5; landing and the later kick change the animation, but those hull/viewheight values remain10/−5 through the pass. Likewise resource charges produced by posture survive the reached ground/movement children. This is a temporal state relationship in the bounded source paths, not a proof of legal real-game combinations.
22
+
23
+ ## COMBGROUND-003 — Actual movement and post-environment handoffs (RE-523)
24
+
25
+ Fifteen fixtures select41768 and evaluate30 slide children through mode/step/wrapper paths with actual ground-derived plane/normal/flags/timers/touches. Three request41848 with its effects omitted. The reached step and fallback code consumes the same state built by posture and the first ground invocation, then returns its actual state into main.
26
+
27
+ The second ground helper receives that after-dispatch position/velocity/state and evaluates any newly reached landing/upward-animation/touch children. Final content sampling consumes the resulting viewheight/current position and retains numeric queue/resource/animation effects. Independent tests predict the complete recorded extended ground state as well as child and movement outputs, so a correct child result applied at the wrong caller boundary cannot satisfy the handoff checks.
28
+
29
+ Native traces/contents/roots are supplied, not collision-derived. The clock-to-main gap, full53418, scheduler, real collision/legal domains, remaining action/alternative-mode/suffix/native consumers and macOS/Linux Rust/Bevy/Solari gameplay remain open. The scenarios deliberately select finite source branches rather than asserting physically consistent contact records.
30
+
31
+ ## Validation and next tasks
32
+
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.
docs/research/QVM_MAIN_POSTURE.md CHANGED
@@ -33,3 +33,6 @@ The main bridge now accepts an optional reached posture effect and preserves exp
33
  Eight tests verify all28 independent posture predictions, eight stand queries, eight actual animation-child effects and their timer/height ordering, root arguments/special skip, actual ground/movement hull and final-content height handoffs, ground classifications/leg timer aging,28 independent slide predictions with step/wrapper/mode outputs, source identity and supplied-effect scope. Full-suite/reproducibility/storage/link/whitespace outcomes are recorded in the ledger.
34
 
35
  RE-504 remains open for its broader ground/native/caller/runtime scope. RE-508 tracks ground recovery/ground-lost/landing/animation/event callees, native collision/content/root ABI/side effects/legal domains, real posture input/resource/animation producers and consumers, remaining action/alternative-mode/suffix effects and complete main/scheduler composition; validate macOS/Linux Rust/Bevy/Solari gameplay. Other game/assets/rendering/protocol milestones remain open.
 
 
 
 
33
  Eight tests verify all28 independent posture predictions, eight stand queries, eight actual animation-child effects and their timer/height ordering, root arguments/special skip, actual ground/movement hull and final-content height handoffs, ground classifications/leg timer aging,28 independent slide predictions with step/wrapper/mode outputs, source identity and supplied-effect scope. Full-suite/reproducibility/storage/link/whitespace outcomes are recorded in the ledger.
34
 
35
  RE-504 remains open for its broader ground/native/caller/runtime scope. RE-508 tracks ground recovery/ground-lost/landing/animation/event callees, native collision/content/root ABI/side effects/legal domains, real posture input/resource/animation producers and consumers, remaining action/alternative-mode/suffix effects and complete main/scheduler composition; validate macOS/Linux Rust/Bevy/Solari gameplay. Other game/assets/rendering/protocol milestones remain open.
36
+
37
+
38
+ Follow-up: [combined posture/ground caller study](QVM_COMBINED_GROUND.md) completes bounded RE-521–523, evaluating reached ground callees against actual posture and movement state at both main boundaries. Native/remaining action-mode-consumer/runtime limits remain explicit.
docs/research/QVM_RECOVERY.md CHANGED
@@ -31,3 +31,6 @@ The post-ground/content sequence receives the actual after-dispatch position, ve
31
  Eight independent tests verify all34 standalone and16 composed searches, every candidate coordinate/order/short circuit, full27 failure and all pointer/bounds/mask arguments, unchanged PS position/velocity, original-origin retrace/full trace copy, follow-up allsolid priority, separate local/global records, actual ground classification/return handoff/touches, main route counts, reached slide/mode outputs, post-environment handoff, source hash/partition and explicit scope. Reproducibility/full-suite/storage/link/whitespace results are recorded in the ledger.
32
 
33
  RE-516 remains open for broader native/legal/main/runtime scope; the finite46296 body/caller policy is now covered by RE-517–519. RE-520 tracks native trace/collision and consistent contact/escape domains, logging/other native ABI effects, combined posture/recovery/landing/ground-loss/animation/action/alternative-mode/suffix state, event/PS216 consumers and complete main/scheduler/macOS/Linux Rust/Bevy/Solari gameplay. Other game/assets/rendering/protocol milestones remain open.
 
 
 
 
31
  Eight independent tests verify all34 standalone and16 composed searches, every candidate coordinate/order/short circuit, full27 failure and all pointer/bounds/mask arguments, unchanged PS position/velocity, original-origin retrace/full trace copy, follow-up allsolid priority, separate local/global records, actual ground classification/return handoff/touches, main route counts, reached slide/mode outputs, post-environment handoff, source hash/partition and explicit scope. Reproducibility/full-suite/storage/link/whitespace results are recorded in the ledger.
32
 
33
  RE-516 remains open for broader native/legal/main/runtime scope; the finite46296 body/caller policy is now covered by RE-517–519. RE-520 tracks native trace/collision and consistent contact/escape domains, logging/other native ABI effects, combined posture/recovery/landing/ground-loss/animation/action/alternative-mode/suffix state, event/PS216 consumers and complete main/scheduler/macOS/Linux Rust/Bevy/Solari gameplay. Other game/assets/rendering/protocol milestones remain open.
34
+
35
+
36
+ Follow-up: [combined main ground composition](QVM_COMBINED_GROUND.md) completes bounded RE-521–523, connecting this recovery with actual posture, ground-loss/landing/animation/touch and reached movement in the same pass. Native/legal/full runtime scope remains open under RE-520/524.
docs/research/README.md CHANGED
@@ -225,3 +225,6 @@ The extension collector adds five focused tests for native tail calls, command-r
225
 
226
 
227
  [QVM allsolid recovery and ground/main caller](QVM_RECOVERY.md) adds RE-517–519. Reproduce with `python3 scripts/analyze_qvm_recovery.py`; check with `python3 scripts/test_qvm_recovery.py`. Actual46296/caller state evaluates with supplied trace responses; consistent collision/native/full runtime domains remain open.
 
 
 
 
225
 
226
 
227
  [QVM allsolid recovery and ground/main caller](QVM_RECOVERY.md) adds RE-517–519. Reproduce with `python3 scripts/analyze_qvm_recovery.py`; check with `python3 scripts/test_qvm_recovery.py`. Actual46296/caller state evaluates with supplied trace responses; consistent collision/native/full runtime domains remain 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.
docs/research/qvm-combined-ground.json ADDED
The diff for this file is too large to render. See raw diff
 
scripts/analyze_qvm_combined_ground.py ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Combined main posture and reached recovery/lost/landing/animation/touch children."""
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 vec
10
+ from analyze_qvm_main_environment import contents,env_state
11
+ from analyze_qvm_main_posture import posture
12
+ from analyze_qvm_main_contact import probe
13
+ from analyze_qvm_ground_callees import lost
14
+ from analyze_qvm_recovery import recovery
15
+ from analyze_qvm_landing import landing,queue,seed
16
+ from analyze_qvm_animation_contacts import evaluate
17
+ from analyze_vm_extensions import verified
18
+
19
+ GROUND=0x46000000
20
+ SCENARIOS={'landing_kick':('flat',2,1023,-1500,None,'flat'),'lost_land':('air',0,7,0,None,'flat'),'recover_air':('solid',0,7,0,13,'air'),'recover_fail':('solid',0,7,0,None,'flat'),'steep_contact':('steep',0,7,0,None,'flat'),'level3_skip':('flat',3,1023,0,None,'flat')}
21
+ POSTURES={'enter':(2208,-1,0),'stand_clear':(2209,0,0),'held':(2209,0,1)}
22
+
23
+
24
+ def state(m):
25
+ r=env_state(m);r.update({'bounds':vec(m,FRAME+184)+vec(m,FRAME+196),'legs':m[PS+76]&0xffffffff,'leg_timer':m[PS+72],'meter':m[PS+184],'entity_flags':m[PS+104]&0xffffffff,'queue':queue(m),'field216':m[PS+216],'field8':m[PS+8],'state220':m[PS+220]&0xffffffff,'field440':m[PS+440]});return r
26
+
27
+
28
+ def ground_all(ins,m,kind,escape=None,followup='flat'):
29
+ before=state(m);pc=46774;calls=[];trace=[];children=[];native=None
30
+ stops=[46847,46860,46873,46983,47022,47190,47215]
31
+ while True:
32
+ t=trace_slice(ins,46774,47215,m,{},resume_at=pc,stop_targets=[s for s in stops if s!=pc],local_base=GROUND,byte_memory={FRAME+25:1},limit=1024);m=t['memory'];calls+=t['calls'];trace+=t['trace'];pc=t['stop']
33
+ if pc==46847:
34
+ c=t['calls'][-1];a=c['args'];start=vec(m,a[12]);end=vec(m,a[24]);fraction=1 if kind=='air' else .5;point=[word(f(number(x)+f(f(number(y)-number(x))*f(fraction)))) for x,y in zip(start,end)];normal=(.8660254,0,.5) if kind=='steep' else (0,0,1);record=[int(kind=='solid'),0,word(fraction),*point,*map(word,normal),0,0,2,0,8]
35
+ native={'call':c,'start':start,'end':end,'record':record}
36
+ for i,v in enumerate(record):m[a[8]+4*i]=v
37
+ elif pc==46860:
38
+ c=t['calls'][-1];old=state(m);m,r=recovery(ins,m,c['args'][8],escape,followup);m[GROUND+112]=r['return_word'];children.append({'target':46296,'before':old,'report':r,'after':state(m)})
39
+ elif pc==46873 and t['calls'] and t['calls'][-1]['target']==46527:
40
+ old=state(m);m,r=lost(ins,m,1,1);children.append({'target':46527,'before':old,'report':r,'after':state(m)})
41
+ elif pc==47190:
42
+ c=t['calls'][-1];old=state(m);m,r=landing(ins,m,c['args'][8]);children.append({'target':45912,'before':old,'report':r,'after':state(m)})
43
+ elif pc in [46983,47022,47215] and t['calls'] and t['calls'][-1]['target'] in [39525,39253]:
44
+ c=t['calls'][-1];old=state(m);r=evaluate(ins,c['target'],c['args'][8],m);m=r['memory'];children.append({'target':c['target'],'request':c['args'][8],'before':old,'after':state(m),'calls':r['calls'],**trace_fields(r,False)})
45
+ elif pc not in stops:raise AssertionError('Unexpected ground boundary')
46
+ if pc==47215:break
47
+ return m,{'target':46773,'kind':kind,'before':before,'native':native,'children':children,'after':state(m),'calls':calls,**trace_fields({'trace':trace},False)}
48
+
49
+
50
+ def case(ins,scenario,variant):
51
+ kind,level,oldground,previous,escape,followup=SCENARIOS[scenario];flags,up,leg=POSTURES[variant]
52
+ def environment(ins,m,target,phase):
53
+ if target==47217:m,r=contents(ins,m,[8]*level+[0]*(3-level));r['combined_after']=state(m)
54
+ else:m,r=ground_all(ins,m,kind if phase=='before' else 'flat',escape,followup)
55
+ r['phase']=phase;return m,r
56
+ def post(ins,m):return posture(ins,m,up,0)
57
+ m=seed(previous=previous,flags=flags);m.update({PS+40:word(previous),PS+68:oldground,PS+164:38,PS+184:4000,PS+92:123,PS+104:0x1235,PS+72:leg,PS+76:25,FRAME+240:0,FRAME+228:-26,FRAME+208:99})
58
+ p=probe(ins,1016,0,flags,'contacts',initial_memory=m,environment_effect=environment,posture_effect=post);p.update({'scenario':scenario,'posture_variant':variant});return p
59
+
60
+
61
+ def main():
62
+ q=json.loads(Path('docs/research/qvm/qagame.json').read_text());_,ins=decode(verified(Path(q['source']['member']['output']).read_bytes(),q['sha256']))
63
+ probes=[case(ins,*v) for v in itertools.product(SCENARIOS,POSTURES)]
64
+ out={'source':q['source'],'sha256':q['sha256'],'probes':probes,'limitations':'Bounded finite shipped-QVM combined main posture/ground composition; no original executable/full QVM/native collision/physics/rendering executes. Actual posture and reached recovery46296/lost46527/landing45912/animation39525-39383/touch39253/event queue29913 children execute in source order before and after reached movement. Native contents/stand/ground/recovery/deep/slide/down/overlap responses and roots/interpolation are supplied, not collision-derived. Initial state/input/resource/animation are supplied;54981 action/logging/query/alternative-mode/other suffix/native consumers remain omitted or unverified. Clock-to-main gap/full53418/scheduler/real legal collision domains and macOS/Linux/Rust/Bevy/Solari gameplay remain open.'};write_json(Path('docs/research/qvm-combined-ground.json'),out);print('Composed posture and reached ground callees across main movement')
65
+
66
+
67
+ if __name__=='__main__':main()
scripts/test_qvm_combined_ground.py ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Independent helper and caller-state predictions for combined ground/main paths."""
3
+ import hashlib,json
4
+ from pathlib import Path
5
+ import unittest
6
+ from test_qvm_ground import f,n,word
7
+ from test_qvm_slide_planes import dot
8
+ from test_qvm_main_posture import expected_posture
9
+ from test_qvm_ground_callees import lost_expected
10
+ from test_qvm_recovery import check_recovery
11
+ from test_qvm_landing import expected as landing_expected
12
+ from test_qvm_animation_contacts import animation_oracle
13
+ from test_qvm_slide_repeated import oracle as slide_oracle
14
+ from test_qvm_contact_callers import expected_step
15
+ from test_qvm_timers_dispatch import timer_oracle
16
+
17
+
18
+ def ground_expected(g,previous):
19
+ s=dict(g['before']);s['touches']=s['touches'][:];record=g['native']['record'];children=g['children'];s.update({'normal':record[6:9],'surface':record[11]})
20
+ def child(target):return next(c for c in children if c['target']==target)
21
+ if record[0]:
22
+ r=child(46296)['report'];v=r['final'];s.update({k:v[k] for k in ['ground','plane','walk','flags']});s.update({'normal':v['trace_globals'][6:9],'surface':v['trace_globals'][11]})
23
+ if not r['return_word']:return s
24
+ record=r['output_record']
25
+ if n(record[2])==1:
26
+ v,_,_=lost_expected(child(46527)['report']);s.update({k:v[k] for k in ['ground','plane','walk','flags','legs','leg_timer','state220','field440']});s.update({'plane':0,'walk':0});return s
27
+ if n(s['velocity'][2])>0 and dot(list(map(n,s['velocity'])),list(map(n,record[6:9])))>10:
28
+ old=bool(s['flags']&4096);s['flags']^=4096;request=26 if old else 28
29
+ if s['legs']!=request:s['legs']=(((s['legs']&128)^128)|request)&0xffffffff;s['leg_timer']=0
30
+ s.update({'plane':0,'walk':0,'ground':1023});return s
31
+ if n(record[8])<n(1060320051) or s['level']>2:s.update({'plane':1,'walk':0,'ground':1023});return s
32
+ s.update({'plane':1,'walk':1,'flags':s['flags']&~18})
33
+ if s['flags']&128:s['flags']&=~128;s['timer']=0
34
+ if s['ground']==1023:
35
+ r=child(45912)['report'];v,_,_,_=landing_expected(r)
36
+ for k in ['velocity','flags','legs','leg_timer','state220','field440','field216','field8','entity_flags','queue']:s[k]=v[k]
37
+ if n(previous)<-200:s['timer']=250
38
+ s['ground']=record[13]
39
+ if record[13]!=1022 and record[13] not in s['touches'] and len(s['touches'])<32:s['touches'].append(record[13])
40
+ return s
41
+
42
+
43
+ class QvmCombinedGroundTests(unittest.TestCase):
44
+ @classmethod
45
+ def setUpClass(cls):cls.r=json.loads(Path('docs/research/qvm-combined-ground.json').read_text())
46
+
47
+ def test_actual_posture_and_initial_contents_order(self):
48
+ self.assertEqual(len(self.r['probes']),18)
49
+ for p in self.r['probes']:
50
+ expected,_,_=expected_posture(p);self.assertEqual(p['posture']['final'],expected);first=p['environment'][0];g=p['environment'][1];self.assertEqual(first['before']['height'],38);self.assertEqual(g['before']['height'],expected['height']);self.assertEqual(g['before']['bounds'],expected['bounds']);self.assertEqual(g['before']['legs'],expected['legs']);self.assertEqual(g['before']['leg_timer'],expected['leg_timer']);self.assertEqual(g['before']['meter'],expected['meter'])
51
+
52
+ def test_each_reached_ground_child_against_independent_helper_model(self):
53
+ counts={46296:0,46527:0,45912:0,39525:0,39253:0}
54
+ for p in self.r['probes']:
55
+ for g in [p['environment'][1],p['environment'][2]]:
56
+ for c in g['children']:
57
+ target=c['target'];counts[target]+=1
58
+ if target==46296:check_recovery(self,c['report'])
59
+ elif target==46527:self.assertEqual(c['report']['final'],lost_expected(c['report'])[0])
60
+ elif target==45912:self.assertEqual(c['report']['final'],landing_expected(c['report'])[0]);self.assertEqual(c['report']['previous'],p['clock']['velocity_snapshot'][2])
61
+ elif target==39525:
62
+ a=c['before'];legs,_,timer,_,calls=animation_oracle({'entry':39525,'type_word':0,'initial_legs_word':a['legs'],'initial_torso_word':0,'initial_leg_timer_word':a['leg_timer'],'initial_torso_timer_word':0,'request_word':c['request']});expected=dict(a);expected.update({'legs':legs,'leg_timer':timer});self.assertEqual(c['after'],expected);self.assertEqual([x['target'] for x in c['calls']],calls)
63
+ else:
64
+ expected=dict(c['before']);touches=expected['touches'][:]
65
+ if c['request']!=1022 and c['request'] not in touches and len(touches)<32:touches.append(c['request'])
66
+ expected['touches']=touches;self.assertEqual(c['after'],expected)
67
+ self.assertEqual(counts,{46296:6,46527:6,45912:15,39525:3,39253:15})
68
+
69
+ def test_all_ground_parent_stores_and_full_final_state(self):
70
+ for p in self.r['probes']:
71
+ for g in [p['environment'][1],p['environment'][2]]:self.assertEqual(g['after'],ground_expected(g,p['clock']['velocity_snapshot'][2]))
72
+
73
+ def test_callee_order_and_posture_timer_reset_before_main_aging(self):
74
+ reset=retained=False
75
+ for p in self.r['probes']:
76
+ for g in [p['environment'][1],p['environment'][2]]:self.assertEqual([c['target'] for c in g['children']],[c['target'] for c in g['calls'] if c['target'] in [46296,46527,45912,39525,39253]])
77
+ g=p['environment'][1];a=p['timer']['before'];self.assertEqual(a['flags'],g['after']['flags']);self.assertEqual(a['movement'],g['after']['timer']);values=timer_oracle({'initial_flags_word':a['flags'],'initial_movement_timer_word':a['movement'],'initial_leg_timer_word':a['leg'],'initial_torso_timer_word':a['torso'],'dt_word':a['dt']});self.assertEqual([p['timer']['after'][k] for k in ['flags','movement','leg','torso']],list(values));self.assertEqual(p['timer']['before']['leg'],g['after']['leg_timer']);self.assertEqual(p['timer']['after']['leg'],max(0,g['after']['leg_timer']-16))
78
+ if p['posture']['final']['leg_timer']==200:
79
+ reset|=g['after']['leg_timer']==0;retained|=g['after']['leg_timer']==200
80
+ self.assertTrue(reset and retained)
81
+
82
+ def test_reached_mode_children_and_wrapper_tail_use_combined_inputs(self):
83
+ children=0;counts={41768:0,41848:0}
84
+ for p in self.r['probes']:
85
+ counts[p['selected_mode']]+=1
86
+ if not p['mode']:continue
87
+ mode=p['mode'];w=mode['wrapper'];g=p['environment'][1]['after'];self.assertEqual(mode['initial']['origin'],g['origin']);self.assertEqual(mode['initial']['velocity'],g['velocity']);self.assertEqual(mode['initial']['touches'],g['touches']);self.assertEqual(mode['initial']['flags'],p['timer']['after']['flags']);self.assertEqual(mode['initial']['timer'],p['timer']['after']['movement']);self.assertEqual(w['before']['flags'],mode['initial']['flags']&~32);self.assertEqual(w['before']['velocity'],g['velocity']);entry=dict(w['before']);entry['ground_normal']=g['normal'];slide_oracle(self,w['first_slide'],entry);children+=1;self.assertEqual(w['first_slide']['ground'],g['plane']);s=w['step'];first=w['first_slide']['final']
88
+ if s:
89
+ entry=dict(s['at_slide']);entry['ground_normal']=g['normal'];slide_oracle(self,s['slide'],entry);children+=1;ret,origin,v,flags=expected_step(s);self.assertEqual([s['return_word'],s['final']['origin'],s['final']['velocity'],s['final']['flags']],[ret,origin,v,flags])
90
+ if not ret:origin,v,flags=first['origin'],first['velocity'],flags|32
91
+ delta=f(n(origin[2])-n(w['before']['origin'][2]));height=int(delta) if delta>2 else 99
92
+ else:origin,v,flags,height=first['origin'],first['velocity'],first['flags'],99
93
+ self.assertEqual([w['final']['origin'],w['final']['velocity'],w['final']['flags'],w['final']['height']],[origin,v,flags,height]);expected=dict(w['final']);vz=f(n(v[2])-f(f(800)*n(p['clock']['float_dt'])));expected['velocity']=v[:2]+[word(vz)]
94
+ if vz<0:expected['flags']&=~192;expected['timer']=0
95
+ self.assertEqual(mode['mode_final'],expected)
96
+ self.assertEqual(counts,{41768:15,41848:3});self.assertEqual(children,30)
97
+
98
+ def test_post_ground_events_and_resources_persist_into_final_contents(self):
99
+ for p in self.r['probes']:
100
+ g=p['environment'][2];c=p['environment'][3];expected=dict(g['after']);expected.update({'level':c['after']['level'],'contents':c['after']['contents']});self.assertEqual(c['combined_after'],expected)
101
+ for k in ['origin','velocity','flags','timer','touches']:self.assertEqual(g['before'][k],p['after_dispatch'][k])
102
+ for k in ['origin','velocity','flags','timer','touches']:self.assertEqual(p['final'][k],c['combined_after'][k])
103
+
104
+ def test_late_animation_does_not_recompute_earlier_posture_hull(self):
105
+ changed=False
106
+ for p in self.r['probes']:
107
+ r=p['posture']['final'];g=p['environment'][2]['after'];self.assertEqual(g['bounds'],r['bounds']);self.assertEqual(g['height'],r['height']);self.assertEqual(g['meter'],r['meter']);changed|=g['legs']!=r['legs']
108
+ if p['scenario']=='landing_kick' and p['posture_variant']=='enter':self.assertEqual(r['bounds'][-1],word(10));self.assertNotEqual(g['legs'],r['legs']);self.assertEqual(g['bounds'][-1],word(10))
109
+ self.assertTrue(changed)
110
+
111
+ def test_source_and_remaining_native_full_runtime_scope(self):
112
+ 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())
113
+ for text in ['no original executable/full QVM/native collision/physics/rendering executes','not collision-derived','54981 action/logging/query/alternative-mode/other suffix/native consumers remain omitted','Clock-to-main gap/full53418/scheduler']:self.assertIn(text,self.r['limitations'])
114
+
115
+
116
+ if __name__=='__main__':unittest.main()