Skip to content

feat(issues): add protocol-gated typed consolidated issue tools - #3393

Draft
SamMorrowDrums wants to merge 1 commit into
sammorrowdrums-typed-repository-toolsfrom
sammorrowdrums-typed-consolidated-issue-tools
Draft

SamMorrowDrums wants to merge 1 commit into
sammorrowdrums-typed-repository-toolsfrom
sammorrowdrums-typed-consolidated-issue-tools

Conversation

@SamMorrowDrums

Copy link
Copy Markdown
Collaborator

Summary

Add concrete Go input/output contracts to IssueRead, IssueWrite, and SubIssueWrite, exposing accurate output schemas and structured content for protocol 2026-07-28 and newer while preserving legacy text and exported raw-result helper signatures. Preserve explicit MCP App awaiting statuses for modern clients without exposing SDK-generated error fallbacks.

Why

Next file-focused typed MCP stack layer; no linked issue. This draft targets sammorrowdrums-typed-repository-tools at verified base 7e864d1e6c4eaadc2050c9d7d973d123471e4ea8 (ancestor 7b0c05e0eae079b0a973d44ea73f6244a491b2a0).

What changed

  • Typed all five issue-read methods (get, get_comments, get_sub_issues, get_parent, get_labels), issue create/update including atomic parent creation, and sub-issue add/remove/reprioritize. Strict output unions retain actual empty/null response shapes and exact JSON text ordering.
  • Added typed custom-field scalars, mutation optionality coverage, modern/legacy/unknown wire tests, strict schema conformance checks, enriched/lockdown output checks, and six scoped tool snapshots.
  • Added a generic inventory distinction between explicitly supplied structured statuses and SDK-generated zero/error output, with regression coverage for protocol gating, output validation, and unchanged InputRequests. Updated error-handling documentation.

MCP impact

  • No tool or API changes
  • Tool schema or behavior changed
  • New tool added

Modern clients receive concrete output schemas and matching structured content; older/unknown protocols retain the original text without output schemas or structured content. Existing exported helper APIs, scopes, feature gates, sanitization, IFC labeling, and lockdown filtering are preserved.

Prompts tested (tool changes only)

Mocked MCP wire equivalents, not live GitHub calls:

  • "Get issue 1, its comments, sub-issues, parent, and labels."
  • "Create an issue under parent issue 7."
  • "Update an issue, clear its labels/assignees/type, and set its text, number, date, and single-select fields."
  • "Clear the last custom field on an issue."
  • "Reopen an issue, close it as completed/not planned, or close it as a duplicate."
  • "Add or remove a sub-issue, or reorder it before/after another sub-issue."
  • "Open the issue form, wait for submission, then execute the submitted create/update."

Security / limits

  • No security or limits impact
  • Auth / permissions considered
  • Data exposure, filtering, or token/size limits considered

Existing scope requirements and feature rules remain unchanged. Structured responses use the same sanitized, lockdown-filtered Go responses as the text path; unsafe hierarchy/closing references remain omitted. API/validation errors do not expose generated success-shaped output; explicit awaiting statuses retain their stop signal and reason.

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

Tool names and aliases are unchanged.

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
  • Tested locally with ./script/test

Validation completed:

  • UPDATE_TOOLSNAPS=true go test ./... — passed; scoped snapshots regenerated, unrelated terminal-newline drift excluded.
  • script/lint — passed, 0 issues.
  • script/test — passed (go test -race ./...).
  • script/generate-docs — passed; generated documentation remained unchanged.
  • git diff --check — passed.

Live PAT-backed e2e tests were not run. Contract tests use real in-memory MCP transports and mocked REST/GraphQL responses, including every scoped method, state variants, empty/null responses, errors, mutation optionality, custom fields, awaiting forms, and lockdown-filtered enrichment.

Docs

  • Not needed
  • Updated (README / docs / examples)

Updated docs/error-handling.md with protocol-gated typed output, explicit awaiting statuses, and unchanged multi-round-trip semantics. Generated docs were refreshed and required no changes.

Preserve raw helper APIs and exact legacy text while exposing concrete output unions for modern protocols. Retain explicit awaiting statuses and real null responses without exposing SDK-generated error fallbacks.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@SamMorrowDrums
SamMorrowDrums added this pull request to stack #3385 October 2, 2026 13:27
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