Skip to content

fix: skip large/binary files during ingestion (OOM guard)#68

Merged
jamestexas merged 1 commit intomainfrom
fix/large-file-guard
Mar 6, 2026
Merged

fix: skip large/binary files during ingestion (OOM guard)#68
jamestexas merged 1 commit intomainfrom
fix/large-file-guard

Conversation

@jamestexas
Copy link
Copy Markdown
Contributor

Summary

  • Centralized ShouldSkipFile() with extension blocklist (.db, .sqlite, .zip, .png, etc.) and configurable size limit
  • New --max-file-size flag (default 100MB, 0 to disable) with human-readable ParseSize()
  • Applied in both engine.go directory walk and mount.go schema inference walk
  • Fixes OOM crash when mounting directories containing large database files (e.g. 10GB .db)

Test plan

  • TestShouldSkipFile — extension blocklist, size limit, zero-disables
  • TestParseSize — MB/GB/KB/bare number/invalid input
  • Full ./internal/ingest/... test suite passes
  • Manual: mache mount ../venturi --schema go.json with 10GB db in directory

🤖 Generated with Claude Code

Add centralized ShouldSkipFile() with extension blocklist (.db,
.sqlite, .zip, .png, etc.) and configurable size limit (default
100MB). New --max-file-size flag (e.g. "1GB", "0" to disable).
ParseSize() handles human-readable strings. Applied consistently
in both engine.go walk and mount.go schema inference walk.
@jamestexas jamestexas merged commit 816afc3 into main Mar 6, 2026
13 checks passed
@jamestexas jamestexas deleted the fix/large-file-guard branch March 6, 2026 01: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