Skip to content

confluence-mdx: Phase 1 sidecar schema v3 — reconstruction metadata 및 identity helper#915

Merged
jk-kim0 merged 1 commit intomainfrom
jk/phase1-sidecar-schema-v3
Mar 14, 2026
Merged

confluence-mdx: Phase 1 sidecar schema v3 — reconstruction metadata 및 identity helper#915
jk-kim0 merged 1 commit intomainfrom
jk/phase1-sidecar-schema-v3

Conversation

@jk-kim0
Copy link
Contributor

@jk-kim0 jk-kim0 commented Mar 13, 2026

Description

  • reverse-sync 재구성 설계(confluence-mdx: reverse-sync 재구성 설계와 구현 정리 범위를 정의합니다 #913)의 Phase 1 구현입니다.
  • SidecarBlockreconstruction 필드를 추가합니다 (kind, old_plain_text, anchors, items).
  • ROUNDTRIP_SCHEMA_VERSION "2" → "3" 승격, v2 하위 호환 로드를 유지합니다.
  • build_sidecar()가 block 타입별 reconstruction metadata를 자동 생성합니다.
  • build_block_identity_index(), find_block_by_identity(): hash + line_range 기반 disambiguation helper를 추가합니다.

Phase 1 게이트 충족 항목

  • existing sidecar tests green (v2 테스트 11개 수정 후 통과)
  • 21개 testcase build + integrity 유지
  • schema v3 직렬화/역직렬화 정상
  • v2 파일 하위 호환 로드 정상
  • duplicate hash disambiguation 동작
  • 전체 845 tests pass

Added/updated tests?

  • Yes — test_reverse_sync_sidecar_v3.py (25 tests), test_reverse_sync_sidecar_v2.py (v3 호환 수정)

Additional notes

🤖 Generated with Claude Code

@vercel
Copy link

vercel bot commented Mar 13, 2026

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

Project Deployment Actions Updated (UTC)
querypie-docs Ready Ready Preview, Comment Mar 13, 2026 2:04pm

Request Review

Base automatically changed from jk/phase0-xhtml-normalizer-and-list-tree to main March 13, 2026 13:59
@jk-kim0 jk-kim0 self-assigned this Mar 13, 2026
… identity helper를 추가합니다

- SidecarBlock에 reconstruction 필드 추가 (kind, old_plain_text, anchors, items)
- ROUNDTRIP_SCHEMA_VERSION "2" → "3" 승격, v2 하위 호환 로드 유지
- build_sidecar가 block 타입별 reconstruction metadata를 자동 생성
- build_block_identity_index, find_block_by_identity: hash + line_range disambiguation
- Phase 1 전용 테스트 25개 추가 (전체 845 pass)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jk-kim0 jk-kim0 force-pushed the jk/phase1-sidecar-schema-v3 branch from 832048d to 65b8464 Compare March 13, 2026 14:01
@jk-kim0 jk-kim0 merged commit e8d11c5 into main Mar 14, 2026
7 checks passed
@jk-kim0 jk-kim0 deleted the jk/phase1-sidecar-schema-v3 branch March 14, 2026 11:12
jk-kim0 added a commit that referenced this pull request Mar 14, 2026
- SidecarBlock.to_dict() / from_dict() 메서드를 추가합니다
- build_sidecar_identity_index() / find_sidecar_block_by_identity() helper를
  파일 상단으로 이동하고 API를 통일합니다
- _build_reconstruction_metadata()를 BlockMapping 기반으로 재작성합니다
  (ordered list, child_xpaths 지원 추가)
- load_sidecar() v2 하위 호환 제거 — v3 strict 검증으로 변경합니다
- test_reverse_sync_sidecar_v2.py 제거 및 v3 테스트를 갱신합니다
- 22개 testcase expected.roundtrip.json fixture를 갱신합니다

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jk-kim0 added a commit that referenced this pull request Mar 15, 2026
## Description

PR #915(schema v3 기반 필드 추가)가 main에 머지된 이후의 증분 변경사항입니다.

- `SidecarBlock.to_dict()` / `from_dict()` 메서드를 추가합니다
- `build_sidecar_identity_index()` / `find_sidecar_block_by_identity()`
helper를 파일 상단으로 이동하고 API를 통일합니다 (기존 `build_block_identity_index` /
`find_block_by_identity` 대체)
- `_build_reconstruction_metadata()`를 `BlockMapping` 기반으로 재작성합니다 —
ordered list, `child_xpaths` 지원 추가
- `load_sidecar()` v2 하위 호환 제거 — v3 strict 검증으로 변경합니다
- `test_reverse_sync_sidecar_v2.py` 제거,
`test_reverse_sync_sidecar_v3.py` 갱신합니다
- 22개 `testcases/*/expected.roundtrip.json` fixture를 갱신합니다

## Added/updated tests?
- [x] Yes — `test_reverse_sync_sidecar_v3.py` 갱신, 22개 fixture 갱신

## Additional notes
- 이 PR은 PR #915 머지 이후 `origin/main` 위에 rebase된 단일 커밋입니다

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
jk-kim0 added a commit that referenced this pull request Mar 15, 2026
## Description

PR #913 시점의 설계 초안을 2026-03-15 `main` (#917 머지 후) 기준으로 갱신합니다.

**수정 파일:** `docs/plans/2026-03-13-reverse-sync-reconstruction-design.md`

- 문서 헤더에 갱신일, 기준 커밋(`9e0d43b9`), 반영된 선행 PR(#913#915, #917) 메타를 추가합니다
- 이미 `main`에 반영된 Phase 0/1 작업과 아직 남은 재구성 작업을 명확히 분리합니다
- Phase 1 후속(#917) 내용을 반영합니다: `strict v3` 전환, identity helper API
통일(`build_sidecar_identity_index` / `find_sidecar_block_by_identity`),
`reconstruction` metadata 보강(`child_xpaths`, ordered list)
- 현재 런타임 기본 경로(patch_builder → text_transfer)와 최종 목표(fragment
reconstruction) 사이의 gap을 재정의합니다
- 남은 구현 단계(Phase 2–5)와 게이트를 현재 코드베이스 기준으로 재확정합니다

**신규 파일:**
`docs/plans/2026-03-15-reverse-sync-reconstruction-cleanup-scope.md`

- 기존 설계 문서에 포함되어 있던 legacy 코드 삭제 범위를 별도 문서로 분리합니다
- 삭제 시작 조건, 완전 삭제 대상, 부분 축소 대상, 유지 대상을 모듈 단위로 정리합니다

## Added/updated tests?
- [x] No — 문서 전용 변경입니다

## Additional notes
- 코드 변경 없음
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