Skip to content

✅⑨ [3596 by Claude Opus 5.5] MCP: get_current_activity and get_recent_activity silently cover only the first 20 repositories - #3613

Merged
integry merged 1 commit into
3595-epic-0-9-h9lfrom
3596/claude-opus-5-5-mcp-get_current_activity--20261117-0119-hk4
Nov 17, 2026
Merged

integry merged 1 commit into
3595-epic-0-9-h9lfrom
3596/claude-opus-5-5-mcp-get_current_activity--20261117-0119-hk4

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

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-hk4
Commits: ✅ Changes committed (e5cf7f0)


AI Processing Completed

Execution Details:

Summary:
get_current_activity and get_recent_activity now 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_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.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (5 files)
    • 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)
  • Low risk (3 files)
    • docs/mcp-coverage.md (+6/−3)
    • docs/mcp.md (+9/−3)
    • packages/api/test/mcpActivity.test.ts (+76/−1)

Validation evidence

  • No repository validation commands ran.

Diff size: 8 files changed, +168/−38 lines

Detailed Logs:

  • Conversation: 102 messages
  • Session: 3879e1f1-c5e0-4c28-a956-57034a0a2859

Log files stored at:

  • conversation: /usr/src/app/logs/executions/issue-3596-2026-11-17T01-36-09-638Z-conversation.json
  • output: /usr/src/app/logs/executions/issue-3596-2026-11-17T01-36-09-638Z-output.txt
Latest Conversation Messages
ASSISTANT: [content unavailable]

ASSISTANT: `get_current_activity` and `get_recent_activity` now 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_request...


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!

…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.
@propr-dev

propr-dev Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

/ultrafix goal=8 max=6
Triggered automatically by the requested execution settings.

@propr-dev propr-dev Bot added the ultrafix label Nov 17, 2026
@propr-dev

propr-dev Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

🔄 Ultrafix loop started (goal: 8/10, max cycles: 6)

First action: /review

💡 Tip: Remove the ultrafix label from this PR to stop further ultrafix cycles.

@propr-dev

propr-dev Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The 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 blockers

No merge blockers.

Suggestions

These are optional follow-ups and are not sent to /fix.

S1: 🟢 Clarify pagination completion

In docs/mcp.md, use a non-null nextRepositoryOffset as the condition for requesting another repository window. The current instructions use repositoriesNotScanned > 0, but the final window intentionally counts earlier repositories as unscanned by that call: the added test expects notScanned: 20 alongside nextRepositoryOffset: null. Clarifying this distinction would improve the walkthrough; the structured continuation already identifies completion.

S2: 🟢 Exercise both pagination dimensions

Consider adding a tool-level regression that exhausts nextOffset within one repository window before advancing repositoryOffset and resetting offset. The new test exercises repository selection directly, while existing pagination tests cover explicit repositories. Combining these paths would strengthen coverage of the new client workflow without changing the implementation.

Score

The 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

  • Model: GPT-6 Astra
  • Time: 23s
  • Tokens: 48,442 (47,952 in / 490 out)
  • Cost: $0.40

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix S1 S2

🤖 Review by ProPR

@propr-dev propr-dev Bot removed the ultrafix label Nov 17, 2026
@propr-dev propr-dev Bot changed the title 🔨 [3596 by Claude Opus 5.5] MCP: get_current_activity and get_recent_activity silently cover only the first 20 repositories ✅⑨ [3596 by Claude Opus 5.5] MCP: get_current_activity and get_recent_activity silently cover only the first 20 repositories Nov 17, 2026
@integry
integry merged commit 9d0e608 into 3595-epic-0-9-h9l Nov 17, 2026
57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant