Skip to content

fix(collector): separate Polymarket settlement time from parity context - #386

Merged
proerror77 merged 1 commit into
mainfrom
codex/polymarket-parity-context-fix-326
Jul 26, 2026
Merged

proerror77 merged 1 commit into
mainfrom
codex/polymarket-parity-context-fix-326

Conversation

@proerror77

Copy link
Copy Markdown
Owner

Change contract

Make the Polymarket Rust shadow parity verifier validate raw Data API trade identity, exact cross-collector values, and market association without treating Polygon settlement time as research-window execution time. Preserve source and receipt timestamps and every existing fail-closed parity surface.

Closes #385. Parent deployment issue: #326.

Out of scope

Collector ingestion behavior, snapshot or research logic, #235 temporal-completeness/admission policy, production cutover, historical repair, and timestamp grace periods.

Dependency / merge order

Independent follow-up to merged #380. No stacked PR dependency; merge this before building the next immutable #326 Rust candidate.

Focused validation

  • Red proof before implementation: public polymarket-raw-ops verify-shadow-parity fixture failed with byte/field/dedupe/settlement/rotation parity failed for a shared endDate+19s settlement timestamp.
  • bash deployment/aliyun/test-polymarket-raw-ops-control-plane.sh
  • cargo test -p hft-collector --no-default-features --locked (221 passed, 2 ignored; all binary tests passed)
  • cargo clippy -p hft-collector --all-targets --locked -- -D warnings
  • rustfmt --edition 2021 --check tools/collector/src/polymarket_parity.rs
  • Standards review: pass, no findings.
  • Spec review against current Fix Polymarket raw parity timestamp semantics for #326 #385 and the superseding source-backed decision: pass, no findings.

The public fixture asserts both lanes retain two trades, shared values match, and the post-end trade preserves trade_ts_unix=319, nested source timestamp 319, and received_at=321.

Rollout / rollback impact

No production mutation in this PR. After merge, build a new exact-main immutable candidate and run a fresh governed shadow Gate before cutover. Rollback is reverting this verifier-only commit; production remains on the Python baseline until Gate success.

@coderabbitai

coderabbitai Bot commented Jul 26, 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: 20 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 Plus

Run ID: 57b7c355-3f6a-4bf0-95ef-6893b036cdaf

📥 Commits

Reviewing files that changed from the base of the PR and between fcb9a89 and e381678.

📒 Files selected for processing (2)
  • deployment/aliyun/test-polymarket-raw-ops-control-plane.sh
  • rust_hft/tools/collector/src/polymarket_parity.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/polymarket-parity-context-fix-326

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 merged commit 9b42fe8 into main Jul 26, 2026
38 checks passed
@proerror77
proerror77 deleted the codex/polymarket-parity-context-fix-326 branch July 26, 2026 16: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.

Fix Polymarket raw parity timestamp semantics for #326

1 participant