---
title: "Conformance"
url: https://recursiveai.org/oneyaml/go/docs/conformance/
description: "What oneyaml-go is measured against, the latest results, and every case it is known not to pass."
version: "1.0.0"
source: https://github.com/recursive-ai-oss/oneyaml-go/blob/7a4c8e39f041b945ee5f121c055f03bc2d7d01d9/docs/conformance.md
---

# Conformance

What oneyaml-go is measured against, the latest results, and every case it is known not to pass.

The library targets YAML 1.2 with the Core schema. It is scored against the official [yaml-test-suite](https://github.com/yaml/yaml-test-suite), release `data-2022-01-17`, plus a set of cases written for the oneyaml family that cover edits, patches, writing, safety and diagnostics. Both run through the conformance kit of the oneyaml family, [oneyaml-kit](https://github.com/recursive-ai-oss/oneyaml-kit), which drives the library through its public API: `Parse`, `Unmarshal`, `Marshal`, `ApplyPatch` and `ApplyMergePatch`. The kit holds the cases, the corrected expectations and the adapter for this library. From a checkout of the kit, run `bin/kit fast --adapter oneyaml-go` with `KIT_ONEYAML_GO_SRC` set to a checkout of this repository.

The tests in this repository that run the kit's cases through the library also run in CI, on every push to `main` and every pull request, against a pinned kit revision, so a change that breaks a kit case fails CI. Locally they are skipped unless `ONEYAML_KIT` names a kit checkout.

## Results

The region below is the kit's own report for this library, copied as generated.

<!-- kit-report:conformance -->
Method: kit 0.1.0 (corpus digest `b1c5e8ce5ca5`, kit revision `0abba1d8b4f2`), every case including the slow ones, run 2026-10-16, library revision `eea67bb6b962`, yaml-test-suite `data-2022-01-17` (revision `6e6c296a`) plus 605 kit cases. Generated by `bin/kit run --slow --adapter oneyaml-go` from the kit's result file `oneyaml-go.json`; do not edit.

## oneyaml-go eea67bb6b962

Language: go. Run date: 2026-10-16. 1286 cases in 11.252 s (full mode).

| Group | Cases | Loose | Strict | Strict, corrected | Unsupported | Strict only | Emulated |
|---|---:|---:|---:|---:|---:|---:|---:|
| yaml-test-suite · events · invalid input | 94 | 94/94 | 0/94 | 0/94 | 0 | 94 | 0 |
| yaml-test-suite · events · valid input | 308 | 308/308 | 308/308 | – | 0 | 0 | 0 |
| yaml-test-suite · values (in.json) · valid input | 279 | 278/279 | 278/279 | 279/279 | 0 | 0 | 0 |
| kit cases · diagnostics · events | 45 | 45/45 | 45/45 | – | 0 | 0 | 0 |
| kit cases · diagnostics · values | 2 | 2/2 | 2/2 | – | 0 | 0 | 0 |
| kit cases · edit · edits by patch | 324 | 324/324 | 324/324 | – | 0 | 0 | 0 |
| kit cases · emit · values written | 33 | 33/33 | 33/33 | – | 0 | 0 | 0 |
| kit cases · parse · events | 34 | 34/34 | 34/34 | – | 0 | 0 | 0 |
| kit cases · parse · values | 19 | 19/19 | 19/19 | – | 0 | 0 | 0 |
| kit cases · roundtrip · edits by patch | 30 | 30/30 | 30/30 | – | 0 | 0 | 0 |
| kit cases · safety · edits by patch | 11 | 11/11 | 11/11 | – | 0 | 0 | 0 |
| kit cases · safety · events | 32 | 32/32 | 32/32 | – | 0 | 0 | 0 |
| kit cases · safety · values | 17 | 17/17 | 17/17 | – | 0 | 0 | 0 |
| kit cases · schema · edits by patch | 3 | 3/3 | 3/3 | – | 0 | 0 | 0 |
| kit cases · schema · values | 55 | 49/55 | 49/55 | – | 0 | 0 | 0 |
| **yaml-test-suite · events · all 402** | 402 | 402/402 | 308/402 | 308/402 | 0 | 94 | 0 |

Cases whose expected bytes rest on a kit convention (the specification does not decide them; see [the kit's edit conventions](https://github.com/recursive-ai-oss/oneyaml-kit/blob/main/docs/edit-semantics.md)). They are counted in the table above too.

| Group | Cases | Loose pass | Loose fail | Strict pass | Strict fail | Unsupported |
|---|---:|---:|---:|---:|---:|---:|
| kit cases · edit · edits by patch | 90 | 90 | 0 | 90 | 0 | 0 |
| kit cases · parse · values | 1 | 1 | 0 | 1 | 0 | 0 |
| kit cases · safety · edits by patch | 4 | 4 | 0 | 4 | 0 | 0 |
| kit cases · schema · edits by patch | 3 | 3 | 0 | 3 | 0 | 0 |
| kit cases · schema · values | 8 | 8 | 0 | 8 | 0 | 0 |
| **all** | 106 | 106 | 0 | 106 | 0 | 0 |

Cases where the strict verdict adds the family's writing convention to the specification (loose is the specification). They are counted in the table above too.

| Group | Cases | Loose pass | Strict pass | Fail only strict | Unsupported |
|---|---:|---:|---:|---:|---:|
| kit cases · emit · values written | 12 | 12 | 12 | 0 | 0 |

Known deviations listed: 14. Unlisted failures: 0. Stale entries: 0.

| Case | Expectation | Mode | Verdict | Reason |
|---|---|---|---|---|
| `own:schema/code-constructing-tags-are-kept-or-refused` | primary | loose | fail | accepted with a wrong result: $[0]: expected {'$tagged': {'tag': 'tag:yaml.org,2002:python/object/appl..., got ['echo hi'] |
| `own:schema/code-constructing-tags-are-kept-or-refused` | primary | strict | fail | accepted with a wrong result: $[0]: expected {'$tagged': {'tag': 'tag:yaml.org,2002:python/object/appl..., got ['echo hi'] |
| `own:schema/global-tag-uri-is-kept` | primary | loose | fail | Value differs at $[0]: expected {'$tagged': {'tag': 'tag:example.com,2000:shape', 'value'..., got [1, 2] |
| `own:schema/global-tag-uri-is-kept` | primary | strict | fail | Value differs at $[0]: expected {'$tagged': {'tag': 'tag:example.com,2000:shape', 'value'..., got [1, 2] |
| `own:schema/local-tag-on-a-collection-is-kept` | primary | loose | fail | Value differs at $[0]: expected {'$tagged': {'tag': '!shape', 'value': {'kind': 'circle',..., got {'kind': 'circle', 'r': 2} |
| `own:schema/local-tag-on-a-collection-is-kept` | primary | strict | fail | Value differs at $[0]: expected {'$tagged': {'tag': '!shape', 'value': {'kind': 'circle',..., got {'kind': 'circle', 'r': 2} |
| `own:schema/mapping-as-a-mapping-key` | primary | loose | fail | Rejects valid input: 'oneyaml: line 1, column 3: a collection cannot be the key of a generic mapping (Go map keys must be comparable)' |
| `own:schema/mapping-as-a-mapping-key` | primary | strict | fail | Rejects valid input: 'oneyaml: line 1, column 3: a collection cannot be the key of a generic mapping (Go map keys must be comparable)' |
| `own:schema/sequence-as-a-mapping-key` | primary | loose | fail | Rejects valid input: 'oneyaml: line 1, column 3: a collection cannot be the key of a generic mapping (Go map keys must be comparable)' |
| `own:schema/sequence-as-a-mapping-key` | primary | strict | fail | Rejects valid input: 'oneyaml: line 1, column 3: a collection cannot be the key of a generic mapping (Go map keys must be comparable)' |
| `own:schema/unresolved-tag-is-kept` | primary | loose | fail | Value differs at $[0]: expected {'$tagged': {'tag': '!color', 'value': 'red'}}, got 'red' |
| `own:schema/unresolved-tag-is-kept` | primary | strict | fail | Value differs at $[0]: expected {'$tagged': {'tag': '!color', 'value': 'red'}}, got 'red' |
| `yts:UGM3@value` | primary | loose | fail | Value differs at $[0].product[0].price: expected 450, got 450.0 |
| `yts:UGM3@value` | primary | strict | fail | Value differs at $[0].product[0].price: expected 450, got 450.0 |
<!-- end kit-report:conformance -->

### How to read the table

- **Loose** counts the outcome only: valid input must give exactly the expected events, value or bytes, and invalid input must be reported as an error.
- **Strict** counts everything the case states. For invalid input that includes the error category and position, and the events emitted before the error.
- **Strict, corrected** judges the cases where the upstream expectation is wrong against the kit's corrected one. The kit lists the corrections and their reasons.
- **Unsupported** and **Strict only** count cases the adapter cannot judge. They are not passes.

### Invalid input and strict events

For invalid input, the Loose column counts the inputs the library rejects. The Strict column also compares the events emitted before the error, and `Parse` returns no partial document, so the kit's adapter has no events to hand over for a failing input and the strict check cannot count a pass for that row. This is a gap in what the public API exposes, not a case the library accepts. The error category and position are checked by the kit's diagnostics cases, which have rows of their own.

## Known deviations

The cases below are the ones the library does not pass. Each one is a difference in the Go value `Unmarshal` into `any` produces, not in what the parser accepts; the `Document` and `Node` API keep the information.

| Case | What happens | Where to get the full information |
|---|---|---|
| `yts:UGM3@value` | The suite's `in.json` records `450` for the scalar `450.00`; the Core schema reads it as the float `450.0`. The kit's corrected expectation agrees with the library (see Strict, corrected). | none needed |
| `own:schema/unresolved-tag-is-kept` | A local tag the schema does not know, such as `!color red`, reads as the string `red`. The tag is dropped from the generic value. | `Node.ExplicitTag`, `Node.TagAsWritten` |
| `own:schema/local-tag-on-a-collection-is-kept` | A local tag on a mapping or sequence is dropped from the generic value. | `Node.ExplicitTag` |
| `own:schema/global-tag-uri-is-kept` | A global tag URI such as `tag:example.com,2000:shape` is dropped from the generic value. | `Node.ExplicitTag` |
| `own:schema/code-constructing-tags-are-kept-or-refused` | A tag such as `!!python/object/apply:os.system` is dropped and the value read as plain data. Nothing is constructed or run. | `Node.ExplicitTag` |
| `own:schema/mapping-as-a-mapping-key` | `Unmarshal` into `any` refuses a mapping used as a key, because a Go map cannot hold it. | `Parse`, `Node.Entry` |
| `own:schema/sequence-as-a-mapping-key` | The same for a sequence used as a key. | `Parse`, `Node.Entry` |

Each of these appears twice in the table of deviations in the report above, once for the loose check and once for the strict one. The kit fails the run if a case fails that is not on this list, and fails it if an entry on the list starts to pass, so the list cannot go stale unnoticed.

## What the results do not say

- The suite covers the grammar. It is not a benchmark.
- A pass is a pass of the kit's checks at the revision shown. It is not a proof of conformance for input the suite does not contain; the library is also fuzzed.
- The kit's own cases were written for this project family. They are a stricter and broader check than the upstream suite alone, and they are the project's judgment of what correct behaviour is where the specification leaves a choice, such as where a new mapping key goes.
