spec: an unrecognised key is an authoring error, never ignored - #24
Open
delchev wants to merge 2 commits into
Open
spec: an unrecognised key is an authoring error, never ignored#24delchev wants to merge 2 commits into
delchev wants to merge 2 commits into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:forrequired:) 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:
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
stagemarker, 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.