Repository navigation
✅⑨ [3596 by Claude Opus 5.5] MCP: get_current_activity and get_recent_activity silently cover only the first 20 repositories - #3613
Conversation
…sitory in the grant, up to 100. Grants can't hold more than 100 repositories, so in practice that's all of them. `list_pull_requests` without `repository` still reads 20 repositories per call, but it now accepts a `repositoryOffset` to reach the rest, and its summary says how many were left out. The 55 MCP test suites, the docs-manifest test, typecheck and lint all pass. Activity tools (`toolsActivity.ts`, `activityDigest.ts`) - The cap went from 20 to 100. Running, queued and failed work was already read with one query across the whole repository set, so the old cap only limited the per-repository access check. That check now runs at most 8 at a time instead of one after another. - Each result has a new `repositoriesNotScanned` count. `repositoriesTruncated` is true only when that count is above zero. - When repositories were skipped, the text summary ends with "N granted repositories were not scanned; work there may be missing." `list_pull_requests` (`pullRequestInventory.ts`, `toolsPullRequests.ts`) - Each scanned repository costs its own GitHub requests, so I kept the 20-per-call window rather than add more GitHub traffic per call. - Call again with `repositoryOffset` set to the returned `nextRepositoryOffset`, and `offset` back to 0, to get the next batch. `offset` still pages within the current batch. - The repository list is now filtered by the grant first, so repositories outside the grant no longer count toward the 20. - The result has `repositoriesNotScanned` and `nextRepositoryOffset`. It also has its own summary line, which names the next `repositoryOffset`. The old generic summary counted the repository list instead of the pull requests. Tests (`mcpActivity.test.ts`) - The issue's case: a grant of 24 repositories where the only running task is in the last one. The task is reported, the summary reads "Across 24 repositories: 1 running tasks…", and each repository is access-checked exactly once. - 103 configured repositories: 100 are read, and the summary says 3 were not scanned. - `list_pull_requests` with 24 repositories, one of them forbidden: the first window and the `repositoryOffset` continuation together cover all of them, and the summary text is checked. I also updated `docs/mcp.md` and `docs/mcp-coverage.md` to describe the new fields and the continuation. Nothing here is visible in the UI, so there are no previews.
|
/ultrafix goal=8 max=6 |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 6) First action:
|
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR addresses activity coverage beyond 20 repositories while keeping pull-request scans bounded and adding repository pagination. It is merge-ready within scope, conditional on the four pending test shards completing successfully. ✅ Broader activity coverage — Both activity tools resolve up to 100 repositories, retain live authorization checks, and report repositories excluded by the bound. ✅ Bounded repository scans — Pull-request inventory filters configured repositories against the grant before selecting its window and preserves authorization checks. ✅ Targeted regression coverage — Added tests cover activity in the 24th repository, digest overflow, and repository-window continuation. Review was limited to static analysis of the supplied diff and context; no commands were run. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Clarify pagination completionIn S2: 🟢 Exercise both pagination dimensionsConsider adding a tool-level regression that exhausts ScoreThe implementation is focused, preserves access boundaries, and includes relevant regression coverage. No merge-blocking defect was verified; current checks report no failures, with four test shards still pending. Score: 9/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
ProPR ✅ Ready · review 9/10 · checks: 57 passed · updated 02:00 UTC
AI Implementation Summary
Closes #3596
Branch:
3596/claude-opus-5-5-mcp-get_current_activity--20261117-0119-hk4Commits: ✅ Changes committed (e5cf7f0)
AI Processing Completed
Execution Details:
Summary:
get_current_activityandget_recent_activitynow cover every repository in the grant, up to 100. Grants can't hold more than 100 repositories, so in practice that's all of them.list_pull_requestswithoutrepositorystill reads 20 repositories per call, but it now accepts arepositoryOffsetto reach the rest, and its summary says how many were left out. The 55 MCP test suites, the docs-manifest test, typecheck and lint all pass.Activity tools (
toolsActivity.ts,activityDigest.ts)repositoriesNotScannedcount.repositoriesTruncatedis true only when that count is above zero.list_pull_requests(pullRequestInventory.ts,toolsPullRequests.ts)repositoryOffsetset to the returnednextRepositoryOffset, andoffsetback to 0, to get the next batch.offsetstill pages within the current batch.repositoriesNotScannedandnextRepositoryOffset. It also has its own summary line, which names the nextrepositoryOffset. The old generic summary counted the repository list instead of the pull requests.Tests (
mcpActivity.test.ts)list_pull_requestswith 24 repositories, one of them forbidden: the first window and therepositoryOffsetcontinuation together cover all of them, and the summary text is checked.I also updated
docs/mcp.mdanddocs/mcp-coverage.mdto describe the new fields and the continuation. Nothing here is visible in the UI, so there are no previews.Review digest
Risk-tiered paths
packages/api/mcp/activityDigest.ts(+9/−2)packages/api/mcp/presentation.ts(+11/−2)packages/api/mcp/pullRequestInventory.ts(+33/−14)packages/api/mcp/toolsActivity.ts(+22/−11)packages/api/mcp/toolsPullRequests.ts(+2/−2)docs/mcp-coverage.md(+6/−3)docs/mcp.md(+9/−3)packages/api/test/mcpActivity.test.ts(+76/−1)Validation evidence
Diff size: 8 files changed, +168/−38 lines
Detailed Logs:
3879e1f1-c5e0-4c28-a956-57034a0a2859Log files stored at:
/usr/src/app/logs/executions/issue-3596-2026-11-17T01-36-09-638Z-conversation.json/usr/src/app/logs/executions/issue-3596-2026-11-17T01-36-09-638Z-output.txtLatest Conversation Messages
This PR was created automatically by ProPR after processing issue #3596.
💡 Need changes?
Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!