Repository navigation
test: prove what a session-log cursor past the tail skips and where it resumes - #60
Merged
Merged
Conversation
…t resumes Canon says a cursor past the aggregate's tail is accepted rather than refused and then suppresses live delivery until the aggregate overtakes it. That came from reading the pinned server, and nothing measured it. Upstream has no production caller that passes after at all, so this SDK is the path's first consumer and the behaviour was unexercised on both sides. The first proof sends a cursor a thousand past the tail and reads to the end: the reply is the marker alone, and the marker carries the real watermark rather than the cursor it was asked for. Its control is the settled read taken first, which returns the turn's own terminal event, so an empty answer is the cursor being out of range and not a server that retained nothing. Persistence is a server option, and without that control this proof would pass unchanged against a server that had it switched off. The second proof puts the cursor three past the tail, where the following turn crosses it, so one attachment shows both halves. The execution start the cursor covers never arrives; the terminal event beyond it does. A second reader on the correct cursor returns that skipped start from the same session, so its absence on the attachment is a skip rather than a gap, and the resumed terminal event is what proves the attachment was alive rather than quietly dead. Silence is never the evidence: every assertion here is something that did arrive, somewhere.
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.
Tests only, one file. Backs a claim #59 made canonical: a
v2.session.logcursor past the aggregate's tail is accepted rather than refused, and then suppresses live delivery until the aggregate overtakes it. That came from reading the pinned server, and nothing measured it. Upstream has no production caller that passesafterat all, so this SDK is the path's first consumer and the behaviour was unexercised on both sides.The unreachable cursor. A cursor a thousand past the tail is read to the end. The reply is the marker alone, and the marker carries the real watermark rather than the cursor it was asked for. Its control is the settled read taken first, which returns the turn's own terminal event, so an empty answer is the cursor being out of range and not a server that retained nothing. Persistence is a server option, so without that control this proof would pass unchanged against a server that had it switched off.
Skip and resume. The second proof puts the cursor three past the tail, where the following turn crosses it, so one attachment shows both halves. The execution start the cursor covers never arrives; the terminal event beyond it does. A second reader on the correct cursor returns that skipped start from the same session, so its absence on the attachment is a skip rather than a gap, and the resumed terminal event is what proves the attachment was alive rather than quietly dead. Silence is never the evidence here: every assertion is something that did arrive, somewhere.
The recorded run: watermark 10, attachment cursor 13, skipped execution start at sequence 12, delivery resuming through the terminal event at 19.
Evidence. Full Release suite: 5022 tests, 0 failed, 0 skipped, nine assemblies across
net8.0,net9.0,net10.0andnet472.generate --verifyandrefresh-spec --verifypass on the same tree.