Skip to content

CLI: say whether a slow stop or cancel went through; an ended box is gone - #81

Open
Adambomb210 wants to merge 1 commit into
mainfrom
claude/box-followups
Open

Adambomb210 wants to merge 1 commit into
mainfrom
claude/box-followups

Conversation

@Adambomb210

Copy link
Copy Markdown
Collaborator

Two gaps turned up by the live staging box test after #80. Box 5d10ee46 cost $0.01.

  • krater stop timed out but had worked. The CLI said staging "didn't answer in time", though the stop was recorded. A change (POST) checks the member with Weave first: token info, userinfo, possibly a service token, and the directory, each with a 10 s timeout. With a slow Weave that runs past the CLI's 30 s limit. Reads skip the directory check, which fits show staying fast. I couldn't confirm this from the server logs, since I have no access to them.
    • The CLI now waits 60 s (httpx.Timeout(60, connect=10)).
    • If cancel, stop, resume or move still times out, it doesn't send the request again, because Krater may have done it. Instead it reads the job. If the job shows the action (the state it leads to, or its event as the newest), the CLI says it went through and carries on as normal. Otherwise it says to try again and exits 1.
  • krater show on a cancelled box still said "Krater saves it every 10 minutes". An ended box now says its disk and saved /workspace are gone. The job page already had this right, because an ended box has no machine card.

Tests: three new CLI tests cover a slow stop that went through (sent once only), a slow cancel that didn't, and an ended box's show. The CLI suite passes all 198 tests and ruff is clean. Server code is unchanged.

🤖 Generated with Claude Code

…gone

Found in the live box test after #80:

- `krater stop` timed out ("didn't answer in time") though Krater had done
  the stop. A change checks the member with Weave first (up to four calls of
  10 s each), past the CLI's 30 s timeout when Weave is slow. The CLI now waits
  60 s, and when cancel/stop/resume/move still time out it reads the job
  instead of guessing (never sending it twice): it says the action went
  through if the job shows it, and otherwise to try again.
- `krater show` on a cancelled box still said "Krater saves it every 10
  minutes". An ended box now says its disk and saved /workspace are gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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