VFX-D-1107¶
Title¶
SuiteLineTooLong
Explanation¶
The suite's YAML contains a single line longer than the 512-character per-line limit the YAML-bomb guard enforces, caught before the suite is parsed. A giant unbroken line — most often a huge mapping key — can drive the underlying YAML tokeniser pathological: a plain-scalar mapping key longer than the tokeniser's 1024-character simple-key bound does not finish scanning at all, which would otherwise exhaust the validation worker's wall-clock budget. Bounding the length of any one line, with a cheap character scan that never invokes the tokeniser, keeps that shape away from it.
Common causes¶
- A huge unbroken mapping key produced by a templating or code-generation tool.
- A very long value (an inline JSON payload, a base64 blob, a long query) written on a single line instead of being wrapped across several (see Fixes — the right wrapping differs for prose/JSON versus an opaque token).
- A malicious or corrupted suite file crafted to stall the YAML tokeniser on an over-long line.
Fixes¶
- Break the over-long content across multiple lines rather than keeping it on one — but which construct to use depends on what the value is, and the two cases below are not interchangeable.
- For a long whitespace-insignificant value (an inline JSON payload, prose): use a YAML block scalar (
|or>), whose content spreads over short, indented lines. - For an opaque, unbreakable single token (base64, a JWT, a hash, a signed URL): do not use a block scalar —
>folds each line break to a space and|inserts a newline, so either one silently changes the token's value and the suite would validate while carrying the wrong payload. Use a double-quoted scalar with backslash line-continuation instead: writekey: "AAAA\then a newline, indentation, andBBBB", which reassembles to exactlyAAAABBBB(YAML removes the escaped line break and the continuation line's leading whitespace) — keeping every physical line under the limit without altering the value. - If the over-long text is a mapping key, rename it to something short — a key is an identifier, not a place for bulk content.