Skip to content

feat(contest): add ATCODER_MAIN_OFFICIAL_ONSITE ContestType for World Tour Finals#3827

Merged
KATO-Hiro merged 2 commits into
stagingfrom
#3812
Jul 8, 2026
Merged

feat(contest): add ATCODER_MAIN_OFFICIAL_ONSITE ContestType for World Tour Finals#3827
KATO-Hiro merged 2 commits into
stagingfrom
#3812

Conversation

@KATO-Hiro

@KATO-Hiro KATO-Hiro commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

close #3812

Summary by CodeRabbit

  • 新機能

    • AtCoder World Tour Finals の公式オンサイト大会を新しいコンテスト種別として認識し、表示名も対応しました。
    • 2019年、2022年、2024年、2025年、2026年の関連コンテスト問題が一覧データに追加されました。
  • バグ修正

    • -open の有無にかかわらず、World Tour Finals 系コンテストを正しく判定できるようになりました。

KATO-Hiro and others added 2 commits July 8, 2026 06:22
… Tour Finals

Introduces a dedicated ContestType for AtCoder World Tour Finals (WTF/AWTF),
replacing the ad-hoc OTHERS classification. Covers 2019–2026 Algorithm divisions;
Heuristic division (awtf*heuristic) remains out of scope.

- Add ATCODER_MAIN_OFFICIAL_ONSITE to Prisma schema enum + migration
- Add TypeScript ContestType constant (priority 20, between FPS_24 and OTHERS)
- Implement isWorldTourFinals / getWorldTourFinalsLabel helpers in contest.ts
  with stripOpenSuffix to handle both seeded (-open) and bare contest IDs
- Wire classification and label into classifyContest / getContestNameLabel
- Remove awtf2024 from ATCODER_OTHERS prefix map (now classified via regex)
- Seed task data for wtf19, wtf22-day1/2, awtf2024, awtf2025 (A–E each)
- Add test cases and unit tests for classify / priority / label

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: ea01e233-d421-45d8-be7e-157ff8e64509

📥 Commits

Reviewing files that changed from the base of the PR and between c6deb0a and bebc5ab.

📒 Files selected for processing (8)
  • prisma/migrations/20260708061608_add_atcoder_main_official_onsite_to_contest_type/migration.sql
  • prisma/schema.prisma
  • prisma/tasks.ts
  • src/lib/types/contest.ts
  • src/lib/utils/contest.ts
  • src/test/lib/utils/contest.test.ts
  • src/test/lib/utils/test_cases/contest_name_labels.ts
  • src/test/lib/utils/test_cases/contest_type.ts

📝 Walkthrough

Walkthrough

ContestType 列挙型に ATCODER_MAIN_OFFICIAL_ONSITE を追加し、World Tour Finals コンテストの分類・ラベル生成・優先度付けロジックを実装。対応する Prisma タスクデータ、スキーマ、マイグレーション、テストケースを追加した。

Changes

World Tour Finals 分類機能の追加

Layer / File(s) Summary
スキーマ・型定義・マイグレーション
prisma/schema.prisma, prisma/migrations/.../migration.sql, src/lib/types/contest.ts
ContestType 列挙型に ATCODER_MAIN_OFFICIAL_ONSITE を追加し、対応するマイグレーションと型マップを更新。
World Tour Finals 判定・ラベル・優先度ロジック
src/lib/utils/contest.ts
isWorldTourFinals/getWorldTourFinalsLabel を新設し、classifyContest/getContestNameLabel に分岐追加、contestTypePriorities に優先度20を割当てて後続をシフト、ATCODER_OTHERS から awtf2024 を削除。
タスクデータとテストケースの追加
prisma/tasks.ts, src/test/lib/utils/contest.test.ts, src/test/lib/utils/test_cases/contest_name_labels.ts, src/test/lib/utils/test_cases/contest_type.ts
World Tour Finals 各年の問題データを追加し、分類・優先度・ラベルの期待値テストを新規追加、awtf2024 を新カテゴリへ移動。

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed タイトルは ATCODER_MAIN_OFFICIAL_ONSITE の追加と World Tour Finals 対応を簡潔に示しているため適切です。
Linked Issues check ✅ Passed #3812 の要件であるスキーマ、型定義、分類メソッド、テスト、wtf22-day1 の問題追加を満たしています。
Out of Scope Changes check ✅ Passed 主要変更は要件内に収まっており、明確な無関係変更は見当たりません。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch #3812

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@KATO-Hiro KATO-Hiro left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

LGTM

@KATO-Hiro KATO-Hiro merged commit e675644 into staging Jul 8, 2026
3 checks passed
@KATO-Hiro KATO-Hiro deleted the #3812 branch July 8, 2026 06:33
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.

[task] 問題を追加しましょう

1 participant