Skip to content

improvement(search): shorter Jira any-term budget and a shared batched read budget - #9984

Merged
waleedlatif1 merged 2 commits into
stagingfrom
improvement/search-mcp-catchup
Nov 13, 2026
Merged

waleedlatif1 merged 2 commits into
stagingfrom
improvement/search-mcp-catchup

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Jira's any-term fallback gets 2s instead of 4s. Successful fallbacks finish within ~1.5s (p95; p99 2.5s), while about a third of attempts stall until the cut, and the whole federated search waits on that stall
  • Scaled MCP reads return up to 20K characters per document whatever limit the client sends (a live document is one chunk, so the chunk limit never sized it). Clients almost never raised limit, so they got 8K pages and came back for continuations
  • Batched reads share one 40K-character call budget: short documents keep all their text and leave the rest to long ones, which continue through next. No document drops below the standard 8K page, so large batches read what they read today
  • tools/list is unchanged, so clients aren't asked to re-approve the connector

Type of Change

  • Improvement

Testing

  • bun run test lib/sim-search lib/knowledge/mcp (527 passed); the new read-budget.test.ts, read-window and fallback-budget tests fail against the previous code
  • biome on changed files
  • A/B on our Search MCP benchmark (105-case bundle, 2 control and 2 candidate arms, 2 attempts each): no case flipped from right to wrong; correctness 71.5% → 74.4% (CI spans 0); completeness and source recall flat; rounds −0.13, tool calls −0.20, searches −0.15 per question (CIs above 0)

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 13, 2026 5:06am UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 9 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no blocking issues remain.

Summary

Shortens the any-term fallback timeout to two seconds and gives scaled MCP reads up to 20,000 encoded characters per document.

  • MCP document reads return larger pages within a shared batch budget.
  • Live search waits only two seconds for any-term matches.

Reviews (2) · Last reviewed commit: "fix(search): reserve standard read pages..." · Reviewed by Greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 9 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

This branch was previously deployed

1 inactive deployment
Preview — b16ca6cb Deployed Nov 13, 2026 by vercel[bot]
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.

1 participant