Skip to content

fix(polymarket): reject non-positive research strikes - #94

Merged
proerror77 merged 1 commit into
mainfrom
codex/polymarket-research-positive-price
Jul 17, 2026
Merged

proerror77 merged 1 commit into
mainfrom
codex/polymarket-research-positive-price

Conversation

@proerror77

@proerror77 proerror77 commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Change contract: Fail closed during governed Polymarket research selection unless every selected price_to_beat is a parseable Decimal strictly greater than zero.

Out of scope: Selection interval limits, raw segment validation, metadata identity rules, normalization, artifact publication, deployment, and live trading behavior.

Dependency or merge order: Corrective follow-up to merged selector PR #93. Rebased onto main at 2ec044c after PRs #91 and #92 merged. Merge this focused fix before opening or merging the normalizer layer.

Focused validation:

  • Red proof: the new discovery_rejects_non_positive_price_to_beat counterexample failed on the prior behavior because a zero strike was accepted.
  • Green: cargo +1.91 test --locked -p hft-collector polymarket_research_select::tests::discovery_rejects_non_positive_price_to_beat -- --exact
  • cargo +1.91 test --locked -p hft-collector polymarket_research_select::tests:: (7 passed)
  • cargo +1.91 test --locked -p hft-collector --lib (129 passed, 1 ignored)
  • cargo +1.91 fmt -p hft-collector -- --check
  • cargo +1.91 clippy --locked -p hft-collector --lib --features collector-binance --no-deps -- -D warnings

Rollout/rollback impact: Research-only fail-closed tightening; malformed zero or negative strikes now stop selection instead of contaminating downstream labels. Rollback is reverting this PR, restoring the prior permissive behavior without changing raw artifacts.

Notes: One file, +55/-1, below the repository split threshold. This PR owns only the missed selector safety counterexample and fix.

@proerror77

Copy link
Copy Markdown
Owner Author

@codex review

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

Next review available in: 29 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

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

Run ID: 442acba3-154d-41cf-92da-539f8eeec3fb

📥 Commits

Reviewing files that changed from the base of the PR and between 2ec044c and 8e331f9.

📒 Files selected for processing (1)
  • rust_hft/tools/collector/src/polymarket_research_select.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/polymarket-research-positive-price

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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: c6051976f4

ℹ️ 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".

@proerror77
proerror77 force-pushed the codex/polymarket-research-positive-price branch from c605197 to 8e331f9 Compare July 17, 2026 10:31
@proerror77

Copy link
Copy Markdown
Owner Author

@codex review

Please re-review current head 8e331f9 after rebase onto main 2ec044c.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 8e331f9f34

ℹ️ 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".

@proerror77
proerror77 merged commit 0db05db into main Jul 17, 2026
17 checks passed
@proerror77
proerror77 deleted the codex/polymarket-research-positive-price branch July 17, 2026 10:47
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