File size: 6,812 Bytes
40af75f b9a9445 40af75f b9a9445 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | # Fallback spawn and normal map commands: RE-864–873
This batch replaces the camera fallback stand-in with original instruction execution and composes normal next-map command children with their shared reset state. Rust ports match the finite source contracts; telefrag, engine refresh, native math/copy and lower callbacks remain explicit boundaries.
| Task | Evidence |
| --- | --- |
| RE-864 | [168114 fallback distance ranking and selection](QVM_SPAWN_FALLBACK.md) |
| RE-865 | [Rust fallback spawn selection](RUST_SPAWN_FALLBACK.md) |
| RE-866 | [Camera setup with actual fallback](QVM_CAMERA_SPAWN.md) |
| RE-867 | [Rust composed fallback camera](RUST_CAMERA_SPAWN.md) |
| RE-868 | [122230 cursor and refreshed filename policy](QVM_ROTATION_ADVANCE.md) |
| RE-869 | [Rust rotation callback intentions](RUST_ROTATION_ADVANCE.md) |
| RE-870 | [7188 override command, copy and original formatter](QVM_MAP_SELECT.md) |
| RE-871 | [Rust override command ownership](RUST_MAP_SELECT.md) |
| RE-872 | [6939 normal path with actual command children](QVM_NORMAL_MAP_FLOW.md) |
| RE-873 | [Rust normal map command/reset composition](RUST_NORMAL_MAP_FLOW.md) |
## Findings and evidence boundaries
Fallback selection has 112 cases. Actual 168114 searches class hash −103258081 through recovered 276433, skips supplied telefrag results, and inserts accepted candidates in stable descending f32 distance order. It keeps 64; the grid reaches 80 entities so this cap is exercised after class filtering. At 8 or more candidates, RNG 36717 selects modulo floor(count/2); below 8 it uses the entire set. A match always consumes one draw, even with one candidate. If every class match is blocked, it chooses the first class match without a draw; no class match reaches captured fatal 2319. It copies spawn angles and adds 9 to origin Z. Source sqrt responses are modeled and checked by Rust transcripts; actual collision/native math and unsafe pointer domains remain open.
The 128 camera fixtures execute 6717→6575 with actual 168114 fallback and the previously recovered searches, RNG and angle bodies. They combine fallback and existing intermission-camera branches with two entity-to-player pointers. Rust stages selection and places only after successful resolution. Telefrag inputs remain caller-provided; no-spawn handling is a typed error rather than executing original fatal termination.
Rotation has 192 cases. The observed write cvar is `bot_interbreedwrite`; the cursor is retained as a raw control counter rather than assumed to represent a map list. Original 122230 increments an enabled signed cursor with word wrapping, tests its threshold, then requests engine−5 refresh of the write cvar before inspecting its string through actual 36038. Only a refreshed nonempty filename requests 122143 and a cvar clear; 121987 follows either way at the boundary. VM filename bytes remain the refreshed value after the captured engine clear. Actual 122143/121987 behavior and engine ownership remain open.
Map selection has 90 cases and executes actual 7188, strlen, bounded-copy wrapper 69338, alternating formatter 70458 and formatter 37914. The nonempty override mirror branch reads the current engine mapname (127 bytes), sets g_nextCycleMap to that current name, then copies the override mirror into the local 128-byte command buffer. It requests an engine g_NextMap clear and emits mode 2 `map <override>\n`, truncated to 127 override bytes. The VM mirror remains unchanged until a future engine refresh. Empty mirror delegates 221662; its supplied return does not affect this body. Tests verify copy direction, NUL padding, unchanged guards/mirror, raw high bytes and exact original formatter output. Engine buffer writes, native−103 copy and actual cvar/command dispatch remain supplied/modeled/captured.
The final 192 cases execute the actual 6939 normal path with recovered 122230/7188 and mode classifier 33715, combining command order with global/client resets. A middle snapshot and optional supplied 249007 connection change prove the final state 2→1 scan observes callback mutations. Rust composes the same phases atomically with explicit supplied connection updates, rejects team-series inputs and invalid callback indices, and preserves pending/phase/series data. Native 249007 and downstream callbacks still remain open.
## Validation
All Python execution in this batch uses the already-resolved Nix Python 3.13.15 declared by flake.nix; PYTHON is explicit for xtask, nested scripts and Git hooks. No macOS Command Line Tools Python is used. Each task passed focused cargo xtask validation before its own commit, with deterministic double report regeneration, relevant Python/scoped gameplay Rust tests, storage, documentation links and whitespace checks. The registry regression verifies all five source-report parity edges, camera/map module consumers and shared transition/intermission dependencies. The single full-suite run after commit ten, `cargo xtask test-full --since 171bd705`, passed with the flake-declared Python: 1,708 Python tests and 169 Rust tests (assets 10, gameplay 129, xtask 30). All 56 affected report producers regenerated twice deterministically. Storage policy, links across 436 documentation files and whitespace checks passed. There was no generated report drift; notes were amended into task ten.
Use `cargo xtask test-group <name>` with `spawn-fallback`, `rust-spawn-fallback`, `camera-spawn`, `rust-camera-spawn`, `rotation-advance`, `rust-rotation-advance`, `map-select`, `rust-map-select`, `normal-map-flow` or `rust-normal-map-flow`, in the flake tool environment.
## Follow-up work (expanded by RE-874–883)
- [ ] Recover 167638 telefrag/collision queries and compare actual native sqrt/atan2; broaden spawn aliases, unsupported domains and original fatal semantics.
- [ ] Compose recovered camera fallback into actual 175123 respawn and 156523 slow setup, then the complete begin-intermission flow.
- [ ] Recover 122143/121987 rotation callbacks, 221662 fallback map selection and 249007 post-map state/command behavior.
- [ ] Compose complete 6939 series/normal handling into readiness, with real engine cvar refresh and command ownership.
- [ ] Recover 277165 allocation/initialization and integrate event caller-owned fields, native linking and lifetime.
- [ ] Execute 6328 publication and real formatting/configstring/network work; integrate ranking→intermission→camera/map/event→scoreboard state.
- [ ] Validate actual macOS/Linux Bevy/Solari gameplay/rendering and continue legacy tracer audits. These policies do not establish full-game completion.
The next batch recovers the overlap filter, bot callbacks and post-map dispatch: [RE-874–883](QVM_BOT_COLLISION_BATCH.md). Its RE-884 list supersedes this older follow-up list.
|