Skip to content

feat(issues): add typed metadata, comment, and dependency outputs - #3391

Draft
SamMorrowDrums wants to merge 2 commits into
sammorrowdrums-type-repository-toolsfrom
sammorrowdrums-type-core-issue-tools
Draft

SamMorrowDrums wants to merge 2 commits into
sammorrowdrums-type-repository-toolsfrom
sammorrowdrums-type-core-issue-tools

Conversation

@SamMorrowDrums

Copy link
Copy Markdown
Collaborator

Summary

Migrate seven issue metadata, comment, dependency, and duplicate-detection tools to concrete NewTool[In, Out] DTOs. Modern protocol clients receive validated output schemas and structured content; legacy and unknown clients retain byte-exact text without structured output.

Why

Stacked directly on #3389 (sammorrowdrums-type-repository-tools) as the next bounded typed MCP migration layer. No issue is automatically closed.

What changed

  • Type ListIssueTypes, ListIssueFields, AddIssueComment, UpdateIssueComment, IssueDependencyRead, IssueDependencyWrite, and FindDuplicate; retain API errors, scopes, feature gates, IFC labels, projections, and exported dependency-helper signatures.
  • Preserve numeric-string coercions and optional-value presence at the compatibility boundary. Duplicate pagination retains API-owned defaults and explicitly supplied zeros; dependency pagination retains its existing defaults.
  • Model single comment/reaction references and combined comment-plus-reaction results with an explicit closed union schema. The nullable zero union accommodates SDK error serialization and is removed from error wire results by the existing protocol middleware.
  • Add modern/legacy/unknown tool-list and call contracts, exact text assertions, output-schema conformance, rejection of partial comment unions, and byte-exact REST/GraphQL API-error contracts. Update tool snapshots and protocol documentation.
  • Keep ListIssues unchanged because it is already typed on the base. Defer the larger IssueRead, IssueWrite, and SubIssueWrite migrations to a separate layer, as agreed with the coordinator. Do not modify stack metadata.

MCP impact

  • No tool or API changes
  • Tool schema or behavior changed
    • Protocol 2026-07-28 and newer expose typed outputSchema and successful structuredContent for these seven tools; older/unknown protocols omit both. Errors omit structured content. Duplicate pagination schemas now permit explicit zero values to preserve existing handler behavior.
  • New tool added

Prompts tested (tool changes only)

  • Deterministic mocked MCP calls, not live GitHub prompts: list repository/organization issue types and single-select field definitions; add a comment, reaction, both, or a comment-targeted reaction; update a conversation comment.
  • Deterministic mocked MCP calls: list blockers/blocking issues, add/remove blocked-by relationships with uppercase legacy inputs, find duplicates with omitted parameters or explicit zero pagination/threshold, and handle invalid inputs/API errors without structured success output.

Security / limits

  • No security or limits impact
  • Auth / permissions considered
    • Existing scope access and dependency/duplicate feature gates are unchanged; existing permission tests pass.
  • Data exposure, filtering, or token/size limits considered
    • Existing minimal references, field definitions, repository visibility labels, and text shapes are preserved. No broader API payloads are exposed by structured output.

Tool renaming

  • I am renaming tools as part of this PR (e.g. a part of a consolidation effort)
    • I have added the new tool aliases in deprecated_tool_aliases.go
  • I am not renaming tools as part of this PR

Note: if you're renaming tools, you must add the tool aliases. For more information on how to do so, please refer to the official docs.

Lint & tests

  • Linted locally with ./script/lint
    • script/lint — passed, 0 issues.
  • Tested locally with ./script/test
    • script/test — passed, full go test -race ./... suite.
    • UPDATE_TOOLSNAPS=true go test ./... — passed; intentional issue snapshots updated.
    • script/generate-docs — passed; generated sections unchanged.
    • git diff --check — passed.
    • Live PAT-dependent e2e tests were not run; deterministic REST/GraphQL and protocol contract tests cover the migration.

Docs

  • Not needed
  • Updated (README / docs / examples)
    • README documents protocol-gated structured output for the migrated issue tools. Generated documentation was refreshed.

@SamMorrowDrums
SamMorrowDrums added this pull request to stack #3385 October 2, 2026 12:23
SamMorrowDrums and others added 2 commits October 2, 2026 14:37
Preserve legacy text and argument coercions while exposing protocol-gated structured issue outputs. Add modern, legacy, unknown-version, union-schema and API-error contracts.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Auto-generated by license-check workflow
@SamMorrowDrums
SamMorrowDrums force-pushed the sammorrowdrums-type-core-issue-tools branch from 88a63ee to 7b0c05e Compare October 2, 2026 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant