# Enforce maxBytes limit before file read (stat-based)

## Description

# Enforce maxBytes limit before file read (stat-based)

## Acceptance

- [ ] Implementation complete
- [ ] Tests passing
- [ ] Documentation updated

## Done summary

Enforced maxBytes via filesystem stat inside SyncService.processFile before reading bytes, including stale walker-size protection and TOO_LARGE skip/error reporting. Added regression test for stale-size walker entries and updated config docs note for pre-read size skipping.

## Evidence

- Commits:
- Tests: bun run lint:check, bun test, bun run eval, bun scripts/docs-verify.ts, bun test test/ingestion/sync-max-bytes.test.ts test/ingestion/sync-tags.test.ts
- PRs:
