Give the managed-labels live smoke a fresh run id each time

The smoke named its sandbox from a fixed run id. Daytona names sandboxes
uniquely, so when a run of the test was interrupted after the create had
gone out — a killed process, a test budget that expired mid-create — the
leftover sandbox made every later run fail with "already exists" until
someone deleted it by hand.

The test now generates a run id per execution and checks the label the
provider returns against that id, so an interrupted run leaves at most a
stray sandbox to prune and never blocks the next one.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Bryan Helmkamp 2026-09-10 10:22:04 -06:00
parent c9bfd5edaa
commit b4191d4431
No known key found for this signature in database

View file

@ -171,7 +171,9 @@ mod daytona_streaming_live {
"DAYTONA_API_KEY must be set to run this live smoke test"
);
let run_id: fabro_types::RunId = "01HY0000000000000000000000".parse().unwrap();
// A fresh id per run: a fixed one would collide with a sandbox an
// interrupted earlier run left behind.
let run_id = fabro_types::RunId::new();
let sandbox = provider_sandbox(
SandboxProviderKind::DAYTONA,
&daytona_access(live_credentials()?),
@ -209,7 +211,7 @@ mod daytona_streaming_live {
)?;
ensure_eq(
&labels.get("sh.fabro.run_id").map(String::as_str),
&Some("01HY0000000000000000000000"),
&Some(run_id.to_string().as_str()),
"Daytona should accept and return the run id label",
)?;
ensure_eq(