Repository navigation
feat(events): derive events from the op log - #112
Open
PiquelChips wants to merge 1 commit into
Open
PiquelChips wants to merge 1 commit into
PiquelChips wants to merge 1 commit into
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 34 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
PiquelChips
force-pushed
the
feat/events-stream
branch
2 times, most recently
from
November 22, 2026 18:54
1428182 to
f413c6d
Compare
Plugins and agents had no way to react to what happens on a node, such as a CI worker waiting for landings that need its checks. `Events` reads events derived from the op log, the records its entries name and the queues' waiting landings, so nothing is stored twice: `statement.issued`, `revision.created`, `target.advanced`, and `check.requested` for each statement a waiting landing lacks. An event's cursor is the sequence number of the entry it comes from, which never changes, across restarts and index rebuilds alike. Events are delivered at least once and in the op log's order, never past an entry whose write is in progress; consumers deduplicate by the whole event kind, so check requests for different requirements or targets stay distinct. `Events::after` reads a page after a cursor, filtered by kind (an event name or a statement kind pattern) and subject (a record, a change or a target), and `Events::wait` polls until something arrives. New benchmarks: reading the events of 10k entries, and polling when there are none.
PiquelChips
force-pushed
the
feat/events-stream
branch
from
November 22, 2026 19:20
f413c6d to
f2860eb
Compare
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.
Plugins and agents had no way to react to what happens on a node, such as a CI worker waiting for landings that need its checks.
Events are derived from the op log when they're read: from its entries, the records they name, and the queues' waiting landings. Nothing is stored twice. There are four kinds:
statement.issued,revision.created,target.advancedandcheck.requested, one for each statement a waiting landing lacks. An event's cursor is the sequence number of the entry it comes from, which never changes across restarts or index rebuilds.Events are delivered at least once and in the op log's order, never past an entry whose write is in progress. Consumers deduplicate by the whole event kind, so check requests for different requirements or targets stay distinct.
Events::afterreads a page after a cursor, filtered by kind and by subject. A kind is an event name or a statement kind pattern. A subject is a record, a change or a target, and a revision's creation also matches its revision id.Events::waitpolls until something arrives.Benchmarks: an empty event poll costs 12.5 µs, and reading 10k entries takes 65 ms.
Note
Written by Claude Opus 5.5 in Claude Code (via T3 Code)