Skip to content

feat: Add tasks for ATC (#3239)#3243

Merged
KATO-Hiro merged 5 commits intostagingfrom
#3239
Mar 7, 2026
Merged

feat: Add tasks for ATC (#3239)#3243
KATO-Hiro merged 5 commits intostagingfrom
#3239

Conversation

@KATO-Hiro
Copy link
Collaborator

@KATO-Hiro KATO-Hiro commented Mar 7, 2026

close #3239

Summary by CodeRabbit

  • New Features
    • Added support for AtCoder Typical Contest (ATC) entries with contest ID recognition and formatted display (e.g., ATC 001); problem-code matching updated to recognize the atc prefix.
  • Tests
    • Added test cases validating ATC contest labels and contest-type detection.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 7, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9a1f600f-0a76-40ec-b5fa-95fde2743fc6

📥 Commits

Reviewing files that changed from the base of the PR and between a818766 and 19c9c7e.

📒 Files selected for processing (1)
  • src/lib/utils/contest.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/lib/utils/contest.ts

Walkthrough

Adds AtCoder Typical Contest entry atc001, expands AtCoder contest code regex to accept atc-prefixed IDs (with end anchor), and adds corresponding unit tests for name label and contest type.

Changes

Cohort / File(s) Summary
Contest configuration
src/lib/utils/contest.ts
Added atc001: 'AtCoder Typical Contest 001' to ATCODER_OTHERS and updated the AXC regex to include the atc prefix and enforce an end anchor.
Test cases
src/test/lib/utils/test_cases/contest_name_labels.ts, src/test/lib/utils/test_cases/contest_type.ts
Added tests verifying atc001 maps to label ATC 001 and to ContestType.OTHERS respectively.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I found a new trail, a contest to greet,
atc001 hops in with a rhythmic beat,
Regex tweaked gently to welcome the crowd,
Tests clap their paws, happy and proud,
A tiny hop forward — code snug and neat.

🚥 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 The title 'Add tasks for ATC' is concise and directly relates to the main change: adding support for AtCoder Typical Contest (ATC) prefix 'atc001' with corresponding test cases.
Linked Issues check ✅ Passed The PR expands ATC regex support and adds test cases for 'atc001', which aligns with issue #3239's objective to add DFS problem from AtCoder contest atc001.
Out of Scope Changes check ✅ Passed All changes are in-scope: contest.ts adds atc001 mapping, and test files add corresponding test cases for contest name labels and contest type classification.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch #3239

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 and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/lib/utils/contest.ts`:
- Around line 317-327: The regexForAxc currently matches "atc" with only three
digits but lacks an end anchor and classifyContest still only special-cases
atc001; update regexForAxc to require end-of-string so it rejects "atc1234"
(i.e., make it match ^(abc|arc|agc|atc)\d{3}$) and update classifyContest to
explicitly treat any contest_id matching /^atc\d{3}$/i as ContestType.OTHERS
(the same classification used for atc001) so admin import logic (the code around
the current admin import check) and rendering remain consistent; alternatively
have the admin import flow call classifyContest instead of repeating checks so
both use the same rule.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6c031ac4-01f3-44f7-9fc3-d6878025ae15

📥 Commits

Reviewing files that changed from the base of the PR and between 339953f and a818766.

📒 Files selected for processing (3)
  • src/lib/utils/contest.ts
  • src/test/lib/utils/test_cases/contest_name_labels.ts
  • src/test/lib/utils/test_cases/contest_type.ts

Copy link
Collaborator Author

@KATO-Hiro KATO-Hiro left a comment

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 376123c into staging Mar 7, 2026
3 checks passed
@KATO-Hiro KATO-Hiro deleted the #3239 branch March 7, 2026 13:41
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.

[Feat] DFS の問題を追加

1 participant