Skip to content

feat(collector): fail closed on Binance market tape continuity - #117

Merged
proerror77 merged 1 commit into
mainfrom
codex/binance-market-tape-producer
Jul 17, 2026
Merged

proerror77 merged 1 commit into
mainfrom
codex/binance-market-tape-producer

Conversation

@proerror77

Copy link
Copy Markdown
Owner

Change contract

Make Binance market_tape.v1 producer fail closed on aggregate-trade continuity by preserving validator state across in-process reconnects and refusing replay-safe checkpoints after process restart when prior market-tape history exists but no aggregate-trade restore exists.

Out of scope

No verifier changes, no downloader/recovery restore implementation, no research snapshot wiring, and no deploy/runtime promotion.

Dependency or merge order

Base: main. Merge independently before the verifier PR.

Focused validation

  • cargo test -p hft-collector --bin binance-lob-archiver -- --nocapture
  • cargo test -p hft-collector current_market_tape_history_requires_aggregate_trade_restore -- --nocapture
  • cargo test -p hft-collector untrusted_market_tape_history_keeps_checkpoints_replay_unsafe -- --nocapture
  • cargo fmt -p hft-collector

Rollout/rollback impact

Roll forward causes restarted producers with existing binance.market_tape.v1 history to keep new segments replay-unsafe until a future restore seam is implemented; rollback restores the previous, unsafe optimistic continuity behavior.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Jul 17, 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: 59 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

Run ID: c8f92a10-249b-44a8-99e7-625c91334e00

📥 Commits

Reviewing files that changed from the base of the PR and between ff6a6e3 and 56660f0.

📒 Files selected for processing (2)
  • rust_hft/tools/collector/src/bin/binance-lob-archiver.rs
  • rust_hft/tools/collector/src/lob_archiver.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/binance-market-tape-producer

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.


#[test]
fn aggregate_trade_is_validated_and_archived_without_mutating_lob_state() {
let root = env::temp_dir().join(format!(
.expect("zstd is required for segment lifecycle tests")
.status
.success());
let root = env::temp_dir().join(format!(
@proerror77
proerror77 force-pushed the codex/binance-market-tape-producer branch from ae58da4 to 56660f0 Compare July 17, 2026 22:01
@proerror77
proerror77 merged commit 137721e into main Jul 17, 2026
10 checks passed
@proerror77
proerror77 deleted the codex/binance-market-tape-producer 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.

2 participants