Data: qualify TOML parser limits and schema separation #46

Closed
opened 2026-12-03 10:24:27 +00:00 by faumaray · 1 comment
Owner

Context: Forge parses pipeline definitions from Git and from the database. Forge tracks this as VL-TOML-01.

Current behavior: Toml.hpp provides typed values, source locations, UTF-8 validation, duplicate-key rejection, max_input_bytes and max_depth (defaults 16 MiB and depth 64). Depth checks appear in value parsing; uniform coverage of dotted/table paths needs qualification.

Need: both definition sources must pass identical parser limits and Forge schema validation before scheduling. Reject unknown schema fields, invalid types, non-finite values where prohibited, excessive expansion and invalid graph structure. Parsing must never execute hooks or pipeline code.

Proposed: Forge-owned PipelineDefinitionLimits and parse_and_validate_pipeline; extend upstream ParseOptions only if a reproducer proves inadequate allocation, node, key-path or depth control.

Tests/gate: arrays, inline tables, long dotted keys, deep table trees, invalid UTF-8, duplicates, huge scalars, boundary limits and stable diagnostics. Preserve valid generic TOML behavior. Gates Forge M13 and migration workflow conversion.

Context: Forge parses pipeline definitions from Git and from the database. Forge tracks this as VL-TOML-01. Current behavior: Toml.hpp provides typed values, source locations, UTF-8 validation, duplicate-key rejection, max_input_bytes and max_depth (defaults 16 MiB and depth 64). Depth checks appear in value parsing; uniform coverage of dotted/table paths needs qualification. Need: both definition sources must pass identical parser limits and Forge schema validation before scheduling. Reject unknown schema fields, invalid types, non-finite values where prohibited, excessive expansion and invalid graph structure. Parsing must never execute hooks or pipeline code. Proposed: Forge-owned PipelineDefinitionLimits and parse_and_validate_pipeline; extend upstream ParseOptions only if a reproducer proves inadequate allocation, node, key-path or depth control. Tests/gate: arrays, inline tables, long dotted keys, deep table trees, invalid UTF-8, duplicates, huge scalars, boundary limits and stable diagnostics. Preserve valid generic TOML behavior. Gates Forge M13 and migration workflow conversion.
Author
Owner

Implemented on branch issue-46-toml-limits (commit 9ccfbf7): uniform max_depth enforcement across table headers, dotted keys, inline tables and arrays, plus an opt-in max_nodes cap and input-byte boundary tests. Merged into main; the full Data test suite and a -Werror build pass. Forge-specific pipeline schema validation stays in Forge (no pipeline type exists in Void). Closing as done.

Implemented on branch `issue-46-toml-limits` (commit `9ccfbf7`): uniform `max_depth` enforcement across table headers, dotted keys, inline tables and arrays, plus an opt-in `max_nodes` cap and input-byte boundary tests. Merged into `main`; the full Data test suite and a `-Werror` build pass. Forge-specific pipeline schema validation stays in Forge (no pipeline type exists in Void). Closing as done.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Void/Library#46