Skip to content

Bound server memory usage when reviewing large untracked files#1118

Merged
backnotprop merged 1 commit into
backnotprop:mainfrom
kcosr:fix/bound-review-memory
Jul 25, 2026
Merged

Bound server memory usage when reviewing large untracked files#1118
backnotprop merged 1 commit into
backnotprop:mainfrom
kcosr:fix/bound-review-memory

Conversation

@kcosr

@kcosr kcosr commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

When an unignored build artifact or binary file appears in Git status, Plannotator can consume several gigabytes of server-side memory even if the rendered diff is small.

This PR keeps those files visible without loading their contents into memory. It also:

  • Limits untracked diff generation to four concurrent Git processes
  • Uses metadata instead of reading large files during freshness checks
  • Prevents binary files and oversized Git content from being served through /api/file-content
  • Applies the same endpoint behavior to the Bun and Pi servers

Large untracked files over 5 MiB are displayed as binary additions. Smaller files continue to behave normally, including manual hunk expansion.

Validated with focused tests, full TypeScript checks, and production builds for the review UI and hook.

Related to #940.

@backnotprop
backnotprop merged commit 193b07e into backnotprop:main Jul 25, 2026
5 checks passed
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.

2 participants