Skip to content

test: prove what a session-log cursor past the tail skips and where it resumes - #60

Merged
Blind-Striker merged 1 commit into
masterfrom
test/log-cursor-past-tail
Sep 8, 2026
Merged

Blind-Striker merged 1 commit into
masterfrom
test/log-cursor-past-tail

Conversation

@Blind-Striker

Copy link
Copy Markdown
Collaborator

Tests only, one file. Backs a claim #59 made canonical: a v2.session.log 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 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.0 and net472. generate --verify and refresh-spec --verify pass on the same tree.

…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.
@Blind-Striker
Blind-Striker merged commit 15a215b into master Sep 8, 2026
4 checks passed
@Blind-Striker
Blind-Striker deleted the test/log-cursor-past-tail branch September 14, 2026 12:55
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