Skip to content

feat: expose wait_timeout and poll_interval to create_vm()#9

Draft
Koan-Bot wants to merge 1 commit into
atoomic:masterfrom
Koan-Bot:koan.atoomic/create-vm-timeout-options
Draft

feat: expose wait_timeout and poll_interval to create_vm()#9
Koan-Bot wants to merge 1 commit into
atoomic:masterfrom
Koan-Bot:koan.atoomic/create-vm-timeout-options

Conversation

@Koan-Bot

@Koan-Bot Koan-Bot commented Mar 21, 2026

Copy link
Copy Markdown
Contributor

What

Adds per-call wait_timeout and poll_interval options to create_vm() and enriches the timeout die message with server ID and last-known status.

Why

The 300s timeout and 5s poll interval were only configurable at the object level. Callers that spin up heterogeneous VMs (fast tiny instances vs. slow large ones) had no per-call control. When a timeout occurred, the generic die message gave no way to identify the orphaned VM for cleanup.

How

  • wait_timeout and poll_interval keys in %opts override the object-level create_max_timeout / create_loop_sleep attributes. Legacy wait_time_limit key still works for backward compat.
  • Die message now reads: Failed to create server <id>: status '<STATUS>' after <N>s timeout
  • Track last_status through the polling loop; simplified the double $server_status->{status} check.

Testing

  • Updated existing timeout test to match the new die message format
  • Added new test verifying per-call wait_timeout/poll_interval override object defaults
  • Full suite: 24/24 tests pass

🤖 Generated with Claude Code


Quality Report

Changes: 2 files changed, 51 insertions(+), 14 deletions(-)

Code scan: clean

Tests: passed (OK)

Branch hygiene: clean

Generated by Kōan post-mission quality pipeline

Previously the polling timeout (300s) and sleep interval (5s) were only
configurable via object attributes.  Callers can now override both
per-call through the `wait_timeout` and `poll_interval` hash keys,
falling back to the object-level defaults when omitted.

The timeout die message now includes the server ID and last-known
status so orphaned VMs can be identified and cleaned up.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Koan-Bot
Koan-Bot force-pushed the koan.atoomic/create-vm-timeout-options branch from df23dc6 to 617d091 Compare April 20, 2026 13:22
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