Skip to content

fix(cli): fail sandbox create immediately with the server error - #180

Merged
jleni merged 3 commits into
mainfrom
fix/sandbox-lease-ssh-errors
Aug 31, 2026
Merged

fix(cli): fail sandbox create immediately with the server error#180
jleni merged 3 commits into
mainfrom
fix/sandbox-lease-ssh-errors

Conversation

@jleni

@jleni jleni commented Aug 30, 2026

Copy link
Copy Markdown
Member

What

kobe lease agent-trusted 401ed with an empty body, then a later 503 sat for nine minutes polling a lease that was never created.

Why

  • Sandbox POSTs signed the JSON body; the operator verifies SSH against an empty body (FromRequestParts cannot read it). Cluster create already signed empty.
  • A finished 503 was treated as an in-flight CREATE and entered CREATE_SETTLE_TIMEOUT (9m).
  • just install omitted --locked, so cargo re-resolved the lock.

Changes

  • Sign sandbox POST/auth like lease_create (empty body).
  • Print the server error/detail immediately; recover only if the POST itself may still be committing.
  • 401 from the auth extractor returns JSON so the CLI can show why.
  • Admission 503 includes the readiness error as detail.
  • just install uses --locked.

Operator image on int-pro does not need this for the current lease path: the CLI is already installed from this tree, and agent-trusted is certified again.

SSH signatures on sandbox POSTs were hashed over the JSON body, but
the operator verifies an empty body. That 401ed create with no JSON.
A later 503 (pool not ready) then waited nine minutes recovering a
lease that never existed.

Sign like lease_create, print error/detail at once, and put JSON on
401 extractor rejections. just install uses --locked.
jleni added 2 commits August 31, 2026 17:20
cargo fmt --check on rust:1.94-bookworm groups axum::Json ahead of
extract; local 1.95 rustfmt does not.
A 503 with a body is the server's last word. Recovering it as an
in-flight CREATE sat for nine minutes. Keep settle/cleanup for
ambiguous sends only.
@jleni
jleni merged commit 7178e92 into main Aug 31, 2026
10 checks passed
@jleni
jleni deleted the fix/sandbox-lease-ssh-errors branch August 31, 2026 19:06
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