|
Download docs/research/QVM_RESUMER_PARTITION_BATCH.md from nmarshall/urt-rs: direct link, hf CLI and curl.
- Browser
- Download file 5.54 kB
-
https://huggingface.co/nmarshall/urt-rs/resolve/main/docs/research/QVM_RESUMER_PARTITION_BATCH.md
- Command line
-
hf download hf://nmarshall/urt-rs/docs/research/QVM_RESUMER_PARTITION_BATCH.md
-
curl -L -o QVM_RESUMER_PARTITION_BATCH.md https://huggingface.co/nmarshall/urt-rs/resolve/main/docs/research/QVM_RESUMER_PARTITION_BATCH.md
5.54 kB
| # Bounded resumer audit and aligned partitioned sorting | |
| RE-780–789; batch baseline `78ab0c4b`. Original assets remain unchanged. Ten tasks each receive a separate commit after focused `cargo xtask` validation. | |
| | Task | Result | Evidence | | |
| | --- | --- | --- | | |
| | RE-780 | Static consumers, literal/computed ranges, dynamic return and loop review markers | [Inventory](QVM_RESUMER_AUDIT.md) | | |
| | RE-781 | Fail-closed destination inference and coherent callback result bytes | [Return placement](QVM_RETURN_PLACEMENT.md) | | |
| | RE-782 | Legacy repeated-call counterexample, corrected timing and stack guards | [Reentry witnesses](QVM_REENTRY_WITNESS.md) | | |
| | RE-783 | Movement resumer opt-in with persistent bytes and handler-returned commands | [Movement witnesses](QVM_EXECUTE_REENTRY.md) | | |
| | RE-784 | Corrected notification dispatch through64 client slots | [Notifications](QVM_NOTIFICATION_REENTRY.md) | | |
| | RE-785 | Dense award scans, timestamp boundaries and index64 alias | [Awards](QVM_AWARD_REENTRY.md) | | |
| | RE-786 | Counter, team-pair and dense/sparse clear migrations | [Counters](QVM_COUNTER_REENTRY.md) | | |
| | RE-787 | Selected dynamic water queries and gait/event source consumers migrated | [Movement source audit](QVM_MOVEMENT_REENTRY.md) | | |
| | RE-788 | Actual aligned swap and median helpers with explicit dynamic returns | [Partition helpers](QVM_RANK_PARTITION_HELPERS.md) | | |
| | RE-789 | Actual aligned partition/tail-loop/recursive sort through64 clients | [Large sort](QVM_RANK_LARGE_SORT.md) | | |
| ## Findings and limits | |
| The legacy resumers can apply a repeated child return after its consumer has already branched using placeholder zero. A three-step synthetic countdown proves the mismatch. The movement resumer additionally rebuilds non-command byte memory from its initial inputs, discarding a STORE1 across a call. Corrected opt-in paths preserve the relevant state, reject nonempty call boundaries, and require explicit reviewed destinations for dynamic stored returns. Callback result patching updates all four little-endian bytes. | |
| The audit inventory distinguishes omitted/default-false, literal modes and unresolved mode expressions; computed ranges remain unresolved rather than silently treated as complete coverage. The final inventory records 182 call expressions across 142 files: 159 use default/literal legacy mode, 20 have computed ranges, and three mode expressions are unresolved. These categories can overlap. Its explicit registry edges cover current non-test scripts. New/unmapped files still require conservative fallback and review of scan dependencies. | |
| Migrated notification, award, counter/clear and selected water/gait fixtures agree with their independent expected behavior and legacy observations over the stated domains. This agreement does not prove correctness of the remaining legacy consumers. Comparator migration also corrects stop-PC metadata after actual LEAVE instructions; return values, trace hashes and all other standalone/nested ranking fields remain unchanged. | |
| The96 larger-sort fixtures execute original35095 instructions and actual34829/34964/5441/33715 children, including ninther sampling, partitioning, insertion fallback, recursion and tail iteration. No ordering result is injected. Eligible numeric clients and aligned four-byte records bound this evidence. Equal comparator keys are checked for equivalent order and permutation preservation, without assuming sort stability. The Rust rank primitive still accepts caller-owned ordering; this batch does not add a Rust whole-sort implementation. | |
| ## Validation | |
| Focused xtask groups precede each task commit. Reports selected by dependency closure regenerate twice byte-identically; affected Python tests, storage policy, documentation links and whitespace guards run. Scoped Rust parity producers run only when selected. The single full run after commit ten, `cargo xtask test-full --since 78ab0c4b`, passed **1,537 Python tests and 92 Rust tests** (10 assets, 54 gameplay, 28 xtask). All 216 affected producers regenerated twice byte-identically. Storage policy, documentation links across 348 files and whitespace checks passed. The working tree was clean after regeneration: no unreviewed report refreshes remained. The final documentation-only update is checked separately without repeating the full suite. | |
| ## Next work — RE-790 | |
| - Continue the legacy resumer audit per consumer, prioritizing loops with result-dependent branches or child memory effects. Review every computed range and dynamic return destination. Keep unrelated reports marked as unaudited. | |
| - Synchronize arbitrary child memory/byte effects through an explicit supported interface; current returned command bytes and patched result bytes do not implement a complete shared VM memory model. | |
| - Add original caller5864 fixtures using the large sort, inactive/connecting/spectator populations and publication children7805/6328. Do not pass the raw prefilter comparator to Rust Ord without resolving its asymmetric cases. | |
| - Recover byte/unaligned and other element-size sort branches; validate native sort ABI, callbacks and error domains before broader parity claims. | |
| - Implement a Rust whole-sort/composition contract with independent fixtures and explicit tie behavior, then connect ranking/stat/recipient effects to runtime entity ownership. | |
| - Continue native serialization, remaining leaderboard categories, whole health/contact callers, collision/world state and gameplay. macOS/Linux execution and interactive Rust/Bevy/Solari acceptance remain open. | |