2 Commits

Author SHA1 Message Date
codex
d876c7a6fb fix(hermes): stop describing a finding as a failed build
All checks were successful
Tests / Declarative: Post Actions passed: 1440
The first advice issues went out rendered through build-failure wording and
were wrong in four places at once: the title printed a source line as a build
number, the header claimed a first failed gate for a build that passed, the
heading asked why a human was needed when nothing had broken, and the
SonarQube link was labelled "Failed build".

Every one of those is small and every one of them is the kind of thing that
makes a reader distrust the rest of the page - which matters more here than
usual, because the whole point of the issue is a suggestion they have to judge
for themselves.

A finding-sourced issue now says what it is: SonarQube reports this rule in
this file, the build is green, this is a standing finding rather than a
failure. Build-failure issues are untouched, and a test asserts each wording
stays out of the other.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-07 05:22:03 -03:00
codex
03f5fbf599 feat(hermes): file a suggested fix when a finding cannot become a patch
All checks were successful
Tests / Declarative: Post Actions passed: 1438
The sweep opens a pull request only when everything lines up: mapped
repository, file inside the write allowlist, and a change expressible as one
anchored snippet. Most of this instance's backlog fails the last of those -
the bulk of it is cognitive-complexity refactors - so those findings produced
nothing at all. That is backwards. A finding nobody can patch automatically is
precisely the one a maintainer has to do by hand, which is when knowing the
intended fix is worth the most.

Such findings now become an issue carrying the finding, links to both the
SonarQube entry and the Hermes run, and the code Hermes believes would resolve
it. A declined pull request falls through to the same path rather than ending
the attempt.

Not a patch, and the issue says so: nothing here is anchored, validated
against the file, or pushed. That is what lets a suggestion describe work too
large or too diffuse for the patcher, which is the whole point of the path.

Deduped on the rule through the existing issue marker, so one root cause
yields one issue however many files it spans. Off by default: it writes to
real repositories, so an operator turns it on deliberately.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-07 05:00:08 -03:00