v1.4.5: Line Range Accuracy, Re-Review Suppression & Input Parameter Standards
🚀 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_rangetofilter_review_comments. Whencode_suggestioncontains multi-line original code andstart_linewas omitted (None), the action inspects file diff lines using contiguous sequential matching and automatically setsstart_lineandlinerange 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
InlineCommentschema 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.comcommitter with suggestion commit patterns). - Graceful Skip: On
pull_request: synchronizeevents, if the commit was created by accepting an inline suggestion,gemini_pr_review.pylogs 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'inaction.ymlinputs andGEMINI_SKIP_INLINE_SUGGESTIONSenv 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 inaction.yml, workflow.ymlfiles, and environment variables (GEMINI_*). - TOML Prompt Scope:
gemini-review.tomlis 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_statustogemini_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: writeandchecks: writepermissions.
🐛 Defensive Response Parsing & Exception Guarding (v1.4.2)
- Safely Handle Null/Empty Gemini API Responses: Fixed unhandled
TypeErrorwhenresponse.textisNone. - Property Getter Exception Guarding: Wrapped property accesses on
response.text,candidates,function_calls, andprompt_feedbackintry...exceptblocks inextract_response_text_or_raise. - Candidate Diagnostic Logging: Logs candidate
finish_reason,finish_message, safety ratings, and function call attempts tosys.stderrwhen text output is missing.
🧠 Holistic Engineering Review Scope (v1.4.2)
- Comprehensive Evaluation: Expanded system instructions and persona guidance to evaluate documentation updates (
.mdfiles, 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
ruffandcodespell.