Task #697: 큰 셀 cross-page split — LINE_SEG.vpos 리셋 검출로 paragraph cut 정합#701
Closed
planet6897 wants to merge 7 commits into
Closed
Task #697: 큰 셀 cross-page split — LINE_SEG.vpos 리셋 검출로 paragraph cut 정합#701planet6897 wants to merge 7 commits into
planet6897 wants to merge 7 commits into
Conversation
- inner-table-01.hwp 큰 셀 cross-page split 결함 분석 - 결함 위치: src/renderer/layout/table_partial.rs L113-130 paragraph-only 셀의 split_end content rendering 누락 - 정정 방향 (B) 셀 내부 split 정합화 확정 - IR vpos 리셋 (cell[11] p[20]~) 이 한컴 정합과 일치 확인
- 결함 산술 본질: vpos 리셋(p[20] vpos=0)과 line_height+ls 누적 mismatch cell[11] 누적 ~424px < abs_limit 459.7px → 26 paras 모두 visible 처리 - 정정 방향 (B-1) 채택: compute_cell_line_ranges 에 vpos 리셋 검출 분기 추가 - 변경 영역: src/renderer/layout/table_layout.rs::compute_cell_line_ranges - 회귀 fixture 목록 + 단위/통합 테스트 계획
- src/renderer/layout/table_layout.rs: paragraph 진입 시 LINE_SEG.vpos 로 cum 동기화 + vpos 리셋 검출 시 cum=abs_limit 강제 (page-break 신호 처리) - inner-table-01.hwp cell[11] line_ranges: 26 visible → 20 visible + 6 skip ✓ - layout 분기 정상 skip 적용 (table_partial.rs L558) - 회귀 테스트: renderer::layout 104 tests passed - 잔존 결함: paragraph y 시각 배치 metric (line_h+ls vs vpos) — Stage 3-2 영역
- 정상 누적 vpos delta 로 cum 을 보정하던 분기는 form-002.hwpx p1 PartialTable 의 paragraph 들에서 회귀 발생 (마지막 paragraph 누락) - vpos 리셋 검출만 좁게 유지 (한컴 page-break 신호 정합) - has_limit && cum < abs_limit 가드도 진입 조건에 미리 적용 검증: cargo test --release 전체 통과 (svg_snapshot 7 passed) inner-table-01.hwp p1 RMSE 26.41% → 26.22% (-0.19%, 개선 미미)
- 변경 A (vpos delta 보정), 변경 B (paragraph y 보정) 둘 다 form-002 회귀 - 최종 채택: vpos 리셋 검출만 유지 (Stage 3-1 좁힌 가드) - inner-table-01 line_ranges 정합 (20 visible + 6 skip) - RMSE 개선은 미미 (폰트 폴백 baseline) - 후속 이슈로 paragraph y 정합 분리 권고
- 회귀 fixture 4종 RMSE 비교 (변경 전/후 동일 baseline = 회귀 없음) - 후속 작업 edwardkim#700 분리 (paragraph y 시각 배치 vpos 정합) - inner-table-01 line_ranges 정합 (20 visible + 6 skip) - 시각 RMSE 부분 개선 (-0.19% p1, -0.09% p2)
inner-table-01.hwp p1 의 cell[10] '사업개요' 라벨이 split row 라는 이유만으로 Top 정렬 강제되어 PDF 정합과 어긋남. line_ranges 가 셀의 모든 line 을 visible 처리하면 (= 실제 split 영향 안 받은 cell) cell.vertical_align 보존. 검증: cargo test --release 21 그룹 통과, 시각: 사업개요 라벨이 cell 중앙 정렬.
Contributor
Author
edwardkim
added a commit
that referenced
this pull request
May 9, 2026
…ine_ranges cum 절대 동기화) 본질: samples/inner-table-01.hwp cell[11] (사업개요, 26 paras) cell-internal split 시 cum 누적 metric (line_height + line_spacing + spacing) 이 한컴 LINE_SEG.vpos 누적과 ~50px 어긋남 → abs_limit (한컴 vpos 단위) 와 비교 시 paragraph cut 위치 부정합 → p[17] '- 전사 데이터 수집/유통체계 구축' 누락. 정정 (compute_cell_line_ranges): - Task #697 영역: vpos 리셋 검출 (cell_first_vpos == 0 + cur_first_vpos < prev_end_vpos 시 cum = abs_limit, page-break 신호) - Task #700 영역: 정상 누적 시 vpos 절대 동기화 (target_cum > cum 일 때만 cum = target_cum, 전진 보장) - 가드: cell_first_vpos == 0 (한컴 정상 인코딩 케이스만), target_cum > cum (감소 금지) 부수 정정 (Task #697 후속, table_partial.rs): - split row 미분할 cell 의 valign 보존 — is_in_split_row && cell_was_split 영역 가드 좁힘. inner-table-01 cell[10] '사업개요' 라벨 중앙 정렬 정합. PR supersede 영역: PR #701 (Task #697) close → PR #706 (Task #697 + #700 통합) supersede 영역. 컨트리뷰터 자체 결정. 작업지시자 시각 판정 (2026-05-09): - BEFORE (devel, PR #662 본질 정정 영역) — form-002 page 0 마지막 visible 줄 26 글자 ('ㅇPFC 나노산소운반체의 최적제조공정개발 및 GMP실증') 표시 - AFTER (PR #706 적용) — 26 글자 누락 - PDF 권위본 (pdf/hwpx/form-002-2022.pdf page 1) 비교 결과 AFTER 가 한컴 정답지 정합 ★ — 26 글자가 본문 영역 외부 영역에 위치 (한컴 권위) → PR #706 이 한컴 권위 정합. golden SVG (tests/golden_svg/form-002/page-0.svg) 를 PR #706 출력으로 갱신 (md5 12a6cbcc → 672c78c6). PR #662 (Task #656) 의 form-002 정정 본질 영역이 잘못된 영역 — 후속 별도 분석 가능성. 검증: - cargo test --release: lib 1166 + 통합 ALL GREEN, failed 0 - svg_snapshot 8/8 (form-002 갱신 후 통과) - cargo clippy --release: 신규 경고 0 - WASM 빌드 4,596,712 bytes - 작업지시자 시각 판정 ★ 통과 Closes #700 Closes #697 Co-Authored-By: Jaeook Ryu <jaeook.ryu@gmail.com> Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
edwardkim
added a commit
that referenced
this pull request
May 9, 2026
- mydocs/pr/archives/pr_706_review.md (검토 문서, 옵션 A 결정 반영)
- mydocs/pr/archives/pr_706_report.md (처리 보고서, golden 갱신 명시)
- mydocs/plans/archives/task_m100_700{,_impl}.md
- mydocs/orders/20260509.md: PR #706 행 + 본 사이클 패턴 라인 추가
처리 결과:
- 옵션 A — 5 commits cherry-pick + golden SVG 갱신 + no-ff merge (fce2d87)
- 작업지시자 시각 판정 ★ 통과 — 정답지 정합 확정
- golden SVG 갱신 (md5 12a6cbcc → 672c78c6, 메인테이너 commit 78e38e5)
- PR supersede: PR #701 close → PR #706 (Task #697 + #700 통합)
- Issue #700 / #697 close 자동 정합
부수 사실:
- PR #662 (Task #656) 의 form-002 정정 본질 영역 부정확 — 후속 별도 분석 가능성
- `feedback_visual_judgment_authority` 권위 사례 신규 (CI 결정적 검증 vs 시각 판정 충돌)
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.
closes #697
follow-up: #700
요약
src/renderer/layout/table_layout.rs::compute_cell_line_rangeshas_limit && cum < abs_limit가드 + 단순 리셋 검출만. 정상 vpos delta 보정은 form-002.hwpx 회귀로 제외.결함
samples/inner-table-01.hwp의 8행×2열 표, 행 6 셀[11] (사업개요, 26 paras, h≈677px) 이 본문(877px) 절반 초과. 한글 2022 PDF 는 cell[11] 의 vpos 리셋 위치(p[19]→p[20], 33120 HU = 459.7px)에서 페이지 분할. rhwp 는 분할 신호를 못 읽어 26 paras 모두 1페이지에 그려 압축/오버플로우.compute_cell_line_ranges산출:회귀 검증
cargo test --release전체 (21 그룹)tests/svg_snapshot.rs(form-002 포함)samples/k-water-rfp.hwp(18p) avg RMSEsamples/issue_265.hwp/samples/hwp3-sample.hwp(7p)→ inner-table-01 외 회귀 없음. 22-23% baseline 은 Linux 환경 폰트 폴백 (Noto Sans vs 한컴 맑은 고딕) noise.
시도했으나 보류한 영역
광범위 paragraph y 시각 배치 vpos 정합 — form-002.hwpx 회귀 발생으로 셀별 가드 필요. 후속 #700 으로 분리.
산출물
mydocs/plans/task_m100_697.md— 수행 계획서mydocs/plans/task_m100_697_impl.md— 구현 계획서mydocs/working/task_m100_697_stage1.md— 분석 보고서mydocs/working/task_m100_697_stage3_1.md— 1차 구현 결과mydocs/working/task_m100_697_stage3_2.md— 2차 시도 + 회귀 가드mydocs/report/task_m100_697_report.md— 최종 결과 보고서커밋 이력