Repository navigation
fix(audit): stop presenting a guess as the change being proposed - #27
Merged
Merged
Conversation
`report()` rendered RENAMED and SIMILAR through the same loop, in the same
before/after diff shape, separated only by a colour that `--no-colour`
strips. In a CI pull request body that left one word telling a reader which
findings had been applied and which were guesses -- and the guess arrived
pre-formatted as a patch, ready to paste.
WhiteSur is the case. Its weekly watch opened three pull requests, one per
channel, each advertising `#placesToolbar` -> `#PlacesToolbar` in that
format. They are different elements in different documents: the Library
window's toolbar in places.xhtml, and the browser window's bookmarks toolbar
in browser.xhtml. Applying it would have moved Library styling onto the
bookmarks bar. Nothing applied it -- write_patch only emits `renamed` -- but
it was recommended, three times, in the same shape as the real fix.
Three changes, none of which touch which findings are produced:
- A near-miss finding now carries `replacement_home`, the document the
suggested name actually lives in. The pack already knew; nothing asked
it. "#PlacesToolbar belongs to browser.xhtml" is the single line that
makes this class of error self-evident.
- Suggestions no longer render as a diff. The current line is shown
unadorned, marked "(a guess, not applied)", with a note to check what
reads the replacement first. The +/- shape is what invites the paste.
- The watch template puts the applied patch under its own heading and
folds the full report into a <details>, so suggestions read as context
rather than as part of the proposal.
Exact matches are untouched: still a diff, still patched, byte-identical
output verified against WhiteSur on Firefox 153.
Co-Authored-By: Claude Fable 5 <[email protected]>
adamXbot
force-pushed
the
fix/suggestions-are-not-patches
branch
from
September 1, 2026 06:09
6287341 to
b778d52
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
report()renderedRENAMEDandSIMILARthrough the same loop, in the same before/after diff shape, separated only by a colour that--no-colourstrips. In a CI pull request body that leaves one word telling a reader which findings were applied and which are guesses — and the guess arrives pre-formatted as a patch, ready to paste.The case
WhiteSur's weekly watch opened three pull requests this week, one per channel, each advertising:
directly beneath the
RENAMEDblock it had applied, in identical formatting. Those are different elements in different documents — the Library window's toolbar inplaces.xhtml, and the browser window's bookmarks toolbar inbrowser.xhtml. Applying it would have moved Library styling onto the bookmarks bar.Nothing applied it:
write_patchonly emitsrenamed, and the attached patch was the unrelated fix alone. But it was recommended, three times, in the shape of a change already made.Three changes
A near-miss finding now carries
replacement_home— the document the suggested name actually lives in. The pack has always known; nothing asked it. This is the line that makes the whole class of error self-evident:Suggestions no longer render as a diff. The current line is shown unadorned. The
+/-shape is the thing that invites a paste.The watch template splits the body — the applied patch under its own heading, the full report folded into a
<details>, so suggestions read as context rather than as part of the proposal.Not changed
Which findings are produced, and how exact matches are handled: still a diff, still patched. Verified byte-identical against WhiteSur on Firefox 153 — same
RENAMEDblock, same generated patch.263 unit tests. The new ones pin that an exact match still renders as a diff, that a guess does not, that it says it was not applied, that it names the replacement's document, and that the two remain distinguishable with colour stripped.
Note
0.20.0 already reclassifies this particular finding as healthy, so the
#placesToolbarsuggestion is gone from WhiteSur regardless. This is about the next near-miss, whatever it turns out to be.🤖 Generated with Claude Code