Skip to content

Conversation

@hentrymartin
Copy link
Collaborator

What's in this PR?

  • Added aiWorkflowId to DefaultChallengeReviewer schema
  • Added logic to save and retrieve it using default-challenge-reviewer API endpoints

timelineTemplateId String?
// Reviewer configuration (mirrors ChallengeReviewer)
scorecardId String
scorecardId String?
Copy link
Collaborator Author

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.

incrementalCoefficient Float?
opportunityType ReviewOpportunityTypeEnum?
isAIReviewer Boolean?
aiWorkflowId String?
Copy link
Contributor

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.

@kkartunov kkartunov self-requested a review November 12, 2025 16:26
*/
-- AlterTable
ALTER TABLE "DefaultChallengeReviewer" DROP COLUMN "isAIReviewer",
ADD COLUMN "aiWorkflowId" VARCHAR(14),

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)

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])
}
}

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.

Copy link
Contributor

@kkartunov kkartunov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@hentrymartin hentrymartin merged commit 9a79208 into develop Nov 12, 2025
6 checks passed
@hentrymartin hentrymartin deleted the pm-2540_3 branch November 12, 2025 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants