Skip to content

fix(polymarket): allow Gate elapsed-time rounding - #526

Merged
proerror77 merged 1 commit into
mainfrom
codex/polymarket-gate-duration-rounding-525
Jul 31, 2026
Merged

fix(polymarket): allow Gate elapsed-time rounding#526
proerror77 merged 1 commit into
mainfrom
codex/polymarket-gate-duration-rounding-525

Conversation

@proerror77

@proerror77 proerror77 commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Change contract

Accept the fixed 900-second Gate when integer elapsed-time sampling reports 900 or 901 seconds; continue rejecting 899 and 902 seconds.

This is a small, already-specified bug fix, so a PRD is unnecessary.

Issue relationship

Refs #525

Out of scope

Dependency / merge order

None. Base is exact main d51453d83472781119ed67e70716faaad2c7a5f0. Merge this PR before rebuilding the production release artifact and rerunning the real-segment preflight/Gate.

Focused validation

  • RED before policy change: gate policy rejected one second of elapsed-time rounding.
  • GREEN: bash deployment/aliyun/test-polymarket-raw-ops-control-plane.sh.
  • GREEN: bash -n deployment/aliyun/test-polymarket-raw-ops-control-plane.sh.
  • GREEN: ShellCheck on the focused test.
  • GREEN: git diff --check.
  • Counterexamples: 899 and 902 remain rejected; 900 fixture and 901 rounding case pass.

Rollout / rollback impact

Rollout changes only the signed Gate policy and its focused contract test. A new exact-main artifact and real closed-segment preflight are required before a new Gate. The Gate remains fail-closed outside 900..901, and production remains Python until a fresh Gate, cutover, and 300-second smoke pass. Rollback is the existing automatic Python rollback.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The shadow-gate duration policy now accepts 900 and 901 seconds. Control-plane tests verify 901 seconds passes and 902 seconds remains rejected.

Changes

Shadow-gate duration validation

Layer / File(s) Summary
Allow one-second duration rounding
deployment/aliyun/polymarket-shadow-gate-policy.jq, deployment/aliyun/test-polymarket-raw-ops-control-plane.sh
The policy accepts 900–901 seconds, while tests accept 901 and reject 902 seconds.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related issues

  • proerror77/monday#525: Directly addresses the same 900–901 second duration boundary and corresponding tests.
  • proerror77/monday#486: Concerns Polymarket shadow-gate duration validation and boundary handling.

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the elapsed-time rounding fix implemented in the policy and tests.
Description check ✅ Passed The description covers the required change, issue, scope, dependencies, validation, rollout, rollback, and scope exception information.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Fix failing CI checks
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/polymarket-gate-duration-rounding-525

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@proerror77
proerror77 enabled auto-merge (squash) July 31, 2026 00:28
@proerror77
proerror77 merged commit 9384b0e into main Jul 31, 2026
41 of 45 checks passed
@proerror77
proerror77 deleted the codex/polymarket-gate-duration-rounding-525 branch July 31, 2026 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant