test: probe loop coverage — _run_instance_probe_loop transition logic #13
Labels
No labels
architecture
backlog
enhancement
module:documents
module:hardware
module:manage
module:pipeline
module:voice
priority:backlog
priority:high
priority:medium
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Circuit-Forge/circuitforge-core#13
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Gap
_run_instance_probe_loopwas shipped in v0.2.0 with no unit tests. The function contains three distinct code paths that need coverage:GET /healthreturns 200 → state transitionsstarting → running_PROBE_TIMEOUT_S→ state transitionsstarting → stoppedstart_timesentry is cleaned up when state is no longerstartingAcceptance criteria
test_probe_transitions_starting_to_running— mock/health→ 200; assertupsert_instancecalled withstate="running"test_probe_transitions_starting_to_stopped_on_timeout— mock time past_PROBE_TIMEOUT_S; assertupsert_instancecalled withstate="stopped"test_probe_cleans_up_start_times_for_non_starting— instance inrunningstate; assert key removed fromstart_timesdictasyncio/pytest-asyncio; mockurllib.request.urlopenandtime.time