File size: 7,099 Bytes
e1f7eb5 | 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 48 49 50 51 52 | # Health effects, contact composition and Rust impulse: RE-725–734
Ten separately committed tasks extend the [contact/health-prefix batch](QVM_CONTACT_HEALTH_BATCH.md). Complete211239 now runs through ordinary/special health changes and actual213009 impulses, and complete292545 composes it with cached original-model contexts. A dependency-free Rust gameplay crate ports the finite impulse contract. Captured callbacks and native/world/platform behavior remain open.
| Task | Completed scope | Evidence |
| --- | --- | --- |
| RE-725 | Pointer fallback and special target-kind routing | [Routing](QVM_HEALTH_ROUTING.md) |
| RE-726 | Attacker credit, minimum damage and client damage records | [Bookkeeping](QVM_HEALTH_CREDIT.md) |
| RE-727 | Magic-checksum classes, method filters and actual RNG | [Special targets](QVM_HEALTH_SPECIAL_TARGET.md) |
| RE-728 | Mode10 lethal interception and method24 override | [Interception](QVM_HEALTH_INTERCEPTS.md) |
| RE-729 | Ordinary subtraction, protected floor and actual meter child | [Mutation](QVM_HEALTH_MUTATION.md) |
| RE-730 | Packed meter cap, pain/death ABI and terminal ordering | [Terminal processing](QVM_HEALTH_TERMINAL.md) |
| RE-731 | Complete source velocity impulse and movement timer | [Impulse](QVM_HEALTH_IMPULSE.md) |
| RE-732 | Complete211239 with actual RNG/meter/impulse children | [Complete health](QVM_HEALTH_COMPLETE.md) |
| RE-733 | Original-model contact composed with actual health | [Contact to health](QVM_CONTACT_HEALTH.md) |
| RE-734 | Rust impulse library/CLI and exact source-word parity | [Rust port](RUST_HEALTH_IMPULSE.md) |
## Recovered behavior
Null inflictor/attacker pointers become the world record. Target kind4 with a nonmagic checksum diverts to a callback gated by target656 and object state, then exits. Accepted normal damage updates attacker credit and client damage records, clamps incoming integer damage to at least1 and publishes attacker/method/direction or origin before subtraction.
The magic checksum uses an original11-entry class jump table. Method34 forces health−999; other methods can be filtered, halved or replaced by1/2/3 damage using actual36717 seed updates and thresholds50/85. Mode10 can intercept lethal distinct-client damage through206128. Method24/global34066516 can request an impulse without ordinary subtraction. These intercepted/callback effects are captured, not supplied as successful gameplay outcomes.
Ordinary damage subtracts selected damage. A protected-client flag floors health at5 and updates flags/meter state before capturing152386. Actual211197 drains client184 by300×selected damage with floor0. Attacker/location and client208 health publish before terminal processing. The terminal entity health floor−999 does not republish client208, so the two fields can differ afterward. Packed client228 low16 values above500 become exactly500, clearing the upper word, except for method26. Pain/death callbacks use distinct argument layouts and ordering.
Complete213009 adds supplied direction×(global scale×knockback/200) in source float32 order. It skips null clients and float zero knockback. Velocity can change while an existing nonzero timer remains intact. A zero timer becomes truncating knockback×2 clamped to50–200 and movement flag64 is set. Direction normalization occurs earlier in211239; the impulse helper does not normalize.
The complete health oracle checks tracked entity/client fields, direction, attacker credit, seed and tracking state. Contact composition preserves original scalar returns and event payloads while applying actual health/impulse changes afterward. All35 cached contact cases retain their exact report provenance. The nonclient sample reads file-backed VM words104/220, both zero; this finite flat-VM case does not establish native null-pointer or live-world legality. Special weapon4 contact still bypasses ordinary health dispatch.
## Rust and validation policy
[urt-gameplay](../../crates/urt-gameplay/README.md) contains a dependency-free simulation primitive and word-oriented CLI. All96 source impulse fixtures match exactly; eight Rust unit tests cover guards, timer bounds, bit preservation, negative knockback and explicit domain rejection. Active nonfinite/output-overflow and unsupported float-to-integer domains reject rather than guessing original runtime behavior. No Bevy adapter, renderer or full Rust health/death system is introduced. Host validation is on macOS; Linux execution remains open.
Each task uses focused `cargo xtask test-group` validation before its commit, with two-pass affected report regeneration and storage/link/whitespace guards. Focused Python counts grow from12 to41 for the health group; the shared contact-helper change uses the contact group (163 tests). The Rust task uses the gameplay group (four Python parity tests plus its eight package tests) and28 focused xtask unit tests. No full workspace/suite run occurs before the tenth task commit. Registry ownership and groups are updated with each task; the representative xtask health check now requires known consumers without hard-coding a fixed group size.
The single full-suite gate ran after commit ten using `cargo xtask test-full --since 1550ce07`: all1,383 Python tests and46 Rust tests passed. Twenty affected report producers regenerated twice byte-identically, leaving the working tree clean. The Python baseline grows1341→1383; Rust now includes10 asset tests,28 runner tests and8 gameplay tests. Final task documentation is amended only to record these results. Original assets and the shared VM evaluator remain unchanged; earlier reports retain their default captured-child behavior.
## Remaining limits and next tasks
RE-724 is partially advanced. Complete function control flow and finite source contracts do not resolve the original registered callback implementations, native math/link/heap behavior, live-world geometry or platform/game completion. RE-735 tracks subsequent work:
1. Recover152386 protected updates and206128 mode10 interception effects beyond captured requests.
2. Resolve object/pain/death callback registrations and concrete implementations from actual entity/native evidence.
3. Validate full nonclient health and VM low-page reads, extreme integer/clock domains and native reference parity.
4. Compose shared293732 firing trace/contact/statistics through actual health and original-model geometry.
5. Recover successful295018 pellet aggregation and compose its target/location health effects.
6. Port verified health gates, damage selection and attribution into Rust with exact source fixtures.
7. Add Rust frame/tag/hierarchy/geometry contracts and explicit Bevy asset/VFS resolution for case and archive variants.
8. Recover native loader18183 ownership/endian/failure and confirm model lifetime contracts.
9. Capture original executable/DLL traces for geometry, math, callbacks, inventory and live frame/clock state.
10. Integrate and validate an interactive macOS/Linux Bevy/Solari slice, continuing maps/materials/textures/audio/network/lifecycle/packaging work.
|