Skip to content

fix(reverse_sync): roundtrip_verifier H1·테이블 패딩 정규화 추가#907

Merged
jk-kim0 merged 1 commit intomainfrom
jk/fix-reverse-sync-verifier-h1-table
Mar 12, 2026
Merged

fix(reverse_sync): roundtrip_verifier H1·테이블 패딩 정규화 추가#907
jk-kim0 merged 1 commit intomainfrom
jk/fix-reverse-sync-verifier-h1-table

Conversation

@jk-kim0
Copy link
Contributor

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

Description

Forward converter가 H1을 페이지 제목으로 처리하고 테이블 셀 폭을 임의로 조정하는 체계적 차이를 정규화합니다.

  • roundtrip_verifier.py: _apply_minimal_normalizations에 추가
    • _normalize_table_cell_padding: 셀 내 연속 공백을 단일 공백으로, 구분자 행(| --- |)의 대시 수를 3개로 정규화
    • _strip_first_heading + lstrip('\n'): Forward converter가 H1을 페이지 제목으로 처리하므로 비교에서 제외
    • _normalize_trailing_blank_lines: 후미 빈 줄 정규화
  • roundtrip_verifier.py: _normalize_trailing_ws_apply_normalizations(lenient 모드)에 복원
  • tests/reverse-sync/544178422/improved.mdx: "All User" figure의 alt·figcaption을 접근차단접근 차단으로 수정 (Admin/Each User 표기와 통일, 표준 맞춤법 적용)
  • tests/reverse-sync/pages.yaml: PASS 전환된 3개 케이스의 expected_statusfailpass로 업데이트 (1456144391, 1495433217, 544178422)

추가 PASS 케이스

1456144391, 1495433217, 544376183, 873136365, 544178422

Added/updated tests?

  • Yes
  • No, and this is why: roundtrip verifier 인프라 변경으로 기존 테스트 케이스가 통과됩니다.

🤖 Generated with Claude Code

@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 12, 2026 5:34am

Request Review

@jk-kim0 jk-kim0 changed the title fix(confluence-mdx): roundtrip_verifier H1·테이블 패딩 정규화 추가 — 5개 케이스 PASS 전환 fix(reverse_sync): roundtrip_verifier H1·테이블 패딩 정규화 추가 — 5개 케이스 PASS 전환 Mar 11, 2026
@jk-kim0 jk-kim0 force-pushed the jk/fix-reverse-sync-verifier-minimal branch 2 times, most recently from aff822b to e67e470 Compare March 11, 2026 16:45
@jk-kim0 jk-kim0 force-pushed the jk/fix-reverse-sync-verifier-h1-table branch from 9f5c927 to 9a61179 Compare March 11, 2026 16:45
@jk-kim0 jk-kim0 self-assigned this Mar 11, 2026
jk-kim0 added a commit that referenced this pull request Mar 12, 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?
- [x] Yes

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

## Stacked PRs

이 PR은 stacked PR 시리즈의 일부입니다:
- #906 (이 PR): 최소 정규화 (`_apply_minimal_normalizations`)
- #907: `_normalize_table_cell_padding` 추가
- #908: `_normalize_trailing_ws` lenient 모드 이동

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Base automatically changed from jk/fix-reverse-sync-verifier-minimal to main March 12, 2026 03:34
@jk-kim0 jk-kim0 force-pushed the jk/fix-reverse-sync-verifier-h1-table branch 2 times, most recently from 9b7e018 to c6d5659 Compare March 12, 2026 03:40
@jk-kim0 jk-kim0 changed the title fix(reverse_sync): roundtrip_verifier H1·테이블 패딩 정규화 추가 — 5개 케이스 PASS 전환 fix(reverse_sync): roundtrip_verifier H1·테이블 패딩 정규화 추가 Mar 12, 2026
@jk-kim0 jk-kim0 force-pushed the jk/fix-reverse-sync-verifier-h1-table branch from c6d5659 to 5e47e47 Compare March 12, 2026 05:24
Forward converter 특성에 의한 체계적 차이를 최소 정규화에 추가합니다.

- `_normalize_table_cell_padding`을 `_apply_minimal_normalizations`으로 이동합니다:
  - 셀 내 연속 공백을 단일 공백으로 정규화
  - 구분자 행(`| --- |`)의 대시 수를 3개로 정규화 (컬럼 폭 차이 무시)
- `_strip_first_heading` + `lstrip('\n')` 추가: Forward converter가 H1을 페이지 제목으로 처리하므로 비교에서 제외합니다.
- `_normalize_trailing_blank_lines` 추가: 후미 빈 줄을 정규화합니다.
- `_normalize_trailing_ws`를 `_apply_normalizations`(lenient 모드)에 복원합니다: `_apply_minimal_normalizations` 추출 시 실수로 제거됨.
- `tests/reverse-sync/544178422/improved.mdx`: "All User" figure의 alt·figcaption을 `접근차단` → `접근 차단`으로 수정합니다 (Admin/Each User 표기와 통일, 표준 맞춤법 적용)
- `tests/reverse-sync/pages.yaml`: PASS 전환된 3개 케이스의 expected_status를 fail → pass로 업데이트합니다 (1456144391, 1495433217, 544178422)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jk-kim0 jk-kim0 force-pushed the jk/fix-reverse-sync-verifier-h1-table branch from 5e47e47 to 94c1b91 Compare March 12, 2026 05:30
@jk-kim0 jk-kim0 merged commit 29f0605 into main Mar 12, 2026
7 checks passed
@jk-kim0 jk-kim0 deleted the jk/fix-reverse-sync-verifier-h1-table branch March 12, 2026 05:36
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