Skip to content

fix(deploy): admit healthy Gamma recovery probe - #717

Merged
proerror77 merged 1 commit into
mainfrom
codex/pm-reference-recover-gate-200
Aug 5, 2026
Merged

proerror77 merged 1 commit into
mainfrom
codex/pm-reference-recover-gate-200

Conversation

@proerror77

@proerror77 proerror77 commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Change contract

Update the PM Reference recover-Gate contract to admit the observed healthy Gamma closed-market probe (tagged=200, untagged=200) and remove only the obsolete event-specific tagged=500 requirement. Candidate binding, exact source/hash identities, stopped-baseline containment, candidate-once health, freshness, normal isolated Gate, OSS readback, and rollback gates remain unchanged.

Issue relationship

Refs #636

Out of scope

Uploader, ACK, CEX data admission, Issue #689, trading, Bybit/Binance, unrelated collectors, runtime/candidate work, and any production start/reload/cutover.

Dependencies and merge order

None. Based on current main at 18ad045752f5f464a0b479ddab075853443b1197. Production rollout remains separately gated after merge.

Focused validation

The existing control-plane contract test covers one successful 200/200 recovery receipt and negative candidate/baseline/probe/status cases, including rejection of a tagged-500 mutation. CI must run the focused shell/control-plane checks and required repository checks against this exact head.

Rollout and rollback

No production impact. Merge only; candidate rebuild, staging, recovery Gate, and runtime promotion are explicitly deferred. The governed controller retains the existing rollback contract.

Scope exception

None.

Summary by CodeRabbit

  • Bug Fixes
    • Updated recovery validation to recognize successful Gamma recovery responses with HTTP 200 status.
    • Standardized recovery checks on the gamma_closed_200 mode and corresponding probe schema.
    • Preserved rejection of unsuccessful recovery responses and updated validation coverage accordingly.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@proerror77, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 47 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6b8ef689-3f93-4c38-8c3f-758e67115ab1

📥 Commits

Reviewing files that changed from the base of the PR and between 4c5f21e and 73b7247.

📒 Files selected for processing (5)
  • deployment/aliyun/polymarket-raw-ops-cutover.sh
  • deployment/aliyun/polymarket-raw-ops-gate-control.sh
  • deployment/aliyun/polymarket-raw-ops-shadow-gate.sh
  • deployment/aliyun/polymarket-shadow-gate-policy.jq
  • deployment/aliyun/test-polymarket-raw-ops-control-plane.sh
📝 Walkthrough

Walkthrough

The recovery contract changes from gamma_tagged_500 to gamma_closed_200. Deployment gates, the JQ policy, and control-plane tests now require the updated schema and HTTP 200 Gamma responses.

Changes

Gamma recovery contract

Layer / File(s) Summary
Recovery contract and policy
deployment/aliyun/polymarket-shadow-gate-policy.jq, deployment/aliyun/polymarket-raw-ops-cutover.sh
Bootstrap recovery now requires gamma_closed_200, the new probe schema, and HTTP 200 for the tagged-closed probe.
Gate validation updates
deployment/aliyun/polymarket-raw-ops-gate-control.sh, deployment/aliyun/polymarket-raw-ops-shadow-gate.sh
Gate validation uses the new mode and schema. Tagged and untagged closed-market probes must return HTTP 200.
Recovery fixtures and assertions
deployment/aliyun/test-polymarket-raw-ops-control-plane.sh
Fixtures and assertions use the HTTP 200 contract. The mutation test uses HTTP 500 as the invalid case.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

  • Issue 624 — Covers the related change from Gamma HTTP 500 recovery handling to HTTP 200 validation.
  • Issue 636 — Covers the recovery-mode and probe-contract update used by these deployment gates.

Possibly related PRs

  • proerror77/monday#44 — Introduced related recovery-mode and schema changes in overlapping control-plane files.
  • proerror77/monday#626 — Updates collector retry behavior for the same Gamma closed-lane recovery scenario.
  • proerror77/monday#644 — Introduced recovery-mode and probe-schema values updated by this PR.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the deployment fix to admit the healthy Gamma recovery probe.
Description check ✅ Passed The description completes every required section and clearly states the behavior, scope, validation, dependencies, and rollout plan.
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.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/pm-reference-recover-gate-200

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 force-pushed the codex/pm-reference-recover-gate-200 branch from a204287 to 47c382e Compare August 5, 2026 07:28
@proerror77
proerror77 force-pushed the codex/pm-reference-recover-gate-200 branch from 47c382e to 73b7247 Compare August 5, 2026 07:37
@proerror77
proerror77 merged commit 4484dd4 into main Aug 5, 2026
45 checks passed
@proerror77
proerror77 deleted the codex/pm-reference-recover-gate-200 branch August 5, 2026 07:45
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.

2 participants