Skip to content

Fix CCM recommendation pagination truncation#664

Open
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/critical-bug-investigation-d6ea
Open

Fix CCM recommendation pagination truncation#664
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/critical-bug-investigation-d6ea

Conversation

@cursor

@cursor cursor Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Description

harness_list(resource_type="cost_recommendation") exposed standard page and size controls, but its REST body builder ignored them and always sent offset: 0, limit: 20. Requests for later pages therefore returned the first page again, silently preventing callers from retrieving recommendations beyond the first 20.

This maps page/size to the endpoint's offset/limit body fields while preserving explicit resource-specific offset/limit overrides. A focused regression covers page: 2, size: 50 producing offset: 100, limit: 50.

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other

Checklist

  • pnpm test passes (117 files, 2554 tests)
  • pnpm typecheck passes
  • pnpm build passes
  • pnpm standards:check passes (10 files, 80 tests)
  • pnpm docs:check passes

Coding Standards (registry-driven MCP model)

  • No new server.registerTool() calls — only a focused existing toolset change
  • Toolset registration unchanged
  • Existing operationPolicy retained
  • Response extractor unchanged
  • Resource identifiers and scope unchanged
  • No console.log() added
Open in Web View Automation 

cursoragent and others added 2 commits July 19, 2026 11:11
Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@thisrohangupta
thisrohangupta marked this pull request as ready for review July 21, 2026 15:35

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

PR Risk Assessment: Low

Evidence (from diff only)

  • 3 files changed (+44 / −2): production fix in src/registry/toolsets/ccm.ts, regression test in tests/registry/registry.test.ts, internal task notes in tasks/todo.md.
  • Production change: cost_recommendation list bodyBuilder now derives REST offset/limit from standard page/size inputs (with explicit offset/limit overrides preserved). Previously pagination inputs were ignored, so later pages always returned the first 20 results.
  • Blast radius: isolated to CCM recommendation listing; no shared dispatch, auth, or config changes.
  • Operation policy: read-only (risk: "read", retryPolicy: "safe").
  • Tests: focused regression asserting page: 2, size: 50offset: 100, limit: 50.
  • CI: build/test/smoke checks passing.

Decision

  • Review required? No (Low risk).
  • Reviewers assigned? None.
  • Approval: Low risk — would approve, but GitHub blocks approving a PR authored by the same bot account. Human merge/approval still needed for branch protection.
Open in Web View Automation 

Sent by Cursor Automation: Assign PR reviewers

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