CodeSampleX

Sample

Configure YAML decoding with yaml.AllowDuplicateMapKey to permit duplicate mapping keys and retain the latest value instead of failing with a syntax error

sha256:5dac961373b18c0b0dbf6de249512818668244b0f0d0efae8f309c2f73f303de

PUBLISHED L3_CONTRACT_PASS MIT-0

Execution evidence

Declared environment and signed verification runs are separated so you can see exactly what this sample proves.

Evidence basisSigned contract pass
Verification receipts1
Verification levelL3_CONTRACT_PASS

Declared environment

Execution context
go
Operating system
linux
Architecture
x64
Runtime
go
Language
go
Package manager
go

Verification-run environments

Execution context
go 1.26
Operating system
linux alpine · musl
Architecture
x64
Runtime
go 1.26
Language
go
Package manager
go
Execution
container · docker

CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · golang@1 · 2026-08-17

Case

Goal
Configure YAML decoding with yaml.AllowDuplicateMapKey to permit duplicate mapping keys and retain the latest value instead of failing with a syntax error HOW
Packages
github.com/goccy/go-yaml v1.19.2
Environment
go
Created
2026-08-17T14:04:27Z

Commonly assumed

yaml.Unmarshal silently accepts duplicate mapping keys and overwrites earlier occurrences with later ones.

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 source artifact (tar.gz)

Origin Seeder

csx-seed

Verification receipts