Skip to content

refactor: UTF-16 → codepoint 변환을 상류 SSOT 로 단일화 (v0.3.2)#14

Merged
DanMeon merged 2 commits intomainfrom
refactor/utf16-helper-ssot
May 3, 2026
Merged

refactor: UTF-16 → codepoint 변환을 상류 SSOT 로 단일화 (v0.3.2)#14
DanMeon merged 2 commits intomainfrom
refactor/utf16-helper-ssot

Conversation

@DanMeon
Copy link
Copy Markdown
Owner

@DanMeon DanMeon commented May 3, 2026

Summary

v0.2.0 IR 매핑이 보유해 온 자체 UTF-16 → codepoint 변환 복사본 (src/ir.rs::utf16_to_cp) 을 상류 Paragraph::utf16_pos_to_char_idx 로 치환해 SSOT 를 단일화한다.

  • src/ir.rs::utf16_to_cp 자체 복사본 + u32::MAX short-circuit + fallback_end 인자 + 짝 단위 테스트 2건 제거. build_char_runs 호출부를 para.utf16_pos_to_char_idx(...) 로 치환.
  • Cargo.toml 0.3.1 → 0.3.2 (PATCH).
  • 부수: 본 binding 이 제출한 issue 초안 (docs/upstream/issue-utf16-pos-to-char-idx.md) frontmatter ActiveFrozen + RESOLVED 한 줄. 인덱스 (docs/upstream/README.md) row 동기화.
  • CHANGELOG.md [0.3.2] 섹션 신설.

Why

상류 PR #494 (Task #484) 가 본 binding 이 제출한 issue 의 옵션 A (Paragraph 인스턴스 메서드 캡슐화) 를 채택해 v0.7.9 에 pub fn 노출함. 자체 복사본 보유는 본 binding 운영 정책 ("상류 신뢰 + 결함 시 PR") 위반이라 SSOT 단일화로 해소 — v0.3.1 의 Paragraph::control_text_positions (PR #405) 채택과 같은 결.

알고리즘 동등 — IR 출력 byte-equal, 공개 API 변경 없음, SchemaVersion "1.1" 유지. 사용자 visible 변화 0.

상세 결정 + 4 항목 ADR (API source / u32::MAX sentinel / fallback_end 인자 / 단위 테스트 처리):

Related Issues

Verification

  • cargo build --release ✅ (AC-1 — 핀 0fb3e67Paragraph::utf16_pos_to_char_idx 시그니처 포함을 컴파일러가 직접 검증)
  • cargo clippy --all-targets -- -D warnings
  • pytest -m "not slow" ✅ — 478 passed, 2 skipped, 5 deselected (tests/test_ir_*.py 회귀 0)
  • AC-2 fixture byte-equal / AC-3 sentinel 자연 처리 / AC-4 schema 무변경 / AC-5 pytest / AC-6/7 issue archive / AC-8 CHANGELOG 모두 충족

DanMeon and others added 2 commits May 3, 2026 22:11
변경사항:
- docs/roadmap/v0.3.2/ir-upstream-utf16-helper.md 신설 (8 결정 사항 / 8 인수조건 / 5 영구 비목표)
- docs/design/v0.3.2/ir-upstream-utf16-helper-research.md 신설 (API source / sentinel / fallback_end / 단위 테스트 처리 4 결정 ADR)
- docs/roadmap/README.md 활성 spec 인덱스에 v0.3.2 row 추가 (Status: Draft)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
변경사항:
- src/ir.rs::utf16_to_cp 자체 복사본 + u32::MAX short-circuit + fallback_end 인자 + 짝 단위 테스트 2건 제거
- build_char_runs 호출부를 para.utf16_pos_to_char_idx(start_utf16) / (end_utf16) 로 치환 (상류 PR #494 / Task #484, v0.7.9 GA)
- Cargo.toml 0.3.1 → 0.3.2
- CHANGELOG.md [0.3.2] 섹션 신설 (### Build — SSOT 단일화 명시 + 핀 0fb3e67 유지)
- docs/upstream/issue-utf16-pos-to-char-idx.md frontmatter Active → Frozen + RESOLVED 인용 블록 추가
- docs/upstream/README.md 인덱스 row Frozen + RESOLVED 컬럼 채움

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@DanMeon DanMeon merged commit c1443c4 into main May 3, 2026
17 checks passed
@DanMeon DanMeon deleted the refactor/utf16-helper-ssot branch May 3, 2026 13:25
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