test: stop the oversized-file guard test writing 31 MB for real - #268
Open
ankitranjan7 wants to merge 1 commit into
Open
test: stop the oversized-file guard test writing 31 MB for real#268ankitranjan7 wants to merge 1 commit into
ankitranjan7 wants to merge 1 commit into
Conversation
The test allocated and wrote a real 31 MB buffer to a temp dir just to give the size guard something over its 30 MB limit. On Windows CI that write alone can exceed the 5s default timeout — it failed the push run of 4eb9c54 while the identical pull_request run passed. The guard only reads stats.size, so truncate an empty file to the same length instead: same assertion, sparse file, no bulk write. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
🟢 No documentation gap found — high confidenceThe pull request only changes tests, lockfiles, generated metadata, or dependency metadata. This review is advisory and does not block merging. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the Windows CI flake seen on #267.
plugins/claude/test/utils.test.jsallocated and wrote a real 31 MB buffer to a temp dir just to givesendWithFile's size guard something over its 30 MB limit. On a slow Windows runner that write alone can blow the 5 s default timeout:It is a flake, not a regression — commit
4eb9c549failed this job in itspushrun (31402668177) and passed the same job in itspull_requestrun (31402676413).The guard only reads
stats.size(plugins/claude/utils.js:378), so truncating an empty file to 31 MB gives the same assertion with no bulk write.Verification
npx vitest run plugins/claude/test/utils.test.js→ 12 passed, test time 5 ms (was dominated by the write). The/too large/assertion still fires, so the file really is over the limit.🤖 Generated with Claude Code