fix(api): commit-time If-Match and single-source rules - #43
Merged
Merged
Conversation
A stored change that the request's If-Match still matches, such as * or a list containing the new hash, now returns 409 state_conflict at commit instead of 412, as RFC 9110 matching requires. The rule is stated once in configuration.md; groups.md, errors.md and the 412 descriptions link to it.
The Cursor and If-Match parameters, the replaceConfigSource If-Match description, the events stream description and the group PATCH page now summarise and link to errors.md and events.md instead of restating them.
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.
Closing-pass fixes.
If-Match. configuration.md said any stored change before the commit returns412, which contradicts*and tag-list matching in errors.md. At commit the server now re-evaluates the request's ownIf-Match: a condition that no longer matches returns412 stale_revision; a stored change the condition still matches returns409 state_conflict, because the validated candidate is stale. The rule is stated once under Configuration, Validation and commit; the group PATCH page, errors.md and the 412/409 descriptions link to it. dae implements it by keeping the parsed condition and matching it against the store hash (or revision) again under the write lock before the commit.Cursorparameter, theIf-Matchparameters, the replaceConfigSourceIf-Matchdescription, the events stream description and the group PATCH page now summarise and link to errors.md (Page cursors, Conditional requests, Choosing the status) and events.md (Replay and recovery) instead of restating them.Checks:
yarn check:contract(87 tests pass),yarn buildwith the link check.