fix: Task #520 partial revert restore — exam_science p2 7번 글상자 ㉠ 사각형 y 회귀 정정 (closes #624)#627
Open
planet6897 wants to merge 5 commits intoedwardkim:develfrom
Open
fix: Task #520 partial revert restore — exam_science p2 7번 글상자 ㉠ 사각형 y 회귀 정정 (closes #624)#627planet6897 wants to merge 5 commits intoedwardkim:develfrom
planet6897 wants to merge 5 commits intoedwardkim:develfrom
Conversation
exam_science p2 7번 글상자 ㉠ 사각형 y-위치 회귀 정정. 회귀 출처: PR edwardkim#561 cherry-pick (3de0505) 에서 Task edwardkim#520 부분 revert - Picture 분기 tac_img_y 산식: seg.vpos - first_vpos → seg.vpos - Shape 분기 shape_area.y: tac_img_y → para_y_before_compose - Shape 분기 layout_cell_shape para_y: tac_img_y → para_y_before_compose 수정 범위: src/renderer/layout/table_layout.rs 3 라인 정정. refs edwardkim#624 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
test_624_textbox_inline_shape_y_on_line2_p2_q7 추가. exam_science.hwp p2 7번 글상자 ㉠ 사각형 y 좌표 [230, 240] 범위 검증. RED 확인: 측정 y=213.95 (Line 1 영역, 회귀 정확히 재현). refs edwardkim#624 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
작업지시자 지시 "분석만 계속 진행" — Stage 2 코드 정정 보류, 영향 범위· edge case·후속 진단 분석으로 전환. 분석 결과: - 광범위 sweep 102 페이지 (6 sample) 중 1 페이지만 정정 영향 — 0.98% - 회귀 발생 조건 4 항 분석: first_vpos>0 AND target_line>0 동시 성립 시 가시화. exam_science p[1] 만 유일 가시 회귀. - 정정 안전성 — first_vpos=0 / target_line=0 / single-line / wrap 모드 모두 무회귀 확정. - Picture 산식 회귀: 가시 영향 0, defensive consistency 차원 복원 권고. - 회귀 출처: PR edwardkim#561 cherry-pick 시 base diff 점검 누락. 후속 자동화 권고. 분석 완료, 코드 정정은 후속 명시 승인 후 진행. refs edwardkim#624 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PR edwardkim#561 cherry-pick (3de0505) 시 누락된 Task edwardkim#520 정정 3 라인 복원: 1. Picture 분기 tac_img_y 산식: seg.vpos → seg.vpos - first_vpos (이중 합산 회귀 해소; first_vpos=0 케이스 동일 동작 보장) 2. Shape 분기 shape_area.y: para_y_before_compose → tac_img_y (target_line 기반 위치 사용; target_line=0 케이스 동일 동작 보장) 3. Shape 분기 layout_cell_shape para_y 인자: 동일 증상 해소: exam_science p2 7번 글상자 ㉠ 사각형이 Line 1 (y=213.95) 에서 Line 2 (y=235.41) 으로 정확히 이동 (Δ +21.47 px = ls[1].vpos - ls[0].vpos / 75). 검증: - cargo test --lib test_624_textbox_inline_shape_y_on_line2_p2_q7 GREEN - cargo test --lib 1135 passed (회귀 0) - cargo test --test svg_snapshot 6/6 passed - cargo clippy --lib -- -D warnings clean - 광범위 sweep 6 fixture 102 페이지: 1 페이지 의도된 정정, 회귀 0 코드 변경 LOC: +9 / -2 (table_layout.rs). refs edwardkim#624 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
158 fixture / 1,496 페이지 sweep — 1 페이지 의도된 정정 (0.067%), 회귀 0건 (1,495 페이지 byte-identical). 검증 완료: - cargo test --lib test_624 RED → GREEN - cargo test --lib 1135 passed (회귀 0) - svg_snapshot 6/6 / clippy clean - 158 fixture / 1,496 페이지 sweep / 회귀 0 - exam_science_002.svg 만 변경 (㉠ 사각형 + ㉠ 텍스트 y +21.47 px) 산출물: - mydocs/report/task_m100_624_report.md (최종 보고서) - mydocs/working/task_m100_624_stage3.md (Stage 3 보고서) - mydocs/orders/20260506.md (오늘 할일 갱신) closes edwardkim#624 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
edwardkim
added a commit
that referenced
this pull request
May 6, 2026
- @planet6897 (Jaeook Ryu) Task #618 회귀 정정 PR 검토 - Task #519 fix (transform: extract_shape_transform) 의 devel 누락 정합 직접 검증 - 본 환경 git merge-base --is-ancestor 7ead89d devel: 부재 - 본 환경 git merge-base --is-ancestor a7e43f9 devel: 부재 - 회귀 origin: PR #527 (CLOSED) 묶음 머지가 본 환경 devel 도달 못 함 - 본 환경 검증: cargo test 1140 passed / clippy 0 / svg_snapshot 6/6 - 정량 측정: BEFORE 0 → AFTER 1 transform 래퍼 (page 4 Q28 박스), PR 본문 명시 100% 일치 - 광범위 sweep: 167 fixture / 1,687 페이지 / 차이 0 - WASM: 4,590,537 bytes (PR #611 baseline +230) - 회귀 방지 후속 영역: Task #517/#518/#523 누락 가능성 + Task #520 (PR #627 별도 영역) - 옵션 A (cherry-pick) 권장 + 옵션 B (후속 task 권유) 결합 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 tasks
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.
Summary
PR #561 cherry-pick (
3de0505) 시 Task #520 의 일부 정정 누락 (3 라인) 회귀 복원.증상:
samples/exam_science.hwppage 2 의 7번 문제 글상자 (pi=33 ci=0, 1x1 Table) 안 p[1] 단락의 ㉠ 사각형 (Control::Shape,treat_as_char=true, ls[1] 위치) 이 Line 1 영역 (y=213.95) 에 잘못 그려져 본문 텍스트 "분자당 구성 …" 위에 겹침.정정 효과: ㉠ 사각형 + ㉠ 텍스트 모두 Line 2 영역 (y=235.41 / 251.45) 으로 정확히 이동. Δ +21.47 px = ls[1].vpos − ls[0].vpos / 75 정확 일치.
회귀 출처 (
git diff 9dc40dd 3de0505)313e65dseg.vpos - first_vpos✓seg.vpos - first_vpos✓tac_img_y✓tac_img_y✓9dc40ddseg.vpos - first_vpos✓seg.vpos - first_vpos✓tac_img_y✓tac_img_y✓3de0505seg.vpos✗ (회귀)seg.vpos - first_vpos✓para_y_before_compose✗ (회귀)para_y_before_compose✗ (회귀)원저자
9dc40dd는 Task #520 fix 유지 + Task #548 추가, PR #561 cherry-pick 메인테이너 정리 단계에서 conflict resolution 누락 추정.정정 내용
src/renderer/layout/table_layout.rs3 라인 정정 (+9/-2):tac_img_y산식 —seg.vpos→seg.vpos - first_vpos(이중 합산 회귀 해소)shape_area.y—para_y_before_compose→tac_img_y(target_line 기반 위치)layout_cell_shapepara_y 인자 — 동일회귀 발생 4 조건 분석
Control::Shape(shape) if shape.common().treat_as_char분기에서 다음 4 조건 모두 성립 시 회귀 가시화:target_line > 0(rect on ls[1]+)first_vpos > 0(paragraph[i>0])→ exam_science p[1] 만이 (c) AND (d) 동시 성립 — 광범위 sweep 결과 (1/1496) 와 정확히 부합.
안전성 분석 (edge cases)
first_vpos = 0(cell 첫 paragraph)seg.vpos - 0 = seg.vpos, 산식 결과 동일target_line = 0(rect on ls[0])target_line > current_tac_line가드로 if 블록 미진입line_segs.len() = 1(single-line)target_line = 0으로 위와 동일wrap = Square / InFrontOfText / TopAndBottomtreat_as_char=true만 처리검증
cargo test --lib test_624_textbox_inline_shape_y_on_line2_p2_q7cargo test --lib(전체)cargo test --test svg_snapshotcargo clippy --lib -- -D warningscargo build --release광범위 fixture sweep (158 fixture / 1,496 페이지)
의도된 정정 1 건 (
samples/exam_science.hwppage 2):TDD 흐름
b3408fee5811c9test_624_textbox_inline_shape_y_on_line2_p2_q7) — y=213.95 회귀 재현c30e886242955b9cf9fc5Test plan
output/svg/의exam_science_002.svg㉠ 사각형이 Line 2 영역 (y≈235) 에 위치, 본문 "분자당 구성" 위 겹침 해소참조
3de0505)9dc40dd(@planet6897 / Jaeook Ryu)313e65d)후속 권고
9dc40dd → 3de0505비교만으로 즉시 식별 가능. 동일 함수 영역 산식 비교 자동화 권고.test_624_textbox_inline_shape_y_on_line2_p2_q7가 RED → GREEN 가드 역할.🤖 Generated with Claude Code