Add verified XML recovery #21

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

Objective

Implement opt-in verified parsing with bounded XML repair and finite parse-pass budgets.

Scope

Add stream_verified/2 and stream_file_verified/2. Implement chunked repairs for invalid encodings, malformed CDATA, whitespace before the XML prolog, trailing garbage, and malformed ampersands. Enforce xml_repair_attempts, max_parse_passes, carry-over, and aggregate temporary-byte limits.

Acceptance Criteria

  • Verified APIs repair the characterized malformed XML cases before item delivery.
  • Default one-pass APIs do not retry after emitting items.
  • Repairs never read the complete document into memory or use unbounded replacements.
  • Repair derivatives and source files are cleaned up correctly.
  • Repair success, exhaustion, pass limits, resource limits, and failure are tested.
## Objective Implement opt-in verified parsing with bounded XML repair and finite parse-pass budgets. ## Scope Add `stream_verified/2` and `stream_file_verified/2`. Implement chunked repairs for invalid encodings, malformed CDATA, whitespace before the XML prolog, trailing garbage, and malformed ampersands. Enforce `xml_repair_attempts`, `max_parse_passes`, carry-over, and aggregate temporary-byte limits. ## Acceptance Criteria - Verified APIs repair the characterized malformed XML cases before item delivery. - Default one-pass APIs do not retry after emitting items. - Repairs never read the complete document into memory or use unbounded replacements. - Repair derivatives and source files are cleaned up correctly. - Repair success, exhaustion, pass limits, resource limits, and failure are tested.
mmacia self-assigned this 2026-10-16 10:12:49 +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#21