fix: 소수와 불완전한 지수 표기 답안의 오채점 방지 - #288
Open
fakeminjun7321 wants to merge 2 commits into
Open
Conversation
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.
한줄 요약
품질 평가가
.5를5로,.5e2를500으로 잘못 읽던 문제를 고치고, 끝나지 않은 지수 표기를 숫자의 일부만 읽어 정답으로 인정하지 않게 합니다.배경
병합된 #284의 숫자 처리 경계를 다시 확인하면서 실제 품질 점수 계산에 영향을 주는 오채점을 재현했습니다.
FINAL: .5와FINAL: -.5에서 소수점과 부호가 빠지는 오류는 #284 이전에도 있었습니다. #284의 과학적 표기 지원 이후에도 소수점 앞 0이 없는 표기는 올바르게 읽히지 않았습니다. 또한FINAL: 1e+같은 불완전한 응답을1로 잘라 정답으로 판정할 수 있었습니다.무엇을 바꿨나
숫자를 찾을 때
.5,-.5,.5e2,5.e2의 소수점·부호·지수를 함께 읽습니다. 불완전하거나 중복된 지수와 소수 지수도 전체 토큰을 기존 Decimal 검증으로 넘겨 잘못된 표기는 거부합니다. 숫자 파서를 새로 만들지 않고 기존 정규식과 정규화 흐름을 유지했습니다.정상 정수, 쉼표 구분 숫자, 숫자 뒤 문장 마침표는 그대로 처리합니다. 실제 평가 함수를 거치는 회귀 검사를 추가해
.5는 정답0.5에만 일치하고, 불완전한1e+가 정답1에 일치하지 않는지 확인했습니다.어떻게 확인했나
python -m pytest -q tests/test_quality.py tests/test_benchmark_runtime.py tests/test_cli_contribute.py tests/test_cli_telemetry_reliability.py --tb=short: 203개 통과.parse_numeric_answer함수 입출력을 확인했습니다:.5 → 0.5,-.5 → -0.5,.5e2 → 50,+.5e-2 → 0.005;1e,1e+,1e-,1e2.3,1e2e3,1e++2는 거부합니다.d55461a의 Windows·macOS·Ubuntu·Docker를 포함한 32개 check 성공, 배포 조건부 12개 생략을 확인했습니다. Windows 전체 로그는 2548 passed, 38 skipped입니다. 별도 OMM #283과 합친 로컬 Python 3.12 전체 검사도 2610 passed, 22 skipped로 통과했습니다.