Skip to content

fix: warn users when repo zip is truncated at 10 MB limit#38

Merged
greynewell merged 1 commit intomainfrom
claude/issue-34-20260227-0311
Feb 27, 2026
Merged

fix: warn users when repo zip is truncated at 10 MB limit#38
greynewell merged 1 commit intomainfrom
claude/issue-34-20260227-0311

Conversation

@claude
Copy link
Contributor

@claude claude bot commented Feb 27, 2026

Summary

  • Changed RepoZip signature from ([]byte, error) to ([]byte, bool, error), where the new bool indicates whether the archive was truncated due to maxTotalSize (10 MB).
  • Set truncated = true before returning io.EOF in internal/zip/zip.go so the caller can distinguish a size-limited stop from a real error.
  • Updated all callers -- runHandler and runWithoutCache in cmd/run.go, and both zip-using functions in cmd/pregen.go -- to log a [warn] message when truncated is true.

Fixes #34

Generated with Claude Code

When the accumulated file size hits maxTotalSize (10 MB) during a repo
walk, RepoZip now sets a truncated flag before returning io.EOF. The
function signature changes from ([]byte, error) to ([]byte, bool, error).
All callers (runHandler, runWithoutCache, pregenFetch in pregen.go) log
a [warn] message when the flag is true so users are informed that graph
analysis is based on a partial repo.

Fixes #34

Co-Authored-By: Grey Newell <greyshipscode@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@greynewell greynewell merged commit 2a49b15 into main Feb 27, 2026
1 check passed
@greynewell greynewell deleted the claude/issue-34-20260227-0311 branch February 27, 2026 03:20
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.

bug: zip.go silently truncates large repos at maxTotalSize with no warning to the user

1 participant