Skip to content

confluence-mdx: reverse-sync 입력 정합성을 검증합니다#1031

Open
jk-kim0 wants to merge 1 commit into
jk/refactor-reverse-sync-local-prooffrom
jk/fix-reverse-sync-input-gates
Open

confluence-mdx: reverse-sync 입력 정합성을 검증합니다#1031
jk-kim0 wants to merge 1 commit into
jk/refactor-reverse-sync-local-prooffrom
jk/fix-reverse-sync-input-gates

Conversation

@jk-kim0

@jk-kim0 jk-kim0 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

MDX 변경이 올바른 Confluence page와 dependency를 대상으로 하는지 증명한 뒤에만 Storage XHTML candidate와 push manifest를 생성합니다.

  • page ID, confluenceUrl, src/content/ko/**.mdx path, pages.qm.yaml row를 하나의 source identity로 결합합니다.
  • page.v1.yaml provenance를 classification-only evidence로 사용하여 stale_original_mdxforward_converter_drift를 구분합니다.
  • 새 attachment reference를 Confluence v2 attachment catalog 전체 pagination으로 검증합니다.
  • 새 internal link를 유일한 page ID/path로 resolve하고 ac:link/ri:page macro로 렌더링합니다.
  • attachment와 internal page dependency를 local proof에 hash-bound evidence로 기록합니다.
  • publisher가 required attachment filename과 linked page ID/status/title을 PUT 직전에 다시 확인합니다.
  • 잘못된 title/H1, unresolved/ambiguous link, missing attachment, unsupported external image/raw link attribute는 fail-closed로 차단합니다.
  • OpenSpec P0 base parity/dependency task와 durable contract를 현재 구현에 맞게 갱신합니다.

Safety boundary

  • 기존 page에 존재하는 attachment의 새 reference만 지원합니다.
  • attachment upload/update/delete, page title update, active draft reconciliation은 수행하지 않습니다.
  • 이 PR은 remote PUT이나 canary update를 실행하지 않습니다.

Test plan

  • 전체 Python test: 1085 passed, 2 skipped
  • reverse-sync Python test: 762 passed
  • make test-convert: 21 passed
  • make test-reverse-sync: golden 16 passed, regression fixture 통과
  • make test-byte-verify: fast/splice 각각 21/21 passed
  • openspec validate complete-reverse-sync --strict
  • git diff --check

Stack

🤖 Generated with Codex

## Summary
MDX 변경이 올바른 Confluence page와 dependency를 대상으로 하는지 검증하고, 검증된 link/attachment만 Storage XHTML과 publisher에 전달합니다.

- page ID, confluenceUrl, repository path를 하나의 source identity로 결합합니다.
- stale original과 forward converter drift를 provenance evidence로 구분합니다.
- attachment catalog와 internal link resolver를 local proof에 결합합니다.
- internal page link와 attachment reference를 Confluence macro로 안전하게 렌더링합니다.
- publisher가 attachment와 linked page identity를 PUT 직전에 다시 확인합니다.
- OpenSpec의 P0 base parity/dependency contract와 검증 결과를 갱신합니다.

## Test plan
- [x] 전체 Python test 1085 passed, 2 skipped
- [x] reverse-sync Python test 762 passed
- [x] make test-convert 21 passed
- [x] make test-reverse-sync golden 16 passed, regression fixture 통과
- [x] make test-byte-verify fast/splice 각각 21/21 passed
- [x] openspec validate complete-reverse-sync --strict
- [x] git diff --check

🤖 Generated with Codex

Co-Authored-By: Atlas <atlas@jk.agent>
@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
querypie-docs Ready Ready Preview, Comment Jul 24, 2026 10:39am

Request Review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9ea1109ef9

ℹ️ 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".

Comment on lines +215 to +216
available = {attachment.filename for attachment in catalog.attachments}
missing = sorted(set(required) - available)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Compare attachment identity, not just filenames

When a verified change adds an attachment reference, the local proof records attachment_id, version, and a catalog hash, but this preflight reduces the current catalog to a filename set. If screen.png is deleted/reuploaded or versioned after verification but before push, the dependency check still passes and the candidate is published against an attachment that was not the one verified; the postcondition only compares Storage XHTML, so it will not catch changed binary content. Carry the required attachment identity/version through and compare them here.

Useful? React with 👍 / 👎.

Comment on lines +179 to +185
for key in ("new_element_xhtml", "new_inner_xhtml"):
if key in current:
current[key] = _resolve_generated_links(
str(current[key]),
resolver,
attachment_filenames,
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Resolve links inside inline fixup patches

When a change is emitted as a text-level patch with inline_fixups (for list/container inline boundary changes), those nested fixup dictionaries also contain new_inner_xhtml. This resolver only scans top-level patch fields, so a relative link or attachment link inside an inline fixup remains as raw <a href="..."> instead of the Confluence ac:link/attachment macro even though the dependency gate may have passed, leaving a broken or unverified link in the candidate. Resolve inline_fixups[*].new_inner_xhtml as well.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant