Skip to content

feat!: 다단 구분선(colLine) carry + 문서 정합 최신화 + rmcp 2.0 보안(#90)#91

Merged
pignuante merged 5 commits into
mainfrom
feat/column-separator-line
Jul 1, 2026
Merged

feat!: 다단 구분선(colLine) carry + 문서 정합 최신화 + rmcp 2.0 보안(#90)#91
pignuante merged 5 commits into
mainfrom
feat/column-separator-line

Conversation

@pignuante

Copy link
Copy Markdown
Contributor

개요

다단 구분선(colLine) carry 기능(HWPX + HWP5→HWPX)에 더해, 이번 브랜치에서 발견한 문서 drift 정합 최신화와 Dependabot #90(rmcp 2.0 보안) 수동 채택까지 함께 담았습니다.

주요 변경

1. 다단 구분선 colLine carry (BREAKING) — feat!

  • HWPX read/write leg (5ab3758): 신규 public 타입 ColumnLine { line_type, width, color } + ColumnSettings.col_line: Option<ColumnLine> + with_separator() 빌더. 구분선 없는 다단은 byte-중립(<hp:colPr> self-closing 유지), 있을 때만 container colPr(OWPML 순서: colLine → colSz).
  • HWP5→HWPX leg (68dbe71): cold ctrl의 Border 블록(kind/width/color) 디코드 → byte-exact <hp:colLine>.
  • 한컴 native wire(type="DOUBLE_SLIM" width="0.7 mm" color="#CA56A7") byte-exact 재현 + HWPX 양방향 round-trip + 한컴 시각 게이트(2단+구분선) 통과.

2. 문서 정합 최신화 — docs (1b2c330)

  • README / CLAUDE.md / CHANGELOG0.9.0 상태로 교정: 버전(0.7→0.9), LOC/소스파일/테스트(2,688)/CLI 명령어(7→11) 카운트, CHANGELOG의 stale [Unreleased] targeted as 0.7.00.10.0 + 이미 릴리스된 0.6~0.9 누적분을 [0.6.0–0.9.0] (released) 배너로 분리.
  • 내부 문서(AGENTS.md ×7 / .docs / MEMORY)도 동일 기준으로 동기화(버전/브랜치 스냅샷, ADR 상태·번호, colLine STATUS).

3. 저장소 위생 — chore (52cc29d)

  • examples/hwp5_review/(리뷰 산출물) + tests/fixtures/hwp5/crossref/*.hwpx(재생성 가능한 변환 출력, 테스트 미참조) gitignore. golden .hwpx는 targeted 규칙으로 영향 없음.

4. 의존성 보안 — fix(deps) (d6f0067)

  • rmcp 1.2 → 2.0, quick-xml 0.40 → 0.41 — RUSTSEC GHSA-89vp-x53w-74fx(MCP Host-header 검증) 해소. Dependabot #90을 수동 채택build(deps): bump the rust-workspace group with 2 updates #90 close 가능.
  • rmcp 2.0 breaking API 마이그레이션(bindings-mcp): Content::textContentBlock::text, PromptMessageRole::UserRole::User, RawResource{..}.no_annotation()Resource::new(..).with_*()(non_exhaustive 빌더).

검증

  • cargo build --workspace --all-features OK
  • cargo nextest run --workspace --all-features2,688 passed, 2 skipped
  • cargo deny check advisories → ok

릴리스 영향

  • feat!(colLine breaking) 포함 → release-plz가 다음 릴리스를 0.10.0으로 bump 예정. fix(deps)도 함께 배포됨.

Add the column separator divider (`<hp:colLine>`) to multi-column layouts,
byte-exact with Hancom-native output and round-tripping through HWPX in both
directions.

- new `hwpforge_core::column::ColumnLine { line_type: BorderLineType,
  width: HwpUnit, color: Color }` (OWPML defaults SOLID / 0.12 mm / #000000)
- `ColumnSettings.col_line: Option<ColumnLine>` + `with_separator()` builder
- schema `HxColLine` + `HxColPr.col_line` (OWPML order: colLine before colSz)
- encoder emits a container `<hp:colPr>` only when a separator is present;
  without one the `<hp:colPr>` stays self-closing → byte-neutral for every
  existing multi-column document
- decoder maps `HxColLine` back to `ColumnLine` (UPPER_SNAKE type + "x.x mm"
  width + #hex color reverse helpers)

Verified against a Hancom-native fixture
(examples/hwp5_review/_verify/nativ-colline.hwpx): our output reproduces
`<hp:colLine type="DOUBLE_SLIM" width="0.7 mm" color="#CA56A7"/>` exactly, and
the generated file renders a 2-column layout with the divider in 한글 (visual
gate passed). HWP5 → HWPX leg (decoding the ColDef separator bits) is a
follow-up slice.

BREAKING CHANGE: `hwpforge_core::column::ColumnSettings` gains a
`col_line: Option<ColumnLine>` field — external code constructing
`ColumnSettings` via a struct literal must specify `col_line` (callers using
the `equal_columns`/`custom` constructors are unaffected). New public type
`ColumnLine`. JSON: when absent, `col_line` is omitted, so existing output is
byte-identical.

Claude-Session: https://claude.ai/code/session_0199NBUj9VUZmSfqxEysxudD
The HWP5 `cold` ctrl's Border block (column divider) was discarded — only the
column count and gap were decoded. This carries it through to a byte-exact
`<hp:colLine>`, completing the colLine round-trip from `.hwp`.

- decoder `Hwp5ColumnDef` gains a `Hwp5ColumnBorder { kind, width, color }`,
  parsed from the `cold` payload after the per-column widths + reserved word
  (only when `same_width`, the per-column list is absent)
- projection maps the raw Border to `ColumnSettings.col_line`: kind →
  `BorderLineType`, width index → mm (한글 16-step table), COLORREF → `Color`
- HWP5_WIRE_SPEC §6.3 documents the Border block layout

Verified against a native fixture (`tests/fixtures/layout/colline.hwp`): cold
bytes `… 08 09 CA 56 A7 00` convert to the byte-exact native HWPX
`<hp:colLine type="DOUBLE_SLIM" width="0.7 mm" color="#CA56A7"/>`. Mapping
confirmed by dumping the native cold ctrl bytes (kind 8 = DoubleSlim, width
index 9 = 0.7 mm, color #CA56A7). 557 smithy-hwp5 + convert tests pass.

Internal to smithy-hwp5 (publish=false) — no public-API change.

Claude-Session: https://claude.ai/code/session_0199NBUj9VUZmSfqxEysxudD
감사(README / CLAUDE·AGENTS / MEMORY·.docs) 후 코드 대조로 drift 교정:

- README: 버전 0.7→0.9, LOC/소스파일/테스트(2,688) 카운트, CLI 명령어 7→11
- CLAUDE.md: 워크스페이스 카운트, foundation deps(schemars), golden 경로,
  quick-xml 0.40, stale 'Current Engineering State' 재작성
- CHANGELOG: stale Unreleased 헤더(0.7.0→0.10.0), 이미 릴리스된 0.6.0–0.9.0
  누적분을 진짜 미릴리스(colLine)와 분리

내부 문서(.docs / AGENTS.md / MEMORY.md, git-ignored)도 동일 기준으로 제자리 갱신.
- examples/hwp5_review/ (리뷰 워크스페이스 산출물, git add -A 사고 방지)
- tests/fixtures/hwp5/crossref/*.hwpx (재생성 가능한 변환 출력; .hwp 입력은 tracked,
  어떤 테스트도 이 .hwpx 를 참조하지 않음). golden .hwpx 는 targeted 규칙으로 영향 없음.
…pendabot #90)

Dependabot #90 을 수동 채택. rmcp <1.4.0 은 MCP Host-header 검증 취약점
(GHSA-89vp-x53w-74fx) → rmcp 2.0 으로 상향(quick-xml 도 0.40→0.41 함께).

rmcp 2.0 breaking API 마이그레이션 (bindings-mcp):
- Content::text → ContentBlock::text (CallToolResult content = Vec<ContentBlock>)
- PromptMessageRole::User → Role::User
- RawResource{..}.no_annotation() → Resource::new(uri,name).with_*() (non_exhaustive 빌더)

검증: workspace 빌드 + 2,688 테스트 green (2 skipped), cargo deny advisories ok.
Cargo.lock 은 gitignore 라 manifest 하한으로 고정. CLAUDE.md gotcha #16 quick-xml 0.41 반영.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant