fix(collector): refuse corrupt upload-status instead of resetting counts - #1158
Open
proerror77 wants to merge 1 commit into
Open
fix(collector): refuse corrupt upload-status instead of resetting counts#1158proerror77 wants to merge 1 commit into
proerror77 wants to merge 1 commit into
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 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 |
proerror77
marked this pull request as ready for review
September 12, 2026 04:50
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
|
||
| #[test] | ||
| fn corrupt_upload_status_does_not_default_failure_count() { | ||
| let root = std::env::temp_dir().join(format!( |
cursor
Bot
force-pushed
the
cursor/collector-upload-status-fail-closed-1729
branch
from
September 12, 2026 05:16
64fbbac to
52aa07f
Compare
Fee, USD-M reference, LOB, and Bybit uploaders now fail closed on invalid upload-status.json instead of treating it as an empty object and writing failure_count back to zero. Missing files still start clean; existing corrupt bytes are left untouched. Co-authored-by: Wild Card <proerror77@users.noreply.github.com>
cursor
Bot
force-pushed
the
cursor/collector-upload-status-fail-closed-1729
branch
from
September 12, 2026 05:44
52aa07f to
6003b18
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change
Corrupt
upload-status.jsonis now fail-closed instead of defaulting to{}and resettingfailure_count. Sharedread_statusin Polymarket, LOBread_upload_status, and the Bybit local copy refuse invalid JSON / non-objects / badfailure_count. A missing file is still an empty map. Collectors that inherit those readers (binance-lob-archiver, fee, usdm-reference) get the same gate.Issue relationship
None
Validation
cargo test -p hft-collector --locked corrupt_upload_statuscargo test -p hft-collector --locked upload_status_must_be_validRebased onto current
mainafter#1154.Runtime impact and rollback
Collector upload-status parsing only. After the next collector deploy, a corrupt status file fails instead of looking freshly healthy. Rollback is the previous collector binaries. Not a live trading change.