qvm: recover refreshed rotation callbacks
Browse files- docs/FINDINGS.md +3 -0
- docs/PROVISIONAL_TODO.md +3 -0
- docs/RESEARCH_LEDGER.md +5 -0
- docs/REVERSE_ENGINEERING_TODO.md +3 -0
- docs/research/QVM_ROTATION_ADVANCE.md +7 -0
- docs/research/README.md +3 -0
- docs/research/qvm-rotation-advance.json +0 -0
- scripts/analyze_qvm_rotation_advance.py +14 -0
- scripts/qvm_map_commands_support.py +30 -0
- scripts/test_qvm_rotation_advance.py +19 -0
- xtask/checks.tsv +5 -0
docs/FINDINGS.md
CHANGED
|
@@ -1601,3 +1601,6 @@ RE-813–822 replaces the scoreboard decimal assumption with actual37914 executi
|
|
| 1601 |
|
| 1602 |
|
| 1603 |
**RE-867:** Rust matches128 continuous source camera/fallback/placement cases with shared RNG state and checked native-math transcripts. The supplied fallback view has been replaced by recovered spawn ranking and +9 Z. Telefrag answers stay caller-owned; no-spawn errors preserve placement state. Native collision/math and runtime integration remain open. [Evidence](research/RUST_CAMERA_SPAWN.md).
|
|
|
|
|
|
|
|
|
|
|
|
| 1601 |
|
| 1602 |
|
| 1603 |
**RE-867:** Rust matches128 continuous source camera/fallback/placement cases with shared RNG state and checked native-math transcripts. The supplied fallback view has been replaced by recovered spawn ranking and +9 Z. Telefrag answers stay caller-owned; no-spawn errors preserve placement state. Native collision/math and runtime integration remain open. [Evidence](research/RUST_CAMERA_SPAWN.md).
|
| 1604 |
+
|
| 1605 |
+
|
| 1606 |
+
**RE-868:** 192 original122230 cases execute actual strlen and recover signed counter wrapping, threshold priority and refresh→optional filename callback/clear→reset order. Engine-5 refresh writes are supplied explicitly, including empty, NUL and high-byte filenames. Actual122143/121987 callbacks and native runtime ownership remain open. [Evidence](research/QVM_ROTATION_ADVANCE.md).
|
docs/PROVISIONAL_TODO.md
CHANGED
|
@@ -1626,3 +1626,6 @@ RE-866: 128 coherent setup→placement cases replace supplied fallback view writ
|
|
| 1626 |
|
| 1627 |
|
| 1628 |
RE-867: Rust matches128 continuous source camera/fallback/placement cases with shared RNG state and checked native-math transcripts. The supplied fallback view has been replaced by recovered spawn ranking and +9 Z. Telefrag answers stay caller-owned; no-spawn errors preserve placement state. Native collision/math and runtime integration remain open. Full runtime completion remains open. [Evidence](research/RUST_CAMERA_SPAWN.md).
|
|
|
|
|
|
|
|
|
|
|
|
| 1626 |
|
| 1627 |
|
| 1628 |
RE-867: Rust matches128 continuous source camera/fallback/placement cases with shared RNG state and checked native-math transcripts. The supplied fallback view has been replaced by recovered spawn ranking and +9 Z. Telefrag answers stay caller-owned; no-spawn errors preserve placement state. Native collision/math and runtime integration remain open. Full runtime completion remains open. [Evidence](research/RUST_CAMERA_SPAWN.md).
|
| 1629 |
+
|
| 1630 |
+
|
| 1631 |
+
RE-868: 192 original122230 cases execute actual strlen and recover signed counter wrapping, threshold priority and refresh→optional filename callback/clear→reset order. Engine-5 refresh writes are supplied explicitly, including empty, NUL and high-byte filenames. Actual122143/121987 callbacks and native runtime ownership remain open. Full runtime completion remains open. [Evidence](research/QVM_ROTATION_ADVANCE.md).
|
docs/RESEARCH_LEDGER.md
CHANGED
|
@@ -2036,3 +2036,8 @@ RE-866 review: expanded the standalone source fallback grid to80 entities so fil
|
|
| 2036 |
## 2026-10-27 — RE-867 Rust camera composition with recovered fallback
|
| 2037 |
|
| 2038 |
Rust matches128 continuous source camera/fallback/placement cases with shared RNG state and checked native-math transcripts. The supplied fallback view has been replaced by recovered spawn ranking and +9 Z. Telefrag answers stay caller-owned; no-spawn errors preserve placement state. Native collision/math and runtime integration remain open. Focused `cargo xtask test-group rust-camera-spawn` passes (9 Python tests); selected reports regenerate twice deterministically, with storage, documentation links and whitespace guards. Full suite deferred to task ten. Original assets unchanged; source fixtures do not establish complete native/runtime parity.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2036 |
## 2026-10-27 — RE-867 Rust camera composition with recovered fallback
|
| 2037 |
|
| 2038 |
Rust matches128 continuous source camera/fallback/placement cases with shared RNG state and checked native-math transcripts. The supplied fallback view has been replaced by recovered spawn ranking and +9 Z. Telefrag answers stay caller-owned; no-spawn errors preserve placement state. Native collision/math and runtime integration remain open. Focused `cargo xtask test-group rust-camera-spawn` passes (9 Python tests); selected reports regenerate twice deterministically, with storage, documentation links and whitespace guards. Full suite deferred to task ten. Original assets unchanged; source fixtures do not establish complete native/runtime parity.
|
| 2039 |
+
|
| 2040 |
+
|
| 2041 |
+
## 2026-10-27 — RE-868 Original rotation cursor and refreshed filename callback policy
|
| 2042 |
+
|
| 2043 |
+
192 original122230 cases execute actual strlen and recover signed counter wrapping, threshold priority and refresh→optional filename callback/clear→reset order. Engine-5 refresh writes are supplied explicitly, including empty, NUL and high-byte filenames. Actual122143/121987 callbacks and native runtime ownership remain open. Focused `cargo xtask test-group rotation-advance` passes (5 Python tests); selected reports regenerate twice deterministically, with storage, documentation links and whitespace guards. Full suite deferred to task ten. Original assets unchanged; source fixtures do not establish complete native/runtime parity.
|
docs/REVERSE_ENGINEERING_TODO.md
CHANGED
|
@@ -1663,3 +1663,6 @@ Purpose: turn the supplied installation into an evidence-backed specification of
|
|
| 1663 |
|
| 1664 |
|
| 1665 |
- [x] RE-867 Rust camera composition with recovered fallback ([evidence](research/RUST_CAMERA_SPAWN.md)).
|
|
|
|
|
|
|
|
|
|
|
|
| 1663 |
|
| 1664 |
|
| 1665 |
- [x] RE-867 Rust camera composition with recovered fallback ([evidence](research/RUST_CAMERA_SPAWN.md)).
|
| 1666 |
+
|
| 1667 |
+
|
| 1668 |
+
- [x] RE-868 Original rotation cursor and refreshed filename callback policy ([evidence](research/QVM_ROTATION_ADVANCE.md)).
|
docs/research/QVM_ROTATION_ADVANCE.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Original rotation cursor and refreshed filename callback policy
|
| 2 |
+
|
| 3 |
+
RE-868. Reproduce with `python3 scripts/analyze_qvm_rotation_advance.py`; focused validation: `cargo xtask test-group rotation-advance`. [Machine report](qvm-rotation-advance.json).
|
| 4 |
+
|
| 5 |
+
192 original122230 cases execute actual strlen and recover signed counter wrapping, threshold priority and refresh→optional filename callback/clear→reset order. Engine-5 refresh writes are supplied explicitly, including empty, NUL and high-byte filenames. Actual122143/121987 callbacks and native runtime ownership remain open.
|
| 6 |
+
|
| 7 |
+
Original executable/native runtime and complete Linux/macOS Rust/Bevy/Solari acceptance remain unverified.
|
docs/research/README.md
CHANGED
|
@@ -1199,3 +1199,6 @@ The extension collector adds five focused tests for native tail calls, command-r
|
|
| 1199 |
|
| 1200 |
|
| 1201 |
[RE-867: Rust camera composition with recovered fallback](RUST_CAMERA_SPAWN.md).
|
|
|
|
|
|
|
|
|
|
|
|
| 1199 |
|
| 1200 |
|
| 1201 |
[RE-867: Rust camera composition with recovered fallback](RUST_CAMERA_SPAWN.md).
|
| 1202 |
+
|
| 1203 |
+
|
| 1204 |
+
[RE-868: Original rotation cursor and refreshed filename callback policy](QVM_ROTATION_ADVANCE.md).
|
docs/research/qvm-rotation-advance.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
scripts/analyze_qvm_rotation_advance.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
import itertools
|
| 3 |
+
from pathlib import Path
|
| 4 |
+
from qvm_research_support import source
|
| 5 |
+
from qvm_map_commands_support import rotation,put_string,CURSOR,ENABLED,LIMIT,WRITE
|
| 6 |
+
from qvm_string_memory_support import cstring
|
| 7 |
+
from analyze_qvm import write_json
|
| 8 |
+
|
| 9 |
+
def main():
|
| 10 |
+
q,raw,h,ins=source();rows=[]
|
| 11 |
+
for enabled,cursor,limit,updated in itertools.product([-1,0,1],[-1,0,1,2147483647],[-1,0,1,2],[b'',b'bot.cfg',b'a\0tail',b'\xff']):
|
| 12 |
+
m={CURSOR:cursor,ENABLED:enabled,LIMIT:limit};b={};put_string(m,b,WRITE,b'previous.cfg',128);m,p,b=rotation(ins,m,b,updated);p.update(input=dict(enabled=enabled,cursor=cursor,limit=limit,updated=updated.hex()),cursor=m[CURSOR]&0xffffffff,filename=cstring(m,b,WRITE).hex());rows.append(p)
|
| 13 |
+
write_json(Path('docs/research/qvm-rotation-advance.json'),{'source':q['source'],'sha256':q['sha256'],'probes':rows,'limits':'Actual122230 and actual36038 over192 cases. Signed wrapped increment/threshold, engine-5 cvar refresh, optional122143 filename callback, clear cvar and121987 order. Engine refresh bytes supplied, downstream callbacks captured; no native bot/config/runtime claim.'})
|
| 14 |
+
if __name__=='__main__':main()
|
scripts/qvm_map_commands_support.py
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Actual map/rotation byte routines; engine cvar and command effects are captured."""
|
| 2 |
+
from qvm_camera_world_support import B,run
|
| 3 |
+
from qvm_string_memory_support import cstring,copy_bounded
|
| 4 |
+
from qvm_byte_memory_support import write_bytes
|
| 5 |
+
from qvm_formatter_support import formatter_env,formatter,image_bytes
|
| 6 |
+
from qvm_scoreboard_wire_support import final_format
|
| 7 |
+
D=B+0x14000
|
| 8 |
+
CURSOR=35145308
|
| 9 |
+
ENABLED=35145312
|
| 10 |
+
LIMIT=35142328
|
| 11 |
+
WRITE=35142060
|
| 12 |
+
MIRROR=34067112
|
| 13 |
+
|
| 14 |
+
def put_string(m,b,address,data,capacity=0):
|
| 15 |
+
data=bytes(data)+b'\0';data=data.ljust(max(capacity,len(data)+8),b'\0');write_bytes(m,b,{address+j:v for j,v in enumerate(data)})
|
| 16 |
+
def strlen(ins,m,a,b):
|
| 17 |
+
m,v,p,b=run(ins,m,36038,36121,20,a,b,base=D+0x1000);return m,v,{'actual_source_child':36038}
|
| 18 |
+
def rotation(ins,m,b,updated):
|
| 19 |
+
requests=[];operations=[]
|
| 20 |
+
def refresh(i,m,a,bs):
|
| 21 |
+
requests.append({'target':-5,'arguments':a});data=(updated+b'\0').ljust(128,b'\0');cells={WRITE+j:v for j,v in enumerate(data)};operations.append({'op':'refresh'});return m,0,{'engine_update_supplied':True,'child_memory_bytes':cells}
|
| 22 |
+
def capture(t):
|
| 23 |
+
def call(i,m,a,bs):
|
| 24 |
+
requests.append({'target':t,'arguments':a})
|
| 25 |
+
if t==122143:operations.append({'op':'write','text':cstring(m,bs,a[8]).hex()})
|
| 26 |
+
if t==-6:operations.append({'op':'clear'})
|
| 27 |
+
if t==121987:operations.append({'op':'reset'})
|
| 28 |
+
return m,0,{'external_effect_captured':True}
|
| 29 |
+
return call
|
| 30 |
+
m,v,p,b=run(ins,m,122230,122286,24,b=b,handlers={-5:refresh,36038:strlen,122143:capture(122143),-6:capture(-6),121987:capture(121987)},base=D);p.update(requests=requests,operations=operations);return m,p,b
|
scripts/test_qvm_rotation_advance.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import json,unittest
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
from test_qvm_exit_complete import signed
|
| 4 |
+
class RotationTests(unittest.TestCase):
|
| 5 |
+
def test_counter_wrap_and_refreshed_cstring_gates(self):
|
| 6 |
+
rows=json.loads(Path('docs/research/qvm-rotation-advance.json').read_text())['probes'];self.assertEqual(len(rows),192)
|
| 7 |
+
for p in rows:
|
| 8 |
+
a=p['input'];cursor=signed(a['cursor']+1) if a['enabled'] else a['cursor'];wrapped=bool(a['enabled']) and cursor>=a['limit'];name=bytes.fromhex(a['updated']).split(b'\0')[0] if wrapped else b'previous.cfg';ops=[]
|
| 9 |
+
if wrapped:cursor=0;ops=[{'op':'refresh'}]+([{'op':'write','text':name.hex()},{'op':'clear'}] if name else [])+[{'op':'reset'}]
|
| 10 |
+
self.assertEqual(p['cursor'],cursor&0xffffffff);self.assertEqual(p['filename'],name.hex());self.assertEqual(p['operations'],ops)
|
| 11 |
+
def test_exact_cvar_callback_abi(self):
|
| 12 |
+
for p in json.loads(Path('docs/research/qvm-rotation-advance.json').read_text())['probes']:
|
| 13 |
+
wanted=[]
|
| 14 |
+
if p['operations']:
|
| 15 |
+
wanted=[(-5,{'8':35142044})]
|
| 16 |
+
if any(o['op']=='write' for o in p['operations']):wanted.extend([(122143,{'8':35142060}),(-6,{'8':60401,'12':60400})])
|
| 17 |
+
wanted.append((121987,{}))
|
| 18 |
+
self.assertEqual([(r['target'],r['arguments']) for r in p['requests']],wanted)
|
| 19 |
+
if __name__=='__main__':unittest.main()
|
xtask/checks.tsv
CHANGED
|
@@ -2460,3 +2460,8 @@ report scripts/analyze_rust_camera_spawn.py docs/research/rust-camera-spawn.json
|
|
| 2460 |
edge docs/research/rust-camera-spawn.json scripts/test_rust_camera_spawn.py
|
| 2461 |
group rust-camera-spawn scripts/analyze_rust_camera_spawn.py
|
| 2462 |
edge scripts/analyze_rust_camera_spawn.py scripts/analyze_qvm_resumer_audit.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2460 |
edge docs/research/rust-camera-spawn.json scripts/test_rust_camera_spawn.py
|
| 2461 |
group rust-camera-spawn scripts/analyze_rust_camera_spawn.py
|
| 2462 |
edge scripts/analyze_rust_camera_spawn.py scripts/analyze_qvm_resumer_audit.py
|
| 2463 |
+
report scripts/analyze_qvm_rotation_advance.py docs/research/qvm-rotation-advance.json
|
| 2464 |
+
edge docs/research/qvm-rotation-advance.json scripts/test_qvm_rotation_advance.py
|
| 2465 |
+
group rotation-advance scripts/analyze_qvm_rotation_advance.py
|
| 2466 |
+
edge scripts/analyze_qvm_rotation_advance.py scripts/analyze_qvm_resumer_audit.py
|
| 2467 |
+
edge scripts/qvm_map_commands_support.py scripts/analyze_qvm_resumer_audit.py
|