fix: v0.3.1 inline 컨트롤 마커 char_start/char_end null 출고 정정#12
Merged
Conversation
변경사항: - v0.3.1 spec 본문 (결정 사항 9 / AC 14 / 영구 비목표 8) — inline 컨트롤 마커의 Provenance.char_start/char_end 채움 정정 - 짝 ADR (4 결정 매트릭스: API source / char_start·end 의미 / 빈 char_offsets 폴백 / Schema 버전) - roadmap/README.md 활성 spec 인덱스에 v0.3.1 row 추가 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
변경사항: - frontmatter 에 generic description 필드 도입 (모든 26 spec/ADR/impl/upstream/verification 파일에 retroactive 추가) - description 을 required 로 lint 룰 격상 (scripts/_doc_lint.py) - docs/upstream/README.md (Living) 신설 — 활성/해결 이슈 인덱스 + archive 정책 SSOT - docs/upstream/issue-*.md 본문에서 자체 추적 문장 분리 (GitHub 이슈 등록 가능 형태로) - docs/upstream/issue-utf16-pos-to-char-idx.md (Active) 신설 — helpers::utf16_pos_to_char_idx 외부 노출 제안 - docs/CONVENTIONS.md 갱신 — schema 표 description row + quoting 가이드 + 4 예시 production-style 통일 + § upstream/ + 디렉토리 트리 + Living 분류 - /new-spec skill 의 spec/ADR 템플릿에 description placeholder 추가 - docs/roadmap/README.md 헤더 날짜 2026-04-30 으로 갱신 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
변경사항: - src/ir.rs: lookup_bin_data_bytes helper 함수 + 단위 테스트 제거 - src/document.rs: bytes_for_image_id 가 상류 inner.get_bin_data((id-1) as usize) 를 직접 호출하도록 변경 + bin_data_id == 0 early return inline - 혼합 (Link + Embedding) 문서의 lookup 한계 docstring 을 메서드 자체로 이전 (상류 패리티 명시) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
변경사항: - 폐기된 phase-N.md 잔존 인용 정리 — AGENTS.md / scripts/_doc_lint.py:285 / python/rhwp/cli/ir.py docstring / v0.7.0/mcp.md:21 (Frozen historical 6 곳은 immutability 정책에 따라 보존) - CONVENTIONS Living 예시 표에 docs/traces/coverage.md 추가 - CONVENTIONS frontmatter ga 행에 meta-level / RESOLVED upstream 면제 케이스 명시 - CONVENTIONS § last_updated 자동 갱신 의 "CI lint 가 git history 일치 여부 검증" 미구현 문장 삭제 - 인수조건 형식 cutoff 를 "v0.4.0+ 신규 spec" → "spec-system-overhaul (2026-04-29) 이후 신규 작성 spec" 시점 기준으로 명문화 (CONVENTIONS / traces/coverage.md 동기) - v0.7.0/mcp.md (발효일 이전 작성 grandfather Draft) 에 AC-1 ~ AC-11 일괄 retrofit - _doc_lint.py:228 의 "Grandfather" 주석을 "Pair-exempt" 로 변경 (CONVENTIONS 의 grandfather 와 의미 충돌 방지) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
변경사항: - 7종 블록 (각주/미주 marker, Picture/Formula/Field/TOC/Table) 의 prov.char_start/char_end 를 zero-width point (char_start == char_end == position) 로 채움 (이전 항상 None) - 상류 Paragraph::control_text_positions() (v0.7.8 PR #405) paragraph 당 1회 호출 + controls/positions 길이 invariant 를 release/debug 모두 assert_eq! 로 가드 - 부모 paragraph 의 char_offsets 빈 케이스 → None 폴백 (fail-safe) - external/rhwp submodule pin 033617e (v0.7.7) → 0fb3e67 (post-v0.7.8) - AC-1 ~ AC-14 회귀 가드 신규 (tests/test_v0_3_1_marker_char_offset.py) + 기존 IR 테스트 7종에 spec marker 부착 - Cargo.toml 0.3.0 → 0.3.1 (Schema 1.1 유지, 호환 100%) - CHANGELOG / spec frontmatter / docs/traces/coverage / CI gated test list 갱신 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
변경사항: - spec/ADR frontmatter status Draft → Frozen, target → ga (v0.3.1) - docs/implementation/v0.3.1/migration.md 신규 (Frozen on creation): 산출물 / 호환성 / 검증 결과 / 이월 사항 - docs/roadmap/README.md 현재 상태 + 활성 spec 인덱스 + 구현 로그 표 갱신 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
변경사항: - AC-10 매핑을 test_ir_schema_export.py::test_real_hwp_document_validates_against_schema 로 정정 (spec § AC-10 가 명시한 권위 위치) - stale entry test_real_sample_ir_passes_jsonschema_validation 제거 (실제 테스트 부재) - test_submodule_pin_matches_changelog_record 추가 (AC-13) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
변경사항: - .claude/hooks/regen-spec-trace.py 신규 — PostToolUse 에서 tests/*.py 편집 감지 시 scripts/generate_spec_trace.py 자동 실행 (CI 와 동일한 --no-project + ad-hoc typer 패턴) - .claude/settings.json PostToolUse 에 hook 등록 - 기존 docs-lint hook 은 docs/*.md 단일 파일만 감시 → tests/*.py 의 @pytest.mark.spec marker 변경이 로컬에서 trace 재생성을 trigger 하지 않아 CI --check 까지 가서야 staleness 발견되던 격차 해소 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
변경사항: - mutmut (mutation testing) 작업 디렉토리 leakage 방지 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.3.1 (메인)
Provenance.char_start/char_end가 v0.3.0 까지 항상 null 이던 문제 정정 — 부모 paragraph 안 zero-width character 위치 (char_start == char_end == position) 로 채운다Paragraph::control_text_positions()(edwardkim/rhwp v0.7.8 PR #405 / Task #390) paragraph 당 1회 호출 +controls.len() == positions.len()invariant 를 release/debug 모두assert_eq!로 가드char_offsets빈 케이스 →None폴백 (fail-safe, 의미 손실 position 흘리지 않음)external/rhwpsubmodule pin033617e(v0.7.7) →0fb3e67(post-v0.7.8)Cargo.toml0.3.0 → 0.3.1. Schema 1.1 유지, API surface diff 없음 (호환 100%)부수 변경 (브랜치 누적분)
docs/upstream/issue-utf16-pos-to-char-idx.md) + index 갱신description필드 도입 (CONVENTIONS Living-policy schema migration)bin_datalookup 을 상류get_bin_data직접 호출로 단순화Why
v0.3.0 IR 출고에서
Provenance.char_start/char_end슬롯이 schema 1.1 에 정의돼 있었지만 inline 컨트롤에 대해 항상 null — 알고리즘이 상류pub(crate)로 갇혀 외부 crate 에서 호출 불가했기 때문. 본 binding 이 등록한 edwardkim/rhwp#390 의 옵션 A 가 PR #405 로 머지되어 v0.7.8 GA 함에 따라 외부 노출 가능해졌다. 이를 활용해 슬롯을 채운다 — schema 변경 없이 기존 consumer 호환 유지.자체 알고리즘 복사 (silent drift 위험) 대신 상류 메서드 직접 호출을 채택 (CLAUDE.md "상류 fix via issues, not local patches" 정책).
Related Issues
🤖 Generated with Claude Code