nmarshall commited on
Commit
51f3f48
·
1 Parent(s): 01aefa2

qvm: complete finite pose

Browse files
docs/ASSET_PIPELINE_TODO.md CHANGED
@@ -670,3 +670,6 @@ Research progress: RE-663 [report](research/QVM_POSE_LEAN.md); remaining native/
670
 
671
 
672
  Research progress: RE-664 [report](research/QVM_POSE_PUBLICATION.md); remaining native/content/runtime/platform scope stays open.
 
 
 
 
670
 
671
 
672
  Research progress: RE-664 [report](research/QVM_POSE_PUBLICATION.md); remaining native/content/runtime/platform scope stays open.
673
+
674
+
675
+ Research progress: RE-665 [report](research/QVM_COMPLETE_POSE.md); remaining native/content/runtime/platform scope stays open.
docs/FINDINGS.md CHANGED
@@ -1016,3 +1016,6 @@ Bounded qagame paths recover bomb-plant/inactivity correction requests, direct f
1016
 
1017
 
1018
  **RE-664 — Relative pose angle publication and numeric flag sum:** 32254 wraps head−body and body−legs independently into inclusive±180, publishes unchanged legs and writes a shifted numeric flag sum through an optional pointer. [Evidence](research/QVM_POSE_PUBLICATION.md).
 
 
 
 
1016
 
1017
 
1018
  **RE-664 — Relative pose angle publication and numeric flag sum:** 32254 wraps head−body and body−legs independently into inclusive±180, publishes unchanged legs and writes a shifted numeric flag sum through an optional pointer. [Evidence](research/QVM_POSE_PUBLICATION.md).
1019
+
1020
+
1021
+ **RE-665 — Complete finite pose routine with recovered source children:** Complete32254 now reaches its void output boundary with actual swing, vector-angle and interpolation children across stationary/movement/animation-mask cases. [Evidence](research/QVM_COMPLETE_POSE.md).
docs/PROVISIONAL_TODO.md CHANGED
@@ -993,3 +993,6 @@ Research progress: RE-663 [report](research/QVM_POSE_LEAN.md); remaining native/
993
 
994
 
995
  Research progress: RE-664 [report](research/QVM_POSE_PUBLICATION.md); remaining native/content/runtime/platform scope stays open.
 
 
 
 
993
 
994
 
995
  Research progress: RE-664 [report](research/QVM_POSE_PUBLICATION.md); remaining native/content/runtime/platform scope stays open.
996
+
997
+
998
+ Research progress: RE-665 [report](research/QVM_COMPLETE_POSE.md); remaining native/content/runtime/platform scope stays open.
docs/RESEARCH_LEDGER.md CHANGED
@@ -982,3 +982,8 @@ One direct append caller156173 and three direct reset callers174399/203011/21963
982
  ## 2026-10-20 — RE-664 Relative pose angle publication and numeric flag sum (separate task commit)
983
 
