Skip to content

fix(polymarket): preserve exact manifest float round trips - #294

Merged
proerror77 merged 1 commit into
mainfrom
codex/polymarket-float-roundtrip-292
Jul 23, 2026
Merged

proerror77 merged 1 commit into
mainfrom
codex/polymarket-float-roundtrip-292

Conversation

@proerror77

Copy link
Copy Markdown
Owner

Change contract

Ensure hft-collector parses serialized floating-point manifest values through serde_json round-trip precision so exact producer-versus-bound-FD equality remains fail-closed without accepting an epsilon.

A PRD is unnecessary because issue #292 defines one dependency-feature behavior and one production-derived counterexample; implementation followed Matt TDD.

Acceptance evidence

  • Red proof before the fix: parsing 0.9340463458110517 produced 0.9340463458110516, while 1048 / 1122 produced 0.9340463458110517.
  • Green proof: the same focused test passes after enabling serde_json/float_roundtrip for hft-collector.
  • Importer strict Value equality and the quality formula are unchanged; no epsilon is accepted.
  • cargo test -p hft-collector: 211 passed, 2 ignored; all binary suites passed.
  • cargo clippy -p hft-collector --all-targets --no-deps -- -D warnings: passed.
  • Changed-file rustfmt and git diff --check: passed.
  • Workspace/package fmt has unrelated pre-existing drift in polymarket-raw-ops.rs and polymarket_raw.rs; this PR does not absorb it.
  • Matt code review: Standards PASS; Spec behavior PASS. Exact-main cloud proof remains the declared post-merge gate.

Out of scope

Approximate float equality; changing manifest schema or quality formula; unrelated formatting cleanup; collector deployment; data rewrapping; snapshot/evaluator logic.

Dependency / merge order

Depends only on merged #291 diagnostics. Merge this PR, publish one exact-main compiler image, then rerun the unchanged #270 triplet.

Focused validation

Production-derived 1-ULP counterexample, full hft-collector tests, strict Clippy, changed-file formatting, and two-axis code review.

Rollout / rollback impact

Dependency-feature-only parsing correction inside hft-collector. Rollback restores the false rejection; strict accepted-data semantics otherwise remain unchanged.

Closes #292

@coderabbitai

coderabbitai Bot commented Jul 23, 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: 39 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: 43f18da0-2324-4489-b598-8d2e9f9435ba

📥 Commits

Reviewing files that changed from the base of the PR and between 4201492 and 66ae828.

📒 Files selected for processing (2)
  • rust_hft/tools/collector/Cargo.toml
  • rust_hft/tools/collector/src/polymarket_research_import.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/polymarket-float-roundtrip-292

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 6698ff4 into main Jul 23, 2026
30 of 32 checks passed
@proerror77
proerror77 deleted the codex/polymarket-float-roundtrip-292 branch July 23, 2026 20:57
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.

Preserve exact Polymarket manifest float round trips

1 participant