|
Download docs/research/QVM_DEFUSE_BATCH.md from nmarshall/urt-rs: direct link, hf CLI and curl.
- Browser
- Download file 9.47 kB
-
https://huggingface.co/nmarshall/urt-rs/resolve/main/docs/research/QVM_DEFUSE_BATCH.md
- Command line
-
hf download hf://nmarshall/urt-rs/docs/research/QVM_DEFUSE_BATCH.md
-
curl -L -o QVM_DEFUSE_BATCH.md https://huggingface.co/nmarshall/urt-rs/resolve/main/docs/research/QVM_DEFUSE_BATCH.md
9.47 kB
| # Bomb-defuse transitions and replay: RE-1014–1023 | |
| Semantic correction from RE-1024: historical capture tags `teleport`, `award` and `sound` for functions205260,283463 and193620 identify score update, indexed counter increment and team radio respectively. Their numeric call arguments remain evidence; the old schemas are retained for compatibility. [Corrected source evidence](QVM_EFFECT_COUNTER.md). | |
| Ten tasks recover five source/Rust contracts across **278 paired scenarios**, including138 repeated-call snapshots. They extend the [assistance batch](QVM_ASSISTANCE_BATCH.md) through the mode8 bomb-defuse callback153419. Every task has a separate commit and focused validation. Native nested effect bodies, actual frame scheduling and full game/platform acceptance remain outside this evidence. | |
| | Tasks | Contract | Paired scenarios | | |
| | --- | --- | ---: | | |
| | RE-1014 / RE-1015 | [Source start](QVM_DEFUSE_BEGIN.md) / [Rust start](RUST_DEFUSE_BEGIN.md) | 72 | | |
| | RE-1016 / RE-1017 | [Source cancellation](QVM_DEFUSE_CANCEL.md) / [Rust cancellation](RUST_DEFUSE_CANCEL.md) | 48 | | |
| | RE-1018 / RE-1019 | [Source completion](QVM_DEFUSE_FINISH.md) / [Rust completion](RUST_DEFUSE_FINISH.md) | 32 | | |
| | RE-1020 / RE-1021 | [Complete source callback](QVM_DEFUSE_COMPLETE.md) / [Rust callback](RUST_DEFUSE_COMPLETE.md) | 96 | | |
| | RE-1022 / RE-1023 | [Source sequences](QVM_DEFUSE_SEQUENCE.md) / [Rust replay](RUST_DEFUSE_SEQUENCE.md) | 30 | | |
| ## Starting a defuse | |
| The153774 fragment assumes prior eligibility, near distance, mask32768 and inactive busy state. It reads a low-byte kind from the current weapon-table word at client312+4×client144. If client220 mask32 is set, it clears masks32/64 and writes animation148=2. The tested kinds11/13/other have the same projected outcome; the temporary selected kind does not alter the stored weapon word. | |
| Start then stores the current tick into shared clock35000484, busy6164=1, client220 mask4 and client104 mask16. Event83 is allocated at the selected bomb origin24, its parameter184 receives configured duration34080132, and its entity424 gains mask32. Sound helper193620 is requested with sound7 and the acting entity after event setup. | |
| Seventy-two source cases exercise raw masks, weapon low bytes, zero/positive/negative duration words and high-bit ticks. Source event-field sentinels on both sides of parameter184 survive. Rust typed arrays own the corresponding copy boundaries and reject unsupported weapon/client indices before mutation. Direct fragment cases are synthetic selected-branch inputs; complete callback cases separately establish routing. | |
| ## Cancelling | |
| Both153927 unflagged and154008 far-target branches check only whether busy6164 is nonzero. Active cancellation clears shared clock35000484, busy6164, client220 mask4 and client104 mask16. It allocates event84 with parameter0 and event mask32. Weapon, animation, completion latch and unrelated bits remain unchanged. | |
| If busy is zero, cancellation preserves stale clocks and flags and requests no event. Forty-eight cases compare both branches, nonzero high-bit busy words and stale inactive state. Rust cancellation is idempotent and does not evaluate unused weapon/client inputs on an inactive exit. | |
| ## Completion and timing | |
| The active153644 path compares signed wrapped elapsed tick minus clock against signed wrapped duration×1000. Unlike the initial eligibility delay, completion accepts equality. Waiting retains all state and emits no effects. Thirty-two cases cover equality, immediately before the threshold, negative elapsed, wrapping ticks, negative duration and multiplication overflow. | |
| Completion requests the original bomb-defused log, sets completion35000396=1, clears clock/busy and the owned masks, allocates event84 with parameter1 and mask32, then requests score update205260 and counter283463 index5. The source order is log, allocation, teleport, award. Weapon and animation remain unchanged. Rust keeps this order as an effect plan and rejects ready invalid client input before mutation; waiting does not evaluate unused indices. | |
| ## Complete153419 callback | |
| Ninety-six scenarios execute admission, teammate exclusion, actual class lookup276433, actual distance65655 and the defuse transitions through154087. Both initial enables and the strict admission delay must pass. Completion must be zero; self must be connected/live/non-following and on the selected team. Selector exactly1 chooses team2; other values choose team1. A live connected non-following same-team client with nonzero6164 blocks entry; self is excluded from that scan. | |
| Lookup uses the original precomputed class hash -82007226 and first eligible entity order. Entity532 must be nonzero, class pointer536 nonnull and hash540 matching. Fixtures include inactive, classless and hash-mismatched first candidates with a valid later entity. The table identity and precomputed hashes are supplied; this does not recover bomb creation or class-hash production. | |
| Actual65655 computes distance from actor origin488 to selected bomb origin24 with finite native sqrt modeled. Distance must be strictly below75 to start or continue; equality is far. Near mask32768 chooses start/wait/completion. Far distance or absent mask32768 chooses cancellation. | |
| If lookup returns null, source execution stops at153612 immediately before fatal2319. Rust returns an explicit missing-bomb boundary diagnostic and does not invent post-error behavior. The replay stops there. Cases cover all three selectors, exact radius, zero/64 teammate counts, gating failures, completed latch, decoys and wrapped timing. Distance fixtures are finite and axis-aligned; broader geometry domains remain open. | |
| ## Repeated coherent calls | |
| Thirty scenarios preserve state across calls at offsets0/1000/2000/5000/6000. Scripted external updates move a bomb inside the radius, press the defuse button or release a blocking teammate before a later call. The source and Rust compare138 snapshots; three missing-bomb scenarios stop after one call, while the other27 execute five calls. | |
| Snapshots include flags, busy state, shared clock, completion latch, animation/weapon words, allocated event parameters, ordered effects, lookup results and distance bits. They verify cancellation/restart, waiting, exact completion and suppression of duplicate rewards after completion. The scripted updates are inputs, not evidence for movement/input/native scheduling behavior. Rust bounded replay stages the batch on typed errors and stores immutable snapshots; this is an adapter guarantee beyond the per-call source routine. | |
| ## Validation and limits | |
| Each task runs its own `cargo xtask test-group qvm-defuse-*` or `rust-defuse-*` before committing. Selected reports regenerate twice identically. Source reports retain verified QVM identity and trace summaries; independent gate/arithmetic/state expectations check the probes. Rust reports compare every projected source field and retain source-report SHA256. Ten added Rust tests cover bit preservation, effect order, timing, stale exits, radius/lookup boundaries, completion latching, missing-bomb stopping and late-error rollback. | |
| Dependency mappings cover all five source/Rust pairs, the defuse module/CLI and existing eligibility policy inputs, including gameplay test-count metadata. The registry regression checks those mappings. One full-suite run follows task ten: `cargo xtask test-full --since 26cfc686`. All Python uses the flake-declared Nix runtime, including Git hooks. Assets and original binaries are unchanged. | |
| Event allocation277695 is supplied. Team radio193620, logs7259, score update205260 and counter update283463 are captured plans. Their actual allocation, positional, score, network and other state feedback is not executed. Full client routing/movement/timer integration and native macOS/Linux runtime conformance remain open. | |
| The single `cargo xtask test-full --since 26cfc686` run at the tenth-commit boundary passed: **1,978 Python tests** across539 modules, **319 Rust tests** (assets10, gameplay279, xtask30), **131 deterministic affected report producers**, storage policy, links across **601 documentation files** and whitespace guards. Regeneration left no changes. Focused dependency-registry regression passed. Validation notes are amended into task ten, preserving ten commits. | |
| ## Follow-up from RE-1024 | |
| The [RE-1024–1033 feedback batch](QVM_EFFECT_FEEDBACK_BATCH.md) corrects effect identities and connects actual constructor/radio/score/counter bodies. Allocation, location/formatter, ranking and native transport/lifecycle feedback remain open. The original follow-up scope was: | |
| - [ ] Recover allocation277695, team radio193620, score update205260 and counter update283463 for bomb/assistance consumers, then replace captured state feedback with verified adapters. | |
| - [ ] Recover bomb creation/class ownership and objective event83/84 client rendering/audio consumers; verify shared-clock and teammate ownership across actual lifecycle transitions. | |
| - [ ] Compose mode8 defusing and nonempty mode10 assistance/self recovery with full154089 client preparation, movement54475 and timer155714. | |
| - [ ] Recover post-movement event/link/health handling, native trace/contents and time/file/network boundaries, with source-backed longer scenarios. | |
| - [ ] Expand geometry, aliasing, identity, wrap/configuration and input domains; continue asset/shader conversion, Bevy/Solari rendering and playable macOS/Linux acceptance. | |