Skip to content

v1.4.5: Line Range Accuracy, Re-Review Suppression & Input Parameter Standards

Choose a tag to compare

@derailed-dash derailed-dash released this 26 Jul 16:21
· 36 commits to main since this release

🚀 What's New in v1.4.5

This release introduces accurate inline code suggestion line range targeting, suppresses redundant re-review loops on inline fixes, establishes clear Action input parameter standards, and consolidates all 1.4.x features and bug fixes.


✏️ Line Range Accuracy & Inline Fix Duplication Fix (v1.4.5)

  • Inline Suggestion Range Auto-Correction: Added _auto_correct_suggestion_range to filter_review_comments. When code_suggestion contains multi-line original code and start_line was omitted (None), the action inspects file diff lines using contiguous sequential matching and automatically sets start_line and line range bounds.
  • Eliminate Duplicated Code Blocks: Prevents GitHub's inline "Commit suggestion" button from replacing single lines with multi-line blocks that duplicate surrounding code.
  • System Instruction Guidance: Updated InlineComment schema docstrings and system instructions to explicitly mandate [start_line..line] range bounds whenever multi-line original code is included in suggestions.

🔕 Re-Review Suppression on Inline Suggestion Commits (v1.4.5)

  • Ignore GitHub UI Suggestion Commits: Added is_inline_suggestion_commit() to detect commits created when developers click "Commit suggestion" in GitHub UI (web-flow / noreply@github.com committer with suggestion commit patterns).
  • Graceful Skip: On pull_request: synchronize events, if the commit was created by accepting an inline suggestion, gemini_pr_review.py logs a skip notice and exits gracefully (sys.exit(0)), preventing noisy and unneeded immediate re-review passes.
  • Configurable Input: Controlled via skip_inline_suggestions: 'true' in action.yml inputs and GEMINI_SKIP_INLINE_SUGGESTIONS env var (default: 'true').

⚙️ Action Input Parameter Standards & AGENTS.md Rule (v1.4.5)

  • Workflow Input Parameter Architecture: Operational configuration parameters (such as skip_inline_suggestions, include_comment_history, language, persona, timeout) MUST be configured via action input parameters in action.yml, workflow .yml files, and environment variables (GEMINI_*).
  • TOML Prompt Scope: gemini-review.toml is strictly reserved for prompt text templates and custom prompt overrides.
  • Project Guidance: Documented parameter vs TOML configuration rules in AGENTS.md.

🔄 Automatic PR Status Check Updates & Permissions (v1.4.3 & v1.4.4)

  • Commit Statuses API Integration: Added post_commit_status to gemini_review/github.py. Posts a commit status check update (state='success', context="Dazbo's Gemini Code Review / review (pull_request)") to GitHub upon review completion.
  • Required Workflow Permissions: Updated workflows to require statuses: write and checks: write permissions.

🐛 Defensive Response Parsing & Exception Guarding (v1.4.2)

  • Safely Handle Null/Empty Gemini API Responses: Fixed unhandled TypeError when response.text is None.
  • Property Getter Exception Guarding: Wrapped property accesses on response.text, candidates, function_calls, and prompt_feedback in try...except blocks in extract_response_text_or_raise.
  • Candidate Diagnostic Logging: Logs candidate finish_reason, finish_message, safety ratings, and function call attempts to sys.stderr when text output is missing.

🧠 Holistic Engineering Review Scope (v1.4.2)

  • Comprehensive Evaluation: Expanded system instructions and persona guidance to evaluate documentation updates (.md files, READMEs, architecture records) alongside source code.
  • Expanded PR Summary Budget: Target PR summary budget set to 3–6 sentences.

🧪 Rick Sanchez Persona & Context Cache Isolation (v1.4.1)

  • Rick Sanchez Persona (rick): Added Rick Sanchez from Rick and Morty as a selectable reviewer persona overlay (persona: 'rick').
  • Persona Context Cache Isolation: Appended active persona suffix to Gemini context cache key (repo-cache-{repo}-{model}-{persona}) to guarantee persona cache separation.

🧪 Test Coverage & Quality

  • Added unit tests for is_inline_suggestion_commit, _auto_correct_suggestion_range, post_commit_status, property getter exceptions, and persona cache isolation (70 total unit tests passing).
  • Fully formatted and validated with ruff and codespell.