From 151651c8b599d14dc09f323ca9b358defdb9d636 Mon Sep 17 00:00:00 2001 From: sam Date: Sun, 11 Oct 2026 14:49:57 +0800 Subject: [PATCH 1/3] Fix E2B template Codex builder and package inputs --- .github/workflows/e2b-template.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2b-template.yml b/.github/workflows/e2b-template.yml index 64dd9475b..40bc46fc4 100644 --- a/.github/workflows/e2b-template.yml +++ b/.github/workflows/e2b-template.yml @@ -128,14 +128,17 @@ jobs: bash scripts/prepare-release-runtimes.sh inputs="$HOME/.oac/build/release-inputs/inputs.json" AGENTS_RUNTIME_CODEX_PACKAGE="$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1]))["codex"])' "$inputs")" + CODEX_CLI_DIR="$AGENTS_RUNTIME_CODEX_PACKAGE" MCODE_HARNESS_BUILD_DIR="$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1]))["mcode"])' "$inputs")" CLAUDE_SDK_BUILD_DIR="$output_root/claude-sdk" - export AGENTS_RUNTIME_CODEX_PACKAGE MCODE_HARNESS_BUILD_DIR CLAUDE_SDK_BUILD_DIR + export AGENTS_RUNTIME_CODEX_PACKAGE CODEX_CLI_DIR MCODE_HARNESS_BUILD_DIR CLAUDE_SDK_BUILD_DIR bash scripts/build-claude-sdk-runtime.sh revision="$(git rev-parse HEAD)" for harness in codex claude mcode; do builder="scripts/build-$harness-runtime.sh" - if [[ "$harness" == codex ]]; then builder=scripts/build-agents-runtime.sh; fi + if [[ "$harness" == codex && ! -f "$builder" && -f scripts/build-agents-runtime.sh ]]; then + builder=scripts/build-agents-runtime.sh + fi AGENTS_RUNTIME_BUILD_DIR="$output_root/$harness" bash "$builder" docker build --platform linux/amd64 --tag "oac-e2b-$harness:$revision" "$output_root/$harness" image="$(docker image inspect --format '{{.Id}}' "oac-e2b-$harness:$revision")" From 5fe83a3e16b48980ef2a549b5ebb542c242b919b Mon Sep 17 00:00:00 2001 From: sam Date: Sun, 11 Oct 2026 14:54:31 +0800 Subject: [PATCH 2/3] Use current Codex runtime build contract in template workflow --- .github/workflows/e2b-template.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/e2b-template.yml b/.github/workflows/e2b-template.yml index 40bc46fc4..2b0ed640f 100644 --- a/.github/workflows/e2b-template.yml +++ b/.github/workflows/e2b-template.yml @@ -127,18 +127,14 @@ jobs: mkdir -p "$output_root" bash scripts/prepare-release-runtimes.sh inputs="$HOME/.oac/build/release-inputs/inputs.json" - AGENTS_RUNTIME_CODEX_PACKAGE="$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1]))["codex"])' "$inputs")" - CODEX_CLI_DIR="$AGENTS_RUNTIME_CODEX_PACKAGE" + CODEX_CLI_DIR="$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1]))["codex"])' "$inputs")" MCODE_HARNESS_BUILD_DIR="$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1]))["mcode"])' "$inputs")" CLAUDE_SDK_BUILD_DIR="$output_root/claude-sdk" - export AGENTS_RUNTIME_CODEX_PACKAGE CODEX_CLI_DIR MCODE_HARNESS_BUILD_DIR CLAUDE_SDK_BUILD_DIR + export CODEX_CLI_DIR MCODE_HARNESS_BUILD_DIR CLAUDE_SDK_BUILD_DIR bash scripts/build-claude-sdk-runtime.sh revision="$(git rev-parse HEAD)" for harness in codex claude mcode; do builder="scripts/build-$harness-runtime.sh" - if [[ "$harness" == codex && ! -f "$builder" && -f scripts/build-agents-runtime.sh ]]; then - builder=scripts/build-agents-runtime.sh - fi AGENTS_RUNTIME_BUILD_DIR="$output_root/$harness" bash "$builder" docker build --platform linux/amd64 --tag "oac-e2b-$harness:$revision" "$output_root/$harness" image="$(docker image inspect --format '{{.Id}}' "oac-e2b-$harness:$revision")" From 9527854fc26788da852ac00e996eac14b6a1a621 Mon Sep 17 00:00:00 2001 From: sam Date: Sun, 11 Oct 2026 15:08:26 +0800 Subject: [PATCH 3/3] test: stabilize preparation expiry deadlines --- apps/daemon/internal/dispatch/preparation_test.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/daemon/internal/dispatch/preparation_test.go b/apps/daemon/internal/dispatch/preparation_test.go index eca2ea195..d987fc818 100644 --- a/apps/daemon/internal/dispatch/preparation_test.go +++ b/apps/daemon/internal/dispatch/preparation_test.go @@ -216,7 +216,8 @@ func TestPreparationSingleTransferAndReleaseDoesNotCancelRun(t *testing.T) { gotSession <- s return s, nil } - r := preparationRouter(t, sender, 80*time.Millisecond, func(context.Context, proto.PromptRequestPayload) (preparedFixture, error) { return p, nil }) + // Allow workspace preparation to finish even on a loaded CI worker. + r := preparationRouter(t, sender, 2*time.Second, func(context.Context, proto.PromptRequestPayload) (preparedFixture, error) { return p, nil }) prepare := mustEnv(t, proto.TypeExecutionPrepare, "request", preparationRequest()) if err := r.Handle(t.Context(), prepare); err != nil { t.Fatal(err) @@ -238,7 +239,7 @@ func TestPreparationSingleTransferAndReleaseDoesNotCancelRun(t *testing.T) { t.Fatal(err) } // The old preparation deadline must not govern the transferred Session. - time.Sleep(100 * time.Millisecond) + time.Sleep(time.Until(time.UnixMilli(ready.ExpiresAt).Add(time.Millisecond))) if session.ctx.Err() != nil || session.cancels() != 0 || p.starts.Load() != 1 || r.ActiveRuns() != 1 { t.Fatal("transfer was duplicated or cancelled") } @@ -310,7 +311,8 @@ func TestPreparationCancelDuringStartClosesLateSession(t *testing.T) { func TestPreparationExpiryAndOldHandleCannotStartReplacement(t *testing.T) { sender := &recSender{} created := make(chan *controlledPreparation, 2) - r := preparationRouter(t, sender, 60*time.Millisecond, func(context.Context, proto.PromptRequestPayload) (preparedFixture, error) { + // Expiry must follow readiness, not race workspace preparation on CI. + r := preparationRouter(t, sender, 2*time.Second, func(context.Context, proto.PromptRequestPayload) (preparedFixture, error) { p := &controlledPreparation{closed: make(chan struct{})} created <- p return p, nil