fix(data): require first-segment snapshot seeds - #129
Conversation
|
Warning Review limit reached
Next review available in: 35 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
43b41ac to
f682005
Compare
f682005 to
877503d
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 28bb82b06a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| require_symbol(&symbols, &symbol)?; | ||
| if event_type == "checkpoint" { | ||
| if event_type == "snapshot" { | ||
| snapshot_seeds.insert(symbol.clone()); |
There was a problem hiding this comment.
Record only replay-accepted snapshot seeds
For first-segment tapes where a snapshot row uses non-canonical casing such as "btcusdt", this normalized insert marks BTCUSDT as seeded even though ReplaySequenceValidator::observe only accepts exact symbol matches for snapshots (binance_lob_replay.rs:136), so replay ignores that snapshot. A session_start + lowercase snapshot + agg_trade + replay-safe checkpoint segment with no diffs can therefore pass this new guard and still have the checkpoint establish the book, which is the counterexample this change is meant to reject; require canonical row symbols or record the seed only after replay accepts the snapshot.
Useful? React with 👍 / 👎.
Change contract
Reject a first Binance market-tape segment whose replay state is established only by a checkpoint; every declared symbol must be seeded by a preceding snapshot in the first segment.
Out of scope
Dependency / merge order
None. This PR was originally stacked on #128; after #128 merged it was retargeted to
main, updated, and revalidated at exact head28bb82b06a3e156ef8576b69a93f08e4711358e4.Focused validation
first_segment_checkpoint_cannot_replace_snapshot_seed; the old verifier incorrectly returned a verified handle forsession_start + agg_trade + replay-safe checkpointwithout a snapshot.28bb82b06a3e156ef8576b69a93f08e4711358e4.Rollout / rollback impact
Verifier-only fail-closed tightening. No runtime service changes. Rollback is reverting this PR; first segments without snapshot seeds remain rejected while active.