- patch-id --stable strips whitespace, so a whitespace-only amend collided
with its pre-amend reflog original and was demoted as a replay — hiding
agent work (macroscope, bugbot, codex). Switched to --verbatim and added
an integration test amending a whitespace-only change.
- Binary and mode-only sections have no ---/+++ lines, so they always
survived filtering even when git-attributed (codex). resolveDiffSectionPath
now falls back to rename/copy metadata and then the `diff --git` header
(with C-style quoted-path decoding); genuinely ambiguous headers are still
kept. Tests for binary, mode-only, quoted, spaced, rename-only, and
ambiguous sections.
- The diff panel banner was driven by the turn summary's origin tags while
the patch was filtered by an independent attribution pass, so the two
could disagree after partial failures (codex). getTurnDiff and
getFullThreadDiff now return gitFileCount from the same pass that filtered
the patch, and the banner uses that.
Codex also flagged attribution cost (re-running per diff-query variant);
deferred — all calls are plumbing on OIDs, the fast path covers turns
without HEAD movement, and caching by checkpoint pair can come later if
real-world latency shows up.
Co-Authored-By: Claude Fable 5 <[email protected]>