Skip to content

PM-5015 ai only review#114

Merged
vas3a merged 8 commits into
developfrom
PM-5015_ai-only-review
May 29, 2026
Merged

PM-5015 ai only review#114
vas3a merged 8 commits into
developfrom
PM-5015_ai-only-review

Conversation

@vas3a

@vas3a vas3a commented May 28, 2026

Copy link
Copy Markdown
Collaborator

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.

  • Added a new "AI Review" phase and seeded it in both the database migration (migration.sql) and seed data (Phase.json).
  • Created and seeded an "AI Only Challenge" timeline template, which uses the new AI Review phase, in both the migration and seed files (TimelineTemplate.json).
  • Updated updateChallenge to 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.
  • Ensured that AI Screening phase is not added to challenges that already have an AI Review phase (i.e., AI Only challenges).
  • Skipped manual reviewer validation for draft/NEW challenges in AI_ONLY mode, and ensured that reviewer resources are not required when opening the review phase for AI_ONLY challenges.
  • Added AI_ONLY_TIMELINE_TEMPLATE_ID to the configuration, with support for environment override.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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
}

@kkartunov kkartunov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good

@vas3a
vas3a merged commit b0c346b into develop May 29, 2026
7 checks passed
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