Task #1552: HWP5 roundtrip 무손실 게이트(hwp5-roundtrip CLI) 신설#1553
Closed
planet6897 wants to merge 2 commits into
Closed
Task #1552: HWP5 roundtrip 무손실 게이트(hwp5-roundtrip CLI) 신설#1553planet6897 wants to merge 2 commits into
planet6897 wants to merge 2 commits into
Conversation
hwpx-roundtrip 대응 HWP5 게이트. serialize_document(=export_hwp_native, HWP5 저장하기)의 무손실성을 5단계로 자동 검사: C1 IR 뼈대 diff(diff_documents) / C2 BinData 스트림 보존(decompressed 내용 멀티셋) / C3 페이지수 복원(DocumentCore) / C4 CFB 구조 / C5 2-round 안정성. - CLI: rhwp hwp5-roundtrip <파일|--batch 폴더> [-o] → inventory.tsv + .rt.hwp + 종료코드 - tests/hwp5_roundtrip_baseline.rs: samples/*.hwp 전수 회귀(신규 자동 포함). out_of_scope()로 HWP3·배포용 자동 제외, XFAIL 9건(F1 BinData 드롭) 봉인. 전수 319건: A=297, xfail=9, 제외=13. baseline 3 passed, 단위 14 passed. - 매뉴얼 mydocs/manual/hwp5_roundtrip_baseline.md 핵심: IR diff=0이 무손실 아님(C2가 그림 드롭 정탐). 선행 조사의 KTX 페이지 붕괴(F2)는 serialize_document 아니라 convert_to_editable 경로 결함으로 분리 규명. closes edwardkim#1552 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 26, 2026
Closed
…건 승격) hwp5-roundtrip 게이트(C2)가 검출한 F1 결함 수정. 원인은 storage_id 충돌이 아니라 대응 HWPTAG_BIN_DATA 레코드가 없는 고아 /BinData 스트림 — 파서가 레코드 기준으로만 스트림을 적재해 저장 시 통째 드롭됐다(IR diff=0이라 false PASS). collect_extra_streams가 직렬화기 재생성 대상(bin_data_content 기반) /BinData 경로만 제외하고, 고아 스트림은 extra_streams로 원본 바이트 보존하도록 수정. 직렬화기 명명 규칙을 미러링하는 serialized_bin_name 헬퍼로 중복 없이 선별. 영향 9건 전수 보존 → tests/hwp5_roundtrip_baseline.rs XFAIL 9건 baseline 승격. closes edwardkim#1554
Contributor
Author
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.
개요
hwpx-roundtrip에 대응하는 HWP5 동일포맷 roundtrip 무손실 게이트를 신설합니다 (closes #1552).serialize_document(=export_hwp_native, HWP5 저장하기)가 IR 뼈대뿐 아니라 BinData 그림 스트림·페이지수·CFB 구조까지 보존하는지 자동 검사하고 회귀로 고정합니다.동기
HWPX/HWP5 무손실 4단계 검증(IR·텍스트·한글 재열림·한글 PDF) 결과 IR diff=0이 무손실을 보장하지 않음이 실증됨:
serialize_document가 일부 BinData 그림 스트림을 통째 드롭(F1) — IR diff·텍스트는 통과라 자동검사가 못 잡음.검사 항목 (C1~C5)
diff_documents)DocumentCore)구현
rhwp hwp5-roundtrip <파일|--batch 폴더> [-o]→inventory.tsv(17컬럼) +.rt.hwp+ 하드 실패 시 종료 코드 1tests/hwp5_roundtrip_baseline.rs—samples/*.hwp전수, 신규 샘플 자동 포함.out_of_scope()로 HWP3·배포용 자동 제외,XFAIL9건(F1) 봉인mydocs/manual/hwp5_roundtrip_baseline.md측정 (samples/*.hwp 319건, 27.5s)
cargo test --test hwp5_roundtrip_baseline3 passed, 단위 14 passed, clippy 클린손실 원인 분리 (게이트 신설의 가치)
선행 조사는
convert(=convert_to_editable경유)로 측정해 KTX 27→1쪽 붕괴·이미지 전손실을 관측했으나, 본 게이트는serialize_document를 직접 테스트하여 KTX는 보존(3/3 이미지, 27=27쪽) 임을 확인 — F2(KTX 붕괴)는 serialize_document가 아니라 convert_to_editable 경로 결함으로 규명됨.후속 (별도 이슈)
serialize_documentBinData 드롭 수정(xfail 9건 승격)convert_to_editable/convert경로 이미지·페이지 손실주의
게이트 통과 = 구조+BinData+페이지(rhwp 자기일관) 보존이며 시각 충실도 보장 아님. C3는 외부 한글-only 붕괴는 미검출(한글 harness 보조).
🤖 Generated with Claude Code
추가: Task #1554 — F1 BinData 고아 스트림 드롭 수정 (closes #1554)
본 PR에 #1554 수정 커밋이 포함됨. 위 "후속(별도 이슈) F1"을 본 PR에서 함께 해결.
HWPTAG_BIN_DATA레코드 없는 고아/BinData스트림 — 파서가 레코드 기준으로만 적재해 저장 시 통째 드롭(IR diff=0이라 false PASS).src/parser/mod.rs):collect_extra_streams가 직렬화기 재생성 대상(bin_data_content기반)/BinData경로만 제외하고, 고아 스트림은extra_streams로 원본 바이트 보존.serialized_bin_name헬퍼로 직렬화기 명명 규칙 미러링(중복 없이 선별).img-start-00120/20 ~interview1/3) BinData 전수 보존 →tests/hwp5_roundtrip_baseline.rsXFAIL 9건 baseline 승격(목록 비움).cargo test --test hwp5_roundtrip_baseline통과, clippy 무경고.mydocs/report/task_m100_1554_report.md