fix(polymarket): bound production Gate to 900 seconds - #501
Conversation
|
Warning Review limit reached
Next review available in: 29 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 Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe shadow gate now uses a bounded 900-second observation window, stricter legacy baseline admission and identity checks, revised preflight budgeting, updated parity evidence handling, and matching policy and control-plane contract tests. ChangesShadow Gate Control Flow
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related issues
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3214966fa0
ℹ️ 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".
|
@coderabbitai review |
✅ Action performedReview finished.
|
Change contract
Run the production Polymarket Rust shadow Gate for exactly 900 seconds total, with the 601-second parity tail contained inside that window, after a fail-fast real-segment preflight capped at 300 seconds.
The Gate still requires a policy-clean atomic Python health publication at admission, captures and checks Python PID/InvocationID/NRestarts for the whole Gate, and validates Rust health, real-segment upload/readback, parity, immutable evidence, and wall-clock bounds. It does not wait for another Python collection cycle. If no Python comparison rows fall inside the Gate window, the user-approved Rust-self mode remains fail-closed on stable Python identity plus nonzero, valid Rust trade and settlement evidence.
Out of scope
Dependency / merge order
c89d7b400c080342756a367c1a4580e4691a8b60) for explicit empty-legacy Rust-self parity support.Focused validation
bash -n deployment/aliyun/polymarket-raw-ops-shadow-gate.shbash -n deployment/aliyun/test-polymarket-raw-ops-control-plane.shshellcheck deployment/aliyun/polymarket-raw-ops-shadow-gate.sh deployment/aliyun/test-polymarket-raw-ops-control-plane.shjq -n -f deployment/aliyun/polymarket-shadow-gate-policy.jqbash deployment/aliyun/test-polymarket-raw-ops-control-plane.shcargo test --manifest-path rust_hft/Cargo.toml -p hft-collector polymarket_parity(27 passed)Counterexamples cover 899-second rejection, pre-Gate parity rejection, unelapsed 900-second wall-clock rejection, disabled Python health/identity rejection, and timer ordering after the Rust shadow PID/InvocationID baseline exists.
Rollout / rollback impact
After merge, build a new exact-main artifact, perform a <=300-second preflight, run one 900-second Gate, cut over the three Rust services, and supervise a 300-second production smoke. Any Gate failure keeps Python and stops shadow; any smoke failure invokes the existing cutover rollback using the exact cutover evidence directory.
Issue relationship
Refs #498