-
Notifications
You must be signed in to change notification settings - Fork 7
Lift the wave loop into the adapter as run_episode #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+1,716
−374
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
faba7de
Lift the wave loop into the adapter as run_episode
sanil-23 87c4518
Lock the routing crate as the adapter's dev dependency
sanil-23 0712ff0
Format the resolved seam test
sanil-23 8be262c
Carry a hosted turn's usage with the turn, and say the registry is re…
sanil-23 fcec0c2
Read the wave watermark once, and keep a plain host's row visibility
sanil-23 0593646
Make the watermark below the first row explicit, not sequence zero
sanil-23 92e7634
Bound every wave read by the wave's watermark
sanil-23 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Represent the cursor before sequence zero
When
child.rootisSequence(0),saturating_sub(1)producesSequence(0), so this is not a cursor immediately before the ask row. If the host's transcript read uses an exclusive lower bound, the first row at sequence zero is omitted; if it uses an inclusive bound, the cursor also cannot distinguish "before zero" from "at zero". The repository permitsSequence(0)(for example, an episode can be opened at sequence zero), and the changed comment requires the ask row to be visible while starting below it. The surrounding host read implementation is not included here, so the exact symptom depends on whether that cursor is exclusive or inclusive, but this code cannot satisfy the stated invariant for a zero root; provide an explicit before-first cursor or handle the zero-root case in the transcript-read API.[RULE] sequence-boundary ·
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Declined: sequence zero is the origin below the first row throughout the driver, not a row. The episode is opened at
Sequence(0)(conduct/mod.rs:177), a desk seat with nothing delivered starts atSequence(0), andsinceis an inclusive watermark (hosted/seed.rsreadsbefore: since + 1). A root is a committed row, so it is above the origin androot - 1is well-defined; a host whose log numbers from zero would already be at odds with the opening watermark, not with this line.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved — the reply explains why it is not a problem (advisory), as of
8be262c.If this is wrong, reopen the conversation and say so; the finding will be re-raised on the next push if it still reproduces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved — the reply explains why it is not a problem (advisory), as of
fcec0c2.If this is wrong, reopen the conversation and say so; the finding will be re-raised on the next push if it still reproduces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correction, after checking the host this is for: OpenCompany numbers its first event zero in every store (SQLite
COALESCE(MAX(seq) + 1, 0), the file store'sunwrap_or(0), MongoDB's "before the first allocation the seq is 0"), and mapsEventSeqtoSequenceone to one. So a fresh company's first operator row sits at sequence zero, below the driver's desk watermark, and a raw or embed seat's first brief omits it.MemoryLognumbers from one, which is why no test here shows it. The finding stands for that host. The fix is the driver's: the "nothing shown yet" watermark becomesOption<Sequence>onTurn::sinceand the delivered-through map, rather than a sequence a host may use. That is a wire change toTurn, so it lands as its own pull request on main after this one, with a test over a log numbered from zero.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in
05936466, in this pull request after all.Turn::sinceisOption<Sequence>(nullon the wire, and required to be present), a thread's first turn starts just below its root or nowhere for a root at zero, the log's newest row is anOptiontoo, and the episode now opens at the task's row with the passed-over seats completed on that row directly, so a task at sequence zero is neither hidden from the starter nor refused as a stale completion.SeatRunner::turnand the history seed take the option. A driver test and an adapter test each run a task at row zero, on a journal numbered from zero, through to completion.