Skip to content

ABORTED [Java] Tool-as-lambda 4.3: Implement schema + coercion internals for Param<T> #1841

Description

@edburns

Base branch: Create your PR targeting edburns/1810-java-tool-ergonomics-tool-as-lambda (not main).

Requirement: When you open the PR, the very first thing you put in the description must be Fixes #1841 where the issue number is this issue for which the PR aims to implement the work.


Overview

Implement Phase 4.3 of #1810: build the internal schema/coercion layer that maps Param<T> metadata and invocation arguments to runtime behavior.

Before coding

  • Do not start any implementation work until this issue is explicitly assigned to the coding agent.
  • Base branch for this work: edburns/1810-java-tool-ergonomics-tool-as-lambda.
  • Read this plan file on the branch before coding: 1810-java-tool-ergonomics-tool-as-lambda-remove-before-merge/1810-ignorance-reduction-for-implementation-plan.md

Ordering rule (important)

This issue starts only after 4.2 is merged; all Phase 4 issues are completed in listed order.

Relevant Phase 3 resolutions to apply

  • 3.4 type mapping scope: support exactly the existing Java schema/tool parameter-type surface; no new schema semantics.
  • 3.5 coercion policy: reuse the existing ObjectMapper conversion policy (do not invent bespoke conversion paths that diverge from existing behavior).
  • 3.7 validation boundaries: validate at construction time, including duplicate parameter names and unsupported mappings, with precise exceptions.
  • 3.8 package boundaries: place user-visible vs internal helpers appropriately; do not leak internal-only types.

Scope / deliverables

  1. Implement internal helper(s) (likely under java/src/main/java/com/github/copilot/tool/) that:
    • produce JSON schema from declared Param<T> metadata
    • coerce invocation arguments into typed lambda arguments consistently
  2. Ensure behavior aligns with baseline contract verified in Phase 2 and consumed by 4.2 overloads.

Gating criteria

  • Internal mapping/coercion behavior matches existing Java tool behavior contract.
  • Clear failure messages for invalid definitions.

Constraints

IMPORTANT: you must run mvn spotless:apply in the java directory before every commit.

  • Keep scope limited to internals for schema/coercion.
  • Do not broaden supported type semantics beyond existing pipeline.

Completion bookkeeping

When complete, update the checkbox for Phase 4.3 in:
1810-java-tool-ergonomics-tool-as-lambda-remove-before-merge/1810-ignorance-reduction-for-implementation-plan.md

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions