fix(collector): skip empty reference batches - #770
Conversation
Root cause: one empty canonical batch directory aborted discovery before later complete batches could upload. Remove only an exactly empty batch directory; partial or malformed batches remain fail-closed and retained.
|
Warning Review limit reached
Next review available in: 28 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 (2)
📝 WalkthroughWalkthroughThe worktree contract now targets USDM reference empty-batch recovery. The Binance USD-M uploader removes empty batch directories, skips them during discovery, and preserves fail-closed handling for partial batches. ChangesUSDM empty-batch recovery
Estimated code review effort: 2 (Simple) | ~15 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@agent-worktree.yml`:
- Line 9: Update the no_external_runtime_mutation configuration key in
agent-worktree.yml from false to true, preserving the rest of the configuration
unchanged.
In `@rust_hft/tools/collector/src/binance_usdm_reference_upload.rs`:
- Around line 739-744: Update the test around publish_batch so the empty
canonical batch at RECEIVED_NS + 100 is created before publishing the complete
batch at RECEIVED_NS + 200. Preserve the existing batch_dir and
directory-creation setup while swapping the timestamps to exercise an empty
batch preceding a later complete batch.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 74d781be-f09a-4054-96a4-6c8d11fe1649
📒 Files selected for processing (2)
agent-worktree.ymlrust_hft/tools/collector/src/binance_usdm_reference_upload.rs
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 52380a7b19
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Change contract
Skip only exactly empty USD-M reference batch directories so one abandoned empty directory cannot block later complete batches. Partial and malformed batches remain fail-closed and retained.
Issue relationship
None
Out of scope
Production mutation, collector cutover, reference schema changes, and PIT research contract changes.
Dependencies and merge order
None
Focused validation
cargo test -p hft-collector --lockedcargo clippy -p hft-collector --locked --lib --bin binance-usdm-reference-upload -- -D warningsgit diff --checkRollout and rollback
No runtime mutation in this PR. Deploy only after merge from an exact-main release; rollback restores the prior digest-addressed uploader.
Scope exception
None