PM-5015 ai only review#114
Merged
Merged
Conversation
…v6 into PM-5015_ai-only-review
There was a problem hiding this comment.
Pull request overview
This PR adds first-class support for “AI Only” challenges by introducing a new AI Review phase, an AI Only Challenge timeline template, and update-time logic to automatically switch/revert timeline templates and bypass manual-reviewer requirements when AI-only review mode is enabled.
Changes:
- Seeded a new AI Review phase and an AI Only Challenge timeline template (in both migrations and seed data).
- Updated challenge update/activation flow to auto-select (or revert) the timeline template based on AI-only configuration, and to prevent adding AI Screening when AI Review is present.
- Added configuration and CI/deployment helpers for the AI-only template and dev deploy tagging.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/services/ChallengeService.js | Auto-switch/revert timeline templates for AI_ONLY mode; skip AI Screening and manual reviewer validation where applicable. |
| src/services/ChallengePhaseService.js | Skip “Reviewer resource required” check for Review phase when AI_ONLY mode is enabled. |
| src/common/challenge-helper.js | Skip AI Screening insertion when an AI Review phase already exists. |
| src/scripts/seed/Phase.json | Seeds the new “AI Review” phase. |
| src/scripts/seed/TimelineTemplate.json | Seeds the new “AI Only Challenge” timeline template using the AI Review phase. |
| prisma/migrations/20260526100000_add_ai_review_phase_and_template/migration.sql | Migrates Phase/TimelineTemplate/TimelineTemplatePhase rows for AI Review + AI Only template. |
| config/default.js | Adds AI_ONLY_TIMELINE_TEMPLATE_ID with env override support. |
| package.json | Adds deploy:dev script for pushing dev-* tags. |
| .circleci/config.yml | Enables build-dev workflow runs on dev-* tags. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+3737
to
+3738
| const isAiOnlyTemplateSwitch = | ||
| isStatusChangingToActive && cachedActivationAiConfig?.mode === 'AI_ONLY'; |
Comment on lines
+4110
to
+4119
| // For AI_ONLY review mode, manual reviewers are not required; skip validation | ||
| let isAiOnlyReviewMode = false; | ||
| try { | ||
| // Reuse the config fetched earlier for template auto-select if available | ||
| const activationAiConfig = cachedActivationAiConfig ?? await helper.getAIReviewConfigByChallengeId(challengeId); | ||
| isAiOnlyReviewMode = activationAiConfig?.mode === 'AI_ONLY'; | ||
| } catch (_err) { | ||
| // non-fatal: proceed with standard reviewer validation if AI config fetch fails | ||
| } | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for "AI Only" challenges by adding a new "AI Review" phase, an "AI Only Challenge" timeline template, and logic to automatically manage these for challenges configured with AI-only review mode. It also ensures that manual reviewers and the AI Screening phase are not required or added for AI Only challenges. Several supporting changes were made to configuration, seeding, and deployment scripts.
migration.sql) and seed data (Phase.json).TimelineTemplate.json).updateChallengeto auto-select the AI Only timeline template when a challenge is set to AI_ONLY review mode, and revert to the default template if AI_ONLY is removed. This includes logic to clear and repopulate phases as needed.AI_ONLY_TIMELINE_TEMPLATE_IDto the configuration, with support for environment override.