fix(polymarket): bound legacy startup health - #506
Conversation
|
Warning Review limit reached
Next review available in: 20 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 (3)
📝 WalkthroughWalkthroughLegacy startup health admission now supports a 2700-second age limit and target-market-based API-error bounds. The jq policy and control-plane tests cover HTTP 429 validation, absolute caps, publication-age boundaries, constant wiring, and deterministic freshness checks. ChangesLegacy startup health bounds
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant LegacyHealthAdmission
participant fresh_legacy_health_observation
participant HealthSnapshot
LegacyHealthAdmission->>fresh_legacy_health_observation: pass 2700-second max age
fresh_legacy_health_observation->>HealthSnapshot: read publication timestamp
fresh_legacy_health_observation-->>LegacyHealthAdmission: return freshness result
Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 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: 56d453449b
ℹ️ 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".
2dc353f to
c1d6fc5
Compare
2ce31c0 to
da809c8
Compare
Issue relationship
Closes #505
Change contract
Bound legacy-Python Gate startup admission to the observed completed atomic
health cadence and a target-scaled allowance for exact trades HTTP 429 errors.
Out of scope
Legacy collector or uploader behavior, shared legacy/Rust health policy,
cutover logic, CI layering, research, snapshot/#235, evaluator/MCTS, and
production mutation.
Dependency / merge order
Depends on PR #503 at base
61c959c453819d97401b699ae4c8e95af9129f3d.Runtime issue #498 remains blocked until this PR merges and a new exact-main
artifact passes real-segment preflight and the 900-second Gate.
Focused validation
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.shbash -nfor both changed shell scriptsjq -n -f deployment/aliyun/polymarket-shadow-gate-policy.jqgit diff --checkCounterexamples cover 2,700/2,701-second freshness, 18/2,792 acceptance,
29/2,792 rejection, 33/10,000 rejection, mixed/wrong/trailing-newline errors,
strict shared legacy policy, strict Rust policy, and preservation of original
errors in immutable Gate evidence.
Rollout / rollback impact
After merge, build a new exact-main immutable release, run a real closed-segment
preflight, then one 900-second Rust Gate. Any failure remains fail-closed with
Python active and Rust shadow stopped. No immutable release is overwritten.
Summary by CodeRabbit
Bug Fixes
Tests