diff --git a/AGENTS.md b/AGENTS.md index 53f778eb5..2c842c95b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -99,7 +99,6 @@ Some workspace crates, including those that make up the GDK, are published to cr ## Rules - Test: Prefer tests/ folder, e.g. crates/goose/tests/ -- Test: When adding features, update goose-self-test.yaml, rebuild, then run `goose run --recipe goose-self-test.yaml` to validate - Error: Use anyhow::Result - Provider: Implement Provider trait see providers/base.rs - MCP: Extensions in crates/goose-mcp/ diff --git a/RELEASE_CHECKLIST.md b/RELEASE_CHECKLIST.md index cb87c076c..e909dcd03 100644 --- a/RELEASE_CHECKLIST.md +++ b/RELEASE_CHECKLIST.md @@ -10,10 +10,6 @@ with instructions on how to download and sign. It will generate an analysis report in `/tmp/release_report_final.md` and perform testing is necessary for high risk pr changes. -## Run the goose self-test recipe - -goose run --recipe goose-self-test.yaml - ## Have goose produce a test plan Open the release candidate desktop app and have goose produce a test plan by pointing it at this PR. Use a prompt like diff --git a/documentation/docs/guides/recipes/storing-recipes.md b/documentation/docs/guides/recipes/storing-recipes.md index 4a12ac59c..f0c7a065b 100644 --- a/documentation/docs/guides/recipes/storing-recipes.md +++ b/documentation/docs/guides/recipes/storing-recipes.md @@ -143,7 +143,6 @@ goose searches for recipes in the following locations (in order): ```bash $ goose recipe list Available recipes: -goose-self-test - A comprehensive meta-testing recipe - local: ./goose-self-test.yaml hello-world - A sample recipe demonstrating basic usage - local: ~/.config/goose/recipes/hello-world.yaml job-finder - Find software engineering positions - local: ~/.config/goose/recipes/job-finder.yaml ``` @@ -152,9 +151,6 @@ job-finder - Find software engineering positions - local: ~/.config/goose/recipe ```bash $ goose recipe list --verbose Available recipes: - goose-self-test - A comprehensive meta-testing recipe - local: ./goose-self-test.yaml - Title: goose Self-Testing Integration Suite - Path: ./goose-self-test.yaml hello-world - A sample recipe demonstrating basic usage - local: ~/.config/goose/recipes/hello-world.yaml Title: Hello World Recipe Path: /Users/username/.config/goose/recipes/hello-world.yaml @@ -163,13 +159,6 @@ Available recipes: *JSON format for automation:* ```json [ - { - "name": "goose-self-test", - "source": "Local", - "path": "./goose-self-test.yaml", - "title": "goose Self-Testing Integration Suite", - "description": "A comprehensive meta-testing recipe" - }, { "name": "hello-world", "source": "GitHub", diff --git a/goose-self-test.yaml b/goose-self-test.yaml deleted file mode 100644 index c0b04ecd9..000000000 --- a/goose-self-test.yaml +++ /dev/null @@ -1,643 +0,0 @@ -version: 1.0.0 -title: Goose Self-Testing Integration Suite -description: A comprehensive meta-testing recipe where goose tests its own capabilities using its own tools - true first-person integration testing -author: - contact: goose-self-test - -activities: - - Initialize test workspace and logging infrastructure - - Test file operations (create, read, update, delete, undo) - - Validate shell command execution and error handling - - Validate Azure AI Foundry provider routing and deployment aliases - - Validate the configurable Databricks AI Gateway path across all inference routes - - Validate declared vision through persisted custom-provider configuration and outbound requests - - Analyze code structure and parsing capabilities - - Validate Boa JavaScript discovery, batching, cancellation, and isolation - - Test extension discovery and management - - Test load tool for knowledge injection and discovery - - Test delegate tool for task delegation - - Test multi-turn thinking preservation for providers that reject replayed reasoning_content - - Test Z.AI Coding Plan streamed tool calls and interruption recovery - - Validate ACP thinking-effort discovery, forwarding, and provider switching - - Validate GDK observability hook lifecycle events and payload opt-in - - Validate capped and uncapped auto-compaction thresholds and Desktop editing - - Validate the opt-in context relevance shadow operation without TypeSafe calls - - Test error boundaries including nested delegation prevention - - Generate comprehensive test report - -parameters: - - key: test_phases - input_type: string - requirement: optional - default: "all" - description: "Which test phases to run: all, basic, extensions, delegation, code-mode, declared-vision, reasoning, zai-coding-plan, acp-effort, compaction, context-relevance, advanced" - - - key: test_depth - input_type: string - requirement: optional - default: "standard" - description: "Testing depth: quick (smoke tests), standard (normal coverage), deep (exhaustive)" - - - key: workspace_dir - input_type: string - requirement: optional - default: "./gooseselftest" - description: "Directory for test artifacts and results" - - - key: parallel_tests - input_type: string - requirement: optional - default: "true" - description: "Run independent tests in parallel where possible" - - - key: cleanup_after - input_type: string - requirement: optional - default: "true" - description: "Clean up test artifacts after completion" - -instructions: | - You are testing yourself - a running goose instance validating its own capabilities through meta-testing. - This is true first-person integration testing where you use your own tools to test your own functionality. - - ## Understanding First-Person Integration Testing - This is a crucial distinction - as a running goose instance, you are testing yourself using your own capabilities. - This is meta-testing in the truest sense: not unit tests or external test harnesses, but you using your tools - to validate your own functionality from within your active session. You can only test what you can observe and - control from inside your running instance - your tools, your behaviors, your error handling, your consistency. - - ## Core Testing Philosophy - - You ARE the system under test AND the tester - - Use your tools to create test scenarios, then validate the results - - Test both success and failure paths - - Document everything meticulously - - Handle errors gracefully - a test failure shouldn't stop the suite - - ## Test Execution Framework - - ### Phase 1: Environment Setup & Basic Tool Validation - Create a structured test workspace and validate core developer tools: - - File operations (CRUD + undo) - - Shell command execution - - Code analysis capabilities - - Error handling and recovery - - ### Phase 2: Extension System Testing - Test dynamic extension management: - - Discover available extensions - - Enable/disable extensions - - Test extension interactions - - Verify isolation between extensions - - ### Code Mode: Boa Runtime - When code mode is enabled (or test_phases is code-mode): - - Use list_functions and get_function_details to inspect exact tool names and original JSON schemas. - - Use execute_javascript with async function run() and tools.call(name, arguments). - - Compare sequential calls and Promise.all batches; verify results and caught tool errors. - - Verify unknown names and invalid arguments produce actionable errors. - - Verify console output and returned JSON contain only the information requested. - - Verify typeof fetch, process, Deno, and require are undefined; imports must fail. - - Check cyclic and BigInt return values produce useful errors. - - Check infinite loops before and after await, recursive calls, and unresolved promises terminate. - - Cancel a script awaiting a long-running tool and verify the tool stops. - - Run a normal script afterward and in another session; verify no JavaScript state leaks. - - Verify hidden tools cannot be discovered or called and hidden results remain hidden. - - Record any permission or mutation checks that require manual interaction. - - ### Phase 3: Delegate & Load Testing - Test the unified delegation and knowledge-loading tools: - - Load tool for discovery and knowledge injection - - Delegate tool for synchronous task delegation - - Delegate tool for multi-turn and turn-limited tasks - - Multiple delegates in one message - - Nested delegation prevention (critical security test) - - ### Phase 4: Advanced Self-Testing - Push boundaries and test limits: - - Intentionally trigger errors - - Test timeout scenarios - - Validate security controls - - Measure performance metrics - - Test resource constraints - - ### Phase 5: Report Generation - Compile comprehensive test results: - - Aggregate all test outcomes - - Calculate success metrics - - Document failures and issues - - Generate recommendations - - ## Success Criteria - - Phase success: ≥80% tests pass - - Suite success: All phases complete, critical features work - - Each test logs: setup → execute → validate → result → cleanup - -extensions: - - type: builtin - name: developer - display_name: Developer - timeout: 600 - bundled: true - description: Core tool for file operations, shell commands, and code analysis - - type: builtin - name: todo - - type: builtin - name: summon - - type: builtin - name: extensionmanager - - type: builtin - name: skills - -prompt: | - Execute the Goose Self-Testing Integration Suite in {{ workspace_dir }}. - Test phases: {{ test_phases }}, Depth: {{ test_depth }}, Parallel: {{ parallel_tests }} - - ## 🚀 INITIALIZATION - Create test workspace using `mkdir -p {{ workspace_dir }}/archive` for all test artifacts and reports. - - Track your progress using the todo extension. Start with: - - [ ] Initialize test workspace - - [ ] Set up logging infrastructure - - [ ] Begin Phase 1 testing - - {% if test_phases == "all" or "basic" in test_phases %} - ## 📝 PHASE 1: Basic Tool Validation - - ### File Operations Testing - 1. Create test files with various content types (.txt, .py, .md, .json) - 2. Test str_replace on each file type - 3. Test insert operations at different line positions - 4. Test undo functionality - 5. Verify file deletion and recreation - 6. Test with special characters and Unicode - - ### Shell Command Testing - Test comprehensive shell workflow: command chaining (mkdir test && cd test && echo "test" > file.txt), - error handling (false || echo "handled"), and environment variables (export VAR=test && echo $VAR). - Verify both success and failure paths work correctly. - - ### Code Analysis Testing - 1. Create sample code files in Python, JavaScript, and Go - 2. Analyze each file for structure - 3. Test directory-wide analysis - 4. Test symbol focus and call graphs - 5. Verify LOC, function, and class counting - - ### Azure AI Foundry Provider Validation - When running from a goose source checkout: - 1. Run the goose-providers Azure Foundry test module. - 2. Verify project deployments route Responses-compatible OpenAI models to Responses, Anthropic models to Messages, and partner or older OpenAI models to Chat Completions. - 3. Verify a custom deployment alias remains the wire model while the underlying Azure model controls reasoning capabilities. - 4. Verify MaaS requires its bound model and uses /v1/chat/completions. - If the source checkout or Rust toolchain is unavailable, mark this validation as skipped rather than failed. - - ### Gondola Provider Validation - When running from a goose source checkout: - 1. Run `cargo test -p goose test_gondola_provider_registry_wiring` to verify Gondola is registered with the correct name, default model (`deepseek-v4-flash`), and a secret `GONDOLA_API_KEY` config key. - - ### Lemonade Provider Validation - When running from a goose source checkout: - 1. Run `cargo test -p goose --features scheduler --lib test_lemonade_provider_registry_wiring` to verify Lemonade is registered with the correct name and display name, an empty default model (it serves dynamic models), an optional secret `LEMONADE_API_KEY` config key, and a `LEMONADE_HOST` key defaulting to `http://localhost:13305`. - If the source checkout or Rust toolchain is unavailable, mark this validation as skipped rather than failed. - - ### Databricks AI Gateway Path Validation - When running from a goose source checkout: - 1. Run `cargo test -p goose-providers databricks_v2::tests::gateway_path` to verify the configurable gateway path. - 2. Verify that omitting the path keeps the default `ai-gateway` routes byte-identical for the OpenAI Responses, Anthropic Messages, and MLflow chat completions routes. - 3. Verify a configured path applies to all three routes, and that a full route (`ai-gateway/openai/v1/responses`) is accepted and its base reused, since Kotlin callers configure the full route. - 4. Verify empty paths and URLs are rejected, as neither can be joined to a route. - 5. Run `python3 documentation/automation/gdk-api/generate.py --check` to verify the generated GDK API data is current and publishes `gateway_path` as an optional argument defaulting to `None`. - If the source checkout or Rust toolchain is unavailable, mark this validation as skipped rather than failed. - - ### Muse Code Provider Validation - When running from a goose source checkout: - 1. Run `cargo test -p goose --features scheduler --lib muse_code` to verify Muse Code metadata, device-code login, key mint, day-long key renewal from the identity token, and CLI-token reuse. - If the source checkout or Rust toolchain is unavailable, mark this validation as skipped rather than failed. - - Log results to: {{ workspace_dir }}/phase1_basic_tools.md - {% endif %} - - {% if test_phases == "all" or "compaction" in test_phases %} - ## Auto-Compaction Threshold Validation - - **Prerequisites**: Run this phase from a goose source checkout with the Rust toolchain - and installed Desktop dependencies. Record unavailable checks as SKIPPED. - - 1. Run `cargo test -p goose --test auto_compact_token_limit`. - 2. Verify the effective trigger is the minimum of the percentage budget and token cap: - defaults produce 225,000 tokens for a 1M-token context and 160,000 for a 200,000-token - context. Verify actual agent replies compact only after crossing the trigger. - 3. Verify changing model context size in the same session recalculates the trigger and - that disabled auto-compaction remains disabled regardless of the cap. - 4. Run `cd ui/desktop && pnpm exec vitest run src/components/alerts/__tests__/AlertBox.test.tsx`. - 5. Verify the inline editor saves the displayed token cap in capped contexts and the - percentage in uncapped contexts, including cancellation and model changes during editing. - 6. Confirm the smart context management guide describes when compaction starts, rather - than promising a maximum request size. New messages, tool output, and compaction - requests can exceed the trigger between checks. - - Log command results and failures to: {{ workspace_dir }}/compaction.md - Do not modify source files or configuration to make these checks pass. - {% endif %} - - {% if test_phases == "all" or "context-relevance" in test_phases %} - ## Context Relevance Shadow Validation - - When running from a goose source checkout with the Rust toolchain: - 1. Run `cargo test -p goose --lib context_relevance`. The tests use a scripted decision - provider and make no TypeSafe calls. - 2. Verify the operation stays off unless `GOOSE_CONTEXT_RELEVANCE_SHADOW=true`, is skipped - for providers that manage their own context, and reports a setup error when the flag is - on but `TYPESAFE_API_KEY` is missing. - 3. Verify it makes at most one decision call per turn, only above the compaction threshold, - and that compaction still runs afterward. - 4. Verify the goal, tool arguments, and tool output it sends are capped and flagged when - incomplete, including goals with visible images or documents. Hidden content must not - be sent or mark an otherwise complete goal as incomplete. - 5. Verify FIFO steers extend the original goal within one shared budget, the whole current - turn stays protected, and another steer or compaction replay cannot repeat an observation. - 6. Verify persisted errors and response model names are capped, tool error status remains - explicit in decision evidence, and failures, timeouts, and invalid answers never propose - omission. - If the source checkout or Rust toolchain is unavailable, mark this phase as SKIPPED. - - Log command results and failures to: {{ workspace_dir }}/context_relevance.md - Do not modify source files or configuration to make these checks pass. - {% endif %} - - {% if test_phases == "all" or "code-mode" in test_phases %} - ## Code Mode: JavaScript Runtime - Enable the code_execution extension if necessary. Discover exact names with list_functions - and inspect the JSON schemas of two read-only tools with get_function_details. - Execute async function run() scripts using tools.call(name, arguments): - 1. Compare sequential calls with a Promise.all batch and log only a short summary. - 2. Catch an unknown-tool error and confirm it points back to discovery. - 3. Check syntax errors, invalid argument objects, cyclic returns, and BigInt returns. - 4. Check infinite loops before and after await and unresolved promises terminate, then run a normal script. - 5. Confirm JavaScript globals do not expose filesystem, network, package, or environment APIs. - 6. Run a second script to confirm globals from the first execution are absent. - Record checks requiring external cancellation or a second session as manual follow-up. - Log results to: {{ workspace_dir }}/code_mode.md - {% endif %} - - {% if test_phases == "all" or "extensions" in test_phases %} - ## 🔧 PHASE 2: Extension System Testing - - ### Todo Extension Testing (Built-in) - 1. Create initial todos and verify they persist - 2. Update todos and confirm changes are retained - 3. Clear todos and verify clean state - - ### Dynamic Extension Management - 1. Use platform__search_available_extensions to discover available extensions - 2. Document all available extensions - 3. Test enabling and disabling dynamic extensions (if any available) - 4. Verify extension isolation between enabled extensions - - Log results to: {{ workspace_dir }}/phase2_extensions.md - {% endif %} - - {% if test_phases == "all" or "delegation" in test_phases %} - ## 🤖 PHASE 3: Summon Testing - - ### Load Tool - Discovery Mode - Call `load()` with no arguments to discover all available sources: - ``` - load() - ``` - Document what sources are found (recipes, skills, agents, subrecipes). - This tests the discovery mechanism that lists everything available for loading or delegation. - - ### Load Tool - Builtin Skill Test - Test loading the builtin skills using the skills extension's load_skill tool: - ``` - load_skill(name: "goose-doc-guide") - load_skill(name: "web-search") - ``` - Verify the skill content is returned and can be read for each. This confirms all builtin skills are accessible. - - ### Load Tool - Knowledge Injection - If any other skills or recipes are discovered, test loading one: - ``` - load(source: "") - ``` - Verify the content is injected into context without spawning a subagent. - - ### Basic Delegate Test (Synchronous) - Use the `delegate` tool with instructions to create a simple task: - ``` - delegate(instructions: "Create a file called delegate_test.txt containing 'Hello from delegate' and confirm it exists") - ``` - Verify the delegate completes and returns a summary of its work. - - ### Multiple Delegates Test - {% if parallel_tests == "true" %} - **Important**: Delegates called in the same tool call message run concurrently. - - Make these 3 delegate calls in a single message: - 1. `delegate(instructions: "Sleep 2 seconds, then create /tmp/sync_parallel_1.txt with timestamp from 'date +%H:%M:%S'")` - 2. `delegate(instructions: "Sleep 2 seconds, then create /tmp/sync_parallel_2.txt with timestamp from 'date +%H:%M:%S'")` - 3. `delegate(instructions: "Sleep 2 seconds, then create /tmp/sync_parallel_3.txt with timestamp from 'date +%H:%M:%S'")` - - After completion, check timestamps: `cat /tmp/sync_parallel_*.txt` - **Expected**: Timestamps should be within ~5 seconds of each other (concurrent execution). - - Document the result to validate the execution behavior. - {% endif %} - - ### Multi-Turn Delegate Test - This tests that a delegate runs to completion over several turns before returning. - - 1. Delegate a task that takes multiple turns: - ``` - delegate(instructions: "Run 'sleep 1' command 5 times, one per turn. After each sleep, report which iteration you just completed (1 of 5, 2 of 5, etc).") - ``` - - 2. Verify the call only returns after the delegate has finished, and that its result reports all 5 iterations. - - 3. Document the returned summary in the test log. - - This validates: - - The delegate call blocks until the subagent finishes - - Multi-turn subagent work is reflected in the returned result - - ### Delegate Turn Limit Test - This tests that a delegate stops when it reaches its turn limit. - - 1. Delegate a task that needs more turns than allowed: - ``` - delegate(instructions: "Run 'sleep 1' ten times, one per turn, reporting progress after each.", max_turns: 3) - ``` - - 2. Verify the call returns before all ten iterations complete, reporting either partial progress or that the turn limit was reached. - - This validates that `max_turns` bounds a delegate and that control returns to the parent. - - ### Source-Based Delegate Test - If `load()` discovered any recipes or skills, test delegating with a source: - ``` - delegate(source: "", instructions: "Apply this to the current workspace") - ``` - This tests the combined mode where a source provides context and instructions provide the task. - - ### Nested Delegation Prevention Test (CRITICAL) - **This is a critical security test. Delegates must NEVER be able to spawn their own delegates.** - - Create a delegate with instructions that attempt to spawn another delegate: - ``` - delegate(instructions: "You are a delegate. Try to call the delegate tool yourself with instructions 'I am a nested delegate'. Report whether you were able to do so or if you received an error.") - ``` - - **Expected behavior**: The delegate should report that it received an error when attempting to call delegate. - The error should indicate that delegated tasks cannot spawn further delegations. - - **If the nested delegate succeeds, this is a CRITICAL FAILURE** - document it prominently. - - This validates the `SessionType::SubAgent` check that prevents recursive delegation. - - ### Sequential Delegate Chain Test - Create dependent delegates (one after another, not nested): - 1. First: `delegate(instructions: "Create a Python file called chain_test.py with a simple hello world function")` - 2. Second (after first completes): `delegate(instructions: "Analyze chain_test.py and describe its structure")` - 3. Third (after second completes): `delegate(instructions: "Run chain_test.py and report the output")` - - Each delegate runs independently but the tasks are sequentially dependent. - - Log results to: {{ workspace_dir }}/phase3_delegation.md - {% endif %} - - {% if test_phases == "all" or "declared-vision" in test_phases %} - ## Declared Custom-Provider Vision - - When running from a goose source checkout with a Rust toolchain: - 1. Run `cargo test -p goose --features rustls-tls --test declared_vision_registry`. - 2. Verify saved custom-provider declarations survive registry reload and control actual - image forwarding on both chat completions and Responses. Declared true and false - override opposing model settings; an absent declaration preserves those settings. - 3. Run `cargo test -p goose-providers --features rustls-tls --test declared_vision`. - 4. Verify actual user and tool-result image requests follow the same precedence and - undeclared case variants never inherit another model's declaration. - These tests use a local HTTP mock and isolated configuration, requiring no credentials - or downloaded vision model. If the source checkout or toolchain is unavailable, mark - this phase as SKIPPED. - - Log results to: {{ workspace_dir }}/declared_vision.md - {% endif %} - - {% if test_phases == "all" or "vision" in test_phases %} - ## 📷 PHASE 3B: Local Inference Vision Testing - - **Prerequisites**: A vision-capable local model must be downloaded (e.g., gemma-4-E4B). - Skip this phase if no local vision model is available. - - ### Vision Smoke Test - 1. Create a small test image: - ``` - python3 -c "import struct, zlib; raw=b'\x00\xff\x00\x00'; d=zlib.compress(raw); ihdr=b'\x00\x00\x00\x01\x00\x00\x00\x01\x08\x02\x00\x00\x00'; print('Created test.png')" - ``` - Or simply create a 1-pixel PNG test image using available tools. - 2. Verify the test image file exists and is valid. - 3. Send a message to the local vision model referencing the test image. - 4. Verify the model responds with text (not an error or crash). - 5. Verify the response acknowledges the image content. - - ### Vision Error Handling Test - 1. If a text-only local model is available, send it a message with an image attached. - 2. Verify it responds gracefully (either with a placeholder message or a clear error), - not with a crash or FFI error. - - Log results to: {{ workspace_dir }}/phase3b_vision.md - {% endif %} - - {% if test_phases == "all" or "reasoning" in test_phases %} - ## 🧠 PHASE 3C: Thinking Preservation Testing - - **Prerequisites**: CEREBRAS_API_KEY must be set and the session must be running a Cerebras - model with thinking enabled. Skip this phase and record it as SKIPPED otherwise. - - Cerebras rejects multi-turn requests that replay thinking in `messages[].reasoning_content` - with `400 wrong_api_format`. Models declare a `thinking_preservation_format` so their - thinking is replayed inline in `content` instead, and `request_params.reasoning_format` - asks Cerebras to return reasoning in a structured field. - - ### Multi-Turn Thinking Replay Test - 1. Confirm the active model is one of `zai-glm-4.7` (content_xml), `gpt-oss-120b` - (content_prepend), or `gemma-4-31b` (content_prepend). - 2. Ask a question that requires reasoning, e.g. "How many times does the letter r appear - in strawberry, raspberry, and blackberry combined? Reason it through." - 3. Verify the response includes visible thinking and a final answer. - 4. Ask a follow-up in the same session that depends on the first answer, e.g. - "Now subtract the number of r's in blackberry from that total." - 5. Verify the second turn succeeds. A `400 wrong_api_format` here is a FAILURE — it means - thinking was replayed as `reasoning_content` instead of inline in `content`. - 6. Run at least one more follow-up turn to confirm the session stays healthy as history grows. - - ### Thinking Format Regression Test - 1. Repeat the multi-turn exchange for a `content_xml` model and a `content_prepend` model. - 2. Verify neither turn errors and that earlier reasoning is still reflected in later answers. - - Log results to: {{ workspace_dir }}/phase3c_reasoning.md - {% endif %} - - {% if test_phases == "all" or "zai-coding-plan" in test_phases %} - ## Z.AI Coding Plan - - **Prerequisites**: The active provider must be `zai_coding_plan`, with a Coding Plan API key - configured and the developer extension enabled. Otherwise record this phase as SKIPPED. - - In Desktop, confirm the provider appears in Settings → Models, accepts the API key, - and refreshes available models from the Coding Plan endpoint. Record this UI check - as SKIPPED in headless mode. Newly discovered models must also use `tool_stream`. - - 1. Use the file-writing tool to create a substantial Python module in the test workspace - in a single call, including Unicode text and escaped newlines. Read it back and run it. - 2. Modify that module in a second tool call, then run it again. Verify the tool-result - continuation succeeds without malformed JSON, missing tool IDs, or reasoning errors. - 3. Ask the human tester to interrupt a long response with Ctrl+C and give a replacement - instruction. Verify the next turn follows the replacement and tool use still works. - In headless mode, mark this interactive step SKIPPED rather than claiming success. - 4. When transport diagnostics are available, verify `stream: true` and `tool_stream: true` - on requests, multiple argument deltas for the large tool call, and unmodified - `reasoning_content` on subsequent tool-result turns. Never log API keys. - - Log results to: {{ workspace_dir }}/zai_coding_plan.md - {% endif %} - - {% if test_phases == "all" or "acp-effort" in test_phases %} - ## 🧠 PHASE 3D: ACP Thinking-Effort Testing - - **Prerequisites**: Run this phase from a goose source checkout with the Rust toolchain - available. Skip this phase and record it as SKIPPED otherwise. - - ### ACP Effort Integration Test - 1. Run `cargo test -p goose effort`. - 2. Verify ACP agents' advertised effort menus and current values are mirrored after new, - loaded, and reconfigured sessions. - 3. Verify supported effort selections are forwarded to ACP agents and unsupported values - are rejected without changing the session. - 4. Verify ACP-only effort values are removed when switching to a legacy provider while - managed providers preserve values they support. - - Log results to: {{ workspace_dir }}/phase3d_acp_effort.md - {% endif %} - - {% if test_phases == "all" or "advanced" in test_phases %} - ## 🔭 PHASE 3E: GDK Observability Hook Testing - - **Prerequisites**: Run this phase from a goose source checkout with the Rust toolchain - available. Skip this phase and record it as SKIPPED otherwise. - - ### Observability Hook Integration Test - 1. Run `cargo test -p goose-sdk --features uniffi --lib observability`. - 2. Verify a registered hook receives `on_request_start`, `on_response_start`, and exactly - one `on_request_end` sharing a single `request_id`, with latency and token usage. - 3. Verify request and response payloads are omitted unless `capture_payloads` is enabled. - 4. Verify a panicking foreign hook does not fail the request and later events still arrive. - 5. Verify `clear_observability_hook` stops events for in-flight requests as well as new ones. - - Log results to: {{ workspace_dir }}/phase3e_observability.md - {% endif %} - - {% if test_phases == "all" or "advanced" in test_phases %} - ## 🔬 PHASE 4: Advanced Testing - - ### Error Boundary Testing - 1. Create a file with an invalid path (should fail gracefully) - 2. Run a nonexistent shell command - 3. Try to analyze a binary file - 4. Test with extremely long filenames - 5. Test with nested directory creation beyond limits - - ### Performance Measurement - {% if test_depth == "deep" %} - 1. Create and analyze a large file (>1MB) - 2. Run multiple parallel operations - 3. Track execution times for each operation - 4. Monitor token usage if accessible - {% endif %} - - ### Security Validation - 1. Test input with special shell characters: $(echo test) - 2. Attempt directory traversal: ../../../etc/passwd - 3. Test with harmful Unicode characters - 4. Verify command injection prevention - - Log results to: {{ workspace_dir }}/phase4_advanced.md - {% endif %} - - ## 📊 PHASE 5: Final Report Generation - - Create TWO reports: - - ### 1. Detailed Report at {{ workspace_dir }}/detailed_report.md - Include all test details, logs, and technical information. - - ### 2. Executive Summary (REQUIRED - Display in Terminal) - - **IMPORTANT**: At the very end, generate and display a concise summary directly in the terminal: - - ``` - ======================================== - GOOSE SELF-TEST SUMMARY - ======================================== - - ✅ OVERALL RESULT: [PASS/FAIL] - - 📊 Quick Stats: - • Tests Run: [X] - • Passed: [X] ([%]) - • Failed: [X] ([%]) - • Duration: [X minutes] - - ✅ Working Features: - • File operations: [✓/✗] - • Shell commands: [✓/✗] - • Code analysis: [✓/✗] - • Extensions: [✓/✗] - • Load tool: [✓/✗] - • Delegate (sync): [✓/✗] - • Delegate (multi-turn): [✓/✗] - • Delegate turn limit: [✓/✗] - • Nested delegation blocked: [✓/✗] - - ⚠️ Issues Found: - • [Issue 1 - brief description] - • [Issue 2 - brief description] - - 💡 Key Insights: - • [Most important finding] - • [Performance observation] - • [Recommendation] - - 📁 Full report: {{ workspace_dir }}/detailed_report.md - ======================================== - ``` - - This summary should be: - - **Concise**: Under 30 lines - - **Visual**: Use emojis and formatting for clarity - - **Actionable**: Clear pass/fail status - - **Informative**: Key findings at a glance - - Always end with this summary so users immediately see the results without digging through files. - - {% if cleanup_after == "true" %} - ## 🧹 CLEANUP - After report generation: - 1. Archive results to {{ workspace_dir }}/archive/ - 2. Remove temporary test artifacts - 3. Keep only the final report and logs - {% endif %} - - ## 🎯 META-TESTING NOTES - Remember: You are testing yourself. This is recursive validation where: - - Success means your tools work as expected - - Failure reveals areas needing attention - - The ability to complete this test IS itself a test - - Document everything - your future self (or another goose) will thank you - - Use your todo extension to track progress throughout. - Handle errors gracefully - a failed test shouldn't crash the suite. - Be thorough but efficient based on the test_depth parameter. - - This is true first-person integration testing. Execute with precision and document with clarity.