refactor(search): type repository, user, org and commit search tools - #3395
Draft
SamMorrowDrums wants to merge 1 commit into
Draft
SamMorrowDrums wants to merge 1 commit into
SamMorrowDrums wants to merge 1 commit into
Conversation
Preserve legacy text and search semantics while publishing protocol-gated concrete structured outputs. Cover modern, legacy, and unknown clients, full repository JSON unions, defaults, IFC labels, and errors. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
SamMorrowDrums
added this pull request to stack #3385
October 2, 2026 14:07
6 of 13 tasks
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
Migrate exactly
search_repositories,search_users,search_orgs, andsearch_commitsto concrete typed inputs and outputs. This draft is a focused layer above #3394; native stack registration is left to the coordinator.Why
Continue the protocol-gated typed read/search migration without changing legacy text responses or search semantics.
Fixes # N/A — migration layer above #3394, not an issue-closing change.
What changed
NewTool[In, Out]registration and shared pagination/schema helpers, preserving legacy coercion, zero/default pagination, type qualifiers, sanitization, errors, scopes, IFC labels, and repository minimal/full output selection.map[string]any; test upstream field coverage and absence of untyped output fields.2026-07-28), legacy (2025-11-25), and unknown-protocol list/call coverage, byte-exact text assertions, success/empty/error cases, schema Resolve and actual structured output validation. Update relevant snapshots.MCP impact
Modern negotiated clients receive concrete output schemas and validated structured content. Legacy/unknown clients retain text and see neither; input schema definitions and legacy text ordering are unchanged.
Prompts tested (tool changes only)
query: "repo:owner/repo fix"; verify default and string/numeric-zero pagination and nonzero string coercion.query: "type:org (location:seattle OR location:california)"verify that an existing type qualifier is not duplicated.minimal_output: false/true, recursive custom properties, empty responses, and errors; user/org sparse profiles and commit metadata/IFC labels.Security / limits
Existing public-read and
read:orgscope requirements are unchanged; client/API failures remain tool errors.Preserve compact default responses, explicit full repository output, existing sanitization, and IFC metadata. No new fields are exposed beyond existing full output.
Tool renaming
deprecated_tool_aliases.goNote: 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/lintscript/lint: passed,0 issues../script/testscript/test: passed (go test -race ./...);pkg/githubreportedokin140.083s.Additional validation:
UPDATE_TOOLSNAPS=true go test ./...: passed;pkg/githubreportedokin16.065s.go test ./pkg/github -run 'TestTypedAccountRepositorySearch|TestSearchRepositoryOutputCoversUpstreamFields|TestSearchPropertyValueJSONUnion|TestSearchOutputsHaveNoUntypedFields' -count=1: passed (0.343s).script/generate-docs: passed; reported successful updates to README and remote-server/insiders-features/feature-flags/tool-renaming docs, with no resulting documentation diff.git diff --check: passed.The final required sequence was
script/lint→script/test→script/generate-docs→git diff --check, all exit 0. Live E2E tests were not run (require a GitHub PAT).Parent verification: original local/live #3394 head was
83955ca85c929687a0630503dcc061b1b9af4537; synchronized before edits to the license-bot commita6b1d6931d0f2e20c62f6fe6b03b1416a5acc93d. That parent delta changes only three license files (3 insertions, 3 deletions). Final merge-base is exactlya6b1d6931d0f2e20c62f6fe6b03b1416a5acc93d; the only layer commit isc918f4b7b9f570f468e7b4566e2392acd2f1b44c, touching eight search implementation/test/snapshot files. License-bot commit is unchanged. Signing failed with1Password: failed to fill whole buffer; retried using command-localgit -c commit.gpgsign=false commitonly.Docs
Documentation generation completed and produced no content changes.