Skip to content

improvement(search): refuse a live chunk index before the provider read - #9805

Merged
waleedlatif1 merged 2 commits into
stagingfrom
improvement/search-live-read-chunk-index
Nov 9, 2026
Merged

waleedlatif1 merged 2 commits into
stagingfrom
improvement/search-live-read-chunk-index

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • read_document refuses a live startChunkIndex other than 0 before resolving the account and fetching the document from its provider, instead of after; a client that guesses a chunk index now gets the "continue using next.startOffset" correction in about 2 s instead of 8–9 s
  • The Search MCP startChunkIndex description says to copy next.startChunkIndex from a prior read (live documents always use 0). It told clients to take a chunk index "from search", which search results stopped carrying in improvement(search): send each Search MCP result fact once #9778, and clients started guessing nonzero values

Type of Change

  • Improvement

Testing

  • MCP client bench (Sonnet 5.5, 83 cases, 4 attempts per case per arm, paired against this branch's base): correct 77.7% → 77.1% (−0.6pp [−4.8, +3.9]), completeness +0.8pp, citedGold +1.7pp, no case flipped from mostly right to never right, model time −0.5 s [0.2, 0.8], input tokens and tool output flat. A guessed chunk index on a long transcript failed in 2.1 s
  • New test (fails on the base, passes here): a nonzero chunk index is refused before the provider read
  • bunx vitest run lib/sim-search/live/application.test.ts lib/knowledge/mcp (137 passed), biome on changed files

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 9, 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 9, 2026 5:14am 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.

No issues found across 3 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

@greptile-apps

greptile-apps Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

This PR rejects a nonzero live startChunkIndex before resolving the account or reading from the provider.

  • Live document reads reject nonzero chunk indexes before provider reads.

Reviews (2) · Last reviewed commit: "test(search): guard the search fixture r..." · 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 9, 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 3 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

@waleedlatif1
waleedlatif1 merged commit 2dcdc96 into staging Nov 9, 2026
80 checks passed
@waleedlatif1
waleedlatif1 deleted the improvement/search-live-read-chunk-index branch November 9, 2026 05:30

This branch was previously deployed

1 inactive deployment
Preview — a57366d3 Deployed Nov 9, 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