Download docs/research/QVM_AIM_TRACE_BATCH.md from nmarshall/urt-rs: direct link, hf CLI and curl.
- Browser
- Download file 7.47 kB
-
https://huggingface.co/nmarshall/urt-rs/resolve/main/docs/research/QVM_AIM_TRACE_BATCH.md
- Command line
-
hf download hf://nmarshall/urt-rs/docs/research/QVM_AIM_TRACE_BATCH.md
-
curl -L -o QVM_AIM_TRACE_BATCH.md https://huggingface.co/nmarshall/urt-rs/resolve/main/docs/research/QVM_AIM_TRACE_BATCH.md
Aim, pellet preparation and trace boundaries: RE-615–624
Ten separately checked tasks extend the allocation and shot-preparation batch. The shared aim function is now recovered through its endpoint, and the event57 path reaches its first trace boundary with actual source allocation and pellet preparation. Neither path establishes a hit, damage, full shot return or playable Rust behavior.
| Task | Recovered scope | Evidence |
|---|---|---|
| RE-615 | Airborne local44 adjustment and three aim trig pairs | Aim trig |
| RE-616 | Conditional extra offsets and additional RNG draws | Extra offsets |
| RE-617 | Endpoint writes and selected origin/forward aliases | Endpoint |
| RE-618 | Complete290493 source control flow with bounded rejection | Whole aim |
| RE-619 | 293732 basis→complete aim→291641 argument handoff | Shared handler aim |
| RE-620 | 291641 prelude, candidate bound edits and first native trace request | Trace request |
| RE-621 | Complete61092 point rotation and alias ordering | Rotation helper |
| RE-622 | 295018 muzzle/width and indexed18-degree pellet rotation | Pellet rotation |
| RE-623 | Signed local seed, absolute-sine scale and pellet endpoint | Pellet endpoint |
| RE-624 | 285840 allocated event57→first295018 pellet→291641 boundary | Event57 chain |
Findings for the rewrite
The source applies the airborne multiplier before sampling and can consume an extra pair of RNG draws after trig. Weapon IDs, flags and strict timestamp comparisons select those draws. Seed consumption is part of parity: the shared aim rejection loop and optional jitter must not be replaced with a distribution that consumes a different sequence.
The complete aim driver now follows the original branches and calls within290493, including rejected candidates, extra offsets and endpoint writes. It agrees with the separately checked stages. Zero global RNG state exhausts the harness budget without changing output; the driver does not pretend the function returned. The endpoint uses supplied forward/right/up vectors in source f32 order without added normalization.
Shared293732 uses a first-match weapon lookup but290493 reads the current packed slot. Explicit mismatch fixtures retain this distinction without establishing those states as legal. Actual source caller pointers now carry the local forward and global muzzle into the complete aim function, then into a pending291641 trace call.
The trace prelude unlinks the shooter through a captured native request, can suspend at rewind144082 or configured setup144493, and widens eligible player bounds before requesting native−25. Self and three client-state gates skip widening. MinimumZ is preserved while other bound fields change. Restoration and relinking remain later source work; the rewrite must not leave these temporary edits as permanent state. No native trace response is supplied by this batch.
Rotation61092 has a complete finite unit-axis analysis. Its matrix matches independent Rodrigues geometry; its final point/output alias is unsafe for general in-place rotation because later components reread overwritten input. Actual295018 uses separate output. It rotates unitY around initialized unitZ by18×pelletIndex degrees, then scales using weapon width and a local seed-dependent absolute sine.
The pellet seed uses signed right shift27, unlike the global36717 RNG's unsigned shift. All256 byte seeds are audited. Zero pellet seed produces finite offsets instead of entering the shared aim rejection loop. The argument seed mutates while the global seed remains unchanged during this pellet stage.
The event57 chain now executes actual allocation/initialization, event construction,4096-scale direction quantization, global PRNG,295018 frame/width/rotation/local-seed/endpoint preparation and reached291641 prelude. It stops at unknown rewind or the captured first native trace request. It never resumes either waiting parent after that boundary. A zero direction stops before projection division. Caller event origin and recalculated global muzzle remain distinct source values.
Validation and limits
The952-test baseline gains36 checks, ending at988 tests. Each task has source identity, deterministic regeneration and a machine report below2MiB. Independent f32, geometry, full-record and control-flow checks cover both ordinary inputs and explicit boundaries. Storage/filter, links and whitespace checks pass. No original assets, Rust runtime or shared VM evaluator change. Existing default research contracts remain unchanged where wrappers gained optional caller contexts.
Native trig/sqrt are finite supplied math models; original native library bit parity is unverified. Native unlink, registration, linking and trace requests are captured without engine effects. Synthetic mismatch/future-time/alias/unit-axis fixtures do not establish legal live input domains. No original executable/full VM, native collision/physics/rendering, successful hit/damage, full20-pellet result, networking or macOS/Linux Bevy/Solari gameplay runs here.
Next ten concrete tasks
- Recover291920–292298 trace-result classification and retry behavior, including reached144766 and211239 boundaries. Distinguish a supplied trace record from native collision evidence.
- Recover291641's candidate restoration/relinking suffix through292544, including144413 and native−31/−32 order. Verify every widened record returns to its expected state on every reached exit.
- Recover rewind144082 and configured144493 preparation plus their inverse contracts. Establish how client6176/716 and world snapshots affect the native trace request.
- Compose293732 through the recovered trace return, then its actual contact292545 and bookkeeping279820 callsites. Preserve caller output records and explicit unresolved damage children.
- Partition292545 by material/contact/weapon/state branches and recover its first reached damage/impact/event consumers with exact asset identities where present.
- Recover295018's20-pellet loop: index progression, signed seed carry, trace/contact conditions and table writes. Existing indices1/19 fixtures resume preparation only; they are not completed earlier pellets.
- Recover295018's four-target/fifteen-slot aggregation and279820 statistics, including the no-target path and exact counter/percentage conversion.
- Recover entity query276433 and native link/unlink contracts; continue288903 after actual allocation through temp_bomb setup/lifetime callbacks.
- Recover grenade223156 and reached trajectory/contact/bounce/explosion/damage paths, with entity clearing/freeing and allocator timing/capacity validated against original behavior.
- Capture original executable/native/DLL reference traces and implement one verified Rust gameplay slice with cross-platform checks. Continue maps/models/textures/shaders/audio/network inventory and Bevy/Solari rendering adaptation for macOS/Linux; these bounded QVM analyses do not complete the game.
Follow-up: the RE-626–635 trace/rewind batch recovers cleanup, snapshot/restore and configured construction. Use its next ten tasks for current unresolved work.