-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Problem
The Python RIMAPI client has 7 write methods that raise NotImplementedError, and only 6 of 16 action types are wired in the action executor. Once the C# RIMAPI fork (#1) lands write endpoints, the Python side needs to connect to them.
Depends on: #1 (C# RIMAPI fork)
Can start now: Mock transport work (fixtures + tests) doesn't need the live mod.
Scope
1. Replace 7 stubs in src/rle/rimapi/client.py (lines 164-185)
| Method | Endpoint |
|---|---|
pause_game() |
POST /api/game/pause |
unpause_game() |
POST /api/game/unpause |
set_colonist_job(colonist_id, job) |
POST /api/colonists/{id}/job |
draft_colonist(colonist_id, draft) |
POST /api/colonists/{id}/draft |
set_work_priorities(colonist_id, priorities) |
POST /api/colonists/{id}/priorities |
place_blueprint(blueprint) |
POST /api/blueprints |
set_research_target(project) |
POST /api/research/target |
2. Add 10 new client methods
For the remaining action types: move_colonist, haul_resource, set_growing_zone, toggle_power, assign_researcher, set_recreation_policy, assign_social_activity, cancel_blueprint, assign_bed_rest, administer_medicine.
3. Wire all 16 action types in src/rle/orchestration/action_executor.py
Replace the catch-all block (lines 79-91) that logs "No RIMAPI endpoint yet" with individual dispatch cases for each action type.
4. Remove NotImplementedError guards in game_loop.py
Remove try/except NotImplementedError: pass around pause_game() (lines 80-83) and unpause_game() (lines 124-127).
5. Update tests
- Replace
TestWriteEndpointStubsintest_rimapi_client.pywith real write endpoint tests using mock transport - Add test cases for all 10 newly-wired action types in
test_action_executor.py - Add write endpoint mock routes in
conftest.py - Update
test_game_loop.pyintegration test
Files to Modify
src/rle/rimapi/client.py— stubs + new methodssrc/rle/orchestration/action_executor.py— dispatch wiringsrc/rle/orchestration/game_loop.py— remove guardstests/conftest.py— write mock fixturestests/unit/test_rimapi_client.py— write endpoint teststests/unit/test_action_executor.py— new dispatch teststests/integration/test_game_loop.py— update for real pause/unpause
@CalebisGross — this is the Python counterpart to #1. Most of it can be done against mock transport now. Full integration testing requires the C# fork to be running. Thoughts on sequencing?
🤖 Generated with Claude Code