uwarp-space 2026-02-26
Security hardening, dead vendor copy deleted, v3.0 player parser added, and sysop frontend modularized
462 files · 13,429+ · 69,203-

Security hardening with regression tests

3 files changed
  • auth.py Auth fallback hardened; contracts aligned
  • app.py CORS middleware added; test path fixed
  • config.py Config endpoint catches widened for API boundary; int() guard added
  • Implemented 7 code review security fixes with 32 regression tests harden behavioral
    2 files
    • auth.py
    • test_auth.py
  • Hardened sysop auth fallback and aligned contracts harden internal
    2 files
    • auth.py
    • contracts.py
  • Added CORS middleware to sysop app and fixed test path remediate internal
    1 file
    • app.py
  • Guarded int(value) in config update to return 422 instead of 500 harden internal
    1 file
    • config.py
  • Widened config endpoint catches back to Exception for API boundary safety harden internal
    1 file
    • config.py

Code review findings implemented across server and worker

3 files changed
  • engine.py Narrowed exception catches; _safe_tick helper extracted
  • game_state.py _loans global state moved into GameState; dead worker sync code removed
  • maintain.py Narrowed exception catches in CLI commands
  • Narrowed broad except-Exception catches and extracted _safe_tick helper remediate internal
    1 file
    • engine.py
  • Moved _loans global state into GameState; removed dead worker sync code remediate internal
    1 file
    • game_state.py
  • Implemented 5 code review findings across server and worker packages remediate internal
    2 files
    • maintain.py
    • config.py
  • Narrowed exception catches in CLI commands and fixed pre-existing ruff errors remediate internal
    1 file
    • _helpers.py
  • Added thread-safe lock to metrics cache with 24 new tests harden internal
    2 files
    • metrics.py
    • test_dict_provider_cache.py

Dead vendored uwarp copy deleted from worker

1 file changed
  • __init__.py Entire vendored uwarp copy deleted (-59K lines)
  • Deleted dead vendored uwarp copy from worker package (-59K lines) deprecate internal
    1 file
    • __init__.py
  • Synced worker with server — extracted _run_handler, narrowed exceptions, atomic writes remediate internal
    1 file
    • entry.py

v3.0 Base player format parser

1 file changed
  • models.py 300-byte Gold-style player record parser
  • Added v3.0 Base player format parser for 300-byte Gold-style records instantiate behavioral
    2 files
    • models.py
    • test_v300_format.py
  • Fixed attrs.asdict bug and faction pascal_len cleanup; achieved 100% game_state.py coverage qualify internal
    2 files
    • game_state.py
    • test_game_state_coverage.py
  • Documented GameState dirty tracking as intentional design specify internal
    1 file
    • game_state.py
  • Atomic .dat writes, narrowed worker exceptions, ServerConfig fallbacks harden internal
    2 files
    • _loader_dat.py
    • config.py

SysOp frontend modularized

2 files changed
  • build_html.py Build script for esbuild-compiled sysop frontend
  • package.json NPM package for sysop frontend build
  • Split monolithic sysop.html into esbuild-compiled source modules decouple internal
    3 files
    • build_html.py
    • package.json
    • shell.html
  • Added player archetype creation and stat stamping sysop scripts instantiate internal
    2 files
    • create_players_all.py
    • stamp_players_all.py

Documentation and CI

1 file changed
  • code-review-architecture.md Comprehensive code review and architectural analysis
  • Added comprehensive code review and architectural analysis documentation specify internal
    1 file
    • code-review-architecture.md
  • Corrected code-review-architecture.md with verified facts specify internal
    1 file
    • code-review-architecture.md
  • Added .coverage to gitignore baseline internal
    1 file
    • .gitignore
  • Grouped models.py re-exports into single import blocks baseline errata
    1 file
    • models.py