Implement bounded collecting APIs over the event stream.
Scope
Add parse_file/2, parse_binary/2, and parse_stream/2 with required finite max_items. Reuse the same stream and collector semantics, apply item filtering before counting, continue to end-of-stream at the exact limit, and return no partial result on errors or overflow.
Acceptance Criteria
Successful calls return ParseResult.
max_items is required and positive.
An additional accepted item returns {:error, {:max_items_exceeded, max_items}}.
Collectors report malformed tails even when the accepted count reaches the limit.
Binary input is never overloaded as a path.
File, binary, and chunk-enumerable inputs are tested.
## Objective
Implement bounded collecting APIs over the event stream.
## Scope
Add `parse_file/2`, `parse_binary/2`, and `parse_stream/2` with required finite `max_items`. Reuse the same stream and collector semantics, apply item filtering before counting, continue to end-of-stream at the exact limit, and return no partial result on errors or overflow.
## Acceptance Criteria
- Successful calls return `ParseResult`.
- `max_items` is required and positive.
- An additional accepted item returns `{:error, {:max_items_exceeded, max_items}}`.
- Collectors report malformed tails even when the accepted count reaches the limit.
- Binary input is never overloaded as a path.
- File, binary, and chunk-enumerable inputs are tested.
mmacia
self-assigned this 2026-10-16 10:12:47 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Objective
Implement bounded collecting APIs over the event stream.
Scope
Add
parse_file/2,parse_binary/2, andparse_stream/2with required finitemax_items. Reuse the same stream and collector semantics, apply item filtering before counting, continue to end-of-stream at the exact limit, and return no partial result on errors or overflow.Acceptance Criteria
ParseResult.max_itemsis required and positive.{:error, {:max_items_exceeded, max_items}}.