Repository navigation
Conversation
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Architecture-Review: unchanged; retain the documented Git patch capture and main’s branch name whitespace handling. Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero primary review by claude on 73d54496e43164a60a1d16b8b38f300b009ff809, 50.8s: request_changes (0 critical, 1 important, 3 suggestion)
Settings per native call (launch configuration and CLI claims, not backend attestation):
- Call 1: requested model claude-opus-5-5 (effort medium); CLI-reported model claude-opus-5-5 (effort unknown); configured model claude-opus-5-5 (effort medium)
Native Claude output is retained in the restricted local review receipt.
| ) | ||
|
|
||
|
|
||
| def render_patch(patch: bytes) -> str: |
There was a problem hiding this comment.
suggestion: The escaped rendering is applied to the whole patch and nothing tells the reviewer
If any single byte in the patch is not valid UTF-8, render_patch doubles every backslash in every file. That includes Git's \ No newline at end of file markers and backslashes in unrelated UTF-8 source files. Neither the material header nor the reviewer policy says the escaping was applied, so the reviewer can't tell whether \\ means a real double backslash or an escaped single one. Smallest fix: add a flag to the material header when the escaped form is used, e.g. "diff_encoding": "utf-8-backslash-escaped" in build_prompt, or mention the escaping in the policy.
|
|
||
| def diff_since(wt: Path, sha: str) -> str: | ||
| return _git(Path(wt), "diff", "--no-color", sha, "HEAD") | ||
| def diff_since(wt: Path, sha: str) -> bytes: |
There was a problem hiding this comment.
suggestion: The diff is decoded to text and then re-encoded to bytes
run(preserve_newlines=True) decodes stdout with surrogateescape, _git returns that string, and diff_since encodes it back to bytes. This does reproduce the original bytes exactly, but it adds a third output mode to _git (alongside the default and preserve_whitespace) just to undo the decoding. It also means _proc.run now has two decode paths with different error handlers for stdout and stderr. Simpler: let run return raw stdout bytes for this mode (or call it with text=False directly from diff_since). Then diff_since gets the bytes without the round trip, and _git keeps its text-only contract.
| command = f"git -C {git_repo} rev-parse HEAD && git -C {git_repo} diff --no-color {base} {head}" | ||
| item = {"type": "command_execution", "id": "read-1", "command": command} | ||
| output = head + "\n" + native.decode(errors="replace") | ||
| events = [ |
There was a problem hiding this comment.
suggestion: The test builds a fake Codex output instead of exercising real Codex behavior
The test creates aggregated_output with native.decode(errors="replace"). That assumes Codex reports command output as lossy UTF-8 with CR bytes kept. If real Codex normalizes CRLF or trims trailing whitespace in aggregated_output, the new digest (which now includes the CR and final newline) would come out unknown in production while this test passes. Consider adding a CRLF case to the fake-codex subprocess test in tests/test_codex_transport.py, which runs real git through the transport path.
Architecture-Review: unchanged; tests exercise the documented exact Git evidence path. Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero delta review by claude on ddb222af12ec0e081225c6e11695a26e26df4258, 14.1s: approve (0 critical, 0 important, 0 suggestion)
Settings per native call (launch configuration and CLI claims, not backend attestation):
- Call 1: requested model claude-opus-5-5 (effort medium); CLI-reported model claude-opus-5-5 (effort unknown); configured model claude-opus-5-5 (effort medium)
Native Claude output is retained in the restricted local review receipt.
|
@Mergifyio queue |
❌ Left the queue ·
|
|
Handoff for ddb222a. The full sandboxed check passed, delta review approved with no findings, and |
|
Superseded by #1353. The source-cap increase cleared the first blocker. This replacement uses a smaller regression fixture to fit the separate test cap after integrating main. The production patch is carried forward. |
Preserve carriage returns in review diffs
Context and goal
Acceptance
A committed CRLF-only change keeps its carriage return and final newline in the supplied patch. Native inspection verifies the digest against Git's output. Existing text-mode callers retain their behavior.
Closes #1126
Base
Base: 47bdb17
Notes
The committed CRLF fixture failed before the change because the prompt dropped its carriage return and final newline. The full runner test file passed with the fix.
This replaces #1140 and carries its diff plus the fixes for its three blocking findings.
Validation
Recorded for
ddb222af12ecuv 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