Skip to content

Improve size-limit handling for pinned repository searches - #63

Merged
Changyong Gong (chagong) merged 1 commit into
mainfrom
chagong-repository-search-limits
Nov 10, 2026
Merged

Changyong Gong (chagong) merged 1 commit into
mainfrom
chagong-repository-search-limits

Conversation

@chagong

Copy link
Copy Markdown
Collaborator

Summary

  • Give internal search-tree metadata a separate 1-MiB transport budget without raising the 100,000-byte model-result cap or changing other response limits.
  • Add an optional pinned-search path for an exact file or directory subtree. Resolve it through bounded, nonrecursive trees at the immutable commit instead of fetching the recursive root inventory for scoped searches.
  • Preserve the 64-file, 256-KiB content, and 60-second scan caps, public-visibility checks, explicit skipped-content reporting, and fail-closed behavior. Return the searched scope and direct inventory-limit recovery toward a narrower path, not a smaller result page.
  • Update the MCP schema, tool documentation, and change-analysis guidance, with regressions for metadata-size mismatches, scope resolution, pagination, budgets, and visibility changes.

Built on merged #62; the SDK-qualified MCP permission fix is unchanged.

Validation

  • Passed 55 repository-search tests, 261 isolated MCP tests, 3 documentation-contract tests, 5 agent-prompt tests, and 17 team-memory instruction tests (341 total), plus syntax and diff checks.
  • Replayed captured public GitHub responses from microsoft/vscode-java-pack at commit 1898fa28d4cf1e1f364a879af206d7ce84b0817a through the real MCP server. The root tree reproduced the 118,674-byte transport / 124,096-byte serialized mismatch and now reaches the retained 64-file limit instead of being rejected as an oversized model result. Scoped src/daemon searches returned seven matching files with pinned pagination; an exact-file search also succeeded. These are new verification queries, not recovered incident arguments.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the scoped repository-search and tree-metadata budget changes.

No open issues 🎉

What changed in this PR

This PR improves IssueLens’s pinned repository searches by separating internal tree-metadata limits from model-result limits and allowing searches within an exact file or directory subtree.

Changes:

  • Adds a 1-MiB internal tree-response budget while retaining existing model-result and scan caps.
  • Introduces optional pinned-search path scoping, with explicit scope reporting and narrower-path recovery guidance.
  • Updates tool documentation and adds regressions for scope resolution, pagination, size limits, and public-visibility checks.
File Description
tests/​test_repository_search.py Adds scoped-search, metadata-budget, validation, and pagination regressions.
skills/​change-analysis/​SKILL.md Explains scoped recovery and preservation of scope across pages.
github_app_mcp/​tests/​test_server.py Tests schema discovery, input validation, and argument forwarding.
github_app_mcp/​tests/​test_public_access.py Tests visibility enforcement throughout scoped searches.
github_app_mcp/​src/​issuelens_github_mcp/​server.py Exposes path, constrains pagination, and documents search limits.
github_app_mcp/​src/​issuelens_github_mcp/​github.py Implements pinned scope resolution and separate tree-metadata budgeting.
github_app_mcp/​README.md Documents scope semantics, limits, and recovery options.

Review effort: Balanced

@chagong
Changyong Gong (chagong) merged commit b9de052 into main Nov 10, 2026
8 checks passed
@chagong
Changyong Gong (chagong) deleted the chagong-repository-search-limits branch November 10, 2026 03:20
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.

2 participants