From 95d1dd4da0525e096dc97296bdcaf1dc75931899 Mon Sep 17 00:00:00 2001 From: Khaliq Date: Fri, 10 Apr 2026 15:56:34 +0200 Subject: [PATCH 1/2] fix: skip in-sandbox provisioning when cloud launcher already seeded ACLs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The cloud bootstrap sets RELAY_CLOUD_PROVISIONING_DONE=1 to signal that relayfile ACLs were already compiled and seeded by the launcher. Without this guard, the SDK provisioner calls POST /v1/workspaces on the relayfile API — which has no such route — causing a fatal 404 that kills the workflow. Co-Authored-By: Claude Opus 4.6 (1M context) --- packages/sdk/src/workflows/runner.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/sdk/src/workflows/runner.ts b/packages/sdk/src/workflows/runner.ts index 25966c818..2a3310a33 100644 --- a/packages/sdk/src/workflows/runner.ts +++ b/packages/sdk/src/workflows/runner.ts @@ -1545,6 +1545,13 @@ export class WorkflowRunner { } private async provisionAgents(config: RelayYamlConfig): Promise { + // Cloud launcher already compiled and seeded relayfile ACLs before the + // sandbox started. Skip in-sandbox provisioning — the relayfile API has + // no POST /v1/workspaces route, so attempting it causes a fatal 404. + if (process.env.RELAY_CLOUD_PROVISIONING_DONE === '1') { + return; + } + this.agentTokens.clear(); await this.stopProvisionedMounts(); From e0ed462c5dc7484b7e28daef8ed84580214b5d1a Mon Sep 17 00:00:00 2001 From: Miya Date: Fri, 10 Apr 2026 16:17:39 +0200 Subject: [PATCH 2/2] fix: rebuild before sdk e2e lifecycle phase --- scripts/e2e-test.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/e2e-test.sh b/scripts/e2e-test.sh index 26bda404a..6ada51f22 100755 --- a/scripts/e2e-test.sh +++ b/scripts/e2e-test.sh @@ -145,7 +145,7 @@ if [ ! -f "$PROJECT_DIR/dist/src/cli/index.js" ]; then log_info "Building project..." npm run build else - log_info "Build exists, skipping (run 'npm run build' to rebuild)" + log_info "Build exists, skipping initial rebuild (Phase 4 will rebuild before SDK lifecycle)" fi # Phase 1: Broker startup smoke test @@ -305,6 +305,8 @@ fi # Phase 4: SDK lifecycle test (spawn/list/release) log_phase "Phase 4: SDK Agent Lifecycle" +log_info "Rebuilding before SDK lifecycle test to ensure dist matches current source..." +npm run build > /dev/null if ! node "$PROJECT_DIR/scripts/e2e-sdk-lifecycle.mjs" \ --name "$AGENT_NAME" \ --cli "claude" \