Skip to content

[Bug]: DOCX non-breaking hyphens disappear from agent attachment text #36844

Closed

Description

@StiensWout

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. Attach a DOCX whose WordprocessingML contains <w:t>1</w:t><w:noBreakHyphen/><w:t>24 hours</w:t> in a run.
  2. Have the attachment text extracted for an agent through DocumentText.ensure.
  3. Read the generated text sidecar.

Expected behavior

The sidecar preserves 1‑24 hours, including U+2011 at the element's position.

Actual behavior

The sidecar contains 124 hours. An agent reads a different numeric value because the empty w:noBreakHyphen element disappears during extraction.

Impact

Minor bug or occasional failure

Version or commit

Reproduced on pingdotgg/main @ 7bc4746.

Environment

Linux server; real document extraction subprocess. No provider required.

Logs or stack traces

The original document produces This occurred 124 hours; literal U+2011 and ordinary hyphen controls preserve the range. A minimal generated archive also reproduces the loss. Independently confirmed by Claude Opus 5.5 during the bughunt.

Screenshots, recordings, or supporting files

Permanent coverage uses a generated archive, without distributing the third-party document.

Workaround

Use a literal U+2011 or ordinary hyphen in the document and reattach it. Previously cached text sidecars require regeneration.

Activity

  1. added
    vouch:trusted
    on Nov 14, 2026
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

    vouch:trusted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions