Skip to content

bug: format_text false values are reported as success but ignored #197

Description

@kiki830621

Problem

format_text(paragraph_index: ..., bold: false) reports success but leaves existing <w:b/> formatting unchanged. The handler builds a fresh RunProperties, assigns bold = false, and calls Document.formatParagraph; the current upstream merge applies only true values, so false is indistinguishable from an omitted argument.

The same ambiguity affects italic: false and underline: false at the public tool boundary.

Type

bug

Expected

  • Omitted formatting arguments leave existing run properties unchanged.
  • bold: false and italic: false explicitly remove/disable those properties.
  • underline: false explicitly removes underline.
  • The tool reports success only when the requested mutation is represented and persists after save/reopen.

Actual

format_text returns Applied formatting to paragraph N, but false boolean values are swallowed by the downstream additive merge.

Scope / Acceptance

  • Depend on the tri-state/presence correction tracked by bug: preserve explicit false run properties across read/write ooxml-swift#115.
  • Add MCP-level RED→GREEN tests for omitted vs true vs false formatting arguments.
  • Verify bold:false, italic:false, and underline:false persist after save/reopen without changing unrelated run properties.
  • Preserve existing as_revision behavior or fail loudly if explicit false revision formatting is not representable.
  • Update public tool descriptions if needed; run focused and full che-word-mcp suites.

Cross-repo tracking


Current Status

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

Key Decisions

  • Omitted formatting arguments remain unchanged; explicit false removes bold/italic/underline.
  • Revision-mode formatting starts from current run properties before applying the partial patch.
  • ooxml 3.5.x rawSlotExecutionFailure has an explicit MCP error mapping.

Blocking

Commits

  • 3353186 — consumer behavior and tests.
  • cd3e592 — final exact upstream pin.

Verification

Pull Request

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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