fix(collector): align live shadow parity windows - #51
Conversation
|
Warning Review limit reached
Next review available in: 48 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. 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 Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughPolymarket shadow parity now applies a 10-minute trade maturity lag, compares joined market context, reports explicit mismatch IDs, validates stricter settlement metadata contracts, emits expanded evidence metrics, and enforces these results through jq policy rejection tests. ChangesPolymarket parity validation
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant ParityCompare
participant TradeMap
participant MarketMetadata
participant GatePolicy
ParityCompare->>TradeMap: apply event maturity and recording cutoff
TradeMap->>MarketMetadata: resolve metadata for referenced markets
MarketMetadata-->>ParityCompare: return governed context
ParityCompare->>GatePolicy: publish parity metrics and mismatch IDs
GatePolicy-->>ParityCompare: accept or reject evidence
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 99a555357a
ℹ️ 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".
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 `@deployment/aliyun/polymarket-shadow-gate-policy.jq`:
- Around line 84-88: Update the maturity assertions in the gate policy to
require that trade_event_window_started_at_unix is less than or equal to
trade_event_window_ended_at_unix, preventing empty mature windows when the
parity window is no longer than the 600-second lag. Add a rejection test
covering a derived end before the start.
🪄 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
Run ID: 2f19f4a6-9065-44a7-ac82-9d52fe5463d5
📒 Files selected for processing (4)
deployment/aliyun/README.mddeployment/aliyun/polymarket-shadow-gate-policy.jqdeployment/aliyun/test-polymarket-raw-ops-control-plane.shrust_hft/tools/collector/src/polymarket_parity.rs
Summary
Validation
Production stays fail-closed: this PR does not cut over the Rust collector. A fresh one-hour shadow gate is required after merge and immutable artifact publication.
Summary by CodeRabbit
New Features
Bug Fixes
Tests