Fix transient Polymarket OSS readback misses - #376
Merged
Merged
Conversation
📝 WalkthroughWalkthroughOSS artifact verification now retries remote readback failures up to three times with a one-second delay. Tests cover recovery from transient missing objects, bounded failure attempts, error context, and local source-file retention. ChangesOSS readback retry behavior
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 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: 1
🤖 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 `@rust_hft/tools/collector/src/polymarket_upload.rs`:
- Around line 1742-1752: Update the retry loop around
download_remote_artifacts_with so the expected initial NoSuchKey probe is not
retried, while retaining retries for post-upload verification failures.
Distinguish the initial readback from post-upload verification in
upload_artifacts_with or restrict this loop’s retry behavior to the verification
path, preserving immediate handling of a missing remote triplet before a new
upload.
🪄 Autofix (Beta)
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: 4a1633f1-98cd-4747-866e-d9920be50110
📒 Files selected for processing (1)
rust_hft/tools/collector/src/polymarket_upload.rs
This was referenced Aug 1, 2026
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 contract
Add a bounded retry only at the shared Polymarket Rust uploader remote-readback verification seam so a newly uploaded triplet can survive a transient first
NoSuchKeywithout weakening fail-closed integrity checks.This is a small, already-specified defect inside #326, so a separate PRD is unnecessary; it adds no product behavior or rollout unit.
Out of scope
Dependency or merge order
PR #372 is already merged. Merge this PR before building the next exact-main candidate and rerunning the formal Gate.
Focused validation
newly_uploaded_triplet_retries_transient_readback_missfailed immediately withNoSuchKeycargo test -p hft-collector polymarket_upload::tests:: --lib— 43 passedcargo test -p hft-collector --lib— 219 passed, 2 ignoredcargo test -p hft-collector --bin polymarket-raw-ops— 4 passedcargo clippy -p hft-collector --lib -- -D warnings— passedrustfmt --edition 2021 --check tools/collector/src/polymarket_upload.rs— passedRollout/rollback impact
Rollout: after merge, build a new exact-main Polymarket Rust candidate and rerun the formal 3600s+601s Gate before any production cutover. The Gate must still verify the exact data/manifest/
_SUCCESStriplet and all existing health/parity requirements.Rollback: revert this PR to restore single-attempt remote readback verification. No production runtime changes occur in this PR.