confluence-mdx: Phase 5 Axis 1 — transfer_text_changes 호출을 전수 제거합니다#942
Open
confluence-mdx: Phase 5 Axis 1 — transfer_text_changes 호출을 전수 제거합니다#942
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
jk-kim0
added a commit
that referenced
this pull request
Mar 19, 2026
리뷰 의견을 반영하여 설계 기준선과 Phase 5 계획을 수정합니다. - pages.yaml 실제 수치로 교정: pass 29 → 31, fail 13 → 11 - 런타임 경로 다이어그램에 transfer_text_changes() 3개 호출 지점 명시 - §4.1: text_transfer 잔존 경로를 3개 지점으로 구체화하고 PR #942 현황 반영 - §4.2: Axis 2 범위를 CLI record_mapping() 중복 제거로 한정 (build_patches 시그니처의 mappings/xpath_to_mapping 전체 제거는 대체 경로 확정 후 별도 진행) - §6 Axis 1: 목표를 'text_transfer 호출 지점 전수 제거'로 재정의 (routing 변경 + 3개 fallback 제거), 완료 기준에 pass 31, transfer_text_changes 0개 추가 - §6 게이트 표: unsupported skip vs fail-closed 구분 명확화 - §8: text_transfer.py 삭제 조건을 '3개 지점 전부 제거 후'로 수정 - §10: 4차 갱신 기준 상태로 업데이트, fail failure_type 표 11건으로 교정 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 task
jk-kim0
added a commit
that referenced
this pull request
Mar 19, 2026
#938) ## Summary - 기존 설계 문서(`docs/plans/2026-03-13-reverse-sync-reconstruction-design.md`)를 2026-03-19 기준으로 갱신합니다. - PR #928, #937, #942 반영 및 리뷰 피드백을 반영하여 Phase 5 계획을 구체화합니다. ### 주요 변경 사항 - PR #942 반영: anchor 있는 container routing을 reconstruction 경로로 전환 완료 - 테스트 수치 갱신 (pass 31개, fail 11개) - Phase 5 Axis 1/2/3 계획 구체화 | Axis | 내용 | |------|------| | Axis 1 | `transfer_text_changes()` 3개 호출 지점 전수 제거. clean container 전환 시 `reconstruct_container_fragment()` 확장 필요(`_apply_outer_wrapper_template()`) | | Axis 2 | CLI `record_mapping()` 책임을 `build_patches()` 내부로 캡슐화. 데이터 소스는 내부 `record_mapping()` 호출로 확정. runtime 중복 제거(`build_sidecar()`와의 이중 호출)는 SidecarBlock 스키마 확장 후 별도 단계. `mapping.original.yaml` artifact는 반환 타입 확장으로 유지 | | Axis 3 | `text_transfer.py`, `table_patcher.py` 및 관련 테스트 삭제 | ### 리뷰 피드백 반영 - Axis 1: clean container에서 `reconstruct_container_fragment()`가 outer wrapper를 "이미 보존함"이라는 잘못된 전제 교정 - Axis 2: `mappings=[]` 전달이라는 모호한 표현을 "내부 `record_mapping()` 호출"로 명확화 - Axis 2: `SidecarBlock`에 `BlockMapping` 필드가 없어 sidecar만으로 복원 불가함을 명시, 데이터 소스 확정 - Axis 2: 목표를 "중복 제거"에서 "CLI 책임 캡슐화"로 교정 — `build_sidecar()`의 별도 호출이 남으므로 runtime 중복은 해소되지 않음을 명시 - Axis 2: `mapping.original.yaml` artifact 처분 방침 추가 ## Added/updated tests? - [x] No, and this is why: `설계 문서 갱신이며 코드 변경 없음` ## Additional notes - 선행 문서: `docs/plans/2026-03-15-reverse-sync-reconstruction-cleanup-scope.md` --------- Co-authored-by: Atlas <atlas@jk.agent> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
patch_builder.py에서 transfer_text_changes() 3개 호출 지점을 모두 제거하고, text_transfer.py import를 삭제합니다. 주요 변경: - _flush_containing_changes() 함수 및 containing_changes dict 제거 - containing 전략: sidecar reconstruction 또는 _is_container_sidecar() 시 replace_fragment 경로로 전환, sidecar 없으면 skip - direct path ac:link/ri:attachment: rewrite_on_stored_template()로 원본 XHTML 구조를 보존하면서 텍스트만 갱신 - paired delete+add fallback: sidecar reconstruction 또는 template rewriting, 불가 시 skip - reconstructors.py: reconstruct_container_fragment()를 확장하여 clean container에서도 outer wrapper template + inline markup 보존 적용 - reconstructors.py: rewrite_on_stored_template() 공개 API 추가 (transfer_text_changes의 sidecar 기반 대체) - 5개 golden test expected 파일을 새 동작에 맞게 갱신 Co-Authored-By: Atlas <atlas@jk.agent>
aa23ae9 to
bdd74f0
Compare
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
PR #938 설계 문서의 Phase 5 Axis 1을 구현합니다.
patch_builder.py에서transfer_text_changes()3개 호출 지점을 모두 제거하고,text_transfer.pyimport를 삭제합니다.제거된 호출 지점
_flush_containing_changes()rewrite_on_stored_template()로 원본 XHTML 구조 보존reconstructors.py 변경
reconstruct_container_fragment()확장: clean container에서도 Step 1(inline markup 보존) + Step 3(outer wrapper template) 적용_root_tags_differ()추가: emit_block이 다른 구조를 생성한 경우 stored fragment 보존_apply_outer_wrapper_template()추출: Step 3 로직을 별도 함수로 분리rewrite_on_stored_template()공개 API 추가: transfer_text_changes의 sidecar 기반 대체patch_builder.py 변경
_flush_containing_changes()함수 및containing_changesdict 제거_is_container_sidecar()헬퍼 추가rewrite_on_stored_template()으로 텍스트만 갱신text_transferimport 제거Golden test expected 파일 갱신 (5개)
<ol start="3">속성이 replace_fragment에서 정확히 재현됨Added/updated tests?
Additional notes
transfer_text_changes()호출이patch_builder.py에서 0개record_mapping()책임 캡슐화) → Axis 3 (legacy 모듈 삭제)