Skip to content

Optimize large PR change analysis - #58

Merged
Changyong Gong (chagong) merged 2 commits into
mainfrom
chagong-issuelens-telemetry-errors
Oct 19, 2026
Merged

Changyong Gong (chagong) merged 2 commits into
mainfrom
chagong-issuelens-telemetry-errors

Conversation

@chagong

Copy link
Copy Markdown
Collaborator

Summary

  • add a patch-free pull request file manifest tool that projects REST metadata before the model-result limit
  • require an explicit component/evidence plan before reading patches or source
  • prefer pinned source reads and bounded five-file patch groups instead of one file per model turn
  • preserve anonymous reads for public repositories without an IssueLens App installation

Why

The #57 team-memory run forced 23 separate list_pull_request_files(per_page=1) model turns. Repeatedly replaying the growing conversation drove the 125k TPM deployment into likely throttling. For the same PR, the new manifest returns all 23 file entries in one approximately 13 KB model payload rather than 23 patch-bearing discovery turns.

This follows GitHub Copilot code review's published large-PR pattern: make an explicit plan, explore relevant repository files with tools, and capture findings while reading rather than deferring all reasoning until the end.

Validation

  • 244 MCP tests passed
  • 404 runnable application tests passed
  • Python compilation passed
  • git diff --check passed
  • live GitHub verification confirmed PR Add atomic wiki page patching #57's 23-file REST response projects from about 79 KB to about 13 KB without patches

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.

🟡 Changes recommended

Manifest pagination can advertise an invalid continuation page, and the new tool lacks telemetry classification.

2 open issues
What changed in this PR

Optimizes IssueLens large-PR analysis by separating compact file discovery from targeted evidence reads, reducing repeated patch content in model conversations.

Changes:

  • Adds a patch-free PR manifest tool with bounded responses and anonymous public-repository fallback.
  • Updates agents to plan evidence reads before inspecting pinned source or bounded patch groups.
  • Extends tool registration, tests, and documentation.
File Description
tests/​test_team_memory_push.py Checks updated batch-analysis instructions.
tests/​test_team_memory_instructions.py Updates the maintenance tool allowlist expectation.
tests/​test_team_memory_coordinator.py Checks manifest-first coordinator requests.
tests/​test_mcp_tool_documentation.py Adds manifest permission expectations.
tests/​test_agent_prompts.py Checks evidence-planning guidance.
skills/​change-analysis/​SKILL.md Defines manifest-first analysis and bounded evidence reads.
main.py Allows the maintenance agent to use manifests.
github_app_mcp/​tests/​test_stdio.py Updates expected tool discovery.
github_app_mcp/​tests/​test_server.py Tests manifest schema and argument forwarding.
github_app_mcp/​tests/​test_github.py Tests projection, pagination, validation, and anonymous fallback.
github_app_mcp/​src/​issuelens_github_mcp/​server.py Exposes the manifest tool.
github_app_mcp/​src/​issuelens_github_mcp/​github.py Implements manifest retrieval and metadata projection.
github_app_mcp/​README.md Documents manifest usage and limits.
docs/​guide.md Explains planned evidence retrieval.
agents/​triage.md Adopts manifest-first investigation.
agents/​team-memory.md Requires evidence planning for maintenance.
agents/​plan.md Updates planning evidence guidance.
agents/​issuelens.md Describes the revised analysis workflow.
.github/​copilot-instructions.md Updates architecture documentation.
.github/​actions/​issuelens/​issuelens_action.py Generates manifest-first batch requests.

Review effort: Balanced

Comment thread github_app_mcp/src/issuelens_github_mcp/github.py Outdated
Comment thread main.py
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

Static review identified no blocking issues, and focused regression coverage addresses the new tool and its integrations.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@chagong
Changyong Gong (chagong) merged commit f532e9c into main Oct 19, 2026
8 checks passed
@chagong
Changyong Gong (chagong) deleted the chagong-issuelens-telemetry-errors branch October 19, 2026 08: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