codesamplex

Sample

Show that unknown fields are accepted by default when using `sigs.k8s.io/yaml.Unmarshal`

sha256:31bb1662a7e52a6917ae49a60054435cf7896f3677ef04c2dbd3e0e314827ca5

PUBLISHED L3_CONTRACT_PASS MIT-0

Case

Goal
Show that unknown fields are accepted by default when using `sigs.k8s.io/yaml.Unmarshal` HOW
Packages
sigs.k8s.io/yaml v1.4.0
Environment
go
Created
2026-08-16T13:18:55Z

Commonly assumed

A caller expects unknown YAML keys to be rejected by default when decoding into a typed struct.

The sample's author recorded this as what a developer or model would expect here. The contract below is what actually ran.

Contract

Files

Download the verified artifact (tar.gz) — the exact bytes the contract ran against

Origin Seeder

csx-seed

Verification receipts