StructuredData: implement XML LLSD #35

Closed
opened 2026-08-08 08:16:58 +00:00 by hugo · 1 comment
Owner

Objective

Implement streaming XML LLSD parse/write behavior behind the OSD model.

Deliverables

  • Map every LLSD element and nested container exactly.
  • Preserve headers, empty values, dates, UUIDs, URIs, binary encodings, whitespace, and formatted output.
  • Disable or bound hostile entity/expansion behavior and enforce depth/size limits.

Validation

  • All XML LLSD golden, round-trip, and malformed tests pass.
  • Security regression fixtures are included.
  • Parser errors retain actionable location/context.

Prerequisite

Milestone 04 supplies implemented value types and the global API/test gates are complete.

Project constraints

  • Native Rust only; no LibreMetaverse/.NET bridge or fallback.
  • Keep mapped signatures fixed and preserve translated assertions exactly.
  • Enforce bounded parsing for untrusted input and update docs and parity status.
## Objective Implement streaming XML LLSD parse/write behavior behind the OSD model. ## Deliverables - Map every LLSD element and nested container exactly. - Preserve headers, empty values, dates, UUIDs, URIs, binary encodings, whitespace, and formatted output. - Disable or bound hostile entity/expansion behavior and enforce depth/size limits. ## Validation - All XML LLSD golden, round-trip, and malformed tests pass. - Security regression fixtures are included. - Parser errors retain actionable location/context. ## Prerequisite Milestone 04 supplies implemented value types and the global API/test gates are complete. ## Project constraints - Native Rust only; no LibreMetaverse/.NET bridge or fallback. - Keep mapped signatures fixed and preserve translated assertions exactly. - Enforce bounded parsing for untrusted input and update docs and parity status.
hugo added this to the 05 - StructuredData implementation milestone 2026-08-08 08:16:58 +00:00
hugo added the enhancement label 2026-08-08 08:16:58 +00:00
Author
Owner

Implemented in commit 84bc31d (pushed to origin/main).

Implementation:

  • Added a native, dependency-free bounded XML LLSD codec for byte, stream, string, reader, inner-element, byte-output, writer, and string-output APIs.
  • Implemented every OSD scalar and nested map/array element, XML wrappers/declarations/comments/CDATA/entities, Linden nonstandard PI handling, empty-value defaults, exact numeric/date/UUID/URI/binary behavior, XML escaping, and deterministic compact map serialization.
  • Enforced input/output, nesting, node, decoded-binary, container, and writer allocation bounds with byte-positioned parse errors.
  • Disabled DTD and named entity expansion and added checked-in hostile DTD, external entity, and unknown entity regression fixtures.
  • Updated dispatch, generated native mappings, API coverage, README progress, and the controlled parity baseline.

Verification:

  • All 15 pre-created XmlLLSDTests compatibility cases pass.
  • All 22 libremetaverse-structured-data unit tests pass, including native round-trip, exact serialization entry points, stream/reader, malformed nesting, entity security, depth limits, and C# empty-binary behavior.
  • Controlled red-suite audit is current: 158 pass, 1,215 expected standardized failures, no unrelated failures.
  • cargo fmt, mapping/shim regeneration checks, API coverage, parity/surface checks, workspace/all-target checks, locked API fixture, workspace test compilation, clippy with all targets/features and warnings denied, and workspace rustdoc all pass.

Reviewed against issue #35 and the pinned XmlLLSD.cs golden reference; no stubs or .NET bridge/fallback remain in the mapped XML APIs.

Implemented in commit 84bc31d (pushed to origin/main). Implementation: - Added a native, dependency-free bounded XML LLSD codec for byte, stream, string, reader, inner-element, byte-output, writer, and string-output APIs. - Implemented every OSD scalar and nested map/array element, XML wrappers/declarations/comments/CDATA/entities, Linden nonstandard PI handling, empty-value defaults, exact numeric/date/UUID/URI/binary behavior, XML escaping, and deterministic compact map serialization. - Enforced input/output, nesting, node, decoded-binary, container, and writer allocation bounds with byte-positioned parse errors. - Disabled DTD and named entity expansion and added checked-in hostile DTD, external entity, and unknown entity regression fixtures. - Updated dispatch, generated native mappings, API coverage, README progress, and the controlled parity baseline. Verification: - All 15 pre-created XmlLLSDTests compatibility cases pass. - All 22 libremetaverse-structured-data unit tests pass, including native round-trip, exact serialization entry points, stream/reader, malformed nesting, entity security, depth limits, and C# empty-binary behavior. - Controlled red-suite audit is current: 158 pass, 1,215 expected standardized failures, no unrelated failures. - cargo fmt, mapping/shim regeneration checks, API coverage, parity/surface checks, workspace/all-target checks, locked API fixture, workspace test compilation, clippy with all targets/features and warnings denied, and workspace rustdoc all pass. Reviewed against issue #35 and the pinned XmlLLSD.cs golden reference; no stubs or .NET bridge/fallback remain in the mapped XML APIs.
hugo closed this issue 2026-08-09 01:09:25 +00:00
Sign in to join this conversation.