feat(lossless): R1/R2/R5 sidecar·rehydrator·byte-verify 초기 구현#790
Closed
feat(lossless): R1/R2/R5 sidecar·rehydrator·byte-verify 초기 구현#790
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
jk-kim0
added a commit
that referenced
this pull request
Feb 17, 2026
…→ reverse_sync 흡수 ## 변경 사항 ### reverse_sync/sidecar.py (신규 — 통합 모듈) - lossless_roundtrip/sidecar.py(PR #790 참조)의 v1 스키마 코드 흡수: RoundtripSidecar, build_sidecar, load_sidecar, write_sidecar, sha256_text - sidecar_lookup.py 전체 코드 흡수: SidecarEntry, load_sidecar_mapping, build_mdx_to_sidecar_index, build_xpath_to_mapping, generate_sidecar_mapping, find_mapping_by_sidecar - 하나의 통합 모듈에서 roundtrip sidecar와 mapping lookup을 모두 제공합니다 ### reverse_sync/rehydrator.py (신규) - MDX + sidecar → XHTML 복원 (document-level hash 매칭 + fallback) ### reverse_sync/byte_verify.py (신규) - page.xhtml과 복원 XHTML의 byte-equal 검증 - iter_testcase_dirs() 재활용 (중복 iter_case_dirs 제거) ### CLI (신규) - mdx_to_storage_roundtrip_sidecar_cli.py: sidecar 생성 CLI - mdx_to_storage_xhtml_byte_verify_cli.py: byte-equal 검증 CLI ### Import 경로 변경 - reverse_sync.sidecar_lookup → reverse_sync.sidecar (patch_builder.py, reverse_sync_cli.py, 테스트 파일 7개) ### 삭제 - reverse_sync/sidecar_lookup.py (sidecar.py에 병합) - test_reverse_sync_sidecar_lookup.py → test_reverse_sync_sidecar.py (rename) ### 테스트 - 기존 567개 + 신규 14개 = 581개 전체 pass Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3 tasks
jk-kim0
added a commit
that referenced
this pull request
Feb 17, 2026
## Summary - `sidecar_lookup.py`를 `reverse_sync/sidecar.py`에 병합하여 sidecar 관련 코드를 단일 모듈로 통합합니다 - PR #790 (lossless_roundtrip)의 v1 sidecar 스키마(RoundtripSidecar, build/load/write)를 `reverse_sync/sidecar.py`에 직접 구현합니다 - `reverse_sync/rehydrator.py`, `reverse_sync/byte_verify.py` 신규 모듈을 추가합니다 - Sidecar 생성/검증 CLI(`mdx_to_storage_roundtrip_sidecar_cli.py`, `mdx_to_storage_xhtml_byte_verify_cli.py`)를 추가합니다 ## Motivation [계획서](https://github.com/jk-kim0/skills-jk/blob/main/projects/active/querypie-docs-mdx-to-storage-xhtml-cli.md)의 Phase L0에 해당합니다. `lossless_roundtrip` 패키지를 별도로 만들지 않고 `reverse_sync`에 직접 통합하여: - 중복 코드 제거 (`iter_case_dirs` vs `iter_testcase_dirs`) - sidecar 관련 코드를 단일 진입점으로 통합 (`sidecar_lookup.py` + roundtrip sidecar v1) - 후속 Phase L1(sidecar v2 스키마)의 확장 기반 마련 ## Changes | 파일 | 변경 | |------|------| | `reverse_sync/sidecar.py` | **신규** — sidecar_lookup.py 흡수 + roundtrip v1 스키마 통합 | | `reverse_sync/rehydrator.py` | **신규** — MDX+sidecar → XHTML 복원 | | `reverse_sync/byte_verify.py` | **신규** — byte-equal 검증 | | `mdx_to_storage_roundtrip_sidecar_cli.py` | **신규** — sidecar 생성 CLI | | `mdx_to_storage_xhtml_byte_verify_cli.py` | **신규** — byte-equal 검증 CLI | | `reverse_sync/sidecar_lookup.py` | **삭제** → sidecar.py에 병합 | | `patch_builder.py`, `reverse_sync_cli.py` 등 | import 경로 변경 | | `test_reverse_sync_sidecar.py` 등 | rename + 신규 테스트 14개 추가 | ## Test plan - [x] 기존 567개 테스트 전체 pass 확인 (import 경로 변경 후 regression 없음) - [x] 신규 14개 테스트 추가 (sidecar v1 CRUD, rehydrator, byte_verify, CLI) - [x] 총 581개 테스트 pass > PR #790은 이 PR에 의해 대체되므로 close 예정입니다. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
|
reverse-sync 디자인 변경에 따라, 이 PR 의 기능은 무효임 |
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
expected.roundtrip.jsonsidecar 생성기와 sidecar 기반 rehydrator 최소 구현을 도입했습니다.Changes
R1: sidecar schema/writer
confluence-mdx/bin/lossless_roundtrip/sidecar.pyconfluence-mdx/bin/mdx_to_storage_roundtrip_sidecar_cli.pyconfluence-mdx/tests/test_lossless_roundtrip_sidecar.pyR2: rehydrator minimal
confluence-mdx/bin/lossless_roundtrip/rehydrator.pyconfluence-mdx/tests/test_lossless_roundtrip_rehydrator.pyR5: byte-equal verify path
confluence-mdx/bin/lossless_roundtrip/byte_verify.pyconfluence-mdx/bin/mdx_to_storage_xhtml_byte_verify_cli.pyconfluence-mdx/tests/test_lossless_roundtrip_byte_verify.pyconfluence-mdx/tests/test_mdx_to_storage_xhtml_byte_verify_cli.pyValidation
pytest -q confluence-mdx/tests/test_mdx_to_storage/test_parser.py confluence-mdx/tests/test_mdx_to_storage/test_inline.py confluence-mdx/tests/test_mdx_to_storage/test_emitter.py confluence-mdx/tests/test_mdx_to_storage_xhtml_verify.py confluence-mdx/tests/test_mdx_to_storage_xhtml_verify_cli.py confluence-mdx/tests/test_mdx_to_storage_xhtml_cli.py confluence-mdx/tests/test_lossless_roundtrip_sidecar.py confluence-mdx/tests/test_lossless_roundtrip_rehydrator.py confluence-mdx/tests/test_lossless_roundtrip_byte_verify.py confluence-mdx/tests/test_mdx_to_storage_xhtml_byte_verify_cli.py147 passedpython3 confluence-mdx/bin/mdx_to_storage_roundtrip_sidecar_cli.py batch-generate --testcases-dir confluence-mdx/tests/testcases --output-name expected.roundtrip.generated.jsonpython3 confluence-mdx/bin/mdx_to_storage_xhtml_byte_verify_cli.py --testcases-dir confluence-mdx/tests/testcases --sidecar-name expected.roundtrip.generated.json --show-fail-limit 5total=21 passed=21 failed=0Notes
sidecar_missing으로 실패 처리됩니다.link-error,adf-extension, emoticon 등)을 추가할 예정입니다.