984
  32254 wraps head−body and body−legs independently into inclusive±180, publishes unchanged legs and writes a shifted numeric flag sum through an optional pointer. 24 fixtures check every output angle word, multi-turn/half-turn behavior, optional flags and signed shifts with synthetic nonboolean inputs. Full suite: 1121 tests pass. Report regenerates byte-identically (25220 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
 
 
 
 
 
 
982
  ## 2026-10-20 — RE-664 Relative pose angle publication and numeric flag sum (separate task commit)
983
 
984
  32254 wraps head−body and body−legs independently into inclusive±180, publishes unchanged legs and writes a shifted numeric flag sum through an optional pointer. 24 fixtures check every output angle word, multi-turn/half-turn behavior, optional flags and signed shifts with synthetic nonboolean inputs. Full suite: 1121 tests pass. Report regenerates byte-identically (25220 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
985
+
986
+
987
+ ## 2026-10-20 — RE-665 Complete finite pose routine with recovered source children (separate task commit)
988
+
989
+ Complete32254 now reaches its void output boundary with actual swing, vector-angle and interpolation children across stationary/movement/animation-mask cases. 110 fixtures independently compose all nine output angles, external state mutations and optional numeric flag output, with exact child coverage and zero/long elapsed cases. Full suite: 1125 tests pass. Report regenerates byte-identically (905274 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
docs/REVERSE_ENGINEERING_TODO.md CHANGED
@@ -1036,3 +1036,6 @@ Purpose: turn the supplied installation into an evidence-backed specification of
1036
 
1037
 
1038
  - [x] RE-664 Relative pose angle publication and numeric flag sum ([report](research/QVM_POSE_PUBLICATION.md)).
 
 
 
 
1036
 
1037
 
1038
  - [x] RE-664 Relative pose angle publication and numeric flag sum ([report](research/QVM_POSE_PUBLICATION.md)).
1039
+
1040
+
1041
+ - [x] RE-665 Complete finite pose routine with recovered source children ([report](research/QVM_COMPLETE_POSE.md)).
docs/research/QVM_COMPLETE_POSE.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # Complete finite pose routine with recovered source children
2
+
3
+ RE-665. Reproduce with `python3 scripts/analyze_qvm_complete_pose.py`; check with `python3 scripts/test_qvm_complete_pose.py`. The [machine report](qvm-complete-pose.json) retains source identity and bounded fixtures.
4
+
5
+ Complete32255–33388 executes the original source branches and actual33391/62944/63746 helpers. Only finite native math responses are modeled. A separate pure oracle composes controller state, animation-dispatched movement yaw, pitch bias and relative-angle publication to check every output and all four external state words. Fixtures cover reverse/forward/default IDs, bit128 masks, zero/full velocity, negative/multi-turn input, optional output flags and elapsed0/16/1000. This closes32254 on these bounded finite fixtures; it does not prove legal live inputs, original native bit parity, asset skeleton identity or successful25341 intersection.
6
+
7
+ No original executable/full QVM/native collision/physics/rendering executes. Native responses and legal input domains are supplied or unverified where stated; full runtime/macOS/Linux Rust/Bevy/Solari gameplay remains open.
docs/research/README.md CHANGED
@@ -594,3 +594,6 @@ The extension collector adds five focused tests for native tail calls, command-r
594
 
595
 
596
  [RE-664: Relative pose angle publication and numeric flag sum](QVM_POSE_PUBLICATION.md). Reproduce with `python3 scripts/analyze_qvm_pose_publication.py`; check with `python3 scripts/test_qvm_pose_publication.py`.
 
 
 
 
594
 
595
 
596
  [RE-664: Relative pose angle publication and numeric flag sum](QVM_POSE_PUBLICATION.md). Reproduce with `python3 scripts/analyze_qvm_pose_publication.py`; check with `python3 scripts/test_qvm_pose_publication.py`.
597
+
598
+
599
+ [RE-665: Complete finite pose routine with recovered source children](QVM_COMPLETE_POSE.md). Reproduce with `python3 scripts/analyze_qvm_complete_pose.py`; check with `python3 scripts/test_qvm_complete_pose.py`.
docs/research/qvm-complete-pose.json ADDED
The diff for this file is too large to render. See raw diff
 
scripts/analyze_qvm_complete_pose.py ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Complete finite32254 with all actual recovered source children."""
3
+ import itertools
4
+ from pathlib import Path
5
+ from qvm_research_support import source,execute,constants
6
+ from qvm_shot_math_support import TRIG
7
+ from analyze_qvm_pose_prefix import fixture,LOCAL,STATE,OUT,VELOCITY
8
+ from analyze_qvm_swing_controller import swing
9
+ from analyze_qvm_vector_angles import vector_angles
10
+ from analyze_qvm_history_angle_lerp import angle
11
+ from analyze_qvm_acceleration import word
12
+ from analyze_qvm_slide_prefix import vec
13
+ from analyze_qvm import write_json
14
+
15
+ def pose(ins,m,args):
16
+ m=dict(m);before={'angles':vec(m,args[8]),'velocity':vec(m,args[12]),'state':[m[STATE+4*j]&0xffffffff for j in range(4)]}
17
+ for o,v in args.items():m[LOCAL+236+o]=v
18
+ def controller(i,m,a,c):m,r=swing(i,m,a);return m,c,0,r
19
+ def direction(i,m,a,c):m,r=vector_angles(i,m,a);return m,c,0,r
20
+ def blend(i,m,a,c):m,r=angle(i,m,a);return m,c,r['result'],r
21
+ m,_,e=execute(ins,32255,33389,m,(0,0,0),LOCAL,{**TRIG,33391:controller,62944:direction,63746:blend})
22
+ return m,{'arguments':args,'initial':before,'final_state':[m[STATE+4*j]&0xffffffff for j in range(4)],'output_legs_body_head':[vec(m,args[28]+o) for o in [0,12,24]],'flag':m.get(args[48]),'execution':e}
23
+
24
+ def main():
25
+ q,raw,h,ins=source();table=constants(raw,h,list(range(20536+22*4,20536+41*4,4))+[21348,21352,21356]);rows=[]
26
+ cases=[(first,second,velocity,angles,16,True) for first,second,velocity,angles in itertools.product([0,20,21,22,23,25,40,41,169],[0,22],[(0,0,0),(3,4,12),(-1,-2,0)],[(30,45.123,10),(-15,-359.5,90)])]+[(23,22,(300,400,0),(400,725,3),0,False),(22,0,(1,0,0),(0,0,0),1000,True)]
27
+ for first,second,velocity,angles,elapsed,flag_pointer in cases:
28
+ m,a=fixture(first,second,angles);m.update(table);a[24]=elapsed
29
+ if flag_pointer:m[a[48]]=99
30
+ else:a[48]=0
31
+ for j,v in enumerate(velocity):m[VELOCITY+4*j]=word(v)
32
+ rows.append(pose(ins,m,a)[1])
33
+ write_json(Path('docs/research/qvm-complete-pose.json'),{'source':q['source'],'sha256':q['sha256'],'probes':rows,'limits':'Complete32255–33388 with actual33391/62944/63746 and finite supplied native math only. No original libm parity, semantic skeleton mapping, full model intersection or legal live-domain validation.'})
34
+ if __name__=='__main__':main()
scripts/test_qvm_complete_pose.py ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json,unittest
2
+ from pathlib import Path
3
+ from test_qvm_ground import word,n,f
4
+ from test_qvm_swing_controller import expected as swing
5
+ from test_qvm_pose_motion_yaw import expected as motion
6
+ from test_qvm_pose_publication import expected as publish
7
+
8
+ def expected(p):
9
+ a=p['arguments'];initial=p['initial'];first=a['16']&~128;second=a['20']&~128;active=int(second not in [0,20,21]);flags=[active,active,int(active and first!=41)];state=initial['state'][:];yaw=word(f(float(int(f(n(initial['angles'][1])*n(1127615329)))&65535)*n(1001652224)));half=word(f(n(initial['angles'][0])*.5))
10
+ for index,slot in [(0,3),(2,1)]:state[slot],flags[index]=swing({'arguments':{'8':yaw,'12':0,'16':word(90),'20':word(.3),'32':a['24']},'initial':[state[slot],flags[index]]})
11
+ leg_yaw=motion({'animation_id':first,'input_yaw':yaw,'previous_yaw':state[1],'velocity':initial['velocity']})[0];pitch=n(half) if active else 0
12
+ if active and pitch>180:pitch=f(pitch-360)
13
+ pitch=word(f(pitch+(15 if first in [20,21] else 5)));state[2]=pitch
14
+ output=publish([[half,yaw,initial['angles'][2]],[pitch,state[3],0],[0,leg_yaw,0]])
15
+ return state,output,flags[1]+(flags[0]>>1)+(flags[2]>>2) if a['48'] else None
16
+ class CompletePoseTests(unittest.TestCase):
17
+ @classmethod
18
+ def setUpClass(cls):cls.rows=json.loads(Path('docs/research/qvm-complete-pose.json').read_text())['probes']
19
+ def test_independent_all_outputs_and_external_mutations(self):
20
+ self.assertEqual(len(self.rows),110)
21
+ for p in self.rows:self.assertEqual((p['final_state'],p['output_legs_body_head'],p['flag']),expected(p),p['arguments'])
22
+ def test_every_child_is_recovered_or_explicit_math(self):
23
+ for p in self.rows:self.assertTrue(set(c['target'] for c in p['execution']['calls'])<={33391,62944,63746,-104,-105,-107});self.assertEqual(len(p['execution']['calls']),len(p['execution']['children']))
24
+ def test_dispatch_special_masks_and_optional_pointer_covered(self):
25
+ self.assertIn(169,{p['arguments']['16'] for p in self.rows});self.assertTrue(any(not p['arguments']['48'] for p in self.rows));self.assertEqual({p['arguments']['24'] for p in self.rows},{0,16,1000})
26
+ def test_void_boundary_and_no_geometry_call(self):
27
+ for p in self.rows:self.assertIsNone(p['execution']['return']);self.assertNotIn(25341,[c['target'] for c in p['execution']['calls']])
28
+ if __name__=='__main__':unittest.main()