fix(reverse_sync): roundtrip verifier 정규화를 추가합니다#974
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
c350d4c to
665a5bd
Compare
- _normalize_empty_list_items: 빈 줄 치환 → 줄째 제거로 변경 - _normalize_consecutive_blank_lines: 연속 빈 줄(3+) → 단일 빈 줄 정규화 추가 - _normalize_blank_line_after_br: <br/> 뒤 빈 줄 제거 정규화 추가 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- _normalize_empty_list_items: 빈 번호 줄 제거 단위 테스트 3건 - _normalize_consecutive_blank_lines: 연속 빈 줄 정규화 단위 테스트 3건 - _normalize_blank_line_after_br: <br/> 뒤 빈 줄 제거 단위 테스트 3건 - verify_roundtrip 통합 테스트 3건 (각 정규화가 PASS 처리되는지 검증) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fd1d4e8 to
3273a5a
Compare
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.
Description
bin/reverse-sync verify --branch=split/ko-proofread-20260221-administrator-manual-general실행 시 발생하는 verify diff의 원인을 조사하고, roundtrip verifier에 누락된 정규화를 추가합니다.목표
verifier 정규화를 정비하여, MDX 교정이 실질적으로 Confluence XHTML 수정으로 이어지는지 검증 가능하게 합니다.
불일치 현상 및 원인
현재 브랜치에서 정규화를 전부 비활성화하면 45건 중 8건 FAIL (총 diff 23줄)이 발생합니다.
_normalize_table_cell_padding(기존)*→*)* text출력 (api-token.mdx, custom-attribute.mdx)_normalize_consecutive_spaces_in_text(기존)<br/>앞 공백 (.<br/>↔. <br/>)<br/>앞뒤 공백 처리 차이 (integrating-with-event-callback.mdx, setting-up-multi-factor-authentication.mdx)_normalize_br_space(기존)<li>번호 (12.)<li>를 번호만 있는 항목으로 출력하지만, improved.mdx에서는 제거됨 (integrating-with-email.mdx)_normalize_empty_list_items(기존, 이 PR에서 정규식 개선)_normalize_consecutive_blank_lines(이 PR에서 신규 추가),_normalize_blank_line_after_br(이 PR에서 신규 추가)변경 내용
roundtrip_verifier.py:_normalize_empty_list_items: 빈 줄 치환(^([ \t]+)\d+\.\s*$→'') → 줄째 제거(^[ \t]+\d+\.\s*\n→'')로 개선 — 기존 정규식은 빈 줄을 남겨서 연속 빈 줄 문제를 유발_normalize_consecutive_blank_lines추가: 3개 이상 연속 개행 → 2개로 정규화_normalize_blank_line_after_br추가:<br/>뒤 빈 줄 제거test_reverse_sync_roundtrip_verifier.py:_normalize_empty_list_items단위 테스트 3건_normalize_consecutive_blank_lines단위 테스트 3건_normalize_blank_line_after_br단위 테스트 3건verify_roundtrip통합 테스트 3건 (각 패턴이 정규화로 PASS되는지 검증)검증
Added/updated tests?
Additional notes
len()→_display_width()수정은 별도 PR #975로 분리하여 머지 완료 (174줄 → 10줄로 감소)_normalize_table_cell_padding으로 공백 차이를 무시하는 것이 올바른 접근