What happened
In PR #1586, the author removed footnote formatting logic from FormatTaskName in status/format.go. After the removal, the function unconditionally returns name, nil — it no longer uses the test result at all. However, the function still calls GetTestResult() (which performs JSON unmarshaling and schema validation) even though its return value is no longer consumed.
The fullsend review agent (run 26946810360) approved the PR and correctly identified the behavioral change and the removal of FormatFootnotes, but did not flag the now-unnecessary GetTestResult() call. The gemini-code-assist bot caught this optimization in an inline review comment on status/format.go, suggesting the call could be removed for a performance improvement.
What could go better
The review agent should perform a "refactoring completeness" check: when a PR simplifies a function by removing code paths, verify that remaining calls, imports, and variable assignments within the changed function are still necessary. In this case, FormatTaskName was reduced to trivially returning its input, but still called an expensive helper whose result was discarded.
This is distinct from existing cross-file impact analysis issues (#1525) because the dead code is within the changed function itself — no cross-file reasoning is needed. The agent had full visibility of the simplified function and could have detected that GetTestResult() was called but its result unused in any remaining code path.
Confidence: Medium-high. The pattern is clear in this instance, but the frequency across other PRs is unknown. The impact per occurrence is low (minor performance improvement), but catching these improves review credibility and reduces follow-up cleanup PRs.
Proposed change
Add a review heuristic to the review agent's analysis prompt (in the review agent definition or review skill) that instructs it to check for refactoring completeness:
When a PR simplifies or removes logic from a function, verify that all remaining function calls, variable assignments, and imports within the changed scope are still consumed. Flag any calls whose return values are no longer used, or imports that are no longer referenced, as candidates for removal.
This should be scoped to changed functions only (not a full codebase scan) to keep token cost low. It could be framed as an optional [refactoring-completeness] finding category at info or low severity.
Validation criteria
On the next 5 PRs to konflux-ci/integration-service (or similar Go repos) that simplify functions by removing code paths, the review agent should flag at least one instance of a newly-unnecessary call or import that it would have previously missed. False positive rate should remain below 20% (i.e., at most 1 in 5 flagged items should be incorrect).
Generated by retro agent from konflux-ci/integration-service#1586
What happened
In PR #1586, the author removed footnote formatting logic from
FormatTaskNameinstatus/format.go. After the removal, the function unconditionally returnsname, nil— it no longer uses the test result at all. However, the function still callsGetTestResult()(which performs JSON unmarshaling and schema validation) even though its return value is no longer consumed.The fullsend review agent (run 26946810360) approved the PR and correctly identified the behavioral change and the removal of
FormatFootnotes, but did not flag the now-unnecessaryGetTestResult()call. The gemini-code-assist bot caught this optimization in an inline review comment onstatus/format.go, suggesting the call could be removed for a performance improvement.What could go better
The review agent should perform a "refactoring completeness" check: when a PR simplifies a function by removing code paths, verify that remaining calls, imports, and variable assignments within the changed function are still necessary. In this case,
FormatTaskNamewas reduced to trivially returning its input, but still called an expensive helper whose result was discarded.This is distinct from existing cross-file impact analysis issues (#1525) because the dead code is within the changed function itself — no cross-file reasoning is needed. The agent had full visibility of the simplified function and could have detected that
GetTestResult()was called but its result unused in any remaining code path.Confidence: Medium-high. The pattern is clear in this instance, but the frequency across other PRs is unknown. The impact per occurrence is low (minor performance improvement), but catching these improves review credibility and reduces follow-up cleanup PRs.
Proposed change
Add a review heuristic to the review agent's analysis prompt (in the review agent definition or review skill) that instructs it to check for refactoring completeness:
This should be scoped to changed functions only (not a full codebase scan) to keep token cost low. It could be framed as an optional
[refactoring-completeness]finding category at info or low severity.Validation criteria
On the next 5 PRs to konflux-ci/integration-service (or similar Go repos) that simplify functions by removing code paths, the review agent should flag at least one instance of a newly-unnecessary call or import that it would have previously missed. False positive rate should remain below 20% (i.e., at most 1 in 5 flagged items should be incorrect).
Generated by retro agent from konflux-ci/integration-service#1586