fix: リジャッジ権限のあるコンテストの提出がクロールされない問題を修正 (#1518, #1520)#1534
Closed
kenkoooo wants to merge 1 commit into
Closed
Conversation
クローラのアカウントがリジャッジ権限を持つコンテスト(例: CodeQUEEN 予選と合同開催された abc308/abc358/abc410)では、提出一覧の各行の先頭に リジャッジ用チェックボックス列が1つ追加され、以降の列が右に1つずれる。 parse_submissions_html は td:first-child / td:nth-child(N) と位置依存で 列を取得していたため、ずれた行で <time> 等が見つからず全行スキップし、 提出0件としてパースしていた。結果、これらのコンテストの提出が一切 取り込まれず、AC が AtCoder Problems に反映されなかった。 先頭のチェックボックス列の有無でオフセットを判定して吸収し、提出詳細 リンクはクラス(a.submission-details-link)で特定する方式に変更。通常 コンテスト(チェックボックス列なし)の挙動は不変。 実際に abc308 の提出一覧(管理者ビュー)を取得したスナップショットを 回帰テスト用フィクスチャとして追加。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
原因
abc308 / abc358 / abc410(CodeQUEEN 予選と合同開催された回)への AC が AtCoder Problems に反映されない、という報告(#1518 / #1520)を調査した。本番(AWS ECS/CloudWatch)のログとクローラ視点での実ページ取得により、パーサのバグであることが判明した。
これらのコンテストはクローラのアカウントがリジャッジ権限を持っているため、提出一覧の各行の先頭にリジャッジ用チェックボックス列が1つ追加され、以降の列がすべて右に1つずれる:
<time>(提出日時)<input type="checkbox" form="rejudge-form">parse_submissions_htmlはtd:first-child timeやtd:nth-child(N)と位置依存で各列を取得していたため、ずれた行で<time>等がNoneとなり全行スキップ → 提出0件としてパースしていた(?のパースエラーではなくcontinueのため、リトライもエラーログも出ず "No more submissions" になる)。その結果、これらのコンテストの提出は一切 DB に取り込まれず(page1 を数分おきに巡回しているにもかかわらず常に0件判定)、AC が反映されなかった。「2026-01以降」なのは新クローラ移行時期と一致する。
変更
parse_submissions_html:a.submission-details-linkで特定tests/assets/submissions_rejudge.htmlとして追加し、20件正しくパースできることを検証。秘密情報が混ざらないよう提出テーブル部分のみ抽出。確認
cargo test -p crawler --test test_parser… 8 tests pass(通常レイアウトの既存テスト + 新規 rejudge レイアウトテスト)cargo clippy -p crawler --all-targets -- -D warnings… pass※ 別PR #1531(404即スキップ)とは独立。あちらはクロール高速化、本PRが #1518/#1520 の実際の修正。
Closes #1518
Closes #1520
🤖 Generated with Claude Code