fix(deploy): let the shadow gate policy accept disabled legacy health admission - #579
Merged
Merged
Conversation
… admission #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
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe shadow-gate policy now permits disabled legacy health-start admission. Health snapshots remain validated when required. Contract tests cover Rust-self and legacy gates with disabled health admission. ChangesLegacy health admission
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change contract
polymarket-shadow-gate-policy.jqacceptsbaseline_health_start_required == false(skipping only the legacy health chain) whenbaseline_mode == legacy_python, and decouplescomparison_mode == rust_selffrom the admission flag. All identity, parity, coverage, and evidence checks are unchanged.Root cause (the real gate killer since #554)
Every #554-era gate failed at the final policy evaluation with 'combined gate evidence failed the production policy' even with all 15 parity checks true. #554 disabled the admission in the gate script, but the policy still required
baseline_health_start_required == true+ the full legacy health chain — verified against the actual gate.json of invocation 305c158c (policy returns false before, true after). The 404 readback noise each time was the shadow's own upload service racing its in-flight multipart, not the gate's death cause.Focused validation
trueon the real gate.json;falseon: flag=true without the health chain, forged trade parity, bad comparison_modeOut of scope
Dependency / merge order
None. Note for the in-flight candidate: its staged control copy needs this policy (host patch + hash recompute, controller-authorized) or the next official release.
Rollout / rollback impact
Gate policy only. Rollback = revert.
Issue relationship
Refs #553
Summary by CodeRabbit