|
Download docs/research/QVM_SESSION_LIFECYCLE_BATCH.md from nmarshall/urt-rs: direct link, hf CLI and curl.
- Browser
- Download file 8.66 kB
-
https://huggingface.co/nmarshall/urt-rs/resolve/main/docs/research/QVM_SESSION_LIFECYCLE_BATCH.md
- Command line
-
hf download hf://nmarshall/urt-rs/docs/research/QVM_SESSION_LIFECYCLE_BATCH.md
-
curl -L -o QVM_SESSION_LIFECYCLE_BATCH.md https://huggingface.co/nmarshall/urt-rs/resolve/main/docs/research/QVM_SESSION_LIFECYCLE_BATCH.md
8.66 kB
| # Session lifecycle and complete persistence: RE-904–913 | |
| Ten separately committed tasks connect original QVM lifecycle routines and their Rust policies across448 paired source cases. They cover initialization, both post-map children, normal map flow, byte-fed write/restore and the bounded connect caller branch. Native files, userinfo/cvars, timing and selected callbacks remain supplied inputs or captured intentions. This evidence does not establish real network/client-connect acceptance or a complete playable game. | |
| | Task | Evidence | Cases | | |
| | --- | --- | ---: | | |
| | RE-904 | [Original247520 initializer](QVM_SESSION_INIT.md) | 96 | | |
| | RE-905 | [Rust initializer and raw-field ownership](RUST_SESSION_INIT.md) | 96 | | |
| | RE-906 | [Original249007 with246746/246963](QVM_POST_MAP_FILES.md) | 48 | | |
| | RE-907 | [Rust complete post-map persistence](RUST_POST_MAP_FILES.md) | 48 | | |
| | RE-908 | [Normal6939 with both persistence children](QVM_NORMAL_MAP_FILES.md) | 64 | | |
| | RE-909 | [Rust normal map/file/cvar flow](RUST_NORMAL_MAP_FILES.md) | 64 | | |
| | RE-910 | [Original byte-fed write/restore](QVM_PERSISTENCE_ROUNDTRIP.md) | 144 | | |
| | RE-911 | [Rust owned in-memory persistence](RUST_PERSISTENCE_ROUNDTRIP.md) | 144 | | |
| | RE-912 | [Bounded173979 caller clear/branch](QVM_CONNECT_SESSION.md) | 96 | | |
| | RE-913 | [Rust connect lifecycle branch](RUST_CONNECT_SESSION.md) | 96 | | |
| ## Initialization ownership | |
| Actual247520 selects the initial team field at3096 through original33715 classification. Team-classified modes preserve a nonzero field, while zero becomes3. Other modes query userinfo key team through70503: a first byte of lowercase s selects3; otherwise a positive capacity limit34089308 reached by34992584 selects3, and other cases select0. The caller fixtures additionally verify uppercase S below capacity selects0. | |
| The initializer writes clock34992532 into selected fields, sets field3108 to1, and computes the timeout at3140 with wrapping arithmetic. A nonzero configured34085460 contributes seconds*1000, including negative values; zero uses60000. Field3148 receives a clock write and is later cleared. Native -3 supplies the tick snapshot stored at3156. A36-byte bounded copy writes one space and NUL padding at3164. Several fields are word-cleared, while the starts of string-like regions are only byte-cleared; neighboring bytes remain observable in warm-state fixtures. The64 ignore words at3780 are cleared. Coordinates3716..3736 survive unless the actual246554 load succeeds. | |
| Initialization then executes actual246963 session serialization and captures7259 diagnostics. The Rust API uses a944-byte block beginning at3096 to preserve byte/word distinctions, with explicit timing and file answers. It stages state/selector changes on typed errors. Metadata meanings, native timing/file semantics and full engine lifecycle remain open. | |
| ## Post-map ordering and map transitions | |
| Actual249007 now executes both recovered client children. The first246746 child produces ordered userinfo/map/open/write/close intentions; the second246963 writes sessionN and sessIgnoreN. Each eligible client's file operations precede its cvar pair. The48 fixtures vary connected-state patterns, level count, mode, enable and supplied open handles, while formatter and info selectors carry across clients. | |
| The64 normal6939 fixtures compose122230,7188,249007 and both persistence children. Score/global resets precede persistence, and the final max-client state2-to1 scan follows it. Reset maximum and level count vary independently. The engine map bytes supplied to the map-command and saved-file paths are consistent. Rust shares action assembly between standalone and normal persistence; no file action is dispatched to an operating system. Bot callback internals,221662 map-list selection, actual cvar/console command dispatch and series-path composition remain open. | |
| ## Byte-fed write/restore and caller integration | |
| The144 round trips execute actual246746 and246963, then feed their captured cvar/file bytes into actual247219/246554 on a fresh destination snapshot. The destination starts with explicit metadata/position values and a nonzero ignore table; caller scratch is also supplied. Session text containing negative/INT_MIN fields is not assumed invertible: recovered formatter and scanner behavior can produce partial writes and scratch-dependent booleans. Restored ignore entries accumulate, and six-float file prefixes remain readable with appended PLAYER text. | |
| Rust MemoryPersistence owns ordered cvar/file byte maps. It applies captured write intentions and supplies those bytes to the restore policies, staging adapter/destination/selector changes on errors. This validates an in-memory transcript; it does not validate a filesystem, native handle lifetime, actual reload or arbitrary concurrent engine effects. | |
| The final source fixtures execute173979's174081..174173 caller portion after its userinfo/authentication prefix. They link entity offset520 to the selected client, clear entity fields764/768, model the actual native6336-byte client memset, set connection468 to1, and copy the slot into6156. The first-time argument or nonzero global34992572 chooses actual247520 initialization; otherwise actual247219 restores. Both children execute recovered scanner/formatter/load policies. Clearing the client does not clear the separate VM caller scratch. The Rust API stages raw client bytes, typed entity linkage and selector together. Authentication before this slice, later team normalization from174174 onward, bot connection behavior, alias domains and real engine acceptance remain open. | |
| ## Validation and storage | |
| Focused `cargo xtask test-group <name>` ran before each commit, with selected reports regenerated twice, source/Rust parity, scoped gameplay checks and storage/documentation/whitespace guards. The ten groups are qvm-session-init, rust-session-init, qvm-post-map-files, rust-post-map-files, qvm-normal-map-files, rust-normal-map-files, qvm-persistence-roundtrip, rust-persistence-roundtrip, qvm-connect-session and rust-connect-session. Shared persistence action assembly also received its standalone regression check. | |
| The dependency-selection regression covers the five source/Rust report pairs, native_policy consumers and shared transition/map/intermission dependencies. Its import smoke check also keeps the existing health lifecycle and new session lifecycle helper namespaces independent. The first full-suite attempt caught a helper filename collision: the original health helper was restored byte-for-byte from the batch baseline, the new code moved to qvm_session_lifecycle_support.py, and affected checks were rerun before final full validation. Python runs only through the resolved Nix runtime declared by flake.nix, with explicit PYTHON inherited by xtask and Git hooks. Original assets are unchanged. After the namespace repair documented above, `cargo xtask test-full --since 6d0ce63f` completed successfully at the tenth-commit boundary: 1,768 Python tests and207 Rust tests (assets10, gameplay167, xtask30). All39 affected report producers regenerated twice deterministically. Storage policy, links across480 documentation files and whitespace checks passed with no generated-report drift. Repair and validation notes were amended into task ten. | |
| ## Follow-up work (expanded by RE-914–923) | |
| - [ ] Recover the173979 authentication/userinfo prefix and post-174174 team normalization, bot branch and downstream connect callbacks; compose the complete function. | |
| - [ ] Recover native file-open return/handle/close behavior and attach a platform-neutral engine IO adapter; validate actual reload and failure ownership on macOS/Linux. | |
| - [ ] Trace real VM scratch provenance, non-ASCII/tail parsing, uppercase exponent and other scanner conversions, oversized/fatal strings and pointer aliases. | |
| - [ ] Recover direct/indirect246938 session-clear use, remaining metadata producers, ignore-table mutations and live count/base changes during callbacks. | |
| - [ ] Integrate both persistence children into series6939/readiness, plus real cvar refresh/command dispatch, bot rotation/native genetics and221662 map-list parsing. | |
| - [ ] Replace supplied spatial-query answers with native broadphase/world collision and compare native math. | |
| - [ ] Compose complete respawn/intermission, event lifetime and ranking/scoreboard/network execution. | |
| - [ ] Validate actual Linux/macOS Rust/Bevy/Solari gameplay/rendering. Full-game completion remains open. | |
| [RE-914–923](QVM_CONNECT_POLICY_BATCH.md) recovers admission/completion and composes the complete bounded173979 caller. Its RE-924 list supersedes the historical follow-up list above. | |