You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: XLSX attachment text leaves spreadsheet escapes literal #36848
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
Create an XLSX workbook with a cell containing first\rsecond and cells containing the literal strings _x0041_ and _x005F_x0041_. Ordinary XlsxWriter shared-string and constant-memory inline-string workbooks both reproduce it.
Attach the workbook to a thread and let the server create its document text sidecar.
Read the .xlsx.txt text provided to the agent. The exported extractDocumentText and the real DocumentText.ensure subprocess return the same wrong content.
Expected behavior
The carriage return follows the existing whitespace normalization, giving first second. Literal escape-shaped text stays exactly _x0041_ and _x005F_x0041_.
Actual behavior
The sidecar contains first_x000D_second, _x005F_x0041_ and _x005F_x005F_x0041_. XML entity decoding does not decode SpreadsheetML ST_Xstring escapes.
Impact
Minor bug or occasional failure. Agents receive incorrect spreadsheet attachment text.
Version or commit
Reproduced on upstream main 73fb6cd009260087dca8b82e53e9415321f32961. The extraction owner is unchanged on rebased main 314f1e2976d9ee238af416b591822de9eb644a35.
Environment
Linux server; ordinary XlsxWriter 3.3.1 shared and inline XLSX fixtures. No client or provider dependency.
Logs and additional context
The existing userInputAttachments.test.ts office-structure test reproduces this through the public extractor and real sidecar subprocess. The same fixture fails before the fix and passes afterward. Discovered by the functional bughunt (GPT 6.1 Sol), independently confirmed by Claude Opus 5.5 on 29d517dbac0b3807303f9c317abb6a7879093f6e, and reproduced again for this fix.
Microsoft ST_Xstring notes define CR escaping and protection of literal escape prefixes. This concerns server extraction, separate from spreadsheet preview rendering.
Activity