feat(polymarket): validate raw research segments - #89
Conversation
|
Warning Review limit reached
Next review available in: 9 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8c2f4ae865
ℹ️ 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".
8c2f4ae to
9d4367a
Compare
9d4367a to
7cec852
Compare
|
@codex review Please re-review current head |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Change contract
Fail closed unless one staged
crypto_expirysegment and one stagedcrypto_expiry_referencesegment form canonical, content-addressed, unsuperseded artifact triplets that reproduce their producer manifests, stay inside their declared UTC-hour partitions, contain only their producer-owned event kinds, and satisfy the raw research policy; on success emit their deterministic identities.Out of scope
Governed event selection or cross-segment joins; five-surface normalization; Parquet/materialization; deployment; trading or execution changes.
Dependency or merge order
Base:
main. This validator layer is independently buildable and mergeable. Merge it before the selector/surfaces layer; no other PR is required first.Focused validation
rustc +1.91 --version->rustc 1.91.1cargo +1.91 fmt -p hft-collector -- --checkcargo +1.91 test --locked -p hft-collector-> 156 passed, 2 ignoredcargo +1.91 clippy --locked -p hft-collector --lib --bin polymarket-raw-ops --features collector-binance --no-deps -- -D warningsgit diff --check origin/main...HEAD_SUCCESS, missing settlement or wrong reference policy, and adjacentSUPERSEDEDmarkers; the positive fixture proves deterministic repeat validation.The repository-wide collector all-target clippy command also reaches two unrelated pre-existing
dead_codewarnings inhft-collector(fallback_symbolsandbinance_spot_pairs). This PR does not absorb that main-branch cleanup; all changed library/CLI targets pass strict clippy, and GitHub Strict Clippy passes.Scope assessment and atomic exception
3 changed files, 813 added non-generated lines, 0 deletions. The 771-line core consists of 528 implementation lines and 243 fixtures/counterexample-test lines; the remaining 42 lines are the minimal library export and opt-in CLI wiring. It contains no selector, normalizer, materializer, deployment, or execution content.
This exceeds the 750-line stop-and-assess threshold. Named reviewer
validator_standards_reviewexplicitly approved the atomic exception for exact head7cec852dcd1e844e9a6f4a128876726f1749e7a0after both P2 fixes, with no remaining P0-P2. The implementation and its fixtures/counterexamples are one Research/data trust-boundary contract: merging or rolling back the validator separately from the negative evidence would label paired raw inputs research-safe without the tests required to prove its fail-closed controls. Splitting the CLI/export glue would not bring the 771-line core below threshold. Selector and normalizer behavior remain separate PRs.Rollout/rollback impact
The change adds an opt-in validation subcommand only; existing collectors, services, execution gates, and live trading state are unchanged. Roll back by reverting this PR as one unit; no data migration or runtime rollback is required.