Add Go low-level tool-definition E2E test [2/6]#1724
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a Go E2E subtest that exercises the shared tools/low_level_tool_definition.yaml snapshot by defining the two custom tools the snapshot calls (set_current_phase, search_items) and validating the final assistant response.
Changes:
- Add a new Go E2E subtest
low_level_tool_definitionunderTestToolsE2E. - Define two custom tools used by the snapshot and assert phase + result content in the final assistant message.
Show a summary per file
| File | Description |
|---|---|
| go/internal/e2e/tools_e2e_test.go | Adds the new low_level_tool_definition Go E2E scenario using the shared replay snapshot and custom tool definitions. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 2
| currentPhase := "" | ||
|
|
||
| setCurrentPhaseTool := copilot.DefineTool("set_current_phase", "Sets the current phase of the agent", | ||
| func(params PhaseArgs, inv copilot.ToolInvocation) (string, error) { | ||
| currentPhase = params.Phase | ||
| return "Phase set to " + params.Phase, nil | ||
| }) | ||
|
|
||
| searchItemsTool := copilot.DefineTool("search_items", "Search for items by keyword", | ||
| func(params SearchArgs, inv copilot.ToolInvocation) (string, error) { | ||
| if params.Keyword != "copilot" { | ||
| t.Fatalf("Expected keyword to be 'copilot', got %q", params.Keyword) | ||
| } | ||
| return "Found: item_alpha, item_beta", nil | ||
| }) |
| if currentPhase != "analyzing" { | ||
| t.Errorf("Expected currentPhase to be 'analyzing', got %q", currentPhase) | ||
| } |
This comment has been minimized.
This comment has been minimized.
Cross-SDK Consistency Review ✅This PR is part of a deliberate 6-PR breakout sequence and maintains cross-SDK consistency well. Coverage status across all SDKs:
Observations:
No cross-SDK consistency issues found in this PR.
|
Summary
Adds the Go low-level tool-definition E2E scenario to
go/internal/e2e/tools_e2e_test.goas part of the PR-1692 breakout sequence.This PR is related to issue #1682 but does not fix #1682.
What changed
low_level_tool_definitioncoverage in Go E2E tests.test/snapshots/tools/low_level_tool_definition.yamlset_current_phase,search_items).Dependency / sequencing
Related