Repository navigation
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
Activity
Wire Python client to upstream RIMAPI v1.8.2 write endpoints
jkbennitt commentedon Mar 21, 2026
Completed
All 5 scope items from this issue are done as of commit
887fdcf:client.py— pause/unpause, draft, work priorities, blueprint all wired to upstream RIMAPI v1.8.2 endpoints (paths updated to/api/v1/convention)move_colonist,set_time_assignment,designate_areamapped to existing upstream endpoints. Remaining actions (haul_resource,set_growing_zone,toggle_power,administer_medicine) stay stubbed pending upstream PRs (tracked in Fork RIMAPI mod and add write endpoints for agent control #1)game_loop.pyfor pause/unpausemock_clientfixture, write endpoint tests, executor dispatch testsUpstream PR submitted: IlyaChichkov/RIMAPI#52 (research target endpoint — first of ~5 contributions)
Two stubs remain (
set_colonist_job,set_research_target) pending upstream acceptance. These will be unwired as upstream PRs land.