Add bounded local collectors #17

Closed
opened 2026-10-16 10:12:47 +00:00 by mmacia · 0 comments
Owner

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.
## 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
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mmacia/feed_reader#17