confluence-mdx: reverse-sync typed plan 경계를 도입합니다#1033
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
## Summary reverse-sync push 경로가 raw patch dict를 직접 신뢰하지 않도록 typed planning과 renderer boundary를 도입합니다. - capability registry와 immutable ChangeIntent, TargetIdentity, PatchOperation, PatchPlan을 추가합니다. - exact sidecar provenance와 MDX intent가 대응하지 않는 operation을 missing_identity로 차단합니다. - raw HTML table과 unknown macro mutation을 unsupported_capability로 차단합니다. - empty source line이 p element mutation으로 바뀌는 legacy insert를 제거합니다. - typed renderer가 target fragment hash, MDX hash, line range를 base sidecar와 다시 검증합니다. - CLI와 local proof에서 raw patch dict를 제거하고 schema v2 plan을 사용하도록 전환합니다. - tool version을 v5로 갱신하고 OpenSpec P1 task를 구현 결과와 동기화합니다. ## Test plan - [x] 전체 Python test 1096 passed, 2 skipped - [x] reverse-sync Python test 773 passed - [x] make test-convert 21 passed - [x] make test-reverse-sync golden 16 passed, regression 43 passed - [x] make test-byte-verify fast/splice 각각 21/21 passed - [x] openspec validate complete-reverse-sync --strict - [x] git diff --check - [x] Python compileall 🤖 Generated with Codex Co-Authored-By: Atlas <atlas@jk.agent>
8188d3d to
f39eecf
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8188d3d22b
ℹ️ 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".
| intent = intent_by_ordinal.get(ordinal) | ||
| if intent is None or intent.provenance_xpath: | ||
| return () |
There was a problem hiding this comment.
Skip already-covered added intents for inserts
When a replace is followed by an insert, such as splitting one paragraph into two, the first added change is already covered by the replace_fragment operation and therefore has provenance_xpath; this branch marks that ordinal as assigned and immediately returns no intent instead of continuing to the next added change. The subsequent real insert is then treated as missing_identity, so intent_complete fails and online push is blocked for valid multi-block replacement edits.
Useful? React with 👍 / 👎.
Summary
reverse-sync push 경로가
build_patches()의 raw dict를 직접 신뢰하지 않도록 typed planning과 renderer boundary를 도입합니다.capabilities.py에 capability ID, support level, renderer owner, required proof, block reason registry를 추가합니다.operations.py에 immutableChangeIntent,TargetIdentity,PatchOperation,PatchPlanschema v2를 추가합니다.planner.py가 기존build_patches()를legacy-patch-builder-v2adapter로 감싸고 raw dict를 typed plan에 격리합니다.intent_complete를 허용하지 않습니다.raw_html_table_edit와unknown_macro_mutation을unsupported_capability로 차단합니다.<p></p>insert mutation으로 바뀌지 않도록 제거합니다.render_patch_plan_preserving()이 target fragment hash, sidecar MDX hash, line range를 base와 다시 비교한 뒤에만 raw renderer input을 복원합니다.reverse-sync-cli-v5로 올립니다.OpenSpec
openspec/changes/complete-reverse-syncPatchPlan/operation 및 raw patch boundarypatch_builder.py의 capability별 strategy 추출, visible model 확장, 모든 table/macro skip reason의 capability 표준화Safety impact
PatchApplicationError로 차단합니다.Test plan
make test-convert: 21 passedmake test-reverse-sync: golden 16 passed, regression 43 passedmake test-byte-verify: fast/splice 각각 21/21 passedopenspec validate complete-reverse-sync --strictgit diff --checkcompileallStack
main으로 변경할 수 있습니다.🤖 Generated with Codex
Co-Authored-By: Atlas atlas@jk.agent