Repository navigation
feat: Check the preconditions on a subject recursively, for the subject together with every subject below it. - #433
Merged
goloroden merged 4 commits intoOct 23, 2026
Conversation
… API, and refuse a recursive one before sending it to a server without it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01CiuYmw4N6SSzfFyrwftUEj
…nd refuse any but a non-recursive one on a server without the v2 API. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01CiuYmw4N6SSzfFyrwftUEj
…sing a write with a recursive precondition, so that a server upgraded meanwhile gets it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01CiuYmw4N6SSzfFyrwftUEj
…again before a recursive write, and keep it if finding out fails. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01CiuYmw4N6SSzfFyrwftUEj
goloroden
deleted the
432-check-preconditions-on-a-subject-recursively
branch
October 23, 2026 08:24
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.
The preconditions on a subject can now apply to the subject together with every subject below it, through
PreconditionOptionswithrecursive, as the v2 API of EventSourcingDB offers it (thenativeweb/eventsourcingdb#1277). Existing calls send the same requests as before.Against a server without the v2 API, a write with a recursive precondition fails with an
IncompatibleServererror before the write is sent, rather than being checked on the subject alone. Before it fails, the client asks the server once more which API it offers, if it had remembered v1, so that a server upgraded while the application runs is used through v2 at once; every other request keeps using the remembered answer meanwhile.The options are an optional last parameter, so every existing call keeps working; a point-free call such as
subjects.map(isSubjectPristine)no longer compiles in TypeScript, sincemappasses the index as the second argument. On v1, only options withrecursiveset tofalseare stripped; anything else is refused, so that a caller without types never gets a check on the subject alone without notice.The tests against the
previewimage pass once it contains thenativeweb/eventsourcingdb#2398.Closes #432
🤖 Generated with Claude Code
https://claude.ai/code/session_01CiuYmw4N6SSzfFyrwftUEj