Skip to content

feat(scan): raise the default total scan limit to 256 MiB (0.2.1) - #58

Merged
1wgrumph merged 2 commits into
mainfrom
feat/scan-total-256mib
Nov 7, 2026
Merged

1wgrumph merged 2 commits into
mainfrom
feat/scan-total-256mib

Conversation

@1wgrumph

@1wgrumph 1wgrumph commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

What

  • Raise the default total scan limit (DEFAULT_MAX_TOTAL_BYTES) from 64 MiB to 256 MiB. Repositories with more than 64 MiB of scannable text failed with scan_error: LimitExceeded. The 1 MiB per-file and 10,000-file limits are unchanged.
  • Widen the total_bytes maximum in schemas/repository-scan-snapshot.schema.json to match.
  • Update the scanner limits line in docs/deployment-profile.md (the separate 64 MiB packed-refs limit is unchanged).
  • Bump bran-cli to 0.2.1 (same files as the 0.2.0 release prep) and add CHANGELOG.md.

The limit feeds the scan input fingerprint, so existing derived indexes rebuild once after upgrading.

Tests

  • New default_total_limit_accepts_256_mib_and_rejects_more: scans 65 MiB with the default configuration, and checks that the default scanner's byte budget accepts a file ending at exactly 256 MiB and rejects one byte more with LimitExceeded. It fails on main with LimitExceeded { ..., limit: 67108864 } and passes here in about 1.2 s.
  • ./tools/ci/check.sh --fast: pass.
  • Independent review: accepted, no findings.

🤖 Generated with Claude Code

Claude Code and others added 2 commits November 6, 2026 17:44
Repositories with more than 64 MiB of scannable text failed with scan_error: LimitExceeded under the default scan configuration. Raise the default total limit to 256 MiB. The 1 MiB per-file and 10,000-file limits are unchanged. The scan snapshot schema now allows total_bytes up to the new default. The limit feeds the scan input fingerprint, so existing derived indexes rebuild once.

Add a test that scans 65 MiB with the default configuration and checks the 256 MiB boundary on the default scanner's byte budget. Bump bran-cli to 0.2.1 and add CHANGELOG.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@1wgrumph
1wgrumph merged commit 0716579 into main Nov 7, 2026
5 checks passed
@1wgrumph
1wgrumph deleted the feat/scan-total-256mib branch November 7, 2026 02:18
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