Skip to content

fix(judge): treat incomplete tool analysis as a warning, not a gate failure - #23

Merged
JorgeOlmosDev merged 2 commits into
mainfrom
fix/errorprone-degraded-not-failed
Jul 12, 2026
Merged

fix(judge): treat incomplete tool analysis as a warning, not a gate failure#23
JorgeOlmosDev merged 2 commits into
mainfrom
fix/errorprone-degraded-not-failed

Conversation

@JorgeOlmosDev

Copy link
Copy Markdown
Contributor

Problem

tool_execution collapsed two very different outcomes into a single FAIL:

  1. A tool that could not run at all (real failure).
  2. A tool that ran but could only analyze part of the target (degraded).

The second is the common case for Error Prone on any repo using annotation processors (Lombok, AutoValue, Dagger, MapStruct…): its isolated javac hits unresolved symbols, Error Prone reports what it could and flags the run incomplete. gavel then failed the verdict of an otherwise-clean repo for a reason unrelated to code quality — observed on buildfarm (Lombok), where tool_execution came back FAIL.

Same class of bug as the TypeScript false-green we just fixed: gavel giving a wrong verdict on a legitimate input.

Fix

Split the two outcomes. A toolexecution.Failure now carries a degraded flag:

  • Hard failure (executionSuccessful=false) → still fails the gate.
  • Degraded (a tool reports warning-level toolExecutionNotifications on a successful invocation) → the gate passes, but the tool_execution ruling carries an honest incomplete analysis — … detail so the gap is never silent.

Never fail on a legitimate input; never hide that coverage was partial.

Scope / compatibility

  • gavel side only (domain Failure + ruling + DTO + SARIF parser).
  • Backward-compatible with the current wrapper: executionSuccessful=false keeps failing. It starts honoring degraded runs the moment the matching gavel_tools wrapper (emits executionSuccessful=true + warning notification for the incomplete case) lands and the pin is bumped.

Tests (TDD)

  • Parser: successful invocation + warning notification → degraded failure; hard failure stays non-degraded.
  • Ruling: degraded-only → PASS with incomplete analysis detail; a hard failure alongside a degraded one still FAILs.

…ailure

tool_execution collapsed two different outcomes into one FAIL: a tool that
could not run at all, and a tool that ran but could only analyze part of the
target. The second is the common case for Error Prone on any repo using
annotation processors (Lombok, AutoValue, Dagger…): javac hits unresolved
symbols, Error Prone reports what it could and flags the run incomplete — and
gavel failed the verdict of an otherwise-clean repo for a reason that has
nothing to do with code quality.

Split the two. A Failure now carries a degraded flag: hard failures (executionSuccessful=false)
still fail the gate; degraded runs — surfaced by a tool as warning-level
toolExecutionNotifications on a *successful* invocation — pass the gate but the
ruling carries an honest "incomplete analysis — …" detail so the gap is never
silent. Same principle as the TypeScript unanalyzed-tools warning: never fail
on a legitimate input, never hide that coverage was partial.

The wrapper side that emits the degraded signal ships in gavel_tools; this
change is backward-compatible with the current wrapper (executionSuccessful=false
keeps failing) and starts honoring degraded runs the moment the new wrapper lands.
@codecov

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.65217% with 2 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
.../application/casefile/evidencedto/toolexecution.go 87.50% 1 Missing ⚠️
core/infrastructure/casefile/sarif/executions.go 94.11% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@github-actions

Copy link
Copy Markdown

Gavel verdict

Project Verdict New Fixed Coverage
cli ✅ pass 0 0 94.0%
core ✅ pass 0 0 94.0%
server ✅ pass 0 0 94.0%
tools ✅ pass 0 0 94.0%
web ✅ pass 0 0 94.0%

@JorgeOlmosDev
JorgeOlmosDev merged commit c1425ee into main Jul 12, 2026
10 checks passed
@JorgeOlmosDev
JorgeOlmosDev deleted the fix/errorprone-degraded-not-failed branch July 12, 2026 09:59
JorgeOlmosDev added a commit that referenced this pull request Jul 13, 2026
…ailure (#23)

* fix(judge): treat incomplete tool analysis as a warning, not a gate failure

tool_execution collapsed two different outcomes into one FAIL: a tool that
could not run at all, and a tool that ran but could only analyze part of the
target. The second is the common case for Error Prone on any repo using
annotation processors (Lombok, AutoValue, Dagger…): javac hits unresolved
symbols, Error Prone reports what it could and flags the run incomplete — and
gavel failed the verdict of an otherwise-clean repo for a reason that has
nothing to do with code quality.

Split the two. A Failure now carries a degraded flag: hard failures (executionSuccessful=false)
still fail the gate; degraded runs — surfaced by a tool as warning-level
toolExecutionNotifications on a *successful* invocation — pass the gate but the
ruling carries an honest "incomplete analysis — …" detail so the gap is never
silent. Same principle as the TypeScript unanalyzed-tools warning: never fail
on a legitimate input, never hide that coverage was partial.

The wrapper side that emits the degraded signal ships in gavel_tools; this
change is backward-compatible with the current wrapper (executionSuccessful=false
keeps failing) and starts honoring degraded runs the moment the new wrapper lands.

* build(deps): bump gavel_tools to 0.3.8 for degraded-analysis wrapper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant