You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary verdict: 1 medium-severity issue found; no high or critical findings.
Medium
internal/prompt/template_context.go:251, internal/prompt/templates/prompt_sections.md.gotmpl:71
The new fallback model can silently render an empty diff section. diff_block now takes the fallback path whenever .Fallback.HasContent is true, but FallbackContext.Rendered() only renders Text and Dirty.Body. If callers populate Commit, Range, or Generic, the template suppresses .Diff.Body and emits no fallback content.
Fix: either implement rendering for all structured fallback variants in Rendered()/templates, or make HasContent only report truly renderable content until those branches are supported. Add tests covering commit/range/generic fallback rendering.
Verdict: 2 medium-severity regressions in prompt behavior should be addressed before merge.
Medium
internal/prompt/prompt.go:821-839, internal/prompt/templates/prompt_sections.md.gotmpl:29-43
Range-review prompts no longer include prior per-commit review context for commits inside the reviewed range. The removed InRangeReviews population/rendering path means range reviews can resurface issues that were already found earlier in the stack or fixed by later commits.
internal/prompt/prompt.go:1126-1139, internal/prompt/templates/prompt_sections.md.gotmpl:135-140 BuildAddressPrompt now merges automated fix attempts and human developer comments into one PreviousAttempts block. That removes the distinct user-comment context and can cause developer guidance to be treated like another failed attempt instead of instructions to honor while fixing.
Finding: Range-review prompts no longer include prior per-commit review context for commits inside the selected range. With the old InRangeReviews population/rendering path removed, the reviewer loses the “already reviewed in this range” guidance and can resurface issues that were already identified or fixed later in the stack.
Suggested fix: Restore an equivalent InRangeReviews field in the consolidated context and render it from optional_sections for range prompts.
Developer comments are conflated with failed fix attempts
Finding: BuildAddressPrompt now merges automated fix attempts and human developer comments into a single PreviousAttempts block. That removes the dedicated ## User Comments section and reframes operator guidance as just another failed attempt, which can cause the agent to underweight or misinterpret explicit developer instructions.
Suggested fix: Keep separate fields for tool attempts and user comments in the address-template context, or preserve the prior split behavior when building the prompt.
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
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.
Summary
TemplateContextrootStack
gotmpl->main)gotmplTest Plan