Conversation
Add test cases covering 4 previously untested AOJ_UNIVERSITY patterns: OUPC (new university abbreviation), RUPC-in-RUPC (same university as parent), HUPC-in-RUPC (new university pair), and UAPC-in-ACPC (edge case where both sides map to ACPC). Also adds tasks.ts entries for the representative contests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…omplete Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
📝 WalkthroughWalkthroughAOJ オンラインジャッジの大学コンテスト系問題 12 個を課題マスタに追加し、対応するテストケース(コンテスト名、表示ラベル、型、URL)を複数のテストファイルで拡張。既存課題との並び順を保持しながら統合。 ChangesAOJ University 問題インポート機能
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/test/lib/utils/test_cases/contest_type.ts (1)
669-677:⚠️ Potential issue | 🟠 Major | ⚡ Quick win根本原因は同一です:AOJ大学系の新規4パターンがテストfixture群へ一貫反映されていません。
contest_name_and_task_index.ts/contest_name_labels.tsでは4件追加済みなのに、contest_type.tsとtask_url.tsは1件のみ追加のため、検証軸ごとにカバレッジが分断されています。
fixture を4ファイル同時に同期させると、この種の取りこぼしを防げます。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/test/lib/utils/test_cases/contest_type.ts` around lines 669 - 677, The AOJ university contest fixtures are out of sync: the aojUniversityContestData array in contest_type.ts only contains one of the four new AOJ patterns added elsewhere (contest_name_and_task_index.ts and contest_name_labels.ts), causing inconsistent test coverage; update aojUniversityContestData to include all four new AOJ entries (mirror the same contestId/name patterns added in contest_name_and_task_index.ts and contest_name_labels.ts) and also ensure task_url.ts contains the matching four fixtures so all four files (contest_type.ts, contest_name_and_task_index.ts, contest_name_labels.ts, task_url.ts) stay synchronized.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@prisma/tasks.ts`:
- Around line 11976-12080: The new AOJ task objects added in prisma/tasks.ts are
missing required ERD fields (grade, contest_type, task_table_index, task_id,
atcoder_problems_difficulty), which breaks task/contesttaskpair assumptions;
update each inserted object in the array to include contest_type (e.g., "AOJ"),
a unique task_id (use a deterministic scheme like
`${contest_id}:${problem_index}`), task_table_index (map from problem_index or
numeric ordering), grade (populate per AOJ difficulty or a default if unknown),
and atcoder_problems_difficulty (fill with a numeric or null-safe value), and
ensure these values match any code that creates ContestTaskPair records so
referential integrity between task and contesttaskpair is preserved.
---
Outside diff comments:
In `@src/test/lib/utils/test_cases/contest_type.ts`:
- Around line 669-677: The AOJ university contest fixtures are out of sync: the
aojUniversityContestData array in contest_type.ts only contains one of the four
new AOJ patterns added elsewhere (contest_name_and_task_index.ts and
contest_name_labels.ts), causing inconsistent test coverage; update
aojUniversityContestData to include all four new AOJ entries (mirror the same
contestId/name patterns added in contest_name_and_task_index.ts and
contest_name_labels.ts) and also ensure task_url.ts contains the matching four
fixtures so all four files (contest_type.ts, contest_name_and_task_index.ts,
contest_name_labels.ts, task_url.ts) stay synchronized.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 42bfbdff-b931-4f91-ad37-df9893a0196e
📒 Files selected for processing (5)
prisma/tasks.tssrc/test/lib/utils/test_cases/contest_name_and_task_index.tssrc/test/lib/utils/test_cases/contest_name_labels.tssrc/test/lib/utils/test_cases/contest_type.tssrc/test/lib/utils/test_cases/task_url.ts
close #3630
Summary by CodeRabbit
リリースノート
新機能
テスト