Skip to content

Send only the first 20,000 characters of a file to the snippet generator - #13109

Merged
iHiD merged 1 commit into
mainfrom
limit-snippet-source-size
Nov 18, 2026
Merged

iHiD merged 1 commit into
mainfrom
limit-snippet-source-size

Conversation

@iHiD

@iHiD iHiD commented Nov 18, 2026

Copy link
Copy Markdown
Member

The snippet extractor Lambda times out after 3 seconds, and very large files can hit that, so the iteration gets no snippet. The snippet only uses the first few lines of the file, so Iteration::GenerateSnippet now sends only the first 20,000 characters. It cuts by characters, not bytes, so a multi-byte character is never split.

A new test checks that a long file is sent truncated.

🤖 Generated with Claude Code

The extractor Lambda times out after 3 seconds, and very large files can hit that, leaving the iteration without a snippet. The snippet only uses the first lines, so we send the first 20,000 characters.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@iHiD
iHiD merged commit 5fe0d43 into main Nov 18, 2026
29 checks passed
@iHiD
iHiD deleted the limit-snippet-source-size branch November 18, 2026 07:03
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