Skip to content

fix(api): commit-time If-Match and single-source rules - #43

Merged
Zakkaus merged 3 commits into
daeuniverse:honkfrom
Zakkaus:fix/contract-closing
Sep 28, 2026
Merged

Zakkaus merged 3 commits into
daeuniverse:honkfrom
Zakkaus:fix/contract-closing

Conversation

@Zakkaus

@Zakkaus Zakkaus commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

Closing-pass fixes.

  • Commit race vs RFC 9110 If-Match. configuration.md said any stored change before the commit returns 412, which contradicts * and tag-list matching in errors.md. At commit the server now re-evaluates the request's own If-Match: a condition that no longer matches returns 412 stale_revision; a stored change the condition still matches returns 409 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.
  • Restated rules. The Cursor parameter, the If-Match parameters, the replaceConfigSource If-Match description, 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 build with the link check.

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.
@Zakkaus
Zakkaus merged commit 1fb08ad into daeuniverse:honk Sep 28, 2026
1 check passed
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