Skip to content

refactor: introduce AppState.gta6 Gta6Session and eliminate 56 mutable statics (desloppify wave 6A-2a) - #122

Merged
leonidarider merged 1 commit into
mainfrom
agent/desloppify-w6a2
Dec 3, 2026
Merged

leonidarider merged 1 commit into
mainfrom
agent/desloppify-w6a2

Conversation

@leonidarider

Copy link
Copy Markdown
Contributor

Summary

First state-layer half of resolving initialization_coupling::gta6_rpf9_global_singleton_sprawl and cross_module_architecture::process_global_mutable_state_coordination (wave 6A-2a):

  • Added Gta6Session(Arc<Gta6SessionInner>) in src/state/gta6/session.rs owned per AppState instance (8 bytes, O(1) clone for background worker threads, full multi-instance and parallel-test isolation).
  • Eliminated all 56 process-global mutable statics across 10 subsystems:
    gta6/anim (5), gta6/audio (7), gta6/bodies (5), gta6/particles (6), gta6/physics (7), gta6/textures (2), gta6/modding (7), gta6/install (8), ttpf_document (5), and document/gta6_script (4).

Verification

  • just ready + shell_budget: 881 tests passed across 9 binaries, 0 failed.
  • cargo clippy -p openrage --all-targets -- -D warnings: 0 warnings.
  • just self-check: 140/140 passed.
  • Pre-commit hook (fmt, encoding, provenance): clean.

…e statics (desloppify wave 6A-2a)

- Introduce Gta6Session(Arc<Gta6SessionInner>) in src/state/gta6/session.rs
  owned per AppState instance so background workers and &AppState callers
  operate on isolated session state instead of process-wide static Mutexes.
- Eliminate all 56 mutable statics across 10 subsystems:
  gta6/anim (5), gta6/audio (7), gta6/bodies (5), gta6/particles (6),
  gta6/physics (7), gta6/textures (2), gta6/modding (7), gta6/install (8),
  ttpf_document (5), and document/gta6_script (4).
@leonidarider
leonidarider merged commit 0157f0f into main Dec 3, 2026
2 of 3 checks passed
@leonidarider
leonidarider deleted the agent/desloppify-w6a2 branch December 3, 2026 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant