Recursive AI

Conformance

All oneyaml Go docs

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, 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, 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.

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).

GroupCasesLooseStrictStrict, correctedUnsupportedStrict onlyEmulated
yaml-test-suite · events · invalid input9494/940/940/940940
yaml-test-suite · events · valid input308308/308308/308–000
yaml-test-suite · values (in.json) · valid input279278/279278/279279/279000
kit cases · diagnostics · events4545/4545/45–000
kit cases · diagnostics · values22/22/2–000
kit cases · edit · edits by patch324324/324324/324–000
kit cases · emit · values written3333/3333/33–000
kit cases · parse · events3434/3434/34–000
kit cases · parse · values1919/1919/19–000
kit cases · roundtrip · edits by patch3030/3030/30–000
kit cases · safety · edits by patch1111/1111/11–000
kit cases · safety · events3232/3232/32–000
kit cases · safety · values1717/1717/17–000
kit cases · schema · edits by patch33/33/3–000
kit cases · schema · values5549/5549/55–000
yaml-test-suite · events · all 402402402/402308/402308/4020940

Cases whose expected bytes rest on a kit convention (the specification does not decide them; see the kit's edit conventions). They are counted in the table above too.

GroupCasesLoose passLoose failStrict passStrict failUnsupported
kit cases · edit · edits by patch909009000
kit cases · parse · values110100
kit cases · safety · edits by patch440400
kit cases · schema · edits by patch330300
kit cases · schema · values880800
all106106010600

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.

GroupCasesLoose passStrict passFail only strictUnsupported
kit cases · emit · values written12121200

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

CaseExpectationModeVerdictReason
own:schema/code-constructing-tags-are-kept-or-refusedprimaryloosefailaccepted 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-refusedprimarystrictfailaccepted with a wrong result: $[0]: expected {'$tagged': {'tag': 'tag:yaml.org,2002:python/object/appl..., got ['echo hi']
own:schema/global-tag-uri-is-keptprimaryloosefailValue differs at $[0]: expected {'$tagged': {'tag': 'tag:example.com,2000:shape', 'value'..., got [1, 2]
own:schema/global-tag-uri-is-keptprimarystrictfailValue differs at $[0]: expected {'$tagged': {'tag': 'tag:example.com,2000:shape', 'value'..., got [1, 2]
own:schema/local-tag-on-a-collection-is-keptprimaryloosefailValue differs at $[0]: expected {'$tagged': {'tag': '!shape', 'value': {'kind': 'circle',..., got {'kind': 'circle', 'r': 2}
own:schema/local-tag-on-a-collection-is-keptprimarystrictfailValue differs at $[0]: expected {'$tagged': {'tag': '!shape', 'value': {'kind': 'circle',..., got {'kind': 'circle', 'r': 2}
own:schema/mapping-as-a-mapping-keyprimaryloosefailRejects 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-keyprimarystrictfailRejects 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-keyprimaryloosefailRejects 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-keyprimarystrictfailRejects 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-keptprimaryloosefailValue differs at $[0]: expected {'$tagged': {'tag': '!color', 'value': 'red'}}, got 'red'
own:schema/unresolved-tag-is-keptprimarystrictfailValue differs at $[0]: expected {'$tagged': {'tag': '!color', 'value': 'red'}}, got 'red'
yts:UGM3@valueprimaryloosefailValue differs at $[0].product[0].price: expected 450, got 450.0
yts:UGM3@valueprimarystrictfailValue differs at $[0].product[0].price: expected 450, got 450.0

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.

CaseWhat happensWhere to get the full information
yts:UGM3@valueThe 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-keptA 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-keptA local tag on a mapping or sequence is dropped from the generic value.Node.ExplicitTag
own:schema/global-tag-uri-is-keptA 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-refusedA 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-keyUnmarshal 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-keyThe 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.