Skip to content

confluence-mdx: reverse-sync preserved anchor 리스트의 bold 제거를 지원합니다#967

Merged
jk-kim0 merged 1 commit intomainfrom
jk/fix-reverse-sync-strong-unwrap
Apr 1, 2026
Merged

confluence-mdx: reverse-sync preserved anchor 리스트의 bold 제거를 지원합니다#967
jk-kim0 merged 1 commit intomainfrom
jk/fix-reverse-sync-strong-unwrap

Conversation

@jk-kim0
Copy link
Copy Markdown
Contributor

@jk-kim0 jk-kim0 commented Apr 1, 2026

Summary

<ac:link> 포함 리스트에서 bold-colon 정규화(**:**:) 시 reverse-sync가 XHTML의 <strong> 태그를 제거하지 못하는 버그를 수정합니다.

Root cause

  • _apply_strong_boundary_fixup이 old/new <strong> 개수 불일치 시 즉시 반환 → bold 제거 미반영
  • _has_inline_boundary_change가 stray bold 마커(****)를 감지하지 못함 → inline fixup 미생성

수정 내용

  • _apply_strong_boundary_fixup: len(old) > len(new) 시 매칭 안 되는 <strong> unwrap (<ac:link-body> 내부 보존)
  • _has_inline_boundary_change: text 세그먼트의 ** 유무 변화도 boundary change로 감지

재현 케이스

543948978 (company-management.mdx) — General(<strong> : </strong> 제거), Allowed Zones(<strong> </strong> 제거)

Test plan

  • fixture 543948978 improved.mdx를 bold-colon 정규화 버전으로 업데이트
  • reverse-sync 통합 테스트 42 passed / 0 failed
  • unit 테스트 122 passed
  • CI 전체 통과 (Validate, Test Confluence MDX Converter, Build, Deploy on Preview)

Debate review

CC-Codex debate review 5라운드 합의 완료 — 이슈 없음 (mergeable).

🤖 Generated with Claude Code

- _apply_strong_boundary_fixup: old/new <strong> 개수 불일치 시
  매칭 안 되는 <strong>을 unwrap하여 bold 제거 반영
  (<ac:link-body> 내부 <strong>은 보존)
- _has_inline_boundary_change: text 세그먼트의 stray ** 유무 변화
  감지로 ****→공백 정규화도 inline fixup 트리거
- 543948978 fixture를 bold-colon 정규화 버전으로 업데이트

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 1, 2026

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

Project Deployment Actions Updated (UTC)
querypie-docs Ready Ready Preview, Comment Apr 1, 2026 10:43am

Request Review

@jk-kim0
Copy link
Copy Markdown
Contributor Author

jk-kim0 commented Apr 1, 2026

[debate-review][sha:8d038277f798b668eaf7bb44443e4943f91fbc61] Consensus reached after 5 rounds.

Debate Summary

  • isu_001 [withdrawn] _apply_strong_boundary_fixup bold 병합/중복 텍스트 매칭 우려 → 회귀 아님으로 철회
  • isu_001 [withdrawn] _apply_strong_boundary_fixup 경계 축소+제거 동시 시나리오 → 이론적 우려로 철회 (round 3)

Withdrawn Findings

  • confluence-mdx/bin/reverse_sync/xhtml_patcher.py:360 - len(old_strongs) > len(new_strongs) 분기가 남겨야 할 <strong>get_text() 완전 일치가 아니면 모두 unwrap()합니다. preserved anchor 문장에서 bold 제거와 경계 축소가 동시에 일어나면, 예를 들어 <strong>Name:</strong> <strong>Role</strong>new_inner_xhtml=<strong>Name</strong>: Role를 적용했을 때 결과가 Name: Role로 되어 Name의 bold까지 사라집니다. 이번 PR이 추가한 분기에서 생긴 회귀이며, 현재 테스트는 이 조합을 다루지 않습니다.
    Reason: 반박을 수용합니다. 지적한 과도한 unwrap 가능성은 이론적이며, PR 이전에도 no-op이었으므로 확인 가능한 회귀가 아닙니다.

@jk-kim0 jk-kim0 self-assigned this Apr 1, 2026
@jk-kim0 jk-kim0 merged commit d1b6a0a into main Apr 1, 2026
7 checks passed
@jk-kim0 jk-kim0 deleted the jk/fix-reverse-sync-strong-unwrap branch April 1, 2026 11:28
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