fix: accept coherent empty bookTicker side - #845
Conversation
|
Warning Review limit reached
Next review available in: 56 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. 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 Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughBookTicker parsing now accepts coherent zero price and quantity pairs while rejecting negative, malformed, and mismatched values. Spot archiving tests verify normal event handling, strict replay, gap-free segments, and successful artifact uploads. ChangesBinance bookTicker validation and archiving
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@rust_hft/tools/collector/src/bin/binance-lob-archiver.rs`:
- Around line 6836-6848: Update the zero-sided BookTicker test around
process_event to snapshot the relevant OrderBookState fields before invocation,
then compare them afterward to assert they are unchanged. Keep the existing
ProcessAction::None assertion and ensure the comparison would detect mutation of
the bid quantity, including the ticker value 3946.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 418cea9a-9813-4c16-97e7-7cc3dd783ce1
📒 Files selected for processing (2)
rust_hft/data-pipelines/core/src/binance_market_tape.rsrust_hft/tools/collector/src/bin/binance-lob-archiver.rs
99b622c to
b8063cc
Compare
Change contract
Accept coherent empty bookTicker sides without restarting the collector: a
price/quantity pair is valid when both are zero or both are positive, while
negative, malformed, and mismatched pairs remain fail-closed.
Issue relationship
Closes #844
Out of scope
No schema, audit event, configuration, dependency, runtime, deployment, or
production changes.
Dependencies and merge order
None.
Focused validation
a=0andA=0parses as normalbook_ticker.the same producer with no session action; manifest
book_tickercount is 1and sequence gaps remain 0.
cargo test -p hft-data --locked(81 passed).cargo test -p hft-collector --bin binance-lob-archiver --locked --no-fail-fastwith a temporary macOS-only
RUSAGE_THREAD->RUSAGE_SELFtest shim (96passed; shim restored byte-for-byte and is not in this PR).
hft-dataandhft-collectorwith-D warnings;git diff --check.Rollout and rollback
None; code-only PR, no runtime action.
Scope exception
None.