fix: Layout 리팩터링 Phase 2 line_break_char_idx 다중화 누락 회귀 정정 (Task #518 재적용, closes #648)#650
Closed
planet6897 wants to merge 2 commits into
Closed
fix: Layout 리팩터링 Phase 2 line_break_char_idx 다중화 누락 회귀 정정 (Task #518 재적용, closes #648)#650planet6897 wants to merge 2 commits into
planet6897 wants to merge 2 commits into
Conversation
Stage 1: RHWP_LAYOUT_DEBUG=1 env logging - paragraph_layout.rs 에 layout_debug_enabled() + layout_inline_table_paragraph 진단 로깅 - 출력: pi/sec/col_x/col_w/y_start/ls_count/tables + 각 ls/inline_tbl 상세 - env-var-checked → 기본 동작 변경 없음 Stage 2: scripts/svg_regression_diff.sh - build mode: 두 ref 자동 빌드 + 광범위 비교 - diff mode: 두 디렉토리 byte 비교 - 기본 7 샘플 170 페이지 커버 검증: - cargo test --release: 1103 passed - svg_regression_diff.sh build devel HEAD: 170/170 byte 동일, diff=0 - exam_science p2 pi=61 logging: ls_count=3 tables=1 rows=2 확인 Phase 2~4 본질 정정의 측정·재현·검증 인프라 마련. (cherry picked from commit 9c16a1b)
paragraph_layout.rs:layout_inline_table_paragraph 줄 나눔 위치 결정 정확도 향상. 핵심 변경: - line_break_char_idx: Option<usize> → line_break_char_indices: Vec<usize> → ls[1..] 모두 사용 (이전엔 ls[1] 만) - ctrl_gap 기반 algorithm → 직접 char_offsets 룩업 → 이전: paragraph 전체 controls 합으로 over-subtract → controls 많은 paragraph 에서 saturating 0 으로 항상 None → 신규: char_offsets[i] >= ts 인 첫 i 가 break char index (간결 + 정확) - wrap 조건에 next_break 추적 추가 - LAYOUT_BREAK_INDICES 디버그 로깅 추가 검증: - edwardkim#496 재현 케이스 (exam_science p2 pi=61): 본문 1줄 column 폭 초과 → 3줄 정상 wrap ls[1] break (char 5) + ls[2] break (char 28) 적용 - 회귀: 7 샘플 170 페이지 중 same=167 / diff=3 (exam_science 정확도 정정) exam_kor/exam_eng/exam_math/synam-001/aift/2010-01-06 byte 동일 - cargo test --release --lib: 1103 passed edwardkim#496 본질 (B) ls[2..] break 미사용 해결. (A) baseline 정렬 / (C) 인라인 vs 블록 은 Phase 3/4 영역. (cherry picked from commit b395e8e)
edwardkim
added a commit
that referenced
this pull request
May 8, 2026
PR #649 (Task #517 재적용): Layout 리팩터링 Phase 1 디버그 인프라 누락 회귀 정정 - 단일 commit `ffb32ff7` (원 commit `9c16a1b4` cherry-pick) - 본 환경 결정적 검증 1165 lib pass, clippy clean - env-var 미설정/설정 SVG md5 동일 — 기본 동작 무영향 확증 처리: close (PR #650 영역 통합 처리) - PR #650 이 본 PR `ffb32ff7` + Task #518 `e8dd3f0f` 두 commit 포함 - PR #650 머지 시 두 commit 함께 cherry-pick 영역으로 통합 처리 - Issue #647 OPEN 유지 (PR #650 머지 시 close 정합) 산출물: - mydocs/pr/archives/pr_649_review.md - mydocs/pr/archives/pr_649_close_report.md - mydocs/orders/20260508.md 갱신
edwardkim
added a commit
that referenced
this pull request
May 8, 2026
closes #647 (Phase 1 인프라) closes #648 (Phase 2 본질 정정) 원 commits 영역의 squash merge (옵션 B): - ffb32ff Task #517 Phase 1: 디버그 인프라 + 회귀 검증 도구 - layout_debug_enabled() env-var 헬퍼 (RHWP_LAYOUT_DEBUG=1) - LAYOUT_INLINE_TABLE_PARA / LAYOUT_LS / LAYOUT_INLINE_TBL 진단 로깅 - scripts/svg_regression_diff.sh (build/diff 두 모드) - e8dd3f0 Task #518 Phase 2: line_break_char_idx 다중화 - line_break_char_idx: Option<usize> → line_break_char_indices: Vec<usize> - ctrl_gap 합산 (saturating 0 → 항상 None) → char_offsets[i] >= ts 직접 룩업 - ls[1] 만 → ls[1..] 모두 (3줄 이상 wrap 케이스) - LAYOUT_BREAK_INDICES 디버그 로깅 회귀 메커니즘: - 묶음 머지 a7e43f9 (Task #517/#518/#519/#520/#521/#523/#528) 영역에서 local/devel 까지만 머지되고 stream/devel 으로 승격 누락 — PR #620 (Task #519, Issue #618) 동일 패턴 본 환경 검증: - cherry-pick 영역 충돌 0건 (Auto-merging paragraph_layout.rs 자동 정합) - cargo test --release 1165 lib pass (회귀 0) - cargo clippy --release clean - env-var 미설정/설정 SVG md5 동일 — 기본 동작 무영향 확증 - 광범위 sweep 7 샘플 170 페이지: same=170 / diff=0 ✅ PR: #650 컨트리뷰터: @planet6897 (14번째 사이클) 선행 PR: #649 close 결정 영역의 통합 처리 영역 정합 Co-Authored-By: Jaeook Ryu <jaeook.ryu@gmail.com>
edwardkim
added a commit
that referenced
this pull request
May 8, 2026
PR #650 (Task #517+#518): Layout 리팩터링 Phase 1+2 누락 회귀 정정 - merge commit: e8f93de (옵션 B — squash merge → 1 commit 축약) - PR #649 close 영역의 통합 후속 처리 영역 - 본 환경 결정적 검증 1165 lib pass + clippy clean - 광범위 sweep 7 샘플 170 페이지: same=170 / diff=0 - WASM 빌드 산출물 갱신 - 시각 판정 게이트 면제 영역 정합 (작업지시자 직접 영역 결정) closes #647 + #648 산출물: - mydocs/pr/archives/pr_650_review.md - mydocs/pr/archives/pr_650_report.md - mydocs/orders/20260508.md 갱신
Owner
|
@planet6897 님 14번째 사이클 PR 처리 완료입니다. 본 환경 검증 결과: 결정적 검증 통과:
광범위 회귀 sweep (`scripts/svg_regression_diff.sh`, 7 샘플 170 페이지):
Phase 2 본질 정정 영역 직접 확인: 처리: 옵션 B — squash merge → 1 commit 축약.
시각 판정 게이트 면제 영역 정합 — env-var-checked + 광범위 sweep 회귀 0 + PR #649 close 영역의 통합 후속 처리 영역의 단순 cherry-pick 영역. 처리 보고서: `mydocs/pr/archives/pr_650_report.md` |
This was referenced May 8, 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.
개요
이슈 #648 정정. Task #518 (Layout 리팩터링 Phase 2 —
line_break_char_idx: Option<usize>→line_break_char_indices: Vec<usize>다중화) 의 원 commitb395e8e6를 cherry-pick 재적용. 이슈 #496 본질 (B)ls[2..]break 미사용 결함 해결.본 PR 의
LAYOUT_BREAK_INDICES디버그 로깅은 PR #649 가 도입한layout_debug_enabled()헬퍼에 의존합니다. 따라서 PR #649 선행 머지 → 본 PR 자동 1 commit 축약 → 머지 순으로 진행 권장.현재 본 PR 은 head=
pr-task648(=pr-task647+ Task #518 commit) 으로 구성되어 있어 GitHub 상에는 2 commit 으로 표시됩니다. PR #649 머지 후에는 본 PR diff 가b395e8e6단일 commit 으로 자동 축약됩니다.회귀 메커니즘
이슈 #618 (Task #519) → PR #620, 이슈 #647 (Task #517) → PR #649 와 동일 패턴: 묶음 머지
a7e43f9 (Task #517/#518/#519/#520/#521/#523/#528)가local/devel에는 머지되었으나stream/devel으로 승격되지 않음.→ Task #518 이전 단일 break 시그니처 그대로.
변경 내역
원 commit
b395e8e6를git cherry-pick -x로 그대로 적용 (충돌 없음).핵심 변경 (
src/renderer/layout/paragraph_layout.rs-40/+77):line_break_char_idx: Option<usize>line_break_char_indices: Vec<usize>ls[1]만ls[1..]모두ctrl_gap합산 (controls 많은 paragraph 에서 over-subtract → saturating 0 → 항상 None)char_offsets[i] >= ts인 첫i직접 룩업next_break추적 + 다중 break 검사LAYOUT_BREAK_INDICES로깅 추가검증
회귀 케이스 (원 commit 보고 인용): exam_science p2 pi=61 본문 1줄 column 폭 초과 → 3줄 정상 wrap (
ls[1]break char 5 +ls[2]break char 28). 7 샘플 170 페이지 중 same=167 / diff=3 (exam_science 정확도 정정).참고
b395e8e6a7e43f9(Merge local/devel: Task Layout 리팩터링 Phase 1: 디버그 인프라 + 회귀 검증 도구 #517/Layout 리팩터링 Phase 2: line_break_char_idx 다중화 (ls[2..] break 사용) #518/그림(Picture) 회전·뒤집기(flip) 속성이 SVG 렌더링에 적용되지 않음 #519/exam_science.hwp 문제7: inline 도형(tac=true, wrap=TopAndBottom)이 다음 문단 라인에 그려져 텍스트와 겹침 #520/exam_eng p2 18번 답안지 위치가 박스 하단에 너무 가까움 — 그림(BehindText) 의 vertical extent 가 paragraph height 에 미반영 #521/exam_science 페이지 1 → 2 누적 vpos drift: 문제 6번 <보기>/답안이 다음 페이지로 밀림 #523/옛한글 PUA → KS X 1026-1:2007 자모 변환 (HncPUAConverter 정합) — exam_kor 17p 고어 미렌더 #528)