confluence-mdx: renderer strategy를 typed decision으로 분리합니다#1041
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 91f4cff432
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if ( | ||
| '<ac:link' in mapping.xhtml_text | ||
| or '<ri:attachment' in mapping.xhtml_text | ||
| ): |
There was a problem hiding this comment.
Block mixed preservation units before rewriting
When a PRESERVED_ANCHOR fragment contains a supported link or attachment plus any unsupported ac:/ri: unit (for example an unknown structured macro that wraps an ac:link), this branch emits a template rewrite before reaching the unknown_preservation_unit skip below. In strict planning that patch is classified as preserved_anchor_template_rewrite rather than unknown_macro_mutation, so unsupported macro internals can still become executable instead of fail-closed; only take this rewrite path after proving the fragment contains no other preservation units.
Useful? React with 👍 / 👎.
7aa8365 to
67ccd5d
Compare
## Summary 지원하는 link 또는 attachment와 unknown Confluence unit이 섞인 fragment를 fail-closed 처리합니다. - template rewrite 전에 preservation tag 전체가 지원 목록 안에 있는지 확인합니다. - unknown macro가 link를 감싼 mixed fragment 회귀 테스트를 추가합니다. ## Test plan - [x] planner 및 patch builder 테스트 147개 통과 - [x] git diff --check 🤖 Generated with Codex
91f4cff to
e6cf77d
Compare
## Summary RendererStrategy enum 전환 후에도 strict stale-list guard가 실행되도록 비교식을 정정합니다. ## Test plan - [x] stale preserved list mapping 회귀 테스트 통과 - [x] git diff --check 🤖 Generated with Codex
67ccd5d to
b0725c1
Compare
## Summary renderer category 선택을 typed decision으로 통합하여 heuristic fallback 경계를 명시합니다. - text block, list, preserved anchor, container, table 전략을 enum으로 분리합니다. - MDX-owned link와 unknown Confluence preservation unit을 구분하여 후자는 fail-closed 처리합니다. - raw HTML table과 preserved anchor가 공통 template rewrite helper를 사용하도록 정리합니다. - 전략 선택과 capability 차단 회귀 테스트 및 OpenSpec 실행 기록을 갱신합니다. 🤖 Generated with Codex Co-Authored-By: Atlas <atlas@jk.agent>
## Summary 지원하는 link 또는 attachment와 unknown Confluence unit이 섞인 fragment를 fail-closed 처리합니다. - template rewrite 전에 preservation tag 전체가 지원 목록 안에 있는지 확인합니다. - unknown macro가 link를 감싼 mixed fragment 회귀 테스트를 추가합니다. ## Test plan - [x] planner 및 patch builder 테스트 147개 통과 - [x] git diff --check 🤖 Generated with Codex
## Summary RendererStrategy enum 전환 후에도 strict stale-list guard가 실행되도록 비교식을 정정합니다. ## Test plan - [x] stale preserved list mapping 회귀 테스트 통과 - [x] git diff --check 🤖 Generated with Codex
13245a3 to
e56e0b9
Compare
## Summary capability 분류를 raw renderer payload의 구조가 아니라 typed renderer strategy와 MDX intent에 결합합니다. - `classify_capability()`이 canonical operation action, `StrategyDecision`, MDX block type을 입력으로 사용합니다. - planner가 operation에 대응하는 `ChangeIntent` ordinal별 capability를 계산합니다. - 하나의 operation에 서로 다른 capability가 대응하면 `unknown_macro_mutation`으로 fail-closed합니다. - legacy renderer skip reason의 blocked capability 대응을 `capabilities.py`로 이동합니다. - MDX-owned link가 `preserved_anchor_template_rewrite`로 오분류되던 경계를 `paragraph_visible_edit`로 바로잡습니다. ## 기존 문제 기존 planner는 renderer가 raw patch를 만든 뒤 action, mapping type, source type과 raw HTML 포함 여부를 다시 조합해 capability를 추론했습니다. 이 방식은 실제 renderer strategy와 capability가 어긋날 수 있고 legacy skip reason 대응표도 planner 내부에 중복시켰습니다. ## Impact - capability ID와 support level을 renderer payload body와 독립적으로 결정합니다. - preserved list/link/attachment와 unknown macro의 fail-closed 경계를 registry 테스트로 고정합니다. - renderer strategy handler의 `reverse_sync/strategies/**` 모듈 추출은 다음 P1 task로 분리합니다. - remote PUT이나 production batch 활성화는 포함하지 않습니다. ## OpenSpec - `complete-reverse-sync`의 capability 판별 추출 task를 완료 처리합니다. - strategy handler 모듈 추출을 별도 P1 task로 명시합니다. ## Test plan - [x] focused capability/planner/patch builder — 152 passed - [x] `../venv/bin/python3 -m pytest -q test_reverse_sync*.py` — 789 passed - [x] `make test-reverse-sync` — golden 16 passed, regression 43 passed - [x] `make test-convert` — 21 passed - [x] `make test-byte-verify` — fast/splice 각각 21/21 passed - [x] `../venv/bin/python3 -m pytest -q` — 1142 passed, 2 skipped - [x] `openspec validate complete-reverse-sync --strict` - [x] `git diff --check` ## Stack - Base: #1041 🤖 Generated with Codex --------- Co-authored-by: Atlas <atlas@jk.agent>
Summary
renderer category 선택을 typed decision으로 통합하여
patch_builder.py의 heuristic fallback 경계를 명시합니다.RendererStrategy와StrategyDecision으로 text block, list, preserved anchor, container, table, blocked category를 정의합니다.ac:/ri:unit은unknown_macro_mutationcapability로 fail-closed 처리합니다.기존 문제
문자열 strategy와 분산된 tag heuristic 때문에 raw HTML table, MDX-owned link, unknown macro가 generic text path에서 서로 다른 의미로 처리될 수 있었습니다. 특히 미지원 preservation unit도 inner XHTML 재생성으로 흘러 Confluence 전용 구조를 손실할 가능성이 있었습니다.
Impact
OpenSpec
complete-reverse-sync의 renderer strategy 분리 task를 완료 처리합니다.Test plan
make test-reverse-sync— golden 16 passed, regression 43 passed../venv/bin/python3 -m pytest -q test_reverse_sync*.py— 779 passedmake test-convert— 21 passedmake test-byte-verify— fast/splice 각각 21/21 passed../venv/bin/python3 -m pytest -q— 1132 passed, 2 skippedopenspec validate complete-reverse-sync --strictgit diff --checkStack
🤖 Generated with Codex