fix(collector): validate observed USD-M zero-price sentinel - #816
Conversation
|
Warning Review limit reached
Next review available in: 51 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)
📝 WalkthroughWalkthroughThe change validates zero-price Binance raw trades against required sentinel fields. It adds continuity coverage for multiple zero-price events and updates USD-M archiver fixtures and upload contract assertions for realistic BTCUSDC frames. ChangesBinance zero-price raw trades
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 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 |
826c9a7 to
7bb7a6d
Compare
Change contract
Accept the observed Binance USD-M zero-price trade sentinel only when
p=0,q=0,X=NA, andst=1; preserve all existing stream, identity, dual-clock, and trade-ID validation. Positive trades remainp>0,q>0, and zero events remain audit-onlyraw_trade_zero_priceevents.Issue relationship
Refs #815
Out of scope
No Spot acceptance, negative/non-sentinel fallback, runtime/ECS/OSS/Live changes, deployment, or workflow/dependency changes.
Dependencies and merge order
None
Focused validation
stream=btcusdc@trade,p=0,q=0,X=NA,st=1) before the fix:raw trade field q is not positive.cargo test -p hft-data --lib --locked: 78 passed.hft-data,hft-collector --bin binance-lob-archiver --tests) pass with-D warnings.RUSAGE_SELFonly); native macOS test execution remains blocked by the pre-existinglibc::RUSAGE_THREADerror inpolymarket_upload.rs.raw_trade, and the strict shape rejects malformed/mismatched fields, Spot, and negative prices.Rollout and rollback
None; code-only PR. Runtime/deployment remains separately gated.
Scope exception
None
Summary by CodeRabbit
Bug Fixes
Tests