Skip to content
Novus Examples
yaml543 B

YAML Unclosed Flow Collection, Intentionally Invalid

An intentionally invalid YAML file whose flow sequence is opened and never closed, so the parser consumes the rest of the document and fails at end of stream. A good error message names the opening bracket, not the last line, which is what this fixture measures.

Preview — first 15 linesyaml
# INTENTIONALLY INVALID. The flow sequence assigned to `stages` is opened with [ and never
# closed, so the parser consumes the remainder of the file looking for the closing bracket and
# fails at end of stream. A recovering parser should report the position of the OPENING bracket,
# not just the end of the file, which is what makes this useful as an error-message fixture.
name: broken-pipeline
image: registry.example.invalid/ci/runner:1.4

stages: [build, test, deploy

jobs:
  build:
    script: make build
  test:
    script: make test

Specifications

Variant
intentionally invalid
Fault
flow sequence opened and never closed
Opening Bracket Line
7
Fails At
end of stream

Testing contract

Expected to fail
Scenario
Report a useful position for an unclosed flow collection that fails at end of stream
Expected result
Parsing fails, and the error names the opening bracket on the stages line rather than only the end of the file

What is a .yaml file?

YAML (YAML Ain't Markup Language) is a human-readable data-serialization format using indentation, key-value pairs, and lists, and is a superset of JSON. It supports comments, anchors, and multiple documents per file, favoring readability for configuration. Its indentation sensitivity makes it error-prone to hand-edit.

How to use this file

Use an example YAML file to test config parsers, indentation and anchor handling, multi-document streams, and safe-loading to avoid arbitrary object construction.

How to use this file for testing

“YAML Unclosed Flow Collection, Intentionally Invalid” is a deterministic Novus Examples fixture for Error handling, Config parsing, Schema validation. Deliberately corrupt and invalid files, clearly labelled, for testing how your tool fails.

Documented properties for this file: YAML · 543 bytes. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.

Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.

Pipeline and infrastructure fixtures are inert configuration: steps reference fictional images and scripts, and nothing here executes. Run your linter, schema validator, migrator, or policy engine against them, and expect the deprecated-syntax and intentionally invalid variants to be rejected.

Code examples

import yaml  # pip install pyyaml

with open("unclosed-flow-collection.yaml") as f:
    data = yaml.safe_load(f)
print(data)

Generated by generation/pipelines.py. Free for any use, no attribution required — license.