refactor: UTF-16 → codepoint 변환을 상류 SSOT 로 단일화 (v0.3.2)#14
Merged
Conversation
변경사항: - 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>
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
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::MAXshort-circuit +fallback_end인자 + 짝 단위 테스트 2건 제거.build_char_runs호출부를para.utf16_pos_to_char_idx(...)로 치환.Cargo.toml0.3.1 → 0.3.2 (PATCH).docs/upstream/issue-utf16-pos-to-char-idx.md) frontmatterActive→Frozen+ 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::MAXsentinel /fallback_end인자 / 단위 테스트 처리):Related Issues
Paragraph::control_text_positions채택 ([api] document_core::find_control_text_positions 외부 crate 노출 검토 부탁드립니다 edwardkim/rhwp#390 / PR #405)Verification
cargo build --release✅ (AC-1 — 핀0fb3e67가Paragraph::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)