uwarp-space
2026-04-02
Full behavioral identity with TWGS Gold, worker session hardening, race condition tests
133 files · 7,674+ · 1,232-
Full behavioral identity with TWGS Gold
4 files changed
stardock.pyShipyards menu rewritten to match TWGS Gold format; Hardware Emporium, port menu, and Tavern parity fixes; TWGS-style greeting on shipyard Buy flow entrydisplay.pyPrompt text and display consistency: weapons, equipment, planet, stardock commandscomms.pyShow comms log after broadcast — matches TWGS Gold backtick behavior; exclude Entry login events from comms log displayengine.pyRecover 1 turn when viewing who's playing (#); genesis no-torpedo message matches TWGS Gold text; jettison prompt text matches TWGS Gold
- Full behavioral identity with TWGS Gold achieved. Shipyards menu rewritten from scratch to match TWGS Gold format including Hardware Emporium, port menu layout, Tavern, and Buy flow greeting. Prompt text and display consistency fixed across weapons, equipment, planet, and stardock commands. Comms log shown after broadcast (backtick). Entry login events excluded from comms log. 1 turn recovered when viewing who’s playing. Genesis and jettison text matched exactly.
remediate
behavioral
2 files
stardock.pyengine.py
Worker session persistence hardening and end-state keying
2 files changed
session_runtime.pySession persistence hardened: scope terminal state by WS id, scope resume tokens by player session contract, reject boolean player IDs, stop unsafe legacy session migration, migrate legacy state keycache.pyCache management hardened; narrow module import fallbacks
- Worker session persistence hardened: terminal state scoped by WebSocket connection ID to prevent cross-session bleed. Resume tokens scoped by player session contract. Boolean player IDs rejected (was accepting True/False as valid IDs). Legacy session migration stopped — unsafe migration removed, legacy state key migrated cleanly. Auth validation preserved without bound settings. Explicit runtime settings replace os.environ bridge.
harden
behavioral
1 file
session_runtime.py
Shared runtime setup and command loop policies
2 files changed
runtime.pySession runtime setup shared between server and workerpolicies.pyCommand loop session policies and TWGS prompt formatting shared
Race condition tests and aggressive PvP test suite
2 files changed
test_pvp_race_conditions.pyMulti-player race condition tests: simultaneous actions, turn order conflicts, state consistency under concurrencytest_pvp_aggressive.pyAggressive mutual PvP and corporate logic tests
- Multi-player race condition tests added to catch state corruption under concurrent player actions (simultaneous warp, simultaneous trade, turn order conflicts). Aggressive mutual PvP tests cover full combat, mutual attack, and corporate logic edge cases.
qualify
internal
2 files
test_pvp_race_conditions.pytest_pvp_aggressive.py
Bot test script preservation and explorer ruff cleanup
2 files changed
stress_20_bots.py20-bot stress test script preserved from prior cleanupparity_recorder.pyParity recorder script for capturing TWGS Gold behavior