Skip to main content
The conformance fixtures define language-independent test cases for Sightmap implementations. Each implementation is expected to pass them. The fixtures live under spec/conformance/.

Layout

Each fixture is a directory named NNN-{slug}.fixture/ with:
  • sightmap/: input YAML files that simulate a .sightmap/ directory
  • expected.json: an object whose cases array contains { command, args, expected } entries
The runner checks that each key in expected exists in the actual output and matches deeply. The actual output may contain additional keys. For an array in expected, the actual array must be at least as long and have the same prefix. spec/conformance/README.md defines the case shape.
The command values in expected.json (match, explain, fmt, validate, lint) are fixture-runner operations, not sightmap CLI commands. The CLI has no match, explain, or fmt command; only validate and lint share names with CLI commands. Each implementation supplies its own runner.

Runtime-semantics fixtures (0NN)

The 0NN series covers loading, route matching, and diagnostics:

Canonical-format fixtures (1NN)

The 1NN series covers the byte-level YAML format defined by spec/v1/canonical-format.md. Tools that write .sightmap/*.yaml must produce this format. Fixtures that test rewritten output store the expected YAML under sightmap/.expected/.
These fixtures define canonical output; the CLI does not include a formatter command. An implementation that writes Sightmap YAML can check its output against this series.

Running locally

The monorepo checker validates fixture inputs expected to be valid and canonical outputs. It skips inputs that the fixture marks with a fmt.schema-invalid or fmt.parse-error diagnostic.
from a checkout of sightmap/sightmap
The checker above validates YAML; it does not execute the { command, args, expected } cases. Each implementation needs a fixture runner that loads the sightmap/ directory, executes each command with its args, and checks the result against expected.

Contributing a new fixture

1

Claim the next number

Create the next-numbered NNN-{slug}.fixture/ directory under spec/conformance/ (see CONVENTIONS.md). Check open SEP and fixture PRs first because they reserve associated fixture numbers.
2

Author the fixture

Write sightmap/*.yaml and expected.json. Keep each fixture focused on one behavior.
3

Verify and open a PR

Run the schema checker and the fixture runner for the implementation you are changing, then open a PR. Sign off your commits with -s per the Contributing guide.