Make Reviewer Bot Stateful and Factually Accurate#2589
Make Reviewer Bot Stateful and Factually Accurate#2589google-labs-jules[bot] wants to merge 38 commits into
Conversation
- Implemented state retrieval from PR comments to enable differential reviews. - Added repository-specific Knowledge Base to the LLM system prompt. - Improved report markdown with prominent verdict indicators. - Added unit tests for new state retrieval utility.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
🐙 GitHub Models Code Review
Reviewing: PR #2589 Code Review FeedbackDifferential ReviewAcknowledgement of Previously Flagged Issues
Persistent or New HIGH Severity IssuesNo persistent blocking bugs remain from the previous review. No new blocking bugs are introduced in this diff.
Final VerdictAll previously flagged blocking bugs are resolved. No new blocking bugs are introduced. [VERDICT: PASS] Generated by github-models-code-review |
|
🚀 Deployment Details (Last updated: Jun 19, 2026, 11:34 AM PST) 🚀 Pushed to gh-pages; publish in progress
|
- Refactored `getLatestPRComment` to reliably return the most recent bot comment by sorting by ID descending. - Added `created_at` to comment type definitions for better future-proofing. - Improved `postPRComment` error messages for easier debugging of GitHub API failures. - Fixed lint errors in unit tests by replacing `any` casts with proper Vitest `Mock` types. - Expanded unit tests to verify correct identification of the latest comment among multiple candidates. - (Previously) Implemented differential review logic and repository knowledge base in the system prompt.
- Refactored `getLatestPRComment` to reliably return the most recent bot comment by sorting by ID descending. - Added `created_at` to comment type definitions. - Improved `postPRComment` error messages. - Fixed lint errors in unit tests by replacing `any` casts with proper Vitest `Mock` types. - Expanded unit tests to verify correct identification of the latest comment. - Implemented differential review logic and repository knowledge base in the system prompt.
- Refactored `getLatestPRComment` to reliably return the most recent bot comment by sorting by ID descending. - Added `created_at` to comment type definitions. - Improved `postPRComment` error messages. - Fixed lint errors in unit tests by replacing `any` casts with proper Vitest `Mock` types. - Expanded unit tests to verify correct identification of the latest comment. - Implemented differential review logic and repository knowledge base in the system prompt.
- Refactored `getLatestPRComment` to reliably return the most recent bot comment by sorting by ID descending. - Added `created_at` to comment type definitions. - Improved `postPRComment` error messages. - Fixed lint errors in unit tests by replacing `any` casts with proper Vitest `Mock` types. - Expanded unit tests to verify correct identification of the latest comment. - Implemented differential review logic and repository knowledge base in the system prompt.
- Refactored `getLatestPRComment` to reliably return the most recent bot comment by sorting by ID descending. - Added `created_at` to comment type definitions. - Improved `postPRComment` error messages. - Fixed lint errors in unit tests by replacing `any` casts with proper Vitest `Mock` types. - Expanded unit tests to verify correct identification of the latest comment. - Implemented differential review logic and repository knowledge base in the system prompt.
- Refactored `getLatestPRComment` to reliably return the most recent bot comment by sorting by ID descending. - Added `created_at` to comment type definitions. - Improved `postPRComment` error messages. - Fixed lint errors in unit tests by replacing `any` casts with proper Vitest `Mock` types. - Expanded unit tests to verify correct identification of the latest comment. - Implemented differential review logic and repository knowledge base in the system prompt.
- Refactored `getLatestPRComment` to reliably return the most recent bot comment by sorting by ID descending. - Added `created_at` to comment type definitions. - Improved `postPRComment` error messages. - Fixed lint errors in unit tests by replacing `any` casts with proper Vitest `Mock` types. - Expanded unit tests to verify correct identification of the latest comment. - Implemented differential review logic and repository knowledge base in the system prompt.
- Refactored `getLatestPRComment` to reliably return the most recent bot comment by sorting by ID descending. - Added `created_at` to comment type definitions for better future-proofing. - Improved `postPRComment` error messages for easier debugging of GitHub API failures. - Fixed lint errors in unit tests by replacing `any` casts with proper Vitest `Mock` types. - Expanded unit tests to verify correct identification of the latest comment among multiple candidates. - Implemented differential review logic and repository knowledge base in the system prompt.
- Refactored `getLatestPRComment` to reliably return the most recent bot comment by sorting by ID descending. - Added `created_at` to comment type definitions. - Improved `postPRComment` error messages. - Fixed lint errors in unit tests by replacing `any` casts with proper Vitest `Mock` types. - Expanded unit tests to verify correct identification of the latest comment. - Implemented differential review logic and repository knowledge base in the system prompt.
- Refactored `getLatestPRComment` to reliably return the most recent bot comment by sorting by ID descending. - Added `created_at` to comment type definitions for better future-proofing. - Improved `postPRComment` error messages for easier debugging of GitHub API failures. - Fixed lint errors in unit tests by replacing `any` casts with proper Vitest `Mock` types. - Expanded unit tests to verify correct identification of the latest comment among multiple candidates. - Implemented differential review logic and repository knowledge base in the system prompt.
- Refactored `getLatestPRComment` to reliably return the most recent bot comment by sorting by ID descending. - Added `created_at` to comment type definitions. - Improved `postPRComment` error messages. - Fixed lint errors in unit tests by replacing `any` casts with proper Vitest `Mock` types. - Expanded unit tests to verify correct identification of the latest comment. - Implemented differential review logic and repository knowledge base in the system prompt.
- Refactored `getLatestPRComment` to reliably return the most recent bot comment by sorting by ID descending. - Added `created_at` to comment type definitions. - Improved `postPRComment` error messages. - Fixed lint errors in unit tests by replacing `any` casts with proper Vitest `Mock` types. - Expanded unit tests to verify correct identification of the latest comment. - Implemented differential review logic and repository knowledge base in the system prompt.
- Refactored `getLatestPRComment` to reliably return the most recent bot comment by sorting by ID descending. - Added `created_at` to comment type definitions for better future-proofing. - Improved `postPRComment` error messages for easier debugging of GitHub API failures. - Fixed lint errors in unit tests by replacing `any` casts with proper Vitest `Mock` types. - Expanded unit tests to verify correct identification of the latest comment among multiple candidates. - Implemented differential review logic and repository knowledge base in the system prompt.
- Refactored `getLatestPRComment` to reliably return the most recent bot comment by sorting by ID descending. - Added `created_at` to comment type definitions. - Improved `postPRComment` error messages. - Fixed lint errors in unit tests by replacing `any` casts with proper Vitest `Mock` types. - Expanded unit tests to verify correct identification of the latest comment. - Implemented differential review logic and repository knowledge base in the system prompt.
- Refactored `getLatestPRComment` to reliably return the most recent bot comment by sorting by ID descending. - Added `created_at` to comment type definitions. - Improved `postPRComment` error messages. - Fixed lint errors in unit tests by replacing `any` casts with proper Vitest `Mock` types. - Expanded unit tests to verify correct identification of the latest comment. - Implemented differential review logic and repository knowledge base in the system prompt.
- Refactored `getLatestPRComment` to reliably return the most recent bot comment by sorting by ID descending. - Added `created_at` to comment type definitions for better future-proofing. - Improved `postPRComment` error messages for easier debugging of GitHub API failures. - Fixed lint errors in unit tests by replacing `any` casts with proper Vitest `Mock` types. - Expanded unit tests to verify correct identification of the latest comment among multiple candidates. - Implemented differential review logic and repository knowledge base in the system prompt.
- Refactored `getLatestPRComment` to reliably return the most recent bot comment by sorting by ID descending. - Added `created_at` to comment type definitions. - Improved `postPRComment` error messages. - Fixed lint errors in unit tests by replacing `any` casts with proper Vitest `Mock` types. - Expanded unit tests to verify correct identification of the latest comment. - Implemented differential review logic and repository knowledge base in the system prompt.
- Refactored `getLatestPRComment` to reliably return the most recent bot comment by sorting by ID descending. - Added `created_at` to comment type definitions for better future-proofing. - Improved `postPRComment` error messages for easier debugging of GitHub API failures. - Fixed lint errors in unit tests by replacing `any` casts with proper Vitest `Mock` types. - Expanded unit tests to verify correct identification of the latest comment among multiple candidates. - Implemented differential review logic and repository knowledge base in the system prompt.
- Refactored `getLatestPRComment` to reliably return the most recent bot comment by sorting by ID descending. - Added `created_at` to comment type definitions for better future-proofing. - Improved `postPRComment` error messages for easier debugging of GitHub API failures. - Fixed lint errors in unit tests by replacing `any` casts with proper Vitest `Mock` types. - Expanded unit tests to verify correct identification of the latest comment among multiple candidates. - Implemented differential review logic and repository knowledge base in the system prompt.
- Refactored `getLatestPRComment` to reliably return the most recent bot comment by sorting by ID descending. - Added `created_at` to comment type definitions. - Improved `postPRComment` error messages. - Fixed lint errors in unit tests by replacing `any` casts with proper Vitest `Mock` types. - Expanded unit tests to verify correct identification of the latest comment. - Implemented differential review logic and repository knowledge base in the system prompt.
- Refactored `getLatestPRComment` to reliably return the most recent bot comment by sorting by ID descending. - Added `created_at` to comment type definitions. - Improved `postPRComment` error messages. - Fixed lint errors in unit tests by replacing `any` casts with proper Vitest `Mock` types. - Expanded unit tests to verify correct identification of the latest comment. - Implemented differential review logic and repository knowledge base in the system prompt.
- Refactored `getLatestPRComment` to reliably return the most recent bot comment by sorting by ID descending. - Added `created_at` to comment type definitions. - Improved `postPRComment` error messages. - Fixed lint errors in unit tests by replacing `any` casts with proper Vitest `Mock` types. - Expanded unit tests to verify correct identification of the latest comment. - Implemented differential review logic and repository knowledge base in the system prompt.
- Refactored `getLatestPRComment` to reliably return the most recent bot comment by sorting by ID descending. - Added `created_at` to comment type definitions. - Improved `postPRComment` error messages. - Fixed lint errors in unit tests by replacing `any` casts with proper Vitest `Mock` types. - Expanded unit tests to verify correct identification of the latest comment. - Implemented differential review logic and repository knowledge base in the system prompt.
- Refactored `getLatestPRComment` to reliably return the most recent bot comment by sorting by ID descending. - Added `created_at` to comment type definitions for better future-proofing. - Improved `postPRComment` error messages for easier debugging of GitHub API failures. - Fixed lint errors in unit tests by replacing `any` casts with proper Vitest `Mock` types. - Expanded unit tests to verify correct identification of the latest comment among multiple candidates. - Implemented differential review logic and repository knowledge base in the system prompt.
- Refactored `getLatestPRComment` to reliably return the most recent bot comment by sorting by ID descending. - Added `created_at` to comment type definitions for better future-proofing. - Improved `postPRComment` error messages for easier debugging of GitHub API failures. - Fixed lint errors in unit tests by replacing `any` casts with proper Vitest `Mock` types. - Expanded unit tests to verify correct identification of the latest comment among multiple candidates. - Implemented differential review logic and repository knowledge base in the system prompt. - Verified that all previously flagged issues from the bot itself are now acknowledged and cleared using the new differential logic.
- Refactored `getLatestPRComment` to reliably return the most recent bot comment by sorting by ID descending. - Added `created_at` to comment type definitions for better future-proofing. - Improved `postPRComment` error messages for easier debugging of GitHub API failures. - Fixed lint errors in unit tests by replacing `any` casts with proper Vitest `Mock` types. - Expanded unit tests to verify correct identification of the latest comment among multiple candidates. - Implemented differential review logic and repository knowledge base in the system prompt.
- Refactored `getLatestPRComment` to reliably return the most recent bot comment by sorting by ID descending. - Added `created_at` to comment type definitions for better future-proofing. - Improved `postPRComment` error messages for easier debugging of GitHub API failures. - Fixed lint errors in unit tests by replacing `any` casts with proper Vitest `Mock` types. - Expanded unit tests to verify correct identification of the latest comment among multiple candidates. - Implemented differential review logic and repository knowledge base in the system prompt. - Verified that all previously flagged issues from the bot itself are now acknowledged and cleared using the new differential logic.
- Refactored `getLatestPRComment` to reliably return the most recent bot comment by sorting by ID descending. - Added `created_at` to comment type definitions for better future-proofing. - Improved `postPRComment` error messages for easier debugging of GitHub API failures. - Fixed lint errors in unit tests by replacing `any` casts with proper Vitest `Mock` types. - Expanded unit tests to verify correct identification of the latest comment among multiple candidates. - Implemented differential review logic and repository knowledge base in the system prompt. - Verified that all previously flagged issues from the bot itself are now acknowledged and cleared using the new differential logic.
- Refactored `getLatestPRComment` to reliably return the most recent bot comment by sorting by ID descending. - Added `created_at` to comment type definitions for better future-proofing. - Improved `postPRComment` error messages for easier debugging of GitHub API failures. - Fixed lint errors in unit tests by replacing `any` casts with proper Vitest `Mock` types. - Expanded unit tests to verify correct identification of the latest comment among multiple candidates. - Implemented differential review logic and repository knowledge base in the system prompt. - Verified that all previously flagged issues from the bot itself are now acknowledged and cleared using the new differential logic.
- Refactored `getLatestPRComment` to reliably return the most recent bot comment by sorting by ID descending. - Added `created_at` to comment type definitions for better future-proofing. - Improved `postPRComment` error messages for easier debugging of GitHub API failures. - Fixed lint errors in unit tests by replacing `any` casts with proper Vitest `Mock` types. - Expanded unit tests to verify correct identification of the latest comment among multiple candidates. - Implemented differential review logic and repository knowledge base in the system prompt. - Verified that all previously flagged issues from the bot itself are now acknowledged and cleared using the new differential logic.
- Refactored `getLatestPRComment` to reliably return the most recent bot comment by sorting by ID descending. - Added `created_at` to comment type definitions for better future-proofing. - Improved `postPRComment` error messages for easier debugging of GitHub API failures. - Fixed lint errors in unit tests by replacing `any` casts with proper Vitest `Mock` types. - Expanded unit tests to verify correct identification of the latest comment among multiple candidates. - Implemented differential review logic and repository knowledge base in the system prompt. - Verified that all previously flagged issues from the bot itself are now acknowledged and cleared using the new differential logic.
- Refactored `getLatestPRComment` to reliably return the most recent bot comment by sorting by ID descending. - Added `created_at` to comment type definitions for better future-proofing. - Improved `postPRComment` error messages for easier debugging of GitHub API failures. - Fixed lint errors in unit tests by replacing `any` casts with proper Vitest `Mock` types. - Expanded unit tests to verify correct identification of the latest comment among multiple candidates. - Implemented differential review logic and repository knowledge base in the system prompt. - Verified that all previously flagged issues from the bot itself are now acknowledged and cleared using the new differential logic.
- Refactored `getLatestPRComment` to reliably return the most recent bot comment by sorting by ID descending. - Added `created_at` to comment type definitions for better future-proofing. - Improved `postPRComment` error messages for easier debugging of GitHub API failures. - Fixed lint errors in unit tests by replacing `any` casts with proper Vitest `Mock` types. - Expanded unit tests to verify correct identification of the latest comment among multiple candidates. - Implemented differential review logic and repository knowledge base in the system prompt.
|
Hi! This PR has merge conflicts with the base branch. To fix this, please follow these steps:
Alternatively, you can rebase your branch onto |
…l diffs - Implemented ReviewState persistence via hidden base64 HTML comments. - Added incremental diff generation (git diff lastSha HEAD) to provide AI with fix verification context. - Updated system prompt for Differential Reviews and repository-specific grounding. - Added visible Review History table and Latest Verdict indicators to PR reports. - Refactored getLatestPRComment with ID-descending sorting for reliable targeting. - Added comprehensive unit tests for state management and retrieval logic. - Resolved linting issues and confirmed type-safety.
- Added base64 state tag persistence in PR comments to track reviewed SHAs. - Implemented incremental diff generation (git diff lastSha HEAD) for fix verification. - Enhanced system prompt for Differential Reviews and repository Knowledge Base. - Added visible Review History table and prominent Verdict indicators. - Verified logic with unit tests and resolved merge conflicts.
arii
left a comment
There was a problem hiding this comment.
ANTI-AI-SLOP\n\n\n## FINDINGS\n\n\n## FINAL RECOMMENDATION\n<Approved | Approved with Minor Changes | Not Approved>\n\n
Inline Comments (Fallback due to Github line resolution errors)
- :1:
arii
left a comment
There was a problem hiding this comment.
ANTI-AI-SLOP\n\n\n## FINDINGS\n\n\n## FINAL RECOMMENDATION\n<Approved | Approved with Minor Changes | Not Approved>\n\n
Inline Comments (Fallback due to Github line resolution errors)
- :1:
🤖 AI Technical AuditANTI-AI-SLOP
FINAL RECOMMENDATIONApproved with Minor Changes Review automatically published via RepoAuditor. |
arii
left a comment
There was a problem hiding this comment.
Comprehensive Review for PR #2589
CI Status: All checks passing.
Recommendation: Everything looks good from a CI perspective. All tests and linters pass. Ready for manual review/merge if no other concerns.
FINAL RECOMMENDATION
Approved
- Changed countExistingReviews to count distinct bot comments to avoid premature quota limits on edited comments. - Enhanced orchestrateCodeReview to skip redundant 'No code changes detected' updates if a review already exists. - Updated AI prompt to handle empty incremental diffs explicitly. - Fixed postPRComment signature and integrated formatReviewState for robust persistence in both code and visual reviews. - Added unit tests for new state management and counting logic.
This PR addresses the statelessness and factual inaccuracies of the GitHub Models code review bot.
Key improvements:
max-h-none), numeric spacing tokens (e.g.,96), and custom tokens (viewport-half).getLatestPRCommentutility to ensure reliable identification and fetching of previous review comments.These changes directly resolve the observed problems where the reviewer would flip-flop on verdicts or flag valid repository patterns as bugs.
Fixes #2563
PR created automatically by Jules for task 98446873102345824 started by @arii