Status: accepted Date: 2026-10-15 Deciders: GoBridge core Relates to: 0013 (the last-committed config artifact), 0016 (the content digest)
config/parser.Parse reads a configuration document in two stages, and both
refuse a field they do not know:
DisallowUnknownFields (JSON) or KnownFields(true) (YAML), so an unknown
key at the top level or inside a known section fails the parse;options block to the decoder the
plugin registered, through a ports.RawConfig that decodes with
ErrorUnused, so an unknown option fails the parse too.This exists to catch a typo. shutdown_timout: 30s is refused instead of
running with the default the person did not mean.
adapters/aws/config/dynamodb) stores the document with
parser.MarshalBridgeConfigJSON and reads it back on every Load, every
watch poll or stream event, and every observation.parser.FileStore, config/parser/store.go).
The admin API saves a changed document into the bridge’s configuration
file. People also edit that file by hand, so an unknown key in it is most
likely a typo. It stays strict.The release that reads a document is not always the release that stored it.
During a rolling deploy, tasks of two releases read the same row. After a
rollback, the older release reads what the newer release wrote. A release
that adds a field writes it into the document. A field without omitempty,
which is most plugin options, is written into every document the release
stores, and a field with omitempty whenever it is set. The older release then
refuses the whole document: the DynamoDB source reports
dynamodb config load: parse, the task does not start or reload, and a
joining cluster member cannot rebuild the committed configuration.
This holds for the DynamoDB document and the rollout artifact, which no person edits. Each of them reaches storage through one of two writers:
So an unknown field in one of those two documents means another release wrote it. Refusing it protects nothing and stops a bridge that could run the document. The file config store is the exception: people edit that file by hand, so an unknown key in it may be a typo.
A configuration document the bridge stored, other than the file config
store, is read leniently: an unknown field is ignored at every level, plugin
options included. A document a person writes, the file config store
included, is still read strictly.
parser.Parse takes functional options. parser.WithIgnoreUnknownFields():
DisallowUnknownFields / KnownFields(true) in the first stage;ports.RawConfig the registry passes to each plugin decoder, so
that decoder’s Decode runs without ErrorUnused.No plugin changes. A decoder that decodes through RawConfig.Decode ignores
an unknown option under the option and refuses it without.
The option ignores unknown fields and nothing else. These are still refused:
transport or store type with no
registered decoder. It is a value outside a fixed list, not an extra field.
The bridge has no adapter to build the component, and dropping it would run
the bridge without a session or store the document declares;parser.MaxConfigBytes;Validate and the configuration validator
make.Exactly two readers pass the option:
Loader.load, which serves
Load, Watch (poll and stream) and Observe;Every other reader stays strict: parser.ParseFile, the file config source
and its watcher, the file config store, parser.NewInlineSource and the
embedded initial document, the admin API, and the CDK configuration source.
parser.MarshalBridgeConfigJSON writes only the fields it knows, so the
newer field is dropped from storage and the newer release then reads its
default.omitempty into every document it
commits, so after a newer release commits any document, a member rolled back
to an older release can refuse to start. Lenient reading removes the decode
failure. It does not let a cohort that runs two releases agree on a document
that contains a field only one of them knows.