uwarp-space 2026-03-03
Phase 2 getattr() elimination across trading, combat, and planet modules; port class regression fixed; ServerConfig/SAFE_CONFIG_DEFAULTS duplication removed
147 files · 10,554+ · 1,581-

Getattr Refactoring (Phase 2)

5 files changed
  • trading.py getattr() calls on player/config/args replaced with direct attribute access
  • combat.py getattr() calls on player/config fields replaced with direct attribute access
  • management.py getattr() calls on planet/config fields replaced with direct attribute access
  • commands.py PlayerRecord fields accessed directly; getattr() pattern removed from Phase 2a
  • __init__.py Strict getattr allowlist tooling — validates no new getattr usages added
  • Phase 2a: all getattr() calls on PlayerRecord fields replaced with direct attribute access decouple internal
    1 file
    • commands.py
  • Trading, combat, and planet modules: getattr() calls on player/config/args fields replaced with direct access decouple internal
    3 files
    • trading.py
    • combat.py
    • management.py
  • Strict getattr allowlist enforced by tooling — no new getattr usages can be introduced outside the allowlist harden internal
    1 file
    • __init__.py
3 files changed
  • port.py Port class regression fixed — all ports were incorrectly becoming class SSS
  • trading.py Pricing flow restored; guardrails enforced; active qty preserved in fixed pricing
  • config_defaults_gen.py ServerConfig/SAFE_CONFIG_DEFAULTS duplication eliminated
  • Port class regression fixed — a bug caused all ports to be classified as SSS regardless of their actual buy/sell configuration remediate internal
    1 file
    • port.py
  • Trading pricing flow restored and guardrails enforced; active commodity quantity preserved correctly in fixed pricing mode remediate internal
    1 file
    • trading.py
  • ServerConfig/SAFE_CONFIG_DEFAULTS duplication eliminated — single source of truth for config defaults remediate internal
    1 file
    • config_defaults_gen.py

Game Mechanics

2 files changed
  • social.py Social runtime rules wired
  • registry.py Stardock runtime rules wired
  • Social and stardock runtime rules wired through to the engine instantiate internal
    2 files
    • social.py
    • registry.py

Data Integrity

1 file changed
  • _game_state_helpers.py Data integrity checks and structured logging enhanced
  • Data integrity checks enhanced and structured logging improved across game state helpers harden behavioral
    1 file
    • _game_state_helpers.py
1 file changed
  • test_locking.py Stress coverage added for lock manager under concurrent load
  • Stress tests added for the lock manager covering concurrent access patterns qualify internal
    1 file
    • test_locking.py