refactor(reverse_sync): list 경로에 visible segment 모델을 도입합니다#991
Open
refactor(reverse_sync): list 경로에 visible segment 모델을 도입합니다#991
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
15b58b6 to
4ad50ff
Compare
88eecdb to
e3e72c9
Compare
- isu_001 (confluence-mdx/bin/reverse_sync/visible_segments.py:100): structural_fingerprint에 entry.marker_ws를 포함시키면 렌더 결과가 동일한 마커 뒤 공백 수정까지 구조 변경으로 분류됩니다. 현재 build_patches()는 이 값을 그대로 비교해서 clean list에 replace_fragment를 생성하므로, * 항목 -> * 항목 같은 no-op 변경에도 불필요한 reverse-sync 패치가 발생합니다. visible segment 단계에서는 보이지 않는 marker gap을 구조 차이에서 제외하거나, list 전략에서 이를 rebuild 조건으로 쓰지 않도록 분리해야 합니다. - isu_002 (confluence-mdx/bin/reverse_sync/patch_builder.py:190): 이 PR의 list 전략 교체로 인해 _normalize_list_for_content_compare()의 production 호출부가 모두 제거되었습니다. 함수 정의(190-234줄)와 test 파일의 직접 import(test_reverse_sync_patch_builder.py 35줄, 3117줄~)만 남아 dead production code가 되었습니다. 함수 및 해당 단위 테스트를 제거하거나 extract_list_model_from_mdx 기반의 동등한 동작 테스트로 교체해야 합니다.
Contributor
Author
|
[debate-review][sha:88eecdbe91f76265a378982946dfda6cb6f38bbc] Consensus reached after 3 rounds. Debate Summary
Applied Fixes
|
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.
문제 현상
reverse_sync의 list 경로는normalize_mdx_to_plain()과 list 전용 whitespace helper 에 의존하고 있었습니다.이 구조에서는 visible whitespace 정보가 패치 전략 결정 전에 손실되어 다음 문제가 발생했습니다.
구현 내용
VisibleSegment,VisibleContentModel을 추가했습니다.confluence-mdx/bin/reverse_sync/visible_segments.py에서 MDX list / XHTML list 의 visible text 와 structural fingerprint 를 직접 추출하도록 했습니다.patch_builder.py의 list 전략을 새 모델 기반으로 전환했습니다.mapping.xhtml_plain_text대신 실제 XHTML fragment 에서 추출한 visible text 를 기준으로 수행하도록 바꿨습니다.docs/superpowers/specs/2026-04-10-list-visible-segments-phase1-design.mddocs/superpowers/plans/2026-04-10-list-visible-segments-phase1.md기대 효과
검증
pytest -q tests/test_reverse_sync_visible_segments.py tests/test_reverse_sync_patch_builder.py tests/test_reverse_sync_xhtml_patcher.py tests/test_reverse_sync_xhtml_normalizer.pypytest -q tests/test_reverse_sync_patch_builder.py tests/test_reverse_sync_mapping_recorder.py tests/test_reverse_sync_sidecar.py tests/test_reverse_sync_cli.py