Repository navigation
Conversation
The reviewer diff now treats every file as text and ignores attributes and diff drivers the PR could set, so a PR-added -diff/binary attribute or a NUL byte no longer reduces a changed text file to "Binary files differ". A file block that is not UTF-8 is replaced by its path and size. Chunked review summarizes a file as deleted only when git's header says so, not when its added lines contain the header text. Closes #1101 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
diff_since now reads Git's output as bytes, so a bare carriage return cannot fake a file boundary, keeps it untrimmed, and decides whether to show a file from its HEAD (or deleted base) blob rather than the patch. Notices and deletion summaries keep Git's own header line, and only a whole "deleted file mode" header line marks a deletion. Refs #1101 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reviewer diff now carries full object IDs, so classification cannot resolve an abbreviated ID as a ref name. The single cat-file batch reads each object once, consumes every payload (submodule commits included) and validates UTF-8 in bounded chunks instead of buffering whole files. Refs #1101 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-diff-integrity # Conflicts: # tests/test_cli.py
…-diff-integrity-2 # Conflicts: # src/loopzero/runners.py # tests/test_cli.py
Folds the submodule case into the main diff test and tightens fixtures so the test suite stays under its line cap after merging main. Refs #1101 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
loopzero primary review by codex on 03267eac62741a9ef20177ccfbe5765a3bcbd42a, 58.4s: request_changes (0 critical, 3 important, 1 suggestion)
Settings per native call (launch configuration and CLI claims, not backend attestation):
- Call 1: requested model gpt-6.2-astra (effort medium); CLI-reported model gpt-6.2-astra (effort medium); configured model gpt-6.2-astra (effort medium)
Raw reviewer output
Native Codex transcript retained in the restricted local review receipt; public evidence is publisher-derived, not backend attestation. Exact raw SHA256: 61980486554599f7e0e7cf6e93b16efa8b99b9affc2989ac0dfba993687d4c5a
|
|
||
| def _content_side(block: bytes) -> tuple[str, str] | None: | ||
| # Full object IDs: an abbreviated one could resolve as a ref name instead. | ||
| index = re.search(rb"(?m)^index ([0-9a-f]{40}|[0-9a-f]{64})\.\.([0-9a-f]{40}|[0-9a-f]{64})", |
There was a problem hiding this comment.
suggestion: Match the entire destination object ID in SHA-256 repositories
The second alternation accepts 40 hex characters without checking what follows, so it truncates every 64-character destination ID. This reintroduces abbreviated lookup for precisely the side used to classify additions and modifications. Require a space or end of line after the ID and assert that _content_side preserves both full lengths.
The reviewer diff now ignores .gitmodules ignore settings, the blob classifier fails as a Git error on EOF, truncated payloads or a stalled reader, and SHA-256 object IDs are matched at full length. Refs #1101 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
loopzero delta review by codex on 70e478b77be9b420ae457fadcd61c9193332de1b, 13.2s: request_changes (0 critical, 1 important, 0 suggestion)
Settings per native call (launch configuration and CLI claims, not backend attestation):
- Call 1: requested model gpt-6.2-astra (effort medium); CLI-reported model gpt-6.2-astra (effort medium); configured model gpt-6.2-astra (effort medium)
Raw reviewer output
Native Codex transcript retained in the restricted local review receipt; public evidence is publisher-derived, not backend attestation. Exact raw SHA256: 8f605b22c77100973003a2386f1f241d6aaa8d911dfc61216dea7b7eab8a4fbf
|
Parked at 70e478b (delta-reviewed; every finding fixed or answered). Blocked only by the size gate: merged with current main, tests are 13,538 lines against the 13,500 cap (this PR adds 55; main is at 13,483). Next: once the test cap is raised, rerun |
|
Superseded by #1511: this PR's reviewed head merged with current main, with the conflict against #1353 (exact byte patches, escaped non-UTF-8) resolved on top of main's version. The non-UTF-8 notices and their batch reader were dropped because main already shows that content escaped, so the planned EOF-test follow-up is no longer needed. Findings and dispositions stay recorded in this PR's threads. |
Keep PR content from hiding changed code from the reviewer
Context and goal
.gitattributesand git's "contains a NUL byte" binary guess, so a changed text file could arrive only as "Binary files … differ". When a large diff was reviewed in chunks, a modified file whose added lines contained the text git uses for deleted files was replaced by ": deleted, N lines". In both cases an approval could cover code the model never saw.diff_sincebuilds the review material withgit diffin the task worktree.split_diffcuts diffs that exceed the reviewer's size budget into chunks and shortens deleted files to a one-line summary.Closes #1101
Acceptance
.gitattributesmarking changed text files-difforbinarystill gives the reviewer those files' hunks.split_diff, a modified file whose added lines include the deletion header text keeps its hunks; only files git's header reports as deleted are summarized.tests/test_worktree.pycover all three cases with a real temporary git repository.Notes
.gitattributesand file bytes are untrusted. Invariant: every changed path appears in the material, with its changed lines when the content is UTF-8 text. Chosen approach:git diff --text --no-ext-diff --no-textconv(verified locally:--textoverrides-diff/binaryattributes and NUL detection), read losslessly as Latin-1 and decoded strictly per file block; deletion judged only from the header before the first hunk. Attributes are not taken from the base because a delta's base is itself a PR head.tests/test_worktree.pyfail on pre-fix source and pass after.deleted file modeheader line. Regression tests fail at the reviewed head.--full-index), so an abbreviated ID cannot resolve as a ref name; the batch reader consumes every payload, so a submodule commit cannot shift later results (test fails at the delta-reviewed head); object IDs are deduplicated and blobs are validated in 64 KiB chunks instead of buffered whole. Not taken: notices for rename-only or mode-only changes, which change no content and are fully shown by Git's rename/mode lines. This was the last review round under the budget..gitmodulessaysignore = all; the batch reader fails closed on EOF, a truncated payload or a 120 s stall (only amissingobject, such as an unfetched submodule commit, is skipped); SHA-256 object IDs are matched at full length. Not taken: classifying before materializing patches for very large binaries, since review material is already bounded by the PR's own size, as for text diffs, and the restructure adds Git calls and code.split_diffalready bounds oversized material.Base
main @ b69efec
Base: b69efec
Validation
Recorded for
70e478b77be9uv run --group dev ruff check src tests: exit 0uv run --group dev tach check: exit 0uv run --python 3.14 python scripts/check_architecture_docs.py: exit 0scripts/size_budget.sh: exit 0uv run --group dev pytest -q: exit 0Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Review