-
Notifications
You must be signed in to change notification settings - Fork 6
feat(PM-2540): added ai workflow id to default reviewer #52
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
prisma/migrations/20251112162335_aiworkflowid_in_def_challenge_reviewer/migration.sql
Show resolved
Hide resolved
prisma/migrations/20251112162335_aiworkflowid_in_def_challenge_reviewer/migration.sql
Show resolved
Hide resolved
| timelineTemplateId String? | ||
| // Reviewer configuration (mirrors ChallengeReviewer) | ||
| scorecardId String | ||
| scorecardId String? |
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.
@kkartunov @jmgasper fyi, I am making scorecardId field nullable as default AI reviewers can be created without a scorecard.
prisma/schema.prisma
Outdated
| incrementalCoefficient Float? | ||
| opportunityType ReviewOpportunityTypeEnum? | ||
| isAIReviewer Boolean? | ||
| aiWorkflowId String? |
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.
@hentrymartin modify the type to String? @db.VarChar(14) as per ticket spec.
| */ | ||
| -- AlterTable | ||
| ALTER TABLE "DefaultChallengeReviewer" DROP COLUMN "isAIReviewer", | ||
| ADD COLUMN "aiWorkflowId" VARCHAR(14), |
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.
[performance]
Consider using CHAR(14) instead of VARCHAR(14) if the aiWorkflowId is always expected to be exactly 14 characters long. This can improve performance slightly and ensure data consistency.
| incrementalCoefficient Float? | ||
| opportunityType ReviewOpportunityTypeEnum? | ||
| isAIReviewer Boolean? | ||
| aiWorkflowId String? @db.VarChar(14) |
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.
[❗❗ correctness]
The @db.VarChar(14) annotation specifies a maximum length for the aiWorkflowId field. Ensure that this length is sufficient for all potential values, as truncation could lead to data loss or errors when storing longer IDs.
| @@index([timelineTemplateId]) | ||
| @@index([timelineTemplateId, phaseId]) | ||
| } | ||
| } |
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.
[💡 style]
The lack of a newline at the end of the file can cause issues with some tools and version control systems. Consider adding a newline to improve compatibility.
kkartunov
left a comment
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.
Looks good
What's in this PR?