[Java] Add replay-proxy E2E coverage for inline lambda-defined tools#1881
Conversation
Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
…-test' into copilot/add-java-e2e-integration-test Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
Cross-SDK Consistency Review ✅This PR adds E2E replay-proxy coverage for Java's SummaryNo cross-SDK consistency issues found. All six SDK implementations already provide their own language-idiomatic ergonomic tool definition patterns:
All SDKs have equivalent mechanisms for defining tools inline without manually constructing raw JSON schema maps. The Minor observationThe class-level Javadoc for /**
* Failsafe integration test for the ergonomic {`@code` `@CopilotTool`} +
* {`@code` ToolDefinition.fromObject()} API.Now that the class also covers the Reviewed for cross-SDK API consistency across Node.js, Python, Go, .NET, Java, and Rust implementations.
|
There was a problem hiding this comment.
Pull request overview
Adds Java failsafe E2E coverage to validate the inline/lambda ToolDefinition.from(...) + Param.of(...) tool-definition path against the replay proxy, ensuring it produces the same end-to-end behavior (and snapshot compatibility) as the existing annotation-based ergonomic tool API.
Changes:
- Extends
ErgonomicToolDefinitionITwith a newlambdaToolDefinition()integration test that defines tools inline usingToolDefinition.from(...)andParam.of(...). - Asserts both assistant-visible output (phase + search results) and an in-process side effect (
currentPhasemutation) during the session. - Marks Phase 4.5 (“E2E integration test”) complete in the implementation plan checklist.
Show a summary per file
| File | Description |
|---|---|
java/src/test/java/com/github/copilot/e2e/ErgonomicToolDefinitionIT.java |
Adds a new replay-proxy-backed E2E test covering inline lambda-defined tools via ToolDefinition.from(...) + Param.of(...). |
1810-java-tool-ergonomics-tool-as-lambda-remove-before-merge/1810-ignorance-reduction-for-implementation-plan.md |
Updates the Phase 4.5 checklist item to completed. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Low
53d3282
into
edburns/1810-java-tool-ergonomics-tool-as-lambda
…1881) * Initial plan * Add Java lambda-based E2E tool definition coverage Co-authored-by: edburns <75821+edburns@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
…1881) * Initial plan * Add Java lambda-based E2E tool definition coverage Co-authored-by: edburns <75821+edburns@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
This change covers Phase 4.5 of the Java tool-as-lambda work by adding real-session E2E validation for inline lambda-defined tools against the replay proxy. It verifies both assistant-visible behavior and in-session tool side effects while following the existing snapshot-reuse strategy.
E2E coverage: inline lambda tool definitions
ErgonomicToolDefinitionITwithlambdaToolDefinition().ToolDefinition.from(...)+Param.of(...)(no annotation-processor path).Behavior asserted in-session
currentPhase) mutates to"analyzing"during the session.Snapshot strategy + plan bookkeeping
tools/ergonomic_tool_definitionsnapshot (no newtest/snapshots/tools/*YAML needed).