feat(issues): add protocol-gated typed consolidated issue tools - #3393
Draft
SamMorrowDrums wants to merge 4 commits into
Draft
SamMorrowDrums wants to merge 4 commits into
SamMorrowDrums wants to merge 4 commits into
Conversation
SamMorrowDrums
added this pull request to stack #3385
October 2, 2026 13:27
8 of 13 tasks
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
force-pushed
the
sammorrowdrums-typed-consolidated-issue-tools
branch
from
October 2, 2026 20:50
c3f5817 to
99cd27e
Compare
Auto-generated by license-check workflow
Contributor
|
…ums-typed-consolidated-issue-tools Content-free merge so GitHub recomputes mergeability against the current parent head. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Auto-generated by license-check workflow
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Explicit structured output can bypass schema validation, and null wire-presence coverage is incomplete.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Adds protocol-gated typed contracts and structured outputs for consolidated issue tools while preserving legacy responses.
Changes:
- Adds typed issue read/write and sub-issue schemas, normalization, and outputs.
- Preserves explicit awaiting-form statuses and expands protocol/schema tests.
- Updates snapshots, error-handling documentation, and license metadata.
| File | Description |
|---|---|
third-party-licenses.windows.md |
Updates Windows architecture license groups. |
pkg/inventory/typed_output.go |
Preserves explicit structured error outputs. |
pkg/inventory/typed_output_test.go |
Tests protocol gating and input requests. |
pkg/github/typed_consolidated_issue_outputs_test.go |
Tests issue tool contracts and outputs. |
pkg/github/typed_consolidated_issue_enrichment_test.go |
Tests enrichment and lockdown filtering. |
pkg/github/issues.go |
Migrates consolidated issue tools to typed handlers. |
pkg/github/consolidated_issue_types.go |
Defines typed contracts and schemas. |
pkg/github/__toolsnaps__/issue_write.snap |
Updates the issue-write schema snapshot. |
pkg/github/__toolsnaps__/issue_write_typed.snap |
Adds the modern typed snapshot. |
docs/error-handling.md |
Documents typed output and status behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+137
to
+140
| if metadata.explicitOutput != nil { | ||
| // The SDK may replace a handler's explicit status with | ||
| // its serialized typed output, including an error zero. | ||
| resultCopy.StructuredContent = metadata.explicitOutput |
Comment on lines
+83
to
+84
| // A JSON null is a real success for get_sub_issues, not an error. | ||
| assert.JSONEq(t, text, mustMarshalJSON(t, result.StructuredContent)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Add concrete Go input/output contracts to
IssueRead,IssueWrite, andSubIssueWrite, exposing accurate output schemas and structured content for protocol2026-07-28and 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-toolsat verified base7e864d1e6c4eaadc2050c9d7d973d123471e4ea8(ancestor7b0c05e0eae079b0a973d44ea73f6244a491b2a0).What changed
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.InputRequests. Updated error-handling documentation.MCP impact
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:
Security / limits
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
deprecated_tool_aliases.goTool 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
./script/lint./script/testValidation 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
Updated
docs/error-handling.mdwith protocol-gated typed output, explicit awaiting statuses, and unchanged multi-round-trip semantics. Generated docs were refreshed and required no changes.