재채점 도구의 숫자 비교를 표시 정밀도 기준으로 변경 - #60
Merged
Merged
Conversation
Codex flagged on PR #53 that numeric_equal used math.isclose with rel_tol=1e-6, so materially different integers such as 1000000 and 1000001 were classified as numeric_format and the regrade exited zero. The comparison now parses both values as Decimal, accepts them when equal, and otherwise rounds both to the smaller number of displayed decimal places: 183.0901 still matches 183.0900900900901 and 4017733 matches 4.017733e+06, but integers must match exactly and 1.5 no longer matches 1.4.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Sep 2, 2026
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.
목적
PR #53의 Codex 리뷰 P2를 반영합니다.
numeric_equal이math.isclose(rel_tol=1e-6)를 써서1000000과1000001처럼 실제로 다른 정수도numeric_format으로 분류했고, 그 경우 재채점이 성공으로 끝나 judge 회귀를 숨길 수 있었습니다.변경
Decimal로 파싱해 같으면 통과하고, 아니면 표시 소수 자릿수가 적은 쪽에 맞춰 둘 다 반올림한 뒤 비교합니다. 소수 자릿수가 0이면(정수) 정확히 같아야 합니다.183.0901↔183.0900900900901,8510700.00↔8510700,4017733↔4.017733e+06은 여전히 표현 차이로,1000000↔1000001과1.5↔1.4는 값 차이로 분류됩니다.검증
tests/test_regrade_review.py)에 위 경우와 비수치·NaN을 추가했습니다. 저장소 테스트 25개 통과.dev@1b8a3362)와 옛 go-mysql-server judge(dev@72b1775d)로 다시 비교했습니다. 완전 일치 35, 숫자 표현 17, 값 차이 8(행 순서 6, DATE 표현 2), 비교 불가 1(#32)로 PR judge가 로컬 MySQL 템플릿 형식의 init SQL을 받아들이도록 수정 #53 댓글의 분류와 같습니다. 새 규칙이 실제 corpus에서 오탐을 내지 않았습니다.