Skip to content

feat: Add joi2026sf to JOISemiFinalRoundProvider (#3152)#3201

Merged
KATO-Hiro merged 3 commits intostagingfrom
#3152
Feb 23, 2026
Merged

feat: Add joi2026sf to JOISemiFinalRoundProvider (#3152)#3201
KATO-Hiro merged 3 commits intostagingfrom
#3152

Conversation

@KATO-Hiro
Copy link
Collaborator

@KATO-Hiro KATO-Hiro commented Feb 23, 2026

close #3152

Summary by CodeRabbit

  • New Features

    • Support for JOI 2026 Semifinal stage (セミファイナルステージ) contest IDs and labels.
    • Added Semifinal tasks for the 2026 round (A–F).
  • Tests

    • Added test coverage for Semifinal contest filtering, labeling, and table generation.
  • Documentation

    • Updated contest table provider guide with Semifinal checklist and references; updated final update date.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 23, 2026

Walkthrough

Added support for JOI semifinal contests using the new "sf" suffix (e.g., joi2026sf): regex and label parsing updated, task records and test data added, provider tests extended, and documentation checklist updated. No exported API signatures were changed.

Changes

Cohort / File(s) Summary
Documentation
docs/guides/how-to-add-contest-table-provider.md
Added checklist items for JOI suffix change (from joi{YYYY}ho to joi{YYYY}sf), added JOISemiFinalRoundProvider issue reference, and updated final update date to 2026-02-22.
Provider Logic
src/features/tasks/utils/contest-table/joi_providers.ts, src/lib/utils/contest.ts
Expanded JOI regexes to accept sf alongside ho, updated label normalization to strip JOI セミファイナルステージ , and added Japanese label mapping for sf.
Provider Tests
src/features/tasks/utils/contest-table/joi_providers.test.ts
Added tests for JOISemiFinalRoundProvider covering filtering, contest-round labeling, and table generation including joi2026sf.
Task Data (DB seed)
prisma/tasks.ts
Inserted six JOI 2026 semifinal tasks (joi2026sf — A..F). Note: the same six task objects were added twice in the file (duplicate entries present).
Test Data
src/test/lib/utils/test_cases/contest_name_and_task_index.ts
Added joi2026sf test-data entry with task indices ['A','B','F'] to JOI test corpus.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hopped through regex, labels, and tests,
Found "sf" fields tucked in contest nests,
Tasks multiplied — a twin surprise,
Docs updated under careful eyes,
I celebrate with carrot-coded zest! 🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding joi2026sf support to JOISemiFinalRoundProvider, which is the primary objective of the PR.
Linked Issues check ✅ Passed The PR successfully implements all coding requirements: adds joi2026sf support, updates regex patterns to match both 'ho' and 'sf' suffixes, implements label generation for 'sf' division, and adds corresponding test cases and task data.
Out of Scope Changes check ✅ Passed All changes are directly related to adding joi2026sf support and updating JOI semifinal provider logic; no unrelated modifications detected.

✏️ 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 #3152

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/lib/utils/contest.ts (1)

486-511: ⚠️ Potential issue | 🟡 Minor

Keep the JOI regex docs in sync with the new sf division.

The explanatory comment still lists only yo/ho/sc/sp, which no longer matches the regex behavior.

📝 Suggested doc fix
- * - Optionally followed by "yo", "ho", "sc", or "sp" (Qual, Final and Spring camp).
+ * - Optionally followed by "yo", "ho", "sc", "sp", or "sf" (Qual, Final/Semifinal, and Spring camp).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/lib/utils/contest.ts` around lines 486 - 511, The regexForJoi comment is
out of sync: the pattern accepts the "sf" division but the explanatory list only
mentions "yo, ho, sc, sp"; update the comment to include "sf" wherever divisions
are listed (the bullet that currently reads "Optionally followed by 'yo', 'ho',
'sc', or 'sp'") and adjust any related descriptive lines or examples to
consistently reference "sf" so the docs match the regex behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@prisma/tasks.ts`:
- Around line 7087-7088: The task object with properties name and title
currently includes a trailing space for "川下り(River Rafting) " and "D. 川下り(River
Rafting) "; remove the trailing whitespace from both string literals so they
read "川下り(River Rafting)" and "D. 川下り(River Rafting)" respectively (look for the
task entry that defines name and title and trim the trailing space characters).

---

Outside diff comments:
In `@src/lib/utils/contest.ts`:
- Around line 486-511: The regexForJoi comment is out of sync: the pattern
accepts the "sf" division but the explanatory list only mentions "yo, ho, sc,
sp"; update the comment to include "sf" wherever divisions are listed (the
bullet that currently reads "Optionally followed by 'yo', 'ho', 'sc', or 'sp'")
and adjust any related descriptive lines or examples to consistently reference
"sf" so the docs match the regex behavior.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 47c8f8d and a536799.

📒 Files selected for processing (6)
  • docs/guides/how-to-add-contest-table-provider.md
  • prisma/tasks.ts
  • src/features/tasks/utils/contest-table/joi_providers.test.ts
  • src/features/tasks/utils/contest-table/joi_providers.ts
  • src/lib/utils/contest.ts
  • src/test/lib/utils/test_cases/contest_name_and_task_index.ts

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.

♻️ Duplicate comments (1)
prisma/tasks.ts (1)

7087-7088: Trailing whitespace on D task name/title — confirmed resolved.

The previously flagged trailing space in '川下り(River Rafting) ' has been removed. Lines 7087–7088 are now clean.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@prisma/tasks.ts` around lines 7087 - 7088, The trailing-space issue in the
task entry has already been resolved; verify there are no remaining trailing
whitespaces in the task record by checking the name and title fields for the
string '川下り(River Rafting)' (fields: name, title) in prisma/tasks.ts and ensure
both are exactly '川下り(River Rafting)' with no extra spaces; if any other
duplicate task entries exist, normalize them the same way and run a quick
whitespace-check (or linter) across the tasks file to confirm all task
names/titles have no trailing spaces.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@prisma/tasks.ts`:
- Around line 7087-7088: The trailing-space issue in the task entry has already
been resolved; verify there are no remaining trailing whitespaces in the task
record by checking the name and title fields for the string '川下り(River Rafting)'
(fields: name, title) in prisma/tasks.ts and ensure both are exactly '川下り(River
Rafting)' with no extra spaces; if any other duplicate task entries exist,
normalize them the same way and run a quick whitespace-check (or linter) across
the tasks file to confirm all task names/titles have no trailing spaces.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between a536799 and ccabfcf.

📒 Files selected for processing (1)
  • prisma/tasks.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 b0bd9c6 into staging Feb 23, 2026
3 checks passed
@KATO-Hiro KATO-Hiro deleted the #3152 branch February 23, 2026 12:44
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] 「JOI 2025/2026 セミファイナルステージ 過去問」を追加しましょう

1 participant