Skip to content

bug: Count binary patches in review limits - #50

Merged
idy merged 1 commit into
mainfrom
codex/binary-diff-review-limit
Sep 25, 2026
Merged

idy merged 1 commit into
mainfrom
codex/binary-diff-review-limit

Conversation

@idy

@idy idy commented Sep 25, 2026

Copy link
Copy Markdown
Member

Closes #49

Summary

  • Use a binary-aware Git patch for the shared reviewer's 5,000,000-byte automatic gate, 100,000,000-byte hard cap, and effective-diff identity.
  • Keep binary patch bodies out of model-facing per-file review chunks.
  • Add a regression fixture where a binary model addition has a tiny plain diff but exceeds the automatic limit.

GizClaw/h6infra PR #4 demonstrates the bug: its plain Git patch is 4,147,843 bytes, while git diff --binary is 18,621,002 bytes. With this change it requires the existing exact-head admin approval command.

Validation

  • node .github/scripts/pr-review/test.mjs
  • node .github/scripts/review-request/test.mjs
  • node .github/scripts/pr-readiness/test.mjs
  • node .github/scripts/issue-review/test.mjs
  • actionlint -ignore 'property "workflow_(repository|sha)" is not defined' .github/workflows/*.yml
  • git diff --check

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ OpenAI PR Review: PASS

Conclusion: Ready from the OpenAI review perspective. PR format, linked Issue design, and code/plan conformance passed with no actionable findings.

Review checks

Check Result
PR format ✅ PASS
Issue design ✅ PASS
Code & plan conformance ✅ PASS

Scope: f3f2e03017 · d371c53225..f3f2e03017 · full · 1 diff chunk

Usage: 53s · 270,653 tokens · 78.6% cache hit · credits unavailable

Summary

The complete diff has one reviewed chunk. It conforms to Issue #49’s plan, with no actionable code findings or plan-conformance blockers.

Review metadata
  • Commit: f3f2e03017
  • Range: d371c53225..f3f2e03017
  • Mode: full
  • Diff chunks: 1
  • Model: gpt-6-sol
  • Reasoning effort: low
  • Session: repo-1309321116-pr-50-v2
  • Generation: 9ab4655615d68316e35a8c30a4b98876d2d4ff9bd311477261a61761cbc886a0
  • Evidence: 74947b5417ee19b90ae4662835a8bf31352a95343b8034e3b253c66a66c285d0

Totals

  • Input: 268,153
  • Cached input: 210,792
  • Cache write: 56,545
  • Output: 2,500
  • Reasoning: 342
  • Total: 270,653
  • Estimated credits: unavailable for this model
Token and cache details
Stage Mode Target Time Input Cached Hit Output Total Credits
pr deterministic format rules 0s 0 0 0.0% 0 0 N/A
pr full pr 11s 43,345 27,783 64.1% 474 43,819 N/A
issue full Issue #49 19s 78,523 70,494 89.8% 933 79,456 N/A
code full chunk 1/1 16s 81,824 51,588 63.0% 754 82,578 N/A
code full aggregate 7s 64,461 60,927 94.5% 339 64,800 N/A

@idy
idy merged commit 5e46add into main Sep 25, 2026
11 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.

bug: Count binary payloads in review size limits

1 participant