Download docs/research/QVM_CAMERA_WORLD_BATCH.md from nmarshall/urt-rs: direct link, hf CLI and curl.
- Browser
- Download file 5.99 kB
-
https://huggingface.co/nmarshall/urt-rs/resolve/main/docs/research/QVM_CAMERA_WORLD_BATCH.md
- Command line
-
hf download hf://nmarshall/urt-rs/docs/research/QVM_CAMERA_WORLD_BATCH.md
-
curl -L -o QVM_CAMERA_WORLD_BATCH.md https://huggingface.co/nmarshall/urt-rs/resolve/main/docs/research/QVM_CAMERA_WORLD_BATCH.md
Entity search and camera composition: RE-854–863
This batch replaces camera search and angle stand-ins with original instruction execution and matching Rust policies. The final composition executes setup and placement across shared world state. Native fallback selection, math-library parity and game/runtime integration remain open.
Findings and boundaries
The class-hash helper has 80 fixtures. It scans from the first entity or immediately after a supplied cursor, checks nonzero in-use and class pointer values, then compares the stored hash. It never compares class text, so collisions select the first eligible hash match. Rust keeps this behavior with bounded slices and cursor validation.
Field search has 150 fixtures and 256 standalone comparator cases. Original 69386 executes rather than a string stand-in. It folds ASCII lowercase to uppercase and compares signed bytes, honors embedded NUL and nullable pointer ordering, and applies the count gate after reading characters. Rust uses logical byte strings with implicit terminators; it does not reproduce unsafe memory reads for zero count or invalid pointers. The field search passes 99999 to the comparator.
Target selection has 168 fixtures plus five six-step RNG sequences. It collects the first 32 eligible field matches, advances the xorshift state exactly once when a match exists, and selects by the low 15-bit result modulo match count. Null/missing paths preserve random state and request diagnostic 2294. Initialization, rendered diagnostics and native world ownership remain open.
The corrected angle probe has 96 fixtures with full/partial output aliases, signed zeros and subnormal intermediates. All 24 older angle fixtures agree. Both source and Rust preserve each f32 arithmetic stage. Source atan2/sqrt responses are finite Python math results rounded to f32; Rust exact parity uses transcripts checked against operation and argument bits. A separate host-math path is checked within four f32 ULPs on this host. Neither establishes original executable/native-library bit parity.
The final 96 world fixtures execute 6717→6575 with actual 276433/276586/276505/69386/36717/62944, covering absent/colliding classes, missing/multiple/capped/self targets, random-state sharing and two entity-to-player pointers. Independent policy tests verify final world/client state and mutation scope. Rust composes the recovered policies and applies placement to an already-resolved mutable player. Fallback 168114 view writes are supplied; raw pointer legality, respawn and runtime behavior remain outside these finite layouts.
Toolchain and validation
The repository had no flake. RE-860 adds pinned Python/Rust/Cargo development dependencies for macOS/Linux and sets an absolute Nix-store PYTHON. After the user's toolchain instruction, research and xtask commands use the flake-provided Python 3.13.15. The Git hooks were subsequently audited in RE-863 and changed from bare python3 to requiring the Nix PYTHON; they fail with guidance when it is missing or points outside the Nix store. Remaining commit/push operations run inside that shell.
The shell was evaluated from an identical temporary copy of flake.nix/flake.lock to avoid copying asset/cache payloads into the Nix store. Four platform shell outputs evaluate; actual runtime validation here is on the host. Use nix develop --command cargo xtask test-group <name> or enter nix develop first. New focused groups are entity-hash, rust-entity-hash, entity-field, rust-entity-field, target-pick, rust-target-pick, camera-angles, rust-camera-angles, camera-world and rust-camera-world. Use storage for hook/storage checks.
Each task passed focused xtask checks before its own commit. Registry regression verifies all five source-report parity dependencies, camera_world module selection and transition-module composition dependency. The single full-suite run after commit ten, cargo xtask test-full --since cedc6d02, passed inside the flake shell: 1,688 Python tests and 157 Rust tests (assets 10, gameplay 119, xtask 28). All 51 affected report producers regenerated twice deterministically with the explicit Nix-store Python3.13.15. Storage policy, 425 documentation files and whitespace checks passed. No generated reports changed. Validation notes were amended into task ten.
Next work: RE-864
- Recover 168114 fallback spawn/view selection and compare actual native atan2/sqrt libraries and edge domains.
- Compose camera world setup into begin-intermission with actual 175123 respawn and 156523 slow setup; broaden alias/entity ownership fixtures.
- Recover next-map command children 122230/7188/249007 and 256248/256651, then execute complete 6939 from readiness.
- Recover 277165 allocation/initialization and integrate event construction with caller-owned fields, native linking and lifetime.
- Execute publication 6328, formatting/configstring/network work, and integrate ranking→intermission→camera/map/event→scoreboard state.
- Continue legacy tracer audits and validate actual macOS/Linux Bevy/Solari gameplay/rendering. Full-game completion remains open.