Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

google-apis-core: CompositeIO does not maintain the IO read contract

Open
#27,758 0 comments 0 reactions 1 assignee View on GitHub

@torreypayne is already working on this.

Since Sep 22, 2026.

Assessment

This issue has not been assessed yet.

Description

Google::Apis::Core::CompositeIO currently leaves pos unchanged after reads, returns nil for read(0), and decrements remaining length by character count rather than byte count. This diverges from the IO contract and misaccounts multibyte data.

A focused candidate:

  • returns an empty buffer for zero-length reads,
  • rejects negative lengths,
  • advances pos and remaining length by bytesize.

The focused contract model and 18 targeted examples pass; the cumulative core suite is 509 examples / 0 failures on Ruby 4.0.6. PR #18722 also touches CompositeIO, but only for frozen-string compatibility already present in current source; it does not address these semantics.

I have a minimal patch ready and can submit it after maintainer acceptance per CONTRIBUTING. The source audit and candidate preparation used AI assistance; I reviewed and verified the result.

Dominant language
Ruby
Stars
2.9k
Forks
888
Avg merge
8m
Merged PRs (30d)
241

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from googleapis/google-api-ruby-client

All issues in googleapis/google-api-ruby-client

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.