Skip to content

Conversation

@KATO-Hiro
Copy link
Collaborator

@KATO-Hiro KATO-Hiro commented Jan 26, 2026

close #2840

Summary by CodeRabbit

  • Documentation

    • Enhanced guide for adding contest table providers with concrete implementation steps, examples, test guidance, and updated references.
  • New Features

    • Added ABC‑Like contest provider and expanded contest recognition to include Tenka1 (2017, 2019) and CADDi 2018.
    • Broadened public contest/task dataset with many new contest entries.
  • Tests

    • Expanded test fixtures and coverage for contest providers, task results, and ABC‑Like/ARC‑Like scenarios.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 26, 2026

Walkthrough

This pull request adds an ABCLikeProvider and registers an "ABC-Like" provider group, extends ARC_LIKE contest mappings (tenka1-2017, tenka1-2019, caddi2018), augments task and contest-task datasets, expands tests for ABC-Like behavior, and updates documentation with concrete provider/test guidance.

Changes

Cohort / File(s) Summary
Provider implementation & mappings
src/lib/utils/contest.ts, src/lib/utils/contest_table_provider.ts
Add ARC_LIKE entries for tenka1-2017, tenka1-2019, caddi2018; implement ABCLikeProvider (filtering, metadata, display config, round label parsing); register ABC-Like in presets and contestTableProviderGroups.
Test suites & mocks
src/test/lib/services/task_results.test.ts, src/test/lib/utils/contest_table_provider.test.ts
Extend mock tasks with many ABC_LIKE/ARC_LIKE entries; add tests exercising ABCLikeProvider filtering, metadata/display, round labels, table generation, and cross-contest scenarios.
Test cases / fixtures
src/test/lib/utils/test_cases/contest_table_provider.ts, src/test/lib/utils/test_cases/contest_type.ts
Add taskResultsForABCLikeProvider export aggregating many ABC-Like contest task results; include arc-like test cases for tenka1-2017, tenka1-2019, caddi2018.
Data augmentation
prisma/contest_task_pairs.ts, prisma/tasks.ts
Add numerous new contest-task pair entries and many new task records across contests (e.g., jsc2025advance-final, tenka1 series, abc422, zone2021, sumitrust2019, etc.).
Documentation
docs/guides/how-to-add-contest-table-provider.md
Expand guide with concrete implementation steps, provider registration/export instructions, skeleton examples, test design patterns, and updated references.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 I hopped through code to add a new lane,
ABC-Like contests now join the train.
Tenka, CADDi, many tasks in sight,
Filters, labels, tests all working right.
Hop-hop—tables bloom beneath the moonlight! 🥕🐇

🚥 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 a table for ABC-like contests, which is reflected in the new ABCLikeProvider class and related contest table updates.
Linked Issues check ✅ Passed The PR implements the feature to add an ABC-like table [#2840] by introducing ABCLikeProvider, registering it in contest provider presets, and adding comprehensive test coverage for ABC-like contest filtering and display.
Out of Scope Changes check ✅ Passed All changes are within scope: new provider implementation, contest mappings, task data augmentation, and test coverage directly support the ABC-like table feature requested in #2840.

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

✨ Finishing touches
  • 📝 Generate docstrings

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

@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: 4

🤖 Fix all issues with AI agents
In `@docs/guides/how-to-add-contest-table-provider.md`:
- Around line 80-81: Update the broken relative links in
docs/guides/how-to-add-contest-table-provider.md that currently use "../src/..."
so they point to the repository root src directory by using "../../src/..."
(i.e., change the link targets from "../src/..." to "../../src/..."); search for
all occurrences of the "../src/" pattern (including the instances referenced
around the Provider implementation link and the other occurrences noted) and
adjust them to "../../src/" so they resolve correctly from the docs/guides
directory.
- Around line 283-294: Replace the bolded step labels (**ステップ1: データソース確認**,
**ステップ2: ContestType 確認**, **ステップ3: テストデータ構築**) with proper Markdown headings
(e.g., "### ステップ1: データソース確認", etc.) so they are recognized as section headers by
markdownlint MD036; ensure the content under each heading remains unchanged and
keep references to the files and symbols mentioned (prisma/tasks.ts,
prisma/contest_task_pairs.ts, prisma/schema.prisma, src/lib/types/contest.ts,
classifyContest(), ContestType) so links/searches still find them.

In `@prisma/tasks.ts`:
- Around line 7889-7914: Update the inconsistent task id prefixes for the CADDi
2018 Beginners entries: change the ids currently set as 'caddi2018_a' and
'caddi2018_b' (the entries with name 'Product and GCD' and 'Harlequin') to use
the 'caddi2018b_' prefix so they match the rest of the contest (e.g.,
'caddi2018b_c' and 'caddi2018b_d' as appropriate); modify only the id fields in
the task objects so test expectations (which expect 'caddi2018b_*') and task
lookup/merge logic align with the other contest entries ('caddi2018b_a',
'caddi2018b_b', etc.).

In `@src/test/lib/services/task_results.test.ts`:
- Around line 283-299: The mock entry for id '24' uses the wrong task id/index
for ABC422; replace the incorrect 'task_id: "abc422_h"' and 'task_table_index:
"H"' with the correct ABC422 values (e.g., 'task_id: "abc422_g"' and
'task_table_index: "G"') in the test data in task_results.test.ts so the mock
matches real contest layout and avoids masking mismatches.

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 e131c92 into staging Jan 26, 2026
4 checks passed
@KATO-Hiro KATO-Hiro deleted the #2840 branch January 26, 2026 13:36
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] テーブル「ABC-like」を追加しましょう

1 participant