Skip to content

format_text bold:false is a no-op — cannot remove existing boolean formatting #174

Description

@kiki830621

Problem

Original observation(同 2026-08-28 session):對已是 <w:b/> 的段落呼叫 format_text(paragraph_index, bold: false),回報 Applied formatting to paragraph 0,但存檔後 <w:b/> 原樣留在檔案裡。

format_text 的 boolean 參數疑似把 false 與「未提供」合併處理(Optional<Bool> conflation):true 能加格式;false 既不寫 <w:b w:val="0"/> 也不移除 <w:b/>,卻回報成功。與 #173 同根:boolean 格式的三態(on / off / 未指定)在內部模型被壓成二態。

Type

bug

Repro

  1. Boolean run property w:val="0" dropped on save — bold spreads to untouched runs #173 的 min.docx(P0 為 <w:rPr><w:b/></w:rPr>
  2. open_documentformat_text(paragraph_index: 0, bold: false)save_documentclose_document
  3. 讀回 word/document.xml

Expected

P0 的粗體被移除(刪 <w:b/>,或寫 <w:b w:val="0"/>);若設計上不支援取消,應回報錯誤而非成功。

Actual

Applied formatting to paragraph 0

存檔後 P0 仍為 <w:rPr><w:b/></w:rPr>(no-op + 成功回報)。

Impact

Environment

#173:che-word-mcp(plugin cache 4.0.7);macOS 27.0。

Priority: P2

Cross-repo implementation


Current Status

Phase: implemented (draft dependency integration)
Last updated: 2026-08-31 by idd-implement

Key Decisions

Scope Changes

  • Added ooxml 3.5.x rawSlotExecutionFailure compatibility required by the dependency upgrade.

Blocking

Commits

  • Consumer draft head cd3e592.

Verification

  • Focused 2/2; full 347 tests with 12 skips and 0 failures against upstream program SHA.

Pull Request

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions