-
Notifications
You must be signed in to change notification settings - Fork 165
feat: Add suggestionSnippets field to review schema and prompts #1101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Updates to Preview Branch (review-suggestion-patch-suggestion) ↗︎
Tasks are run on every commit but only new migration files are pushed.
View logs for this Workflow Run ↗︎. |
3667d29
to
b52e3b8
Compare
b52e3b8
to
9e6db88
Compare
9e6db88
to
3b80963
Compare
frontend/packages/prompt-test result: View results: https://app.promptfoo.dev/eval/f:4d45bcee-8391-48c5-9f56-69870146a07e ❌️ Promptfoo test failed
|
e606a5e
to
284efda
Compare
284efda
to
36c719a
Compare
c27f128
to
ac0e2bb
Compare
- Update tests in processSaveReview to include an empty suggestionSnippets array. - Enhance generateReview prompt documentation to define suggestionSnippets with filename and patch properties. - Extend reviewSchema to validate suggestionSnippets as an array of objects. - Update test fixtures to assert that suggestionSnippets are correctly included in the review report.
ac0e2bb
to
b8bfc8e
Compare
- type: javascript | ||
# Test 1: Check if the snippet has the exact correct file path | ||
value: | | ||
JSON.parse(output).issues.find(issue => issue.kind === "Migration Safety").suggestionSnippets[0].filename === "frontend/packages/db/prisma/migrations/20250328105323_add_branch_name_to_knowledge_suggestion/migration.sql" | ||
- type: javascript | ||
# Test 2: Check if the snippet suggests setting a DEFAULT value for the branchName column | ||
value: | | ||
JSON.parse(output).issues.find(issue => issue.kind === "Migration Safety").suggestionSnippets[0].snippet.includes("ALTER TABLE \"KnowledgeSuggestion\" ADD COLUMN \"branchName\" TEXT NOT NULL DEFAULT '") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to test those
PR Reviewer Guide 🔍(Review updated until commit 85131cc)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 85131cc
Previous suggestions✅ Suggestions up to commit b8bfc8e
|
ah, not (edited )done |
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍🏻
Issue
Why is this change needed?
This change introduces the
suggestionSnippets
field to provide patch-level details for each suggestion in the review report. By including this field, reviewers can now receive specific file patch information along with general suggestions, enhancing the clarity and actionability of the feedback. (Note: The UI to display this information is not yet implemented.)What would you like reviewers to focus on?
suggestionSnippets
field is correctly integrated in the review schema and reflected in both tests and documentation.suggestionSnippets
(i.e., an array of objects containingfilename
andpatch
).suggestionSnippets
in the review report.Testing Verification
#1101 (comment)
Some tests are failed, but are not relevant to this PR.
What was done
🤖 Generated by PR Agent at b8bfc8e
suggestionSnippets
field in review schema for detailed suggestions.suggestionSnippets
integration and structure.suggestionSnippets
usage.suggestionSnippets
correctness in reports.Detailed Changes
processSaveReview.test.ts
Update tests to include `suggestionSnippets` field
frontend/packages/jobs/src/functions/tests/processSaveReview.test.ts
suggestionSnippets
field to test data for issues.fixture.yaml
Add test fixtures for `suggestionSnippets` validation
frontend/packages/prompt-test/src/fixtures/github.com//pull/1033/fixture.yaml
suggestionSnippets
field.generateReview.ts
Enhance prompt documentation for `suggestionSnippets`
frontend/packages/jobs/src/prompts/generateReview/generateReview.ts
suggestionSnippets
field in the prompt structure.reviewSchema.ts
Extend review schema to include `suggestionSnippets`
frontend/packages/jobs/src/prompts/generateReview/reviewSchema.ts
suggestionSnippets
field to the review schema.filename
andpatch
.Additional Notes