Skip to content

fix(collector): align Binance segment rotation - #301

Merged
proerror77 merged 1 commit into
mainfrom
codex/cex-segment-boundary-224
Jul 23, 2026
Merged

proerror77 merged 1 commit into
mainfrom
codex/cex-segment-boundary-224

Conversation

@proerror77

Copy link
Copy Markdown
Owner

Relates to #224.

Change contract: Align Binance collector segment duration rotation to UTC epoch boundaries so the ten-minute shadow configuration cannot rotate once at start+600s and immediately again at the hourly partition boundary, producing a checkpoint-only technical segment with no real aggregate trade.

Out of scope: Relaxing the agg_trade > 0 gate, deployment/gate policy changes, ECS cutover, historical reconstruction, snapshot construction, evaluator/MCTS, research logic, Polymarket collection, and any production-unit change.

Dependency or merge order: #293, #295, and #296 are merged. This focused runtime follow-up must merge before building the next candidate and rerunning the full one-hour #224 gate.

Focused validation:

  • Production gate t-jpn6rts76tsm96o ran the observation window and failed closed on a 15.1-second Spot manifest beginning at 21:59:58 UTC with checkpoint=2750, stream_coverage=1, diff=1, and agg_trade=0. No PASSED.sha256 was created and no cutover occurred.
  • Counterexample segment_rotation_aligns_to_utc_boundaries failed before the change and passes after it.
  • cargo test -p hft-collector --bin binance-lob-archiver: 47 passed.
  • cargo clippy -p hft-collector --bin binance-lob-archiver -- -D warnings.

Rollout/rollback impact: Build a new SHA-addressed candidate, install it without touching production, and rerun the unchanged full gate. A failed gate leaves the existing production binary active. Rollback is the single collector commit in this PR.

PRD note: This is a small, already-specified runtime defect discovered by the #224 production gate; focused TDD is sufficient and no new PRD is needed.

@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: 9 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: 6534a4ab-0131-4af2-b891-491003aaa8a0

📥 Commits

Reviewing files that changed from the base of the PR and between 7cfae3a and 1d26c2b.

📒 Files selected for processing (1)
  • rust_hft/tools/collector/src/bin/binance-lob-archiver.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/cex-segment-boundary-224

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 888c3fe into main Jul 23, 2026
17 of 18 checks passed
@proerror77
proerror77 deleted the codex/cex-segment-boundary-224 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.

1 participant