Skip to content

fix(attachment): Save binary IO payloads without newline corruption#727

Open
Gujiassh wants to merge 1 commit intocrmne:mainfrom
Gujiassh:fix/attachment-binary-save-refresh-20260411
Open

fix(attachment): Save binary IO payloads without newline corruption#727
Gujiassh wants to merge 1 commit intocrmne:mainfrom
Gujiassh:fix/attachment-binary-save-refresh-20260411

Conversation

@Gujiassh
Copy link
Copy Markdown

Summary

  • refresh the old Attachment#save binary-write fix onto current main
  • rewind IO-like sources and write them with File.binwrite so binary attachments are saved byte-for-byte
  • keep the regression coverage proving binary payloads are not rewritten with an added newline

Validation

  • bundle exec rspec spec/ruby_llm/attachment_spec.rb
  • bundle exec rubocop lib/ruby_llm/attachment.rb spec/ruby_llm/attachment_spec.rb

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
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