confluence-mdx: ADF panel 재구성 시 stale fallback 제거 및 container reconstructor 방어 코드 추가#910
Open
confluence-mdx: ADF panel 재구성 시 stale fallback 제거 및 container reconstructor 방어 코드 추가#910
Conversation
1 task
6430287 to
af0a6aa
Compare
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
af0a6aa to
018efe2
Compare
018efe2 to
782fae8
Compare
79f1c6a to
3c34267
Compare
jk-kim0
added a commit
that referenced
this pull request
Mar 16, 2026
… 유지 개선합니다 - _rewrite_paragraph_on_template: paragraph inline tag(bold/em/link/code)를 유지하며 텍스트만 새 fragment 기준으로 갱신합니다 (PR #910 방식 도입) - _has_inline_markup: <p>에 ac:image 외 inline 태그 존재 여부를 탐지합니다 - reconstruct_container_fragment: anchor로 reconstruction이 트리거된 경우, 같은 container 내 inline markup child도 함께 보존합니다 - outer wrapper template: sidecar xhtml_fragment를 기준으로 macro 속성(ac:schema-version 등) 을 보존합니다 (기존: emitted fragment 기준) 트리거 정책: anchor(ac:image) 또는 list item anchor가 있는 경우에만 reconstruction을 적용하며, inline markup만 있는 container는 text-transfer 유지합니다. (child 수 불일치 케이스에서 안전성 확보) Co-Authored-By: Atlas <atlas@jk.agent>
6d8bcd1 to
b23cc42
Compare
b23cc42 to
ad185c3
Compare
9038f39 to
67fef19
Compare
67fef19 to
9ea0de6
Compare
test_adf_panel_with_anchor_preserves_adf_wrapper에 stale fallback 제거를 검증하는 assertion을 추가합니다. 기존 테스트는 main에서도 통과하여 PR의 실질적 동작 차이를 검증하지 못했습니다. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
template_soup/template_root/template_body가 파싱 후 참조되지 않았습니다. _apply_outer_wrapper_template()가 자체적으로 template을 파싱하므로 중복이었습니다. 섹션 주석 앞 빈 줄도 복원합니다. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
문제
ADF panel (
ac:adf-extension) container를 anchor 재구성한 뒤,ac:adf-fallback에원본 텍스트가 stale 상태로 남아 Confluence 렌더링 시 불일치가 발생할 수 있었습니다.
수정 내용
ADF fallback 처리 (pipeline-reachable 버그 수정)
_apply_outer_wrapper_template()에 ADF fallback 처리를 추가합니다.<ac:,<ri:)이 포함되면fallback을 제거합니다 (fallback div에 ac: 요소를 넣을 수 없으므로).
_find_adf_fallback_body(),_fragments_contain_confluence_markup()헬퍼를 추가합니다.Container reconstructor 방어 코드 (direct-call safety)
현재 pipeline에서 clean container는
container_sidecar_requires_reconstruction()게이트가 False를 반환하여
reconstruct_container_fragment()에 도달하지 않습니다.아래 변경은 향후 리팩터링 시 안전장치로 기능합니다:
직접 호출 시에도 sidecar wrapper를 보존합니다.
items재구성 경로를 추가합니다._find_container_body(),_replace_container_body_children()헬퍼를 분리합니다.테스트
Pipeline-reachable (main에서 실패, PR에서 성공)
test_adf_panel_with_anchor_preserves_adf_wrapper— ADF panel e2e: stale fallback 제거 및 wrapper 보존 검증
Direct-call (방어 코드 검증)
test_clean_container_preserves_template_wrappertest_clean_adf_container_updates_fallback_bodytest_anchor_bearing_adf_container_drops_stale_fallback검증