HWP5 roundtrip 무손실 게이트 + BinData 고아 스트림 드롭 수정 (#1552, #1554)#1558
Merged
Conversation
This was referenced Jun 26, 2026
…kim#1554) hwpx-roundtrip에 대응하는 HWP5 동일포맷 roundtrip 무손실 게이트를 신설하고(edwardkim#1552), 그 게이트(C2)가 검출한 BinData 그림 스트림 드롭(F1)을 수정한다(edwardkim#1554). [edwardkim#1552] hwp5-roundtrip 게이트 - CLI `rhwp hwp5-roundtrip <파일|--batch 폴더> [-o]` — inventory.tsv + .rt.hwp, 하드 실패 시 종료 코드 1 - 회귀 테스트 tests/hwp5_roundtrip_baseline.rs (samples/*.hwp 전수, 신규 자동 포함) - 검사 C1 IR 뼈대 / C2 BinData 보존 / C3 페이지수 / C4 CFB 구조 / C5 2-round 안정성 - 매뉴얼 mydocs/manual/hwp5_roundtrip_baseline.md - IR diff=0이 무손실을 보장하지 않음을 실증(C2가 F1 정탐) [edwardkim#1554] serialize_document BinData 고아 스트림 드롭 수정 - 원인은 storage_id 충돌이 아니라 대응 HWPTAG_BIN_DATA 레코드가 없는 고아 /BinData 스트림 — 파서가 레코드 기준으로만 적재해 저장 시 통째 드롭됐다. - collect_extra_streams가 직렬화기 재생성 대상(bin_data_content 기반) /BinData 경로만 제외하고, 고아 스트림은 extra_streams로 원본 바이트 보존하도록 수정. serialized_bin_name 헬퍼로 직렬화기 명명 규칙 미러링(중복 없이 선별). - 영향 9건 전수 보존 → baseline XFAIL 9건 승격(목록 비움) closes edwardkim#1552 closes edwardkim#1554
e5803b4 to
5a89ff9
Compare
Collaborator
|
@planet6897 감사합니다. 최신 검증 결과:
merge commit: |
This was referenced Jun 26, 2026
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 무손실 게이트 신설(#1552)과,그 게이트(C2)가 검출한 BinData 그림 스트림 드롭(F1) 수정(#1554)을 단일 squash 커밋으로 통합합니다.
PR #1553을 대체합니다 (#1552 단독 PR → #1552+#1554 통합).
closes #1552
closes #1554
[#1552] hwp5-roundtrip 무손실 게이트
serialize_document(= HWP5 저장하기)가 IR 뼈대뿐 아니라 BinData 그림 스트림·페이지수·CFB 구조까지 보존하는지 자동 검사하고 회귀로 고정합니다. IR diff=0이 무손실을 보장하지 않음을 실증.diff_documents)DocumentCore)rhwp hwp5-roundtrip <파일|--batch 폴더> [-o]→inventory.tsv+.rt.hwp+ 하드 실패 시 종료 코드 1tests/hwp5_roundtrip_baseline.rs—samples/*.hwp전수, 신규 샘플 자동 포함mydocs/manual/hwp5_roundtrip_baseline.md[#1554] serialize_document BinData 고아 스트림 드롭 수정
HWPTAG_BIN_DATA레코드가 없는 고아/BinData스트림 — 파서가 레코드 기준으로만 적재해 저장 시 통째 드롭(IR diff=0이라 false PASS). 예:img-start-001(레코드 0, 스트림 20),interview(레코드 2, 스트림 3 → BIN0001 고아).src/parser/mod.rs):collect_extra_streams가 직렬화기 재생성 대상(bin_data_content기반)/BinData경로만 제외하고, 고아 스트림은extra_streams로 원본 바이트 보존.serialized_bin_name헬퍼로 직렬화기 명명 규칙(find_bin_data_info_with_compress) 미러링하여 중복 없이 선별.img-start-00120/20 ~interview1/3) BinData 전수 보존 →tests/hwp5_roundtrip_baseline.rsXFAIL 9건 baseline 승격(목록 비움).검증
rhwp hwp5-roundtrip→ 전건 PASS (이전BINDATA_LOSS)cargo test --test hwp5_roundtrip_baseline3건 통과(baseline_all_samples회귀 없음,xfail_entries_still_fail승격 통과)cfb_writer(17)·bin_data(16) 통과,cargo clippy --release무경고, 변경 파일cargo fmt적용범위 밖 (별도 이슈)
convert/convert_to_editable경로 이미지·페이지 손실(KTX 27→1쪽).serialize_document는 KTX 보존 확인됨.주의
게이트 통과 = 구조+BinData+페이지(rhwp 자기일관) 보존이며 시각 충실도 보장 아님.
보고서:
mydocs/report/task_m100_1552_report.md,mydocs/report/task_m100_1554_report.md