Skip to content

fix(server): review diffs no longer read oversized untracked files - #36302

Merged
juliusmarminge merged 1 commit into
mainfrom
factory/pr-32463-a1794597635
Nov 13, 2026
Merged

juliusmarminge merged 1 commit into
mainfrom
factory/pr-32463-a1794597635

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

No code change this round; the head is unchanged. The brief listed nothing to change, so I watched pull request 36302 until its checks and review bots settled: all 35 checks passed on 3123830, Macroscope approved with no line findings, and CodeRabbit generated no actionable comments (merge risk minimal). The pull request reports mergeable_state clean. CodeRabbit's description check notes that the description's Evidence section is still a placeholder; that is the proof step's to fill in. The change itself is as before: getReviewDiffPreview now applies the 256 MiB untracked budget that only status totals used. Staged deletions are dropped before sizes are counted, files are admitted smallest first, and a preview with omitted files is reported through the existing incomplete-source state (no file list, truncated, bounded patch of what fit). Status totals stay all-or-nothing.

Supersedes #32463. The change is @luis-7654's; their commits are kept.

Reproduction on main

Proposed steps, not executed: 1. Create a disposable Git repository with an initial commit. 2. Modify a tracked text file, create a small untracked ordinary.txt, and create an untracked sparse file with truncate -s 8G large.data on Linux. 3. Add the repository as a T3 Code project, create a thread, and open Changes or Uncommitted. 4. On main, background totals are bounded, but the full review request still introduces large.data into its temporary index before reading statistics and can stall. With this change, large.data is omitted, ordinary edits remain reviewable, and the review displays an omission notice.

Evidence

Create an initially committed repository, modify tracked.txt, add small ordinary.txt and an 8 GiB sparse large.data, create a replay-backed thread, and open Changes. Both runs used fresh synthetic state, Chromium, 1280×800, and the light theme.

Before After
9efd960925 3123830626
Review statistics timed out; ordinary.txt was missing. ordinary.txt and tracked.txt appeared; large.data was excluded and the preview was explicitly incomplete.
Before: untracked review failure After: bounded review with ordinary files
Before recording After recording

Scenario source. Base error details containing the workspace path are masked. The runner returned exit 0: failed on base, passed on head.

Not shown:

  • File-specific omission identification was not shown: head displays a generic incomplete-preview warning, without naming large.data.
  • Ordinary files were visible in the review list; their expanded diff contents were not exercised.

Tests

None run locally this round, since nothing changed. CI on 3123830: all 35 checks passed, including the 8 required ones (Test Server shards, Lint, Build and Typecheck).

Not in this change

  • The original PR's untrackedOmitted contract field and the new omission notices in web DiffPanel and mobile ReviewSheet/reviewModel/useReviewDiffData: new visible wording that is not a certain bug fix; the existing incomplete-preview state covers it.
  • The original PR's change of the totals error text to 'Untracked files exceed the review input limits.': main's 'Untracked files are too large to count.' is kept.
  • A per-file size limit (the original PR description mentions 10 MiB per file): only the aggregate 256 MiB budget main already uses is applied.
  • When an oversized untracked file is selected by itself, its single-file preview comes back empty and marked truncated; the clients' existing per-file size-limit wording for that state was not changed.
  • The Evidence section of the pull request description is still a placeholder, as CodeRabbit's description check notes; the proof step owns it.
  • The original PR's untrackedOmitted contract field and web/mobile omission notices remain left out, as in the previous round.

Who did the work

  • Written by Claude Fable 5.2, in Claude Code
  • Reviewed by GPT-6.1 Sol, in Codex, and by Claude Opus 5.5, each on its own
  • Proof captured by GPT-6.1 Sol and checked by Claude Opus 5.5

Run by the t3code factory in T3 Code.

Review previews put every untracked file into the temporary review index,
so git read all of their bytes; only the status totals had a size budget.
The preview now uses the same 256 MiB budget. Files that do not fit stay
out of the index, smallest files are kept first, and the source is
reported the way an unlistable untracked tree already is: no file list,
marked truncated, with the bounded patch of everything that did fit.
Staged deletions are dropped before sizes are counted, so their worktree
copies cannot spend the budget.

Co-authored-by: luis-7654 <[email protected]>

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Nov 13, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 3123830

Macroscope's review found this PR approvable — Review previews now exclude untracked files beyond the existing byte budget and explicitly flag partial results. The change limits expensive reads using a temporary index without modifying repository contents.

You can add or adjust custom eligibility rules. Learn more.

@github-actions

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Codex Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 21.5 KiB 21.5 KiB 0 B (0.0%) 24.4 KiB ✅
Codex Live turn messages 1 1 0 (0.0%) 8 ✅
Claude Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Claude Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 21.9 KiB 21.9 KiB 0 B (0.0%) 24.4 KiB ✅
Claude Live turn messages 1 1 0 (0.0%) 8 ✅

Other scenarios

All 64 scenario measurements match main.

