Skip to content

fix(reverse_sync): roundtrip_verifier에 최소 정규화 추가합니다#906

Merged
jk-kim0 merged 3 commits intomainfrom
jk/fix-reverse-sync-verifier-minimal
Mar 12, 2026
Merged

fix(reverse_sync): roundtrip_verifier에 최소 정규화 추가합니다#906
jk-kim0 merged 3 commits intomainfrom
jk/fix-reverse-sync-verifier-minimal

Conversation

@jk-kim0
Copy link
Contributor

@jk-kim0 jk-kim0 commented Mar 11, 2026

Description

verify_roundtrip의 strict 모드에서도 forward converter의 체계적 출력 특성에 의한 차이를 정규화하여 false negative를 줄입니다.

추가된 최소 정규화 (strict/lenient 공통 적용):

  • _normalize_consecutive_spaces_in_text: 코드 블록 외 영역에서 2개 이상 연속 공백을 단일 공백으로 정규화
    • 배경: improved.mdx**bold** : 형태의 이중 공백이 있어도 forward converter는 단일 공백으로 출력
  • _normalize_br_space: <br/> 앞의 공백 제거
    • 배경: forward converter가 ' '.join(li_itself)<br/> 앞에 공백을 추가

변경하지 않은 것:

  • _normalize_trailing_ws는 최소 정규화에 포함하지 않음 (strict 모드의 trailing whitespace 검사 보존)

Added/updated tests?

  • Yes

TestNormalizeConsecutiveSpaces (5개), TestNormalizeBrSpace (5개), 통합 테스트 3개 추가 — 총 22개 테스트 통과

Stacked PRs

이 PR은 stacked PR 시리즈의 일부입니다:

@vercel
Copy link

vercel bot commented Mar 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
querypie-docs Ready Ready Preview, Comment Mar 11, 2026 5:11pm

Request Review

@jk-kim0 jk-kim0 changed the title fix(confluence-mdx): roundtrip_verifier 최소 정규화 추가 — 6개 케이스 PASS 전환 fix(reverse_sync): roundtrip_verifier 최소 정규화 추가 — 6개 케이스 PASS 전환 Mar 11, 2026
@jk-kim0 jk-kim0 force-pushed the jk/fix-reverse-sync-verifier-minimal branch from 507bfe0 to aff822b Compare March 11, 2026 12:22
@jk-kim0 jk-kim0 changed the title fix(reverse_sync): roundtrip_verifier 최소 정규화 추가 — 6개 케이스 PASS 전환 fix(reverse_sync): roundtrip_verifier에 최소 정규화 추가합니다 Mar 11, 2026
forward converter의 체계적 출력 특성에 의한 차이를 strict 모드에서도
정규화하여 false negative를 줄입니다.

- _normalize_consecutive_spaces_in_text: 코드 블록 외 이중 공백을 단일 공백으로 정규화
- _normalize_br_space: <br/> 앞의 공백 제거
- _apply_minimal_normalizations: 위 두 정규화를 항상 적용 (strict/lenient 공통)
- 단위 테스트 및 통합 테스트 추가 (22개 테스트 모두 통과)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jk-kim0 jk-kim0 force-pushed the jk/fix-reverse-sync-verifier-minimal branch from aff822b to e67e470 Compare March 11, 2026 16:45
@jk-kim0 jk-kim0 self-assigned this Mar 11, 2026
- verify_roundtrip 독스트링: strict 모드에서 최소 정규화가 적용됨을 명시
- _apply_minimal_normalizations 독스트링: strict/lenient 공통 적용 범위 설명 추가
- _normalize_consecutive_spaces_in_text 독스트링: inline code span 동작 명시
- 테스트 추가: 코드 블록 전후 텍스트 경계 케이스, inline code span 공백 정규화

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
roundtrip_verifier에 이중 공백 정규화(_apply_minimal_normalizations)가 추가되어
bold 뒤 이중 공백 소실(failure_type=13) 유형 7건이 모두 통과됩니다.

- 544145591, 544243925, 544376004: Bold 뒤 이중 공백 소실
- 1453588486: 목록 항목 앞 이중 공백 소실
- 1454342158, 544382060: Bold 뒤 이중 공백 소실
- 544381651: Italic 앞뒤 공백 소실

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jk-kim0 jk-kim0 merged commit 47feef6 into main Mar 12, 2026
7 checks passed
@jk-kim0 jk-kim0 deleted the jk/fix-reverse-sync-verifier-minimal branch March 12, 2026 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant