Repository navigation
[ocr-lambda] 생기부 출결 행 변환 회귀 테스트 추가 - #516
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
vercel
Bot
temporarily deployed
to
Preview – hellogsm-client-26-admin
October 12, 2026 08:18
Inactive
There was a problem hiding this comment.
Overview
ocr-lambda의achievementTextConverter.test.ts에만 생기부 출결 행 변환 회귀 테스트를 추가한다.- 런타임 로직은 변경하지 않고,
2.출결상황표의 열 순서 보존·빈 칸/스캔 잡음 처리·개근 조건부 출력을 고정한다.
Intent
- 서버가 출결의 질병/미인정/기타 3칸 중 미인정만 반영하도록 수정될 때,
ocr-lambda에서 열이 한 칸만 밀려도 질병·기타 값이 미인정 자리에 들어가는 회귀를 방지하기 위함. - 출결 12칸의 위치 보존, 빈 칸/잡음의 0 치환, 개근 처리 로직을 테스트로 고정한다.
Risk
- 전체적으로 낮음: 테스트 파일 추가만.
- 확인 필요: 출결 행 15칸(학년, 수업일수, 12칸, 특기사항) 가정과 실제 kordoc PDF/병합 셀(
colSpan) 구조 일치 여부. - 이 PR은 질병 포함 감점 문제 자체는 해결하지 않으며, 서버
MiddleSchoolRecordParser수정이 별도 필요.
0 inline comment(s)
This branch was previously deployed
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.
개요 💡
생기부
OCR자동 입력 시 비교과 출결(결석·지각·조퇴·결과)에 질병·기타 값까지 포함되는 문제가 보고되었습니다. 원인은 서버MiddleSchoolRecordParser.readAttendance()가 각 항목의 질병/미인정/기타 3칸을 합산하는 데 있으며, 감점 대상인 미인정 칸만 반영하도록 백엔드 수정이 별도로 필요합니다.서버가 미인정 칸만 읽게 되면
ocr-lambda가 출결 행을 변환할 때 열이 한 칸만 밀려도 질병 값이 미인정 자리로 들어가 점수에 반영됩니다. 그런데 출결 행 변환에는 테스트가 없었기 때문에, 열 위치 보존을 회귀 테스트로 고정하였습니다. 이 PR은 테스트만 추가하며 런타임 동작은 변경하지 않습니다.작업내용 ⌨️
achievementTextConverter.test.ts에 실제 생기부와 같은2.출결상황섹션과 헤딩 2줄(학년/수업일수, 질병/미인정/기타 ×4)을 갖춘 출결 표 입력을 구성하였습니다.convertAttendanceRow가 원본 열 순서 그대로 숫자 12개를 내보내는지 검증하는 테스트를 추가하였습니다..,•)이 건너뛰어지지 않고 제자리에서 0으로 바뀌어 항상 숫자 12개가 되는지 검증하는 테스트를 추가하였습니다.개근이면개근줄로 내보내는지, 출결 칸에 값이 있으면개근으로 덮지 않는지 검증하는 테스트를 추가하였습니다.pnpm --filter @repo/ocr-lambda test(16개 통과),lint,check-types모두 통과하였습니다.관련 이슈 🚨
#515 (세부 작업 1~3)
이슈의 세부 작업 4~5(실제 생기부 PDF로 출결 행 셀 개수 확인, 그 결과에 따른 열 개수 검증 적용 여부 결정)는 실제 PDF 확인이 필요하여 이번 범위에서 제외하였고, 이슈는 열어 둡니다. 질병 포함 문제 자체는 서버
MiddleSchoolRecordParser수정으로 해결되어야 하며 이 PR로는 해결되지 않습니다.리뷰 요청사항 👀
테스트 입력은 출결 행이 15칸(학년, 수업일수, 12칸, 특기사항)으로 들어온다고 가정하고 만들었습니다. kordoc이 실제 PDF에서 병합 셀(
colSpan)로 칸 수를 줄여 내보내는 경우가 있다면 이 가정이 맞지 않으므로, 실제 출결 표 구조를 확인해 보신 분이 있다면 의견 부탁드립니다.