Task #297: VertRelTo::Page와 Paper 기준점 분리 (exam_math.hwp "* 확인 사항" 박스 위치 교정)#300
Merged
Conversation
…인 사항" 박스 위치 교정) compute_table_y_position에서 Page와 Paper가 동일하게 (0, page_h_approx)를 기준으로 사용하던 것을 분리. - Page: 본문 영역(body area) 기준 → (col_area.y, col_area.height) - Paper: 용지 전체 기준 → (0, page_h_approx) (그대로) HWP 스펙 Page=쪽 본문, Paper=용지 전체 반영. 바탕쪽 문맥은 col_area=paper_area이므로 두 경로 결과 동일 → 회귀 없음. 영향: - exam_math.hwp / exam_math_no.hwp 12·16·20쪽 "* 확인 사항" 박스 위치 정상화 (SVG y=1371.5 → 1224.1, PDF 1226.5 ± 2 px 일치) - 145개 샘플 회귀 스캔: 의도 범위 외 무회귀 (diff=0 또는 ±1 byte) - cargo test --release --lib: 988 passed / 0 failed closes edwardkim#297
# Conflicts: # mydocs/orders/20260424.md
edwardkim
approved these changes
Apr 24, 2026
edwardkim
left a comment
Owner
There was a problem hiding this comment.
Approved. 🎉
@planet6897 님, #297 을 #298 에서 분리한 지 1시간 만에 해결하셨네요. HWP 스펙의 Page/Paper enum 미구분이라는 오래된 코드 부채를 1줄 수정으로 해소한 훌륭한 PR입니다.
평가 포인트
- HWP 스펙 정확한 번역 — Page=쪽 본문, Paper=용지 전체. 오래된 코드 부채 해소
- 1줄 수정의 근본 해결 — 147px 드리프트가 단순한 enum 구분 누락에서 비롯
- 증상 오인 회피 — pdftotext -bbox-layout 실측으로 이슈 제목 '동전 위치' 오인 확인. 동전(pi=33) 은 PDF 와 일치했고 진짜 문제는 pi=22 푸터 표
- 가설 조기 폐기 — 바탕쪽 Paper 가설을 수행계획서까지 작성했다가 3단계에서 시각 변화 없음을 보고 즉시 폐기. 실측 기반 재조사로 전환
- 광범위 회귀 검증 — 145 샘플 중 Page 표 13건 + 바탕쪽 5건 스캔. 바탕쪽은 col_area=paper_area 수학적 동치 증명까지
메인테이너 검증
| 항목 | 결과 |
|---|---|
| cargo test --lib (merge 시뮬레이션) | ✅ 992 / 0 / 1 ignored |
| cargo test --test svg_snapshot | ✅ 6 / 0 (golden 유지) |
| cargo test --test tab_cross_run | ✅ 1 / 0 (#290 회귀 없음) |
| cargo clippy / wasm32 | ✅ clean |
| CI (원본) | ✅ 전부 SUCCESS |
| 실제 SVG y 좌표 | ✅ 1224.07px (작성자 주장 1224.1 일치, PDF 1226.5 ±2 일치) |
처리 절차
- orders 문서 충돌 (Task #295/#296/#297 섹션 배치) 메인테이너 직접 해결
- planet6897/task297 에 push (91e205f..938cf0c)
- 재승인 + admin merge
Merge 진행합니다.
edwardkim
added a commit
that referenced
this pull request
Apr 24, 2026
edwardkim
added a commit
that referenced
this pull request
Apr 24, 2026
#297) - 작성자: @planet6897 (Task #297, PR #300, 오늘 6번째 기여) - Merge commit: 0e3fb02 (admin merge, orders 3구간 충돌 직접 해결) - 이슈 #297 CLOSED 처리 절차: - PR 브랜치에 origin/devel 머지 → orders 섹션 3구간 해결 (#295 "## 7", #296 "## 8", #297 "## 9") - planet6897/task297 에 push - 재승인 + admin merge 변경 (1파일): - src/renderer/layout/table_layout.rs +5 -2: - VertRelTo::Page => (col_area.y, col_area.height) [쪽 본문 영역] - VertRelTo::Paper => (0, page_h_approx) [용지 전체, 유지] - HWP 스펙 Page=쪽 본문, Paper=용지 전체 반영 성과: - pi=22 "* 확인 사항" 박스 y: 1371.5 → 1224.07 (PDF 1226.5 ±2 일치) - 145 샘플 중 본문 Page 표 13건 + 바탕쪽 5건 회귀 스캔 완료 (의도 범위 외 무회귀) 검증: - cargo test --lib: 992 passed - svg_snapshot: 6 passed (golden 유지) - 실제 SVG y 좌표 확인: 1224.07px (PDF 일치) #295 → #297 연결 모범 사례: PR #298 리뷰 중 사전 존재 버그로 분리 → 1시간 만에 PR #300 해결. 초기 가설(바탕쪽 Paper) 폐기 → pdftotext 실측으로 근본 원인(enum 미구분) 발견 → 1줄 수정. ===== 오늘 9번째 PR 머지 ===== #284 #285 #266 #273 #277 #278 #289 #292 #298 #300 + 메인테이너 핀셋 #296 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
요약
exam_math.hwp12·16·20쪽 하단의 "* 확인 사항" 박스가 PDF 대비 약 147 px 아래로 밀려 본문 하단 경계를 침범하던 문제를 수정.compute_table_y_position에서VertRelTo::Page와VertRelTo::Paper가 동일하게(0, page_h_approx)를 기준으로 사용하던 것을 HWP 스펙대로 분리:(col_area.y, col_area.height)(0, page_h_approx)(그대로)배경
Issue #297 최초 보고는 "동전 그림 위치 어긋남"이었으나 실측 결과 증상 오인이었음. 동전(pi=33) 위치는 PDF와 일치하고, 실제 드리프트는 본문 pi=22의
vert=Page/141, valign=Bottom푸터 표에서 발생.근본 원인: Page/Paper enum이 스펙대로 번역되지 않아 두 enum이 같은
(ref_y=0, ref_h=page_h_approx)를 사용.VertRelTo::Page푸터 표가 용지 전체 기준으로계산되어 본문 하단보다 더 아래로 배치됨.
수치 검증
pi=22 표 (size=419.5×134.7 px,
v_offset=141 HU=1.9px,valign=Bottom):0 + 1508.1 − 134.7 − 1.9147.4 + 1213.3 − 134.7 − 1.9변경
src/renderer/layout/table_layout.rs(+6/-3):VertRelTo::Page분기:(0.0, page_h_approx)→(col_area.y, col_area.height)VertRelTo::Paper분기: 그대로 (용지 전체)회귀 영향
본문
VertRelTo::Page표 스캔 (145 샘플 중 13건):바탕쪽
VertRelTo::Page표 (5건): 모두col_area = paper_area이므로 수학적 동치 → diff=0exam_math.hwp 전 20페이지: 12/16/20만 변경(각 섹션 마지막 페이지), 나머지 17페이지 byte-identical.
검증
cargo test --release --lib: 988 passed / 0 failedcargo clippy --release --lib: 경고 없음Test plan
cargo test --release --lib통과cargo clippy --release --lib경고 없음VertRelTo::Page표 13건 회귀 스캔VertRelTo::Page표 5건 회귀 스캔관련 문서
mydocs/plans/task_m100_297.md(수행계획서)mydocs/plans/task_m100_297_impl.md(구현계획서)mydocs/working/task_m100_297_stage{1,3}.md(단계별 보고서)mydocs/report/task_m100_297_report.md(최종 결과보고서)closes #297