Skip to content

CEX: retain USD-M server-time receipt clock - #252

Merged
proerror77 merged 1 commit into
mainfrom
codex/cex-usdm-reference-clock-222
Jul 23, 2026
Merged

CEX: retain USD-M server-time receipt clock#252
proerror77 merged 1 commit into
mainfrom
codex/cex-usdm-reference-clock-222

Conversation

@proerror77

Copy link
Copy Markdown
Owner

Part of #222.

Change contract

Retain and validate the received clock of the /fapi/v1/time source used to timestamp USD-M exchange metadata, and version the complete dual-clock contract as binance.usdm_reference.v2.

Out of scope

Collector runtime, artifact publication, deployment/shadow gate/cutover, issues #223/#224, snapshot, evaluator, and research logic.

Dependency or merge order

Correction after PR #251 and before the #222 collector/runtime artifact PR. This PR does not close #222.

Focused validation

  • TDD red proof: the focused test initially failed because ActivePerpetualContract lacked source_clock_received_at_ns and the normalizer lacked the source-clock receipt argument.
  • cargo test -p hft-data (42 passed)
  • cargo clippy -p hft-data -- -D warnings
  • single-file rustfmt check
  • git diff --check
  • two independent read-only reviews; one schema-version blocker was fixed and both final reviews are no-blocker.

A PRD is unnecessary because this is a focused correction to the already-approved #222 data contract.

Rollout / rollback impact

No collector has deployed or published v1 artifacts. The schema is explicitly bumped to v2 instead of silently defaulting the missing received clock. Rollback is a single code revert; no production state changes.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@proerror77, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 31 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d673995f-4981-42b8-a306-339d692cf9e0

📥 Commits

Reviewing files that changed from the base of the PR and between 83ddae0 and c5d076a.

📒 Files selected for processing (1)
  • rust_hft/data-pipelines/core/src/binance_usdm_reference.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/cex-usdm-reference-clock-222

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@proerror77
proerror77 merged commit 05d1966 into main Jul 23, 2026
18 checks passed
@proerror77
proerror77 deleted the codex/cex-usdm-reference-clock-222 branch July 24, 2026 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CEX: 永续 mark/index、funding、OI 与 basis collector

1 participant