fix(collector): bound explicit historical discovery - #172
Merged
Merged
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughExplicit market IDs are now capacity-validated and discovered through direct Gamma market-detail requests. Tests cover bypassing keyset pagination and rejecting unsupported markets before completion output. ChangesExplicit Polymarket market discovery
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant collect_once
participant ReferenceCollector
participant GammaAPI
participant ActiveTape
collect_once->>ReferenceCollector: discover configured market IDs
ReferenceCollector->>GammaAPI: GET /markets/{id}
GammaAPI-->>ReferenceCollector: market detail
ReferenceCollector->>ReferenceCollector: validate supported target
ReferenceCollector->>ActiveTape: write completion output only after successful collection
Possibly related PRs
🚥 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 |
This was referenced Jul 20, 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.
Closes #171
Change contract
When an isolated reference collector run supplies one or more
--market-idvalues, fetch and identity-check only those Gamma market-detail records instead of scanning broad keyset pages. Without explicit IDs, retain the existing open plus closed 24-hour discovery behavior.Out of scope
New date-range flags, completion semantics, polling limits, production ECS/reference-recovery cutover, evidence publication, snapshots, evaluator/MCTS, and live execution.
Dependency or merge order
None. This corrects the opt-in interface introduced by merged #166 and is based on current
main(8e5bb9b2).Focused validation
cargo test -p hft-collector requested_market_ids_bypass_broad_gamma_discovery --lib --no-default-features --lockedcargo test -p hft-collector requested_non_target_market_fails_before_completion --lib --no-default-features --lockedcargo test -p hft-collector settlement_discovery_capacity_covers_every_configured_five_and_fifteen_minute_market --lib --no-default-features --lockedcargo test -p hft-collector --bin polymarket-raw-ops --no-default-features --lockedcargo clippy -p hft-collector --lib --no-default-features --locked -- -D warningsgit diff --checkThe repository-wide
cargo fmt --checkreports pre-existing formatting diffs outside this PR; no unrelated formatting was changed.Rollout/rollback impact
Publish a content-addressed
binance-lob-archiverimage and run it only in a named isolated Kubernetes Job for the known BTC 5m cohort. No production collector changes. Roll back by deleting that Job and retaining the current image.PRD note
A new PRD is unnecessary: this is a narrow correction to the already-merged explicit-market-id collector contract. #171 provides the scoped contract and acceptance evidence.
Summary by CodeRabbit
New Features
Bug Fixes