기능: 감사 1순위 배치 — 필드 33종·머리말 적용쪽·부유 그림 배치·스토리지 보존 (GF-4·GE-α9·GE-9·GE-β7/β8)#16
Merged
Conversation
hwpx writer가 `applyPageType="BOTH"` 상수를 방출해 짝수/홀수 구분 머리말· 꼬리말이 왕복·합성에서 전부 "양쪽"으로 뭉개졌다. `g.data` 선두 UINT32의 bits0-1(적용쪽: 0=양쪽·1=짝수·2=홀수)을 read 측 head_foot_data 매핑의 역으로 방출한다. hwp5-origin(CTRL_HEADER 표 141)·hwpx-origin(head_foot_data 8B) 두 경로 모두 선두 u32에 적용쪽이 실려 동일 처리된다. 테스트: 머리말_적용쪽_hwpx_왕복 (EVEN/ODD write→read 왕복 보존). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
parse_picture_gso가 z_order·세로/가로 오프셋을 0으로 하드코딩해, hwp5→hwpx 변환에서 떠 있는 그림이 원위치와 무관하게 좌상단(offset 0)에 뭉쳤다. GE-8이 TABLE에 적용한 GsoPlacement와 동일한 개체 공통 속성(표 69) 레이아웃으로 세로offset@4·가로offset@8·z-order@20을 실값으로 IR에 승계한다. hwpx write는 이미 floating <hp:pos>/zOrder에 이 값을 방출하므로 read 승계만으로 해소된다. common_data raw는 건드리지 않고 hwp5-origin 그림은 extras 비지 않아 합성 경로(synth_pictures_para)를 타지 않으므로 hwp5→hwp5 identity 무손실 유지 (identity·roundtrip 통과 확인). 테스트: body_text::tests::부유_그림_배치_승계(크래프트 바이트 캡처), 부유_그림_배치_hwpx_방출(hp:pos/zOrder 방출). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
is_field_ctrl_id가 스펙 표 128의 34종 중 12종만 인식해, 변경추적 필드 19종 (FIELD_REVISION_*)·차례(%toc)·개인정보(%cpr)가 hwpx write의 catch-all에서 필드 통째 DROP됐다(내용까지 소실). 표 128에서 21종의 ctrl_id를 확정해 인식 목록에 추가한다. OWPML fieldBegin@type 매핑: - 차례(%toc)는 정답지 코퍼스(과업지시서 hwpx) 실측 `type="TABLEOFCONTENTS"`로 양방향 확정 → 종류까지 왕복(%toc→TABLEOFCONTENTS→%toc). - 변경추적 19종·개인정보(%cpr)는 코퍼스에 OWPML type 근거가 없어 지어내지 않고 UNKNOWN 폴백으로 방출 — 종류 라벨은 잃어도 fieldBegin/End·내용 텍스트는 보존 (GF-1과 동일 손실 등급). 역방향은 UNKNOWN→%unk 기존 경로로 왕복 성립. 메모(%%me)는 메모 리스트(GB-7, 미방출)와 짝을 이뤄야 해 dangling 메모 필드를 근거 없이 내보내면 한글에서 깨질 수 있어 의도적으로 보류(정답지 필요). 테스트: 확장필드_hwp5출신_hwpx_방출(%%*d·%toc·%cpr — DROP 없이 fieldBegin/End 3쌍·내용 보존, %toc는 TABLEOFCONTENTS 종류 왕복, 나머지는 %unk 하향). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
hwp5 FileHeader bit5(XMLTemplate)·문서 이력 비트는 표시용 디코드만 있고, read 화이트리스트·write 스토리지 시퀀스 양쪽에 `/XMLTemplate`·`/DocHistory`가 없어 IR 경유 되쓰기에서 경고 없이 통째 드롭됐다(전자정부 XML 서식·문서 이력 소실). GE-β5 (hwpx settings.xml pass-through) 선례와 동일하게: - Document에 raw 슬롯 신설: `hwp5_xml_template`·`hwp5_doc_history` (스트림 CFB 경로 + 압축 미해제 바이트, JSON 왕복 포함, 빈 벡터는 직렬화 생략). - hwp5 read: `/XMLTemplate/*`·`/DocHistory/*` 스트림을 원문 바이트 그대로 포착 (스토리지별 압축 규칙 미기재라 해제하지 않음 = 무손실). - hwp5 write: 존재 시 상위 스토리지를 mkdir -p(create_storage_all)로 확보 후 재방출(compress 금지 — 바이트 동일). hwpx 경로는 빈 벡터로 무관. - 내용(§4.4 레코드)은 해석하지 않는다(LASTDOCDATA 플래그 스펙 미기재 — 정답지 필요). hwp5 identity·roundtrip 무영향 확인(빈 벡터 시 write 무변). 테스트: xmltemplate_dochistory_스토리지_왕복(합성 .hwp에 두 스토리지 주입 → read→write → 스트림 존재·바이트 동일). Co-Authored-By: Claude Fable 5 <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.
배경
2026-07-19 스펙 전수 감사(#15)에서 확정한 콘텐츠 소실급 갭의 1차 수정 배치. 5건 중 4건 구현, 1건 보류.
구현 (커밋 4개)
applyPageType실값 방출 (BOTH 상수 → 표 141 bit0-1 역매핑, 0=BOTH·1=EVEN·2=ODD)parse_picture_gso의 오프셋·z-order 0 하드코딩 제거, 표 69 실값을 IR로 승계 (GE-8의 GsoPlacement 선례).common_dataraw 무변경 — identity 게이트 유지%cpr·%toc추가 → 통째 DROP 해소.%toc는 정답지 실측(type="TABLEOFCONTENTS")으로 양방향 매핑, 나머지는 UNKNOWN 폴백(내용 보존, GF-1 등급으로 하향).%%me(메모)는 GB-7 연동 위험으로 의도적 보류보류
검증
scripts/check.sh전체 통과 (구현자·리뷰어 각 1회), 신규 테스트 5종hp:pos가 실제 오프셋으로 방출됨 확인 (기존: 전부 0)⚠ 머지 전 실기 검증 필요 (불변식 3)
hwpx 방출 변경(GE-α9·GF-4·GE-9)은 한글 실기 확인이 필요합니다:
🤖 Generated with Claude Code