feat(collector): accept Binance reference kinds on Polymarket market tape - #550
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe recorder now includes Binance ChangesBinance reference tape support
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related issues
Possibly related PRs
Sequence Diagram(s)sequenceDiagram
participant Recorder
participant TapeScanner
participant BinanceValidators
participant ManifestBuilder
Recorder->>TapeScanner: write configured Binance reference records
TapeScanner->>BinanceValidators: validate each record kind
BinanceValidators-->>TapeScanner: accept or reject record
TapeScanner->>ManifestBuilder: count accepted Binance records by kind
ManifestBuilder-->>TapeScanner: emit manifest with reference counts
🚥 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 |
The strategy-runtime tape recorder can now persist Binance reference updates (spot_price, agg_trade, l2) via its include_kinds policy, so the upload validator accepts and fail-closed validates them: - ALLOWED_KINDS gains spot_price/agg_trade/l2 with per-kind shape validation against the actual recorded MarketUpdate JSON. A zero spot_price is accepted as the feed's reconnect-unavailable sentinel; negative prices, missing fields, and wrong types are rejected. - Manifest gains binance_reference_counts per kind; quote coverage, event context, and quality flags stay Polymarket-scoped so canonical keeps its PM-only meaning on mixed tapes. - Recovery re-check deliberately stays narrower than ALLOWED_KINDS: the reference collector's active tape never contains Binance kinds. - polymarket-market-tape.toml records the three kinds. Refs #540
3a694a7 to
a0f2b36
Compare
…onfig pins (#562) * fix(security): bump ruint past RUSTSEC-2026-0220 in prediction-markets lockfile PR #522 updated only the main workspace lock; ploy-ci's Dependency audit scans rust_hft/prediction-markets/Cargo.lock and now fails repo-wide on lanes that trigger it. Closes #561 * test(ploy): update tape config pins for Binance kinds and tick-level sampling The scope-gated CI let #550/#548 merge without running workspace_runtime_retirement; its pinned include_kinds and quote_sample_ms went stale. Refs #540 Refs #539 * fix(research): refresh checked-in Linux policy graph for ruint bump The build.rs graph validator requires input:Cargo.lock to hash the workspace lockfile exactly; the ruint bump changed it. ruint itself is not in the Linux policy package set, so only the input line and the canonical fingerprint need refreshing. Refs #561 * test(research): re-pin mission templates to refreshed policy snapshot id The policy snapshot id is derived from the dependency fingerprint; the ruint lockfile refresh changed it, so the checked-in BTC/SOL mission templates must be re-pinned. Refs #561 --------- Co-authored-by: Sonic Shih <sonic.shih@mandonothing.com>
Change contract
Polymarket market tape carries Binance reference updates (
spot_price/agg_trade/l2) end-to-end: recorder accepts them viainclude_kindsand the upload validator validates them field-level against the real producer shapes (zero-price spot sentinel accepted — emitted on every Binance WS reconnect; rejecting it would make any reconnect tape un-uploadable). PM coverage semantics (canonical,quote_coverage_complete) stay PM-scoped; a newbinance_reference_countsmanifest field carries per-family counts.Out of scope
l2_depthkind (filtered recorder-side already)Dependency / merge order
Stacked on the pm-upload-qcf PR (base
codex/pm-upload-qcf). Textually conflicts with the pm-tick-tape PR in the toml — rebase after that lands.Focused validation
ploy-market-contracts/src/events.rsandbinance_collectors.rsby adversarial reviewcargo test -p hft-collector --locked: 62 polymarket_upload tests greenRollout / rollback impact
Validator + config; takes effect on the next recorder/uploader deploy. Rollback = revert config, older validator still accepts PM-only tapes.
Issue relationship
Closes #540
Summary by CodeRabbit
New Features
Bug Fixes