Skip to content

Fix multiple bugs: type safety, defaults, validation, thread safety - #1

Closed
Aitgray wants to merge 1 commit into
mainfrom
claude/condescending-brattain
Closed

Fix multiple bugs: type safety, defaults, validation, thread safety#1
Aitgray wants to merge 1 commit into
mainfrom
claude/condescending-brattain

Conversation

@Aitgray

@Aitgray Aitgray commented Apr 9, 2026

Copy link
Copy Markdown
Owner
  • Raise UniverseSchemaError on empty YAML instead of returning None from load_universe
  • Add missing Any import in factions/ai.py for correct type annotations
  • Fix growth_rate default in save_load.py from_dict (0.0 -> 0.01) to match Population dataclass
  • Move cached_nodes update inside lock in update_node_positions to prevent race conditions
  • Add try/except for int() conversion in /sim/step and /sim/rewind endpoints (returns 400)
  • Add response.ok checks in frontend postJson and fetchSimState to handle HTTP errors

- Raise UniverseSchemaError on empty YAML instead of returning None from load_universe
- Add missing Any import in factions/ai.py for correct type annotations
- Fix growth_rate default in save_load.py from_dict (0.0 -> 0.01) to match Population dataclass
- Move cached_nodes update inside lock in update_node_positions to prevent race conditions
- Add try/except for int() conversion in /sim/step and /sim/rewind endpoints (returns 400)
- Add response.ok checks in frontend postJson and fetchSimState to handle HTTP errors

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Aitgray Aitgray closed this Apr 9, 2026
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