All 64 scenario measurements
Provider Scenario Metric Main baseline This PR Impact PR ceiling
Codex short turn resume WebSocket decoded 10.5 KiB 10.5 KiB 0 B (0.0%) 12.7 KiB ✅
Codex short turn resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex long turn running, cold open HTTP decoded 281.7 KiB 281.7 KiB 0 B (0.0%) 302.7 KiB ✅
Codex long turn running, cold open rows 75 75 0 (0.0%) 75 ✅
Codex long turn running, history page HTTP decoded 92.4 KiB 92.4 KiB 0 B (0.0%) 107.4 KiB ✅
Codex long turn running, history page rows 75 75 0 (0.0%) 75 ✅
Codex long turn finished, cold open HTTP decoded 381.5 KiB 381.5 KiB 0 B (0.0%) 410.2 KiB ✅
Codex long turn finished, cold open rows 151 151 0 (0.0%) 151 ✅
Codex long turn finished, socket cold open WebSocket decoded 381.6 KiB 381.6 KiB 0 B (0.0%) 410.2 KiB ✅
Codex long turn finished, socket cold open WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex long turn finished, socket cold open rows 151 151 0 (0.0%) 151 ✅
Codex long turn finished, work page HTTP decoded 186.2 KiB 186.2 KiB 0 B (0.0%) 200.2 KiB ✅
Codex long turn finished, work page rows 150 150 0 (0.0%) 150 ✅
Codex idle thread resume WebSocket decoded 65 B 65 B 0 B (0.0%) 200 B ✅
Codex idle thread resume WebSocket messages 1 1 0 (0.0%) 1 ✅
Codex fleet shell snapshot HTTP decoded 42.4 KiB 42.4 KiB 0 B (0.0%) 53.7 KiB ✅
Codex fleet shell snapshot rows 27 27 0 (0.0%) 27 ✅
Codex fleet shell subscribe WebSocket decoded 65 B 65 B 0 B (0.0%) 200 B ✅
Codex fleet shell subscribe WebSocket messages 1 1 0 (0.0%) 1 ✅
Codex fleet shell resume check HTTP decoded 18 B 18 B 0 B (0.0%) 100 B ✅
Codex fleet shell resume check rows 0 0 0 0 ✅
Codex stale shell reload HTTP decoded 42.4 KiB 42.4 KiB 0 B (0.0%) 53.7 KiB ✅
Codex stale shell reload rows 27 27 0 (0.0%) 27 ✅
Codex stale shell resume WebSocket decoded 140 B 140 B 0 B (0.0%) 400 B ✅
Codex stale shell resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex stale todo list cold open HTTP decoded 72.4 KiB 72.4 KiB 0 B (0.0%) 83.0 KiB ✅
Codex stale todo list cold open rows 75 75 0 (0.0%) 75 ✅
Codex stale todo list cold open nodes 2 2 0 (0.0%) 4 ✅
Codex stale todo list cold open subagents 2 2 0 (0.0%) 4 ✅
Codex stale todo list cold open plans 1 1 0 (0.0%) 2 ✅
Codex stale todo list cold open providerTurns 1 1 0 (0.0%) 2 ✅
Codex stale todo list cold open checkpoints 1 1 0 (0.0%) 2 ✅
Claude short turn resume WebSocket decoded 10.6 KiB 10.6 KiB 0 B (0.0%) 12.7 KiB ✅
Claude short turn resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude long turn running, cold open HTTP decoded 283.3 KiB 283.3 KiB 0 B (0.0%) 302.7 KiB ✅
Claude long turn running, cold open rows 75 75 0 (0.0%) 75 ✅
Claude long turn running, history page HTTP decoded 93.4 KiB 93.4 KiB 0 B (0.0%) 107.4 KiB ✅
Claude long turn running, history page rows 75 75 0 (0.0%) 75 ✅
Claude long turn finished, cold open HTTP decoded 384.2 KiB 384.2 KiB 0 B (0.0%) 410.2 KiB ✅
Claude long turn finished, cold open rows 151 151 0 (0.0%) 151 ✅
Claude long turn finished, socket cold open WebSocket decoded 384.3 KiB 384.3 KiB 0 B (0.0%) 410.2 KiB ✅
Claude long turn finished, socket cold open WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude long turn finished, socket cold open rows 151 151 0 (0.0%) 151 ✅
Claude long turn finished, work page HTTP decoded 188.1 KiB 188.1 KiB 0 B (0.0%) 200.2 KiB ✅
Claude long turn finished, work page rows 150 150 0 (0.0%) 150 ✅
Claude idle thread resume WebSocket decoded 66 B 66 B 0 B (0.0%) 200 B ✅
Claude idle thread resume WebSocket messages 1 1 0 (0.0%) 1 ✅
Claude fleet shell snapshot HTTP decoded 43.0 KiB 43.0 KiB 0 B (0.0%) 53.7 KiB ✅
Claude fleet shell snapshot rows 27 27 0 (0.0%) 27 ✅
Claude fleet shell subscribe WebSocket decoded 66 B 66 B 0 B (0.0%) 200 B ✅
Claude fleet shell subscribe WebSocket messages 1 1 0 (0.0%) 1 ✅
Claude fleet shell resume check HTTP decoded 18 B 18 B 0 B (0.0%) 100 B ✅
Claude fleet shell resume check rows 0 0 0 0 ✅
Claude stale shell reload HTTP decoded 43.0 KiB 43.0 KiB 0 B (0.0%) 53.7 KiB ✅
Claude stale shell reload rows 27 27 0 (0.0%) 27 ✅
Claude stale shell resume WebSocket decoded 140 B 140 B 0 B (0.0%) 400 B ✅
Claude stale shell resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude stale todo list cold open HTTP decoded 73.4 KiB 73.4 KiB 0 B (0.0%) 83.0 KiB ✅
Claude stale todo list cold open rows 75 75 0 (0.0%) 75 ✅
Claude stale todo list cold open nodes 2 2 0 (0.0%) 4 ✅
Claude stale todo list cold open subagents 2 2 0 (0.0%) 4 ✅
Claude stale todo list cold open plans 1 1 0 (0.0%) 2 ✅
Claude stale todo list cold open providerTurns 1 1 0 (0.0%) 2 ✅
Claude stale todo list cold open checkpoints 1 1 0 (0.0%) 2 ✅

Baseline: c83e78f · PR result: 3123830 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Untracked review-index preparation now applies a shared 256 MiB limit and reports when it omits files. Review previews handle incomplete indexes, and tests cover status counts and oversized untracked files.

Changes: Untracked review previews

Layer / File(s) Summary
Bounded review-index preparation
apps/server/src/vcs/GitVcsDriverCore.ts
Review-index preparation excludes staged deletions and adds remaining candidates smallest-first within the 256 MiB limit. It returns whether it omitted files.
Incomplete-result handling and tests
apps/server/src/vcs/GitVcsDriverCore.ts, apps/server/src/vcs/GitVcsDriverCore.test.ts
Branch totals disallow partial results. Review previews use metadata-only mode only when the untracked index is complete. Tests check status counts and oversized-file preview results.

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Bug fix

Suggested reviewers: only21mil, kirat0201

Merge Risk: Minimal · up to 31238

Review previews now stay bounded when untracked files are large, and they still show tracked changes and the untracked files that fit. The supplied evidence shows no actionable merge risk. The author reports passing server tests and checks.

Pre-merge checks: Passed 3 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Description check Inconclusive The description lacks a complete Problem statement, Scope link, and Verification. The Problem section is missing, and it does not name an issue or explain a bug report. Verification is weak: the autho… Add a clear Problem statement that names the bug and expected behavior. Link the issue that shows the bug, or explain why no issue is needed. Replace the Evidence placeholder with the captured results, or state what remains unverified. Reco…
Passed Passed checks: 3 passed

Check name Status Explanation
Title check Passed The title names the main change: review diffs no longer read oversized untracked files. The raw summary and objectives confirm that the preview now applies the 256 MiB untracked budget, omits files th…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: review diffs no longer read oversized untracked files. The raw summary and objectives confirm that the preview now applies the 256 MiB untracked budget, omits files that do not fit, and returns a bounded patch. The title uses the repository's conventional commit form and is specific enough for a teammate to understand the primary change.

Full details: Description check

Explanation

The description lacks a complete Problem statement, Scope link, and Verification. The Problem section is missing, and it does not name an issue or explain a bug report. Verification is weak: the author ran no tests this round. The Evidence section is still a placeholder, as the author states. The Evidence table gives before-and-after results, but the description also says the Evidence section is still a placeholder. Other parts are substantive: the Change section explains the 256 MiB budget, staged-deletion handling, and smallest-first admission. The reproduction steps are proposed but not run. The description also contains a mismatch: it says the change covers the review preview, while the raw summary says the status-totals path now uses the same byte cap. The description states that status totals stay all-or-nothing, which is a different behavior from the summary. These gaps are significant but the description is mostly complete.

Resolution

Add a clear Problem statement that names the bug and expected behavior. Link the issue that shows the bug, or explain why no issue is needed. Replace the Evidence placeholder with the captured results, or state what remains unverified. Reconcile the description with the change summary: state whether status totals now use the 256 MiB cap or keep their separate behavior. Give the focused test results for GitVcsDriverCore.test.ts, and say which new tests cover the oversized-file case and the staged-deletion case.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between c83e78f and 3123830.

Files selected for processing: 2

  • apps/server/src/vcs/GitVcsDriverCore.test.ts
  • apps/server/src/vcs/GitVcsDriverCore.ts

Limit details: You’ve used all 10 included reviews currently available.

@juliusmarminge
juliusmarminge merged commit 3521634 into main Nov 13, 2026
36 checks passed
@juliusmarminge
juliusmarminge deleted the factory/pr-32463-a1794597635 branch November 13, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant