refactor: unify subagent and subrecipe tools into single tool (#5893)
Some checks are pending
Canary / Prepare Version (push) Waiting to run
Canary / build-cli (push) Blocked by required conditions
Canary / Upload Install Script (push) Blocked by required conditions
Canary / bundle-desktop (push) Blocked by required conditions
Canary / bundle-desktop-linux (push) Blocked by required conditions
Canary / bundle-desktop-windows (push) Blocked by required conditions
Canary / Release (push) Blocked by required conditions
CI / changes (push) Waiting to run
CI / Check Rust Code Format (push) Blocked by required conditions
CI / Build and Test Rust Project (push) Blocked by required conditions
CI / Lint Rust Code (push) Blocked by required conditions
CI / Check OpenAPI Schema is Up-to-Date (push) Blocked by required conditions
CI / Test and Lint Electron Desktop App (push) Blocked by required conditions
Live Provider Tests / check-fork (push) Waiting to run
Live Provider Tests / changes (push) Blocked by required conditions
Live Provider Tests / Build Release Binary (push) Blocked by required conditions
Live Provider Tests / Smoke Tests (push) Blocked by required conditions
Documentation Site Preview / deploy (push) Waiting to run
Publish Docker Image / docker (push) Waiting to run

This commit is contained in:
tlongwell-block 2025-12-13 13:50:20 -05:00 committed by GitHub
parent e6e5ba52ab
commit a131b08817
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
32 changed files with 796 additions and 3443 deletions

View file

@ -77,29 +77,23 @@ check_recipe_output() {
local tmpfile=$1
local mode=$2
if grep -q "| subrecipe" "$tmpfile"; then
echo "✓ SUCCESS: Subrecipe tools invoked"
RESULTS+=("✓ Subrecipe tool invocation ($mode)")
# Check for unified subagent tool invocation (new format: "─── subagent |")
if grep -q "─── subagent" "$tmpfile"; then
echo "✓ SUCCESS: Subagent tool invoked"
RESULTS+=("✓ Subagent tool invocation ($mode)")
else
echo "✗ FAILED: No evidence of subrecipe tool invocation"
RESULTS+=("✗ Subrecipe tool invocation ($mode)")
echo "✗ FAILED: No evidence of subagent tool invocation"
RESULTS+=("✗ Subagent tool invocation ($mode)")
fi
if grep -q "file_stats" "$tmpfile" && grep -q "code_patterns" "$tmpfile"; then
# Check that both subrecipes were called (shown as "subrecipe: <name>" 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"
RESULTS+=("✓ Both subrecipes present ($mode)")
else
echo "✗ FAILED: Not all subrecipes found in output"
RESULTS+=("✗ Subrecipe names ($mode)")
fi
if grep -q "| subagent" "$tmpfile"; then
echo "✓ SUCCESS: Subagent execution detected"
RESULTS+=("✓ Subagent execution ($mode)")
else
echo "✗ FAILED: No evidence of subagent execution"
RESULTS+=("✗ Subagent execution ($mode)")
fi
}
echo "Running recipe with parallel subrecipes..."
@ -108,14 +102,6 @@ if (cd "$TESTDIR" && "$SCRIPT_DIR/target/release/goose" run --recipe project_ana
echo "✓ SUCCESS: Recipe completed successfully"
RESULTS+=("✓ Recipe exit code")
check_recipe_output "$TMPFILE" "parallel"
if grep -q "execution_mode: parallel" "$TMPFILE"; then
echo "✓ SUCCESS: Parallel execution mode detected"
RESULTS+=("✓ Parallel execution mode")
else
echo "✗ FAILED: Parallel execution mode not detected"
RESULTS+=("✗ Parallel execution mode")
fi
else
echo "✗ FAILED: Recipe execution failed"
RESULTS+=("✗ Recipe exit code")