-
-
Notifications
You must be signed in to change notification settings - Fork 10
feat: Add tables for ABC 042-125 and ARC 058-103 (#2836) #2911
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughAdds two contest table providers (ABC042ToABC125Provider and ARC058ToARC103Provider), expands the tasks and contest-task-pair datasets, introduces tests for the new providers, and adds a developer test-plan document. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Cache: Disabled due to data retention organization setting Knowledge base: Disabled due to data retention organization setting 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (1)
docs/dev-notes/2025-12-03/add_tests_for_contest_table_provider/plan.md (1)
69-217: Align sample test snippets with the actual provider APIThe plan is very detailed and accurately reflects the implemented providers/tests, but earlier sections still show example tests using non-existent methods like
getRoundId()andgetHeaderId(), while the actual implementation usesgetContestRoundIds()andgetHeaderIdsForTask(). The “教訓” section explains this, but the outdated snippets can still mislead someone copying them directly.Consider updating those sample code blocks to use the real methods (
getContestRoundIds,getHeaderIdsForTask) so the plan remains copy‑paste safe and fully aligned with the final implementation.Also applies to: 268-472, 525-541
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to data retention organization setting
📒 Files selected for processing (5)
docs/dev-notes/2025-12-03/add_tests_for_contest_table_provider/plan.md(1 hunks)prisma/contest_task_pairs.ts(1 hunks)prisma/tasks.ts(4 hunks)src/lib/utils/contest_table_provider.ts(5 hunks)src/test/lib/utils/contest_table_provider.test.ts(3 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
src/test/lib/utils/contest_table_provider.test.ts (2)
src/lib/utils/contest_table_provider.ts (2)
ABC042ToABC125Provider(264-297)ARC058ToARC103Provider(332-365)src/lib/types/task.ts (1)
TaskResults(74-74)
src/lib/utils/contest_table_provider.ts (3)
src/lib/types/task.ts (1)
TaskResult(64-72)src/lib/utils/contest.ts (2)
classifyContest(5-97)getContestNameLabel(327-398)src/lib/types/contest_table_provider.ts (2)
ContestTableMetaData(122-125)ContestTableDisplayConfig(149-155)
🔇 Additional comments (7)
prisma/tasks.ts (1)
4308-4602: New ABC042–125 / ARC058–103 task entries look internally consistentThe added task records for ABC125/124/113/112/111, ABC051/044/043/042, and ARC103/102/060/059/058 (including the ABC–ARC shared-problem IDs like
arc103_a/arc103_b,arc102_a/arc102_b,arc060_a/arc060_b,arc059_*,arc058_*) are structurally consistent with the existing dataset:
id/contest_id/problem_indextriples match the patterns used elsewhere (e.g., ARC-origin IDs reused under ABC contest_ids for shared problems).- Names/titles align with the canonical AtCoder problem naming conventions for this era.
- The IDs referenced here are also present in the expanded
contest_task_pairsmappings, so nothing appears orphaned.Given this is static data and the relationships line up with the new providers and mappings, I don’t see functional issues in this block.
Also applies to: 4864-4976
prisma/contest_task_pairs.ts (1)
2-901: ARC058–103 / ABC042–125 mappings match the intended concurrent-era structureThe extended
contest_task_pairs:
- Correctly pair each ABC round in 042–125 with its corresponding ARC problems (C/D as shared where applicable) and vice versa for ARC058–103.
- Reuse ARC-origin
problem_ids (e.g.,arc103_a/arc103_b,arc102_a/arc102_b,arc058_*,arc059_*,arc060_*) in both ABC and ARC contexts in a way that matches the data added intasks.ts.- Maintain consistent
problem_indexletters (C/D) across ABC/ARC sides, which aligns with how these shared problems are shown in tables.- Add the extra tessoku-book and math-and-algorithm mappings only for problem IDs that exist in
tasks.ts.I don’t see duplicate or obviously mismatched
(contest_id, problem_id, problem_index)entries in this new range; the structure looks sound for the new providers to consume.Also applies to: 902-1101
src/test/lib/utils/contest_table_provider.test.ts (3)
11-28: New provider imports integrate cleanly with existing test harnessAdding
ABC042ToABC125ProviderandARC058ToARC103Providerto the existing import set keeps all providers covered in one place and fits the current test organization; no structural or isolation issues here.
392-548: ABC042–ABC125 provider tests correctly cover range, type, metadata, and shared-problem behaviorThe new
"ABC 042 to ABC 125"describe block exercises:
- Range filtering (in/out of 042–125) and ABC-only type filtering.
- Metadata and display-config fields matching the provider implementation.
- Round-label formatting using the mocked
getContestNameLabel.- Table generation for both regular and shared-problem scenarios (ABC042 with
arc058_*, and mixed solo/concurrent rounds).The assertions align with
ABC042ToABC125Provider’s actual logic and the mocks forclassifyContest/getContestNameLabel, so these tests should reliably guard the new behavior.
697-856: ARC058–ARC103 provider tests robustly validate the concurrent ARC-side behaviorThe
"ARC 058 to ARC 103"tests validate:
- Proper range filtering (058–103) and ARC-only type filtering.
- Provider metadata / display-config consistency.
- Round-label formatting via the mocked
getContestNameLabel.- Table generation for ARC058 (including shared C/D vs exclusive E/F) and multi-round concurrent scenarios (e.g., ARC058 with ABC042, ARC060 with ABC044).
They also check
getContestRoundIdsand empty-input handling, matchingARC058ToARC103Provider’s implementation. The coverage is thorough and lines up well with the provider’s responsibilities.src/lib/utils/contest_table_provider.ts (2)
258-297: LGTM! Well-structured provider implementation.The
ABC042ToABC125Providerfollows the established pattern and correctly implements all required methods. The range filtering (42-125), metadata, display configuration for 4-task contests, and label formatting are all appropriate.
326-365: LGTM! Well-structured provider implementation.The
ARC058ToARC103Providerfollows the established pattern and correctly implements all required methods. The range filtering (58-103), metadata, display configuration for 4-task contests, and label formatting are all appropriate.
KATO-Hiro
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
close #2836
Summary by CodeRabbit
New Features
Tests
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.