Skip to content

fix(deploy): drop legacy-Python health admission from polymarket shadow gate - #554

Merged
proerror77 merged 2 commits into
mainfrom
codex/pm-gate-legacy-admission
Aug 1, 2026
Merged

fix(deploy): drop legacy-Python health admission from polymarket shadow gate#554
proerror77 merged 2 commits into
mainfrom
codex/pm-gate-legacy-admission

Conversation

@proerror77

@proerror77 proerror77 commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Change contract

The Polymarket shadow gate no longer requires admissible legacy-Python collector health at start (LEGACY_HEALTH_START_REQUIRED=false). The legacy lane is being retired for the same degradation that blocked two gate attempts (39+ HTTP 429 entries, frozen health writes since 2026-07-31T20:14Z, no health 15+ min after clean restart). Candidate-side parity, readback, and continuity checks are unchanged.

Disclosure (evidence parity)

The on-host release copy of polymarket-raw-ops-shadow-gate.sh (candidate cb55ac1d) was already patched to this exact behavior on 2026-08-01 with the bundle hash recomputed and the old candidates restored/reverted, to unblock the in-flight cutover. This PR makes the change official; the next official release supersedes the host patch.

Out of scope

  • Any candidate-side gate check
  • Legacy Python collector fixes (lane retired by the cutover)

Dependency / merge order

None. Independent of the other open PRs.

Focused validation

  • test-polymarket-raw-ops-control-plane.sh PASS (fixture pin updated to the new default)
  • test-polymarket-raw-ops-stage.sh PASS; bash -n clean

Rollout / rollback impact

Takes effect with the next release bundle; host interim state already matches. Rollback = revert.

Issue relationship

Refs #553

Summary by CodeRabbit

  • Bug Fixes

    • Disabled the retired legacy health startup admission requirement.
    • Updated control-plane validation to reflect the revised startup behavior.
  • Tests

    • Adjusted contract checks to confirm legacy health startup is no longer required.

@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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1a713257-da5e-4884-8816-343cd9058328

📥 Commits

Reviewing files that changed from the base of the PR and between c95e51c and 4ffc65d.

📒 Files selected for processing (2)
  • deployment/aliyun/polymarket-raw-ops-shadow-gate.sh
  • deployment/aliyun/test-polymarket-raw-ops-control-plane.sh
🚧 Files skipped from review as they are similar to previous changes (2)
  • deployment/aliyun/test-polymarket-raw-ops-control-plane.sh
  • deployment/aliyun/polymarket-raw-ops-shadow-gate.sh

📝 Walkthrough

Walkthrough

The shadow gate disables the legacy Python health startup requirement. The control-plane contract test now expects the disabled configuration. Candidate-side parity evidence requirements remain unchanged.

Changes

Legacy health admission retirement

Layer / File(s) Summary
Gate configuration and contract validation
deployment/aliyun/polymarket-raw-ops-shadow-gate.sh, deployment/aliyun/test-polymarket-raw-ops-control-plane.sh
The gate sets LEGACY_HEALTH_START_REQUIRED=false. The contract test asserts the disabled setting. Parity evidence requirements remain unchanged.

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

Possibly related issues

  • proerror77/monday issue 553: Directly tracks disabling LEGACY_HEALTH_START_REQUIRED and updating its contract test.

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes removing legacy-Python health admission from the Polymarket shadow gate.
Description check ✅ Passed The description covers the change, rationale, issue, scope, dependencies, validation, and rollout; it omits the scope exception section.
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.
✨ Finishing Touches
📝 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-gate-legacy-admission

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 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-raw-ops-shadow-gate.sh`:
- Around line 19-22: Update the comment near LEGACY_HEALTH_START_REQUIRED to
describe only retirement of the legacy-Python health-admission requirement,
without claiming the legacy lane or legacy health/cutover support is disabled.
Replace the inaccurate 2026-07-31..08-01 incident range with the verified
incident date, preserving the existing candidate-side parity statement.

In `@deployment/aliyun/test-polymarket-raw-ops-control-plane.sh`:
- Line 4155: Update the gate validation using grep in the
LEGACY_HEALTH_START_REQUIRED check to match an active configuration declaration
as an exact line, excluding commented or embedded text. If duplicate
declarations are invalid, require exactly one matching line rather than merely
checking for any occurrence.
🪄 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 Plus

Run ID: 4e4f357a-0eef-4765-9420-0ce086bbdc6e

📥 Commits

Reviewing files that changed from the base of the PR and between 322372e and 6d66917.

📒 Files selected for processing (2)
  • deployment/aliyun/polymarket-raw-ops-shadow-gate.sh
  • deployment/aliyun/test-polymarket-raw-ops-control-plane.sh

Comment thread deployment/aliyun/polymarket-raw-ops-shadow-gate.sh
Comment thread deployment/aliyun/test-polymarket-raw-ops-control-plane.sh Outdated
proerror77 pushed a commit that referenced this pull request Aug 1, 2026
Addresses CodeRabbit review on PR #554: grep -Fq could match a
commented line; use anchored exact-line match.

Refs #553
@proerror77
proerror77 enabled auto-merge (squash) August 1, 2026 05:10
Sonic Shih added 2 commits August 1, 2026 13:11
…ow gate

The legacy lane is being retired for the same degradation that blocked
two shadow-gate attempts on 2026-07-31..08-01 (chronic HTTP 429 storms,
frozen health writes). Discloses: the on-host release copy was already
patched to this behavior to unblock the in-flight cutover.

Refs #553
Addresses CodeRabbit review on PR #554: grep -Fq could match a
commented line; use anchored exact-line match.

Refs #553
@proerror77
proerror77 force-pushed the codex/pm-gate-legacy-admission branch from c95e51c to 4ffc65d Compare August 1, 2026 05:11
@proerror77
proerror77 merged commit d39897d into main Aug 1, 2026
43 checks passed
@proerror77
proerror77 deleted the codex/pm-gate-legacy-admission branch August 1, 2026 05:24
proerror77 added a commit that referenced this pull request Aug 1, 2026
… admission (#579)

#554 turned LEGACY_HEALTH_START_REQUIRED off in the gate script, but
polymarket-shadow-gate-policy.jq still required
baseline_health_start_required == true (plus the full legacy health
chain) whenever baseline_mode == legacy_python, so every gate died at
the final policy evaluation ('combined gate evidence failed the
production policy'). The policy now skips the legacy health chain when
the admission is disabled (flag false), keeps all identity/parity
checks, and no longer ties comparison_mode rust_self to the admission.
Counterexample fixtures prove fail-closed behavior for flag-true
without the health chain, forged parity, and bad comparison_mode.

Refs #553

Co-authored-by: Sonic Shih <sonic.shih@mandonothing.com>
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