From 9beaaaedfd96659f882a07e5e5342ac9060cfe29 Mon Sep 17 00:00:00 2001 From: Jack Amadeo Date: Thu, 5 Feb 2026 11:01:43 -0500 Subject: [PATCH 1/4] Smoke tests: split compaction test and use debug build --- .github/workflows/pr-smoke-test.yml | 57 +++++++++++++++++++---------- 1 file changed, 38 insertions(+), 19 deletions(-) diff --git a/.github/workflows/pr-smoke-test.yml b/.github/workflows/pr-smoke-test.yml index 71459d026464..4aee115fd24e 100644 --- a/.github/workflows/pr-smoke-test.yml +++ b/.github/workflows/pr-smoke-test.yml @@ -45,7 +45,7 @@ jobs: - '!documentation/**' build-binary: - name: Build Release Binary + name: Build Binary runs-on: ubuntu-latest needs: changes if: needs.changes.outputs.code == 'true' || github.event_name == 'workflow_dispatch' @@ -65,15 +65,15 @@ jobs: - name: Cache Rust dependencies uses: Swatinem/rust-cache@v2 - - name: Build Release Binary for Smoke Tests + - name: Build Binary for Smoke Tests run: | - cargo build --release + cargo build --bin goose - name: Upload Binary for Smoke Tests uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 with: name: goose-binary - path: target/release/goose + path: target/debug/goose retention-days: 1 smoke-tests: @@ -90,10 +90,10 @@ jobs: uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 with: name: goose-binary - path: target/release + path: target/debug - name: Make Binary Executable - run: chmod +x target/release/goose + run: chmod +x target/debug/goose - name: Run Smoke Tests with Provider Script env: @@ -152,17 +152,6 @@ jobs: run: | bash scripts/test_subrecipes.sh - - name: Run Compaction Tests - env: - ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} - GOOSE_PROVIDER: anthropic - GOOSE_MODEL: claude-sonnet-4-5-20250929 - HOME: /tmp/goose-home - GOOSE_DISABLE_KEYRING: 1 - SKIP_BUILD: 1 - run: | - bash scripts/test_compaction.sh - smoke-tests-code-exec: name: Smoke Tests (Code Execution) runs-on: ubuntu-latest @@ -177,10 +166,10 @@ jobs: uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 with: name: goose-binary - path: target/release + path: target/debug - name: Make Binary Executable - run: chmod +x target/release/goose + run: chmod +x target/debug/goose - name: Run Provider Tests (Code Execution Mode) env: @@ -200,3 +189,33 @@ jobs: mkdir -p $HOME/.local/share/goose/sessions mkdir -p $HOME/.config/goose bash scripts/test_providers.sh --code-exec + + compaction-tests: + name: Compaction Tests + runs-on: ubuntu-latest + needs: build-binary + steps: + - name: Checkout Code + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + with: + ref: ${{ github.event.inputs.branch || github.ref }} + + - name: Download Binary + uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 + with: + name: goose-binary + path: target/debug + + - name: Make Binary Executable + run: chmod +x target/debug/goose + + - name: Run Compaction Tests + env: + ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} + GOOSE_PROVIDER: anthropic + GOOSE_MODEL: claude-sonnet-4-5-20250929 + HOME: /tmp/goose-home + GOOSE_DISABLE_KEYRING: 1 + SKIP_BUILD: 1 + run: | + bash scripts/test_compaction.sh From 43f0cff379a6d92b5a9eebc558f2993281788e44 Mon Sep 17 00:00:00 2001 From: Jack Amadeo Date: Thu, 5 Feb 2026 12:06:23 -0500 Subject: [PATCH 2/4] update binary paths in scripts --- scripts/test_compaction.sh | 4 ++-- scripts/test_mcp.sh | 4 ++-- scripts/test_providers.sh | 4 ++-- scripts/test_subrecipes.sh | 10 +++++----- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/scripts/test_compaction.sh b/scripts/test_compaction.sh index 876ee514218e..88c957d82d7b 100755 --- a/scripts/test_compaction.sh +++ b/scripts/test_compaction.sh @@ -14,7 +14,7 @@ fi if [ -z "$SKIP_BUILD" ]; then echo "Building goose..." - cargo build --release --bin goose + cargo build --bin goose echo "" else echo "Skipping build (SKIP_BUILD is set)..." @@ -22,7 +22,7 @@ else fi SCRIPT_DIR=$(pwd) -GOOSE_BIN="$SCRIPT_DIR/target/release/goose" +GOOSE_BIN="$SCRIPT_DIR/target/debug/goose" # Apply provider/model overrides if set if [ -n "$COMPACTION_PROVIDER" ]; then diff --git a/scripts/test_mcp.sh b/scripts/test_mcp.sh index ccfacdb8b861..85d72f9297bd 100755 --- a/scripts/test_mcp.sh +++ b/scripts/test_mcp.sh @@ -3,7 +3,7 @@ set -e if [ -z "$SKIP_BUILD" ]; then echo "Building goose..." - cargo build --release --bin goose + cargo build --bin goose echo "" else echo "Skipping build (SKIP_BUILD is set)..." @@ -11,7 +11,7 @@ else fi SCRIPT_DIR=$(pwd) -GOOSE_BIN="$SCRIPT_DIR/target/release/goose" +GOOSE_BIN="$SCRIPT_DIR/target/debug/goose" TEST_PROVIDER=${GOOSE_PROVIDER:-anthropic} TEST_MODEL=${GOOSE_MODEL:-claude-haiku-4-5-20251001} diff --git a/scripts/test_providers.sh b/scripts/test_providers.sh index 024560f734ee..638d74eb8f27 100755 --- a/scripts/test_providers.sh +++ b/scripts/test_providers.sh @@ -31,7 +31,7 @@ fi if [ -z "$SKIP_BUILD" ]; then echo "Building goose..." - cargo build --release --bin goose + cargo build --bin goose echo "" else echo "Skipping build (SKIP_BUILD is set)..." @@ -247,7 +247,7 @@ run_test() { ( export GOOSE_PROVIDER="$provider" export GOOSE_MODEL="$model" - cd "$testdir" && "$SCRIPT_DIR/target/release/goose" run --text "Immediately use the shell tool to run 'ls'. Do not ask for confirmation." --with-builtin "$BUILTINS" 2>&1 + cd "$testdir" && "$SCRIPT_DIR/target/debug/goose" run --text "Immediately use the shell tool to run 'ls'. Do not ask for confirmation." --with-builtin "$BUILTINS" 2>&1 ) > "$output_file" 2>&1 # Check result diff --git a/scripts/test_subrecipes.sh b/scripts/test_subrecipes.sh index 25d5e11190c4..a194689ff438 100755 --- a/scripts/test_subrecipes.sh +++ b/scripts/test_subrecipes.sh @@ -7,7 +7,7 @@ fi if [ -z "$SKIP_BUILD" ]; then echo "Building goose..." - cargo build --release --bin goose + cargo build --bin goose echo "" else echo "Skipping build (SKIP_BUILD is set)..." @@ -17,7 +17,7 @@ fi SCRIPT_DIR=$(pwd) # Add goose binary to PATH so subagents can find it when spawning -export PATH="$SCRIPT_DIR/target/release:$PATH" +export PATH="$SCRIPT_DIR/target/debug:$PATH" # Set default provider and model if not already set # Use fast model for CI to speed up tests @@ -76,7 +76,7 @@ RESULTS=() check_recipe_output() { local tmpfile=$1 local mode=$2 - + # Check for unified subagent tool invocation (new format: "─── subagent |") if grep -q "─── subagent" "$tmpfile"; then echo "✓ SUCCESS: Subagent tool invoked" @@ -85,7 +85,7 @@ check_recipe_output() { echo "✗ FAILED: No evidence of subagent tool invocation" RESULTS+=("✗ Subagent tool invocation ($mode)") fi - + # Check that both subrecipes were called (shown as "subrecipe: " in output) if grep -q "subrecipe:.*file_stats\|file_stats.*subrecipe" "$tmpfile" && grep -q "subrecipe:.*code_patterns\|code_patterns.*subrecipe" "$tmpfile"; then echo "✓ SUCCESS: Both subrecipes (file_stats, code_patterns) found in output" @@ -98,7 +98,7 @@ check_recipe_output() { echo "Running recipe with parallel subrecipes..." TMPFILE=$(mktemp) -if (cd "$TESTDIR" && "$SCRIPT_DIR/target/release/goose" run --recipe project_analyzer_parallel.yaml --no-session 2>&1) | tee "$TMPFILE"; then +if (cd "$TESTDIR" && "$SCRIPT_DIR/target/debug/goose" run --recipe project_analyzer_parallel.yaml --no-session 2>&1) | tee "$TMPFILE"; then echo "✓ SUCCESS: Recipe completed successfully" RESULTS+=("✓ Recipe exit code") check_recipe_output "$TMPFILE" "parallel" From 174e25d73413a88c390e1f81a91f17fae8b44775 Mon Sep 17 00:00:00 2001 From: Jack Amadeo Date: Thu, 5 Feb 2026 12:22:14 -0500 Subject: [PATCH 3/4] Compaction test uses python --- .github/workflows/pr-smoke-test.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/pr-smoke-test.yml b/.github/workflows/pr-smoke-test.yml index 4aee115fd24e..2597460a37b0 100644 --- a/.github/workflows/pr-smoke-test.yml +++ b/.github/workflows/pr-smoke-test.yml @@ -209,6 +209,14 @@ jobs: - name: Make Binary Executable run: chmod +x target/debug/goose + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Install uv + uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0 + - name: Run Compaction Tests env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} From 0472ba70304b12b8a6f384bcad8c095edea1cdba Mon Sep 17 00:00:00 2001 From: Jack Amadeo Date: Fri, 6 Feb 2026 14:39:01 -0500 Subject: [PATCH 4/4] Update .github/workflows/pr-smoke-test.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/pr-smoke-test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pr-smoke-test.yml b/.github/workflows/pr-smoke-test.yml index 2597460a37b0..2e3d380e7eb2 100644 --- a/.github/workflows/pr-smoke-test.yml +++ b/.github/workflows/pr-smoke-test.yml @@ -226,4 +226,6 @@ jobs: GOOSE_DISABLE_KEYRING: 1 SKIP_BUILD: 1 run: | + mkdir -p $HOME/.local/share/goose/sessions + mkdir -p $HOME/.config/goose bash scripts/test_compaction.sh