pub const MAX_VALIDATION_ISSUES: usize = 4096;Expand description
Cap on the number of issues collected by validate_value.
A maliciously crafted trajectory sitting inside
MAX_ATIF_BYTES (64 MiB) can legitimately trigger millions of
validation issues. Each ValidationIssue allocates two owned
Strings (path + message); five million entries → ~500 MiB
Vec, hitting OOM before the caller ever renders a bounded
error message (as once happened in the reconciler). Cap the collection
so the memory bound is O(cap), independent of the input’s
pathological branching.
When the cap fires, a synthetic tail issue is emitted so downstream consumers know the truncation happened.