Skip to content

spec: an unrecognised key is an authoring error, never ignored - #24

Open
delchev wants to merge 2 commits into
mainfrom
spec/unknown-keys
Open

spec: an unrecognised key is an authoring error, never ignored#24
delchev wants to merge 2 commits into
mainfrom
spec/unknown-keys

Conversation

@delchev

@delchev delchev commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

A typed mapping normally drops a key it does not know. That silence is the worst failure this format can have: the file is accepted, generation succeeds, the application deploys, and the only symptom is that the promise the author wrote is absent at runtime — with every step of the pipeline reporting success. A case slip (Required: for required:) is the same failure and the hardest to see by eye.

The format already demands this honesty of generators elsewhere ("report what you cannot resolve rather than ignore it"); this states it for the vocabulary itself.

Authoring rules gains a bullet and an Unrecognised keys rule:

A conforming generator MUST report a key it does not recognise as an authoring error rather than ignoring it, and the report MUST name the key, where it appears, and — where one exists — the nearest declared name. Key names are case-sensitive […] This applies equally to a seed row, whose keys are the target entity's own names rather than this specification's. A map whose keys are drawn from the model being described (a map: projection, a relation's where:, a widget's at:) is validated against that model, not against this vocabulary.

Seeds — the existing normative rule is sharpened rather than replaced: a row key is a field name, a to-one relation name (a collection has no column to set) or the stage marker, and what accepting anything else silently costs is now spelled out — a dropped NOT NULL foreign key makes the import skip every row, so a nomenclature lands as zero rows behind a fully green pipeline.

No new construct, so Appendix A is unchanged.

Proven out in the reference implementation: eclipse-dirigible/dirigible#6748 (raw-tree key validation against the model classes + seed-row keys), verified against 63 real production intent files with no false positives. Motivating report: eclipse-dirigible/dirigible#6541.

A typed mapping normally drops a key it does not know, and that silence is the
worst failure this format can have: the file is accepted, generation succeeds,
the application deploys, and the only symptom is that the promise the author
wrote is absent at runtime - with every step reporting success. A case slip is
the same failure and is the hardest to see by eye.

Adds the normative rule to Authoring rules: an unrecognised key must be
reported naming the key, where it appears and the nearest declared name; key
names are case-sensitive; maps whose keys come from the model being described
are validated against that model instead.

Sharpens the seeds rule the same way - a row key is a field name, a *to-one*
relation name (a collection has no column to set) or the `stage` marker, and
what accepting it silently costs is spelled out: a dropped NOT NULL foreign key
makes the import skip every row.
An argument declared on a kind that does not read it (a decision's `if` on a
user task, a boundary `timeout` on a service task) is the same silent drop as
an invented one - the step reads nothing - so it must be reported the same way,
naming the kind that does read it. Also names the blocks that are a fixed
vocabulary despite being written as a mapping (trigger, abortOn, an event
binding, a step's args and what nests inside them), and adds a delegate's
injected `fields:` to the free-form list.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant