Conversation
patch_builder.py에서 transfer_text_changes() 호출을 모두 제거하고 각 지점을 sidecar 기반 재구성 또는 인라인 diff-apply로 전환합니다. 지점 1 (paired delete+add fallback): - clean container / sidecar 없음 → _build_replace_fragment_patch로 전환 - reconstruct_container_fragment의 per-child 재구성이 inline styling 보존 지점 2 (preserved anchor list): - _apply_mdx_diff_to_xhtml() 인라인 구현으로 전환 - transfer_text_changes의 align_chars 알고리즘을 patch_builder에 내장 - text-level 패치 형식 유지하여 ac:/ri: XHTML 구조 보존 지점 3 (containing strategy): - 모든 containing 케이스를 sidecar 기반 _build_replace_fragment_patch로 통합 - full container + anchor → reconstruct_fragment_with_sidecar - clean container → per-child 재구성으로 inline markup 보존 삭제 대상: - _accumulate_text_change() 함수 - _text_change_patches dict - from reverse_sync.text_transfer import transfer_text_changes 알려진 regression (1건): - 544379393: containing 재구성 시 <br/> 앞 공백 차이 (expected_status: fail 전환) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
containing 전략에서 같은 parent에 대한 두 번째 이후 변경이 중복 replace_fragment 패치를 생성하여 xhtml_patcher에서 ValueError 크래시가 발생하던 문제를 수정합니다. bid in used_ids 체크로 첫 번째 변경만 패치를 생성합니다. preserved anchor list 경로에서 _accumulate_text_change 제거 후 같은 부모의 다중 항목 변경이 독립 패치로 분리되어 두 번째 이후 변경이 old_plain_text 불일치로 skip되던 문제를 수정합니다. _text_change_patches registry를 복원하여 _apply_mdx_diff_to_xhtml 기반으로 누적 적용합니다. 544379140 expected.beautify-diff를 실제 출력으로 갱신합니다. Co-Authored-By: Atlas <atlas@jk.agent>
containing 전략에서 replace_fragment 사용 시 change.new_block이 child 하나의 MDX만 포함하므로 parent 전체를 대체하면 다른 child가 유실되는 문제를 수정합니다. anchor 재구성이 필요한 경우만 replace_fragment를 유지하고, clean container / child-of-parent는 preserved anchor list와 같은 _text_change_patches 누적 + _apply_mdx_diff_to_xhtml 패턴으로 전환합니다. 이 변경으로 544379393의 known regression이 해소됩니다 (expected_status: fail → pass 복원, main 대비 31/11 → +1 pass). Co-Authored-By: Atlas <atlas@jk.agent>
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.
Summary
patch_builder.py에서transfer_text_changes()호출 3개 지점을 모두 제거합니다_accumulate_text_change()함수,_text_change_patchesdict,text_transferimport를 삭제합니다_apply_mdx_diff_to_xhtml)로 전환합니다3개 지점 전환 전략
transfer_text_changes_build_replace_fragment_patch(sidecar 재구성)_accumulate_text_change→transfer_text_changes_apply_mdx_diff_to_xhtml(인라인 diff-apply, text-level 패치 유지)_accumulate_text_change→transfer_text_changes_build_replace_fragment_patch(sidecar 기반 통합)알려진 regression (1건)
544379393: containing 재구성 시<br/>앞 공백 차이 (expected_status: fail전환)<br/>공백이 improved MDX와 불일치Test plan
python3 -m pytest tests/ --ignore=tests/test_unused_attachments.py— 879 passedmake test-reverse-sync— 42 passed, 0 failedmake test-reverse-sync-bugs— 30 passed, 12 failed (main 대비 1건 regression)grep transfer_text_changes bin/reverse_sync/patch_builder.py— 호출 0건 (주석만)🤖 Generated with Claude Code