Skip to content

fix(agents-server): sanitize attachment filename fallback#4548

Open
KyleAMathews wants to merge 3 commits into
mainfrom
fix/attachment-bytestring-filename
Open

fix(agents-server): sanitize attachment filename fallback#4548
KyleAMathews wants to merge 3 commits into
mainfrom
fix/attachment-bytestring-filename

Conversation

@KyleAMathews

Copy link
Copy Markdown
Contributor

Summary

  • sanitize the legacy Content-Disposition filename fallback to ASCII-only before setting attachment response headers
  • preserve the full Unicode filename in the RFC 5987 filename* parameter
  • add a regression test for screenshot-style filenames containing a narrow no-break space

Test plan

  • pnpm --filter @electric-ax/agents-runtime build
  • pnpm --dir packages/agents-server exec vitest run test/electric-agents-routes.test.ts

@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.12%. Comparing base (916f6cd) to head (6d67b86).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #4548       +/-   ##
===========================================
+ Coverage   54.80%   74.12%   +19.31%     
===========================================
  Files         317       52      -265     
  Lines       36681     6895    -29786     
  Branches    10466     2189     -8277     
===========================================
- Hits        20104     5111    -14993     
+ Misses      16544     1768    -14776     
+ Partials       33       16       -17     
Flag Coverage Δ
packages/agents ?
packages/agents-mobile ?
packages/agents-runtime ?
packages/agents-server 74.12% <100.00%> (+0.17%) ⬆️
packages/agents-server-ui ?
packages/electric-ax ?
typescript 74.12% <100.00%> (+19.31%) ⬆️
unit-tests 74.12% <100.00%> (+19.31%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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