uwarp-space 2026-02-14
Data/gameplay model separation completed, server module restructured, and documentation overhauled
573 files · 94,245+ · 33,220-

Data/gameplay model separation (Phase 5)

13 files changed
  • player.py Clean Player gameplay model — I/O boundaries convert to/from PlayerRecord
  • planet.py Planet gameplay model
  • sector.py Sector gameplay model
  • converters.py Converter utilities between storage records and gameplay models
  • combat.py Combat rules updated to use Player model
  • corporation.py Corporation rules updated to use gameplay models
  • movement.py Movement rules updated
  • planet.py Planet rules updated
  • economy.py Economy rules updated
  • encounter.py Encounter rules updated
  • game_state.py GameState converts at I/O boundaries; preserves unk_* fields in internal _*_data attributes
  • game_loader.py Game loader updated for PlayerRecord → Player conversion
  • game_saver.py Game saver updated for Player → PlayerRecord conversion
  • GameState now converts at I/O boundaries: PlayerRecord → Player on load, Player → PlayerRecord on save, preserving binary-faithful unk_* fields in internal _*_data attributes decouple internal
    2 files
    • game_state.py
    • converters.py
  • All 13 core rules files, 4 server engine files, NPC system, session system, tournament system, and SQLite store updated to use clean Player/Planet/Sector gameplay models rather than raw storage records decouple internal
    5 files
    • combat.py
    • corporation.py
    • movement.py
    • planet.py
    • economy.py
  • Test imports fixed across storage tests (test_alias_persistence, test_mercenary_expiration, etc.) qualify internal
    2 files
    • test_alias_persistence.py
    • test_mercenary_expiration.py

Server module restructure

7 files changed
  • admin.py Admin commands updated after server restructure
  • trading.py Trading commands updated
  • game_loop.py Game loop updated
  • login.py Login flow updated
  • session_bridge.py Session bridge updated
  • bf-20260214-183935.txt 62,000-line debug artifact deleted
  • entry.py Worker entry.py trimmed — dead code removed, worker setup fixed
  • Deleted a 62,000-line src/bf-*.txt debug artifact decouple internal
    1 file
    • bf-20260214-183935.txt
  • Cloudflare Worker entry.py significantly trimmed (530 insertions / 1,466 deletions) — dead code removed, worker setup fixed deprecate internal
    1 file
    • entry.py
  • wrangler.toml at project root consolidated for local dev; deploy configs moved to deploy/ decouple internal
    1 file
    • wrangler.toml
  • Static bundle handler updated; worker scripts cleaned up decouple internal
    1 file
    • static_bundle.py

Full documentation refresh

7 files changed
  • ARCHITECTURE.md Rewritten to describe the new model separation and GameState boundary pattern
  • DATA_MODELS.md New comprehensive guide to storage vs. gameplay model conventions
  • API_SPEC.md Updated with new model usage standards
  • CONTRIBUTING.md Updated with new model usage standards
  • TESTING.md Updated with new model usage standards
  • CLAUDE.md Added project conventions (pywrangler workflow, build pipeline, test commands)
  • README.md Test status badge added (790 passing)
  • docs/ARCHITECTURE.md rewritten to describe the new model separation and GameState boundary pattern specify architectural
    1 file
    • ARCHITECTURE.md
  • docs/DATA_MODELS.md created: comprehensive guide to storage vs. gameplay model conventions specify internal
    1 file
    • DATA_MODELS.md
  • docs/API_SPEC.md, TESTING.md, CONTRIBUTING.md updated with new model usage standards qualify internal
    3 files
    • API_SPEC.md
    • TESTING.md
    • CONTRIBUTING.md
  • Stale status and milestone documents removed decouple internal
    2 files
    • STATUS.md
    • MILESTONES.md
  • Added CLAUDE.md with project conventions (pywrangler workflow, build pipeline, test commands) qualify internal
    1 file
    • CLAUDE.md
  • Added test status badge to README (790 passing) qualify errata
    1 file
    • README.md

Serialization fixes

1 file changed
  • entry.py Fixed dataclass serialization and import path in Cloudflare worker runtime
  • Fixed dataclass serialization and import path in Cloudflare worker runtime remediate internal
    1 file
    • entry.py
  • Fixed player serialization for Pyodide/CF Workers runtime (dataclass asdict() vs. Pydantic model_dump()) remediate internal
    1 file
    • converters.py