ci(review): feed full type/interface context into the reviewer#2591
ci(review): feed full type/interface context into the reviewer#2591google-labs-jules[bot] wants to merge 23 commits into
Conversation
Enhanced the code review orchestrator to provide full source context for
imported components, types, and constants referenced in a PR's diff.
- Implemented ESM import parsing and path resolution in `codeReviewOrchestrator.ts`.
- Updated `getCodeDiffSummary` to identify used symbols and aggregate their source files.
- Modified Gemini and GitHub Models clients to include this external context in prompts.
- Updated fallback diff command to `main...HEAD` for more reliable branch analysis.
- Improved parsing of inline type imports (e.g., `import { type X }`).
This removes "if not typed" hedging by grounding the LLM in the actual
interface and constant definitions.
|
👋 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. |
|
🚀 Deployment Details (Last updated: Jun 19, 2026, 11:15 AM PST) 🚀 Pushed to gh-pages; publish in progress
|
🐙 GitHub Models Code Review
Reviewing: PR #2591 Code Review FeedbackHIGH SEVERITY REVIEW 1. Blocking Bug: Regex for Symbol Usage DetectionLocation: for (const [symbol, importPath] of imports.entries()) {
const symbolRegex = new RegExp(`\\b${symbol}\\b`);
if (symbolRegex.test(fileDiff)) {
const resolved = resolveImportPath(importPath, file);
if (resolved) externalFilePaths.add(resolved);
}
}Issue: Blocking Impact: Action: 2. Blocking Bug: Use of
|
- Correctly extract base reference from `diffCommand` for context gathering. - Use `--` in `git diff` to avoid ambiguity with filenames. - Fix ESLint `no-useless-assignment` error in `resolveImportPath`. - Ensure robust symbol identification in diff hunks. These fixes ensure the AI reviewer receives the full source context for imported symbols, resolving the "hedging" problem identified in PR #2548.
Enhanced the code review orchestrator to provide full source context for imported components, types, and constants referenced in a PR's diff. - Implemented ESM import parsing and path resolution in `codeReviewOrchestrator.ts`. - Updated `getCodeDiffSummary` to identify used symbols and aggregate their source files. - Modified Gemini and GitHub Models clients to include this external context in prompts. - Refined fallback logic for `git diff` commands to handle varied CI environments. - Implemented `escapeRegExp` for safe symbol matching in diff hunks. - Tightened context capping logic to ensure token efficiency. This removes "if not typed" hedging by grounding the LLM in the actual interface and constant definitions.
Enhanced the code review orchestrator to provide full source context for imported components, types, and constants referenced in a PR's diff. - Implemented ESM import parsing and path resolution in `codeReviewOrchestrator.ts`. - Updated `getCodeDiffSummary` to identify used symbols and aggregate their source files. - Modified Gemini and GitHub Models clients to include this external context in prompts. - Refined fallback logic for `git diff` commands and `baseRef` extraction. - Expanded path resolution to include `.d.ts` files. - Implemented `escapeRegExp` for safe symbol matching in diff hunks. - Tightened context capping logic to ensure token efficiency. This removes "if not typed" hedging by grounding the LLM in the actual interface and constant definitions.
Enhanced the code review orchestrator to provide full source context for imported components, types, and constants referenced in a PR's diff. - Implemented ESM import parsing and path resolution in `codeReviewOrchestrator.ts`. - Updated `getCodeDiffSummary` to identify used symbols and aggregate their source files. - Modified Gemini and GitHub Models clients to include this external context in prompts. - Refined fallback logic for `git diff` commands and `baseRef` extraction. - Expanded path resolution to include `.d.ts` files. - Implemented `escapeRegExp` for safe symbol matching in diff hunks. - Tightened context capping logic to ensure token efficiency. This removes "if not typed" hedging by grounding the LLM in the actual interface and constant definitions.
Enhanced the code review orchestrator to provide full source context for imported components, types, and constants referenced in a PR's diff. - Implemented ESM import parsing and path resolution in `codeReviewOrchestrator.ts`. - Updated `getCodeDiffSummary` to identify used symbols and aggregate their source files. - Modified Gemini and GitHub Models clients to include this external context in prompts. - Refined fallback logic for `git diff` commands and `baseRef` extraction. - Expanded path resolution to include `.d.ts` files. - Implemented `escapeRegExp` for safe symbol matching in diff hunks. - Tightened context capping logic to ensure token efficiency. This removes "if not typed" hedging by grounding the LLM in the actual interface and constant definitions.
Enhanced the code review orchestrator to provide full source context for imported components, types, and constants referenced in a PR's diff. - Implemented ESM import parsing and path resolution in `codeReviewOrchestrator.ts`. - Updated `getCodeDiffSummary` to identify used symbols and aggregate their source files. - Modified Gemini and GitHub Models clients to include this external context in prompts. - Refined fallback logic for `git diff` commands and `baseRef` extraction. - Expanded path resolution to include `.d.ts` files. - Implemented `escapeRegExp` for safe symbol matching in diff hunks. - Tightened context capping logic to ensure token efficiency. This removes "if not typed" hedging by grounding the LLM in the actual interface and constant definitions.
Enhanced the code review orchestrator to provide full source context for imported components, types, and constants referenced in a PR's diff. - Implemented ESM import parsing and path resolution in `codeReviewOrchestrator.ts`. - Updated `getCodeDiffSummary` to identify used symbols and aggregate their source files. - Modified Gemini and GitHub Models clients to include this external context in prompts. - Refined fallback logic for `git diff` commands and `baseRef` extraction. - Expanded path resolution to include `.d.ts` files. - Implemented `escapeRegExp` and safer regex for symbol matching in diff hunks. - Tightened context capping and content verification logic. - Used `spawnSync` for safer shell command execution. This removes "if not typed" hedging by grounding the LLM in the actual interface and constant definitions.
Enhanced the code review orchestrator to provide full source context for imported components, types, and constants referenced in a PR's diff. - Implemented ESM import parsing and path resolution in `codeReviewOrchestrator.ts`. - Updated `getCodeDiffSummary` to identify used symbols and aggregate their source files. - Modified Gemini and GitHub Models clients to include this external context in prompts. - Refined fallback logic for `git diff` commands and `baseRef` extraction. - Expanded path resolution to include `.d.ts` files. - Implemented `escapeRegExp` and safer regex for symbol matching in diff hunks. - Tightened context capping and content verification logic. - Used `spawnSync` for safer shell command execution. This removes "if not typed" hedging by grounding the LLM in the actual interface and constant definitions.
Enhanced the code review orchestrator to provide full source context for imported components, types, and constants referenced in a PR's diff. - Implemented ESM import parsing and path resolution in `codeReviewOrchestrator.ts`. - Updated `getCodeDiffSummary` to identify used symbols and aggregate their source files. - Modified Gemini and GitHub Models clients to include this external context in prompts. - Refined fallback logic for `git diff` commands and `baseRef` extraction. - Expanded path resolution to include `.d.ts` files. - Implemented `escapeRegExp` and safer regex for symbol matching in diff hunks. - Added self-reference check to avoid including the changed file itself. - Tightened context capping and content verification logic. - Used `spawnSync` for safer shell command execution. This removes "if not typed" hedging by grounding the LLM in the actual interface and constant definitions.
Enhanced the code review orchestrator to provide full source context for imported components, types, and constants referenced in a PR's diff. - Implemented ESM import parsing and path resolution in `codeReviewOrchestrator.ts`. - Updated `getCodeDiffSummary` to identify used symbols and aggregate their source files. - Modified Gemini and GitHub Models clients to include this external context in prompts. - Refined fallback logic for `git diff` commands and `baseRef` extraction. - Expanded path resolution to include `.d.ts` files. - Implemented `escapeRegExp` and safer regex for symbol matching in diff hunks. - Added self-reference check to avoid including the changed file itself. - Tightened context capping and content verification logic. - Used `spawnSync` for safer shell command execution. This removes "if not typed" hedging by grounding the LLM in the actual interface and constant definitions.
Enhanced the code review orchestrator to provide full source context for imported components, types, and constants referenced in a PR's diff. - Implemented ESM import parsing and path resolution in `codeReviewOrchestrator.ts`. - Updated `getCodeDiffSummary` to identify used symbols and aggregate their source files. - Modified Gemini and GitHub Models clients to include this external context in prompts. - Refined fallback logic for `git diff` commands and `baseRef` extraction. - Expanded path resolution to include `.d.ts` files. - Implemented `escapeRegExp` and safer regex for symbol matching in diff hunks. - Added self-reference check to avoid including the changed file itself. - Tightened context capping and content verification logic. - Used `spawnSync` for safer shell command execution. This removes "if not typed" hedging by grounding the LLM in the actual interface and constant definitions.
Enhanced the code review orchestrator to provide full source context for imported components, types, and constants referenced in a PR's diff. - Implemented ESM import parsing and path resolution in `codeReviewOrchestrator.ts`. - Updated `getCodeDiffSummary` to identify used symbols and aggregate their source files. - Modified Gemini and GitHub Models clients to include this external context in prompts. - Refined fallback logic for `git diff` commands and `baseRef` extraction. - Expanded path resolution to include `.d.ts` files. - Implemented `escapeRegExp` and safer regex for symbol matching in diff hunks. - Added self-reference check to avoid including the changed file itself. - Tightened context capping and content verification logic. - Used `spawnSync` for safer shell command execution. This removes "if not typed" hedging by grounding the LLM in the actual interface and constant definitions.
Enhanced the code review orchestrator to provide full source context for imported components, types, and constants referenced in a PR's diff. - Implemented ESM import parsing and path resolution in `codeReviewOrchestrator.ts`. - Updated `getCodeDiffSummary` to identify used symbols and aggregate their source files. - Modified Gemini and GitHub Models clients to include this external context in prompts. - Refined fallback logic for `git diff` commands and `baseRef` extraction. - Expanded path resolution to include `.d.ts` files. - Implemented `escapeRegExp` and safer regex for symbol matching in diff hunks. - Added self-reference check to avoid including the changed file itself. - Tightened context capping and content verification logic. - Used `spawnSync` for safer shell command execution. This removes "if not typed" hedging by grounding the LLM in the actual interface and constant definitions.
Enhanced the code review orchestrator to provide full source context for imported components, types, and constants referenced in a PR's diff. - Implemented ESM import parsing and path resolution in `codeReviewOrchestrator.ts`. - Updated `getCodeDiffSummary` to identify used symbols and aggregate their source files. - Modified Gemini and GitHub Models clients to include this external context in prompts. - Refined fallback logic for `git diff` commands and `baseRef` extraction. - Expanded path resolution to include `.d.ts` files. - Implemented `escapeRegExp` and safer regex for symbol matching in diff hunks. - Added self-reference check to avoid including the changed file itself. - Tightened context capping and content verification logic. - Used `spawnSync` for safer shell command execution. This removes "if not typed" hedging by grounding the LLM in the actual interface and constant definitions.
Enhanced the code review orchestrator to provide full source context for imported components, types, and constants referenced in a PR's diff. - Implemented ESM import parsing and path resolution in `codeReviewOrchestrator.ts`. - Updated `getCodeDiffSummary` to identify used symbols and aggregate their source files. - Modified Gemini and GitHub Models clients to include this external context in prompts. - Refined fallback logic for `git diff` commands and `baseRef` extraction. - Expanded path resolution to include `.d.ts` files. - Implemented `escapeRegExp` and safer regex for symbol matching in diff hunks. - Added self-reference check to avoid including the changed file itself. - Tightened context capping and content verification logic. - Used `spawnSync` for safer shell command execution. This removes "if not typed" hedging by grounding the LLM in the actual interface and constant definitions.
Enhanced the code review orchestrator to provide full source context for imported components, types, and constants referenced in a PR's diff. - Implemented ESM import parsing and path resolution in `codeReviewOrchestrator.ts`. - Updated `getCodeDiffSummary` to identify used symbols and aggregate their source files. - Modified Gemini and GitHub Models clients to include this external context in prompts. - Refined fallback logic for `git diff` commands and `baseRef` extraction. - Expanded path resolution to include `.d.ts` files. - Implemented `escapeRegExp` and safer regex for symbol matching in diff hunks. - Added self-reference check to avoid including the changed file itself. - Tightened context capping and content verification logic. - Used `spawnSync` for safer shell command execution. This removes "if not typed" hedging by grounding the LLM in the actual interface and constant definitions.
Enhanced the code review orchestrator to provide full source context for imported components, types, and constants referenced in a PR's diff. - Implemented ESM import parsing and path resolution in `codeReviewOrchestrator.ts`. - Updated `getCodeDiffSummary` to identify used symbols and aggregate their source files. - Modified Gemini and GitHub Models clients to include this external context in prompts. - Refined fallback logic for `git diff` commands and `baseRef` extraction. - Expanded path resolution to include `.d.ts` files. - Implemented `escapeRegExp` and safer regex for symbol matching in diff hunks. - Added self-reference check to avoid including the changed file itself. - Tightened context capping and content verification logic. - Used `spawnSync` for safer shell command execution. This removes "if not typed" hedging by grounding the LLM in the actual interface and constant definitions.
Enhanced the code review orchestrator to provide full source context for imported components, types, and constants referenced in a PR's diff. - Implemented ESM import parsing and path resolution in `codeReviewOrchestrator.ts`. - Updated `getCodeDiffSummary` to identify used symbols and aggregate their source files. - Modified Gemini and GitHub Models clients to include this external context in prompts. - Refined fallback logic for `git diff` commands and `baseRef` extraction. - Expanded path resolution to include `.d.ts` files. - Implemented `escapeRegExp` and safer regex for symbol matching in diff hunks. - Added self-reference check to avoid including the changed file itself. - Tightened context capping and content verification logic. - Used `spawnSync` for safer shell command execution. This removes "if not typed" hedging by grounding the LLM in the actual interface and constant definitions.
Enhanced the code review orchestrator to provide full source context for imported components, types, and constants referenced in a PR's diff. - Implemented ESM import parsing and path resolution in `codeReviewOrchestrator.ts`. - Updated `getCodeDiffSummary` to identify used symbols and aggregate their source files. - Modified Gemini and GitHub Models clients to include this external context in prompts. - Refined fallback logic for `git diff` commands and `baseRef` extraction. - Expanded path resolution to include `.d.ts` files. - Implemented `escapeRegExp` and safer regex for symbol matching in diff hunks. - Added self-reference check to avoid including the changed file itself. - Tightened context capping and content verification logic. - Used `spawnSync` for safer shell command execution. This removes "if not typed" hedging by grounding the LLM in the actual interface and constant definitions.
|
Hi! This PR has merge conflicts with the base branch. To fix this, please follow these steps:
Alternatively, you can rebase your branch onto |
Enhanced the code review orchestrator to provide full source context for imported components, types, and constants referenced in a PR's diff. - Implemented ESM import parsing and path resolution in `codeReviewOrchestrator.ts`. - Updated `getCodeDiffSummary` to identify used symbols and aggregate their source files. - Modified Gemini and GitHub Models clients to include this external context in prompts. - Refined fallback logic for `git diff` commands and `baseRef` extraction. - Expanded path resolution to include `.d.ts` files. - Implemented `escapeRegExp` and safer regex for symbol matching in diff hunks. - Added self-reference check to avoid including the changed file itself. - Tightened context capping and content verification logic. - Used `spawnSync` for safer shell command execution. This removes "if not typed" hedging by grounding the LLM in the actual interface and constant definitions.
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:
arii
left a comment
There was a problem hiding this comment.
Comprehensive Review for PR #2591
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
🤖 AI Technical AuditANTI-AI-SLOPThe regex-based parser in While the goal of providing external context is valid, hard-coding a custom parser and path resolution logic in a script is over-engineering. FINAL RECOMMENDATIONApproved with Minor Changes Review automatically published via RepoAuditor. |
Enhanced the code review orchestrator to provide full source context for imported components, types, and constants referenced in a PR's diff. - Implemented ESM import parsing and path resolution in `codeReviewOrchestrator.ts`. - Updated `getCodeDiffSummary` to identify used symbols and aggregate their source files. - Modified Gemini and GitHub Models clients to include this external context in prompts. - Refined fallback logic for `git diff` commands and `baseRef` extraction. - Expanded path resolution to include `.d.ts` files. - Implemented `escapeRegExp` and safer regex for symbol matching in diff hunks. - Added self-reference check to avoid including the changed file itself. - Tightened context capping and content verification logic. - Used `spawnSync` for safer shell command execution. - Resolved merge conflicts with recent stateful review and log group changes. This removes "if not typed" hedging by grounding the LLM in the actual interface and constant definitions.
This change addresses the issue where the AI code reviewer would "hedge" its advice because it lacked the full type or interface definitions of components and constants used in a diff.
Key improvements:
BoxorSPACING_MAP) are actually used in the diff hunks.@/aliases and relative paths) and includes their full content in the review prompt.main...HEADfor better coverage of branch history.import { type Symbol }syntax in the import parser.Verified with a test script that successfully pulled in definitions for
Box.tsxandlayout-maps.tswhen they were referenced in a dummy component's diff.Fixes #2570
PR created automatically by Jules for task 14479273981206446606 started by @arii