Skip to content

fix(research): preserve checkpoint float identity - #429

Merged
proerror77 merged 1 commit into
mainfrom
codex/mcts-checkpoint-float-roundtrip-428
Jul 28, 2026
Merged

fix(research): preserve checkpoint float identity#429
proerror77 merged 1 commit into
mainfrom
codex/mcts-checkpoint-float-roundtrip-428

Conversation

@proerror77

@proerror77 proerror77 commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Change contract: Enable exact f64 JSON roundtrips for ploy-research checkpoint state and atomically refresh the governed policy identity and BTC/SOL mission pins so a freshly written checkpoint survives typed readback.

Out of scope: Checkpoint schema, evaluator semantics, cohort or projection logic, collector/runtime, hft-search-kernel, CEX, alpha-harness, and the #325 E2E fixture.

Dependency / merge order: This is the sole predecessor to #325. Merge #428 first; only then rebase and promote #325.

Focused validation:

  • cargo test --locked -p ploy-research prediction_mcts_run::tests --lib (19 passed)
  • cargo test --locked -p ploy-research prediction_policy_identity --lib (3 passed)
  • cargo test --locked -p ploy-research checked_in_btc_and_sol_templates --lib (1 passed)
  • cargo clippy --locked -p ploy-research --no-deps -- -D warnings -A clippy::type_complexity
  • rustfmt check and git diff --check
  • Two independent read-only committed-range reviews: no findings

TDD note: A PRD is unnecessary because this is a small, already-specified defect. The counterexample proves that -1.9089014592447406 changed one ULP under the prior serde_json feature graph and now preserves exact to_bits identity.

Rollout / rollback impact: Dependency-feature-only research correctness change. Rollback restores the known false corruption rejection for valid checkpoint metrics and requires reverting the refreshed policy graph and mission pins atomically.

Closes #428

Summary by CodeRabbit

  • Configuration

    • Updated Bitcoin and Solana short-term research mission configurations to use refreshed search policy snapshots.
  • Reliability

    • Improved consistency when handling floating-point research data.
  • Tests

    • Updated training evidence values and expanded validation for checkpoint rewards, including precise serialization and round-trip checks.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 91d1316d-85eb-4fe8-8d5c-4248f0ea7998

📥 Commits

Reviewing files that changed from the base of the PR and between 82b8f7e and 5eeac4d.

📒 Files selected for processing (6)
  • rust_hft/prediction-markets/config/research_missions/polymarket-btc-5m.example.json
  • rust_hft/prediction-markets/config/research_missions/polymarket-sol-5m.example.json
  • rust_hft/prediction-markets/crates/ploy-research/Cargo.toml
  • rust_hft/prediction-markets/crates/ploy-research/prediction-policy-dependencies.linux.sha256
  • rust_hft/prediction-markets/crates/ploy-research/prediction-policy-dependencies.linux.txt
  • rust_hft/prediction-markets/crates/ploy-research/src/prediction_mcts_run.rs

📝 Walkthrough

Walkthrough

The PR enables exact serde_json floating-point round-tripping for MCTS checkpoint data, updates dependency metadata and test evidence, and replaces the pinned search-policy snapshot identifiers for the BTC and SOL five-minute missions.

Changes

Prediction policy and checkpoint precision

Layer / File(s) Summary
Exact checkpoint float round-trip
rust_hft/prediction-markets/crates/ploy-research/Cargo.toml, rust_hft/prediction-markets/crates/ploy-research/prediction-policy-dependencies.linux.*, rust_hft/prediction-markets/crates/ploy-research/src/prediction_mcts_run.rs
Enables the serde_json float_roundtrip feature, updates recorded dependency metadata, changes training metrics, and verifies exact checkpoint_reward preservation through JSON round-tripping.
Mission snapshot pin updates
rust_hft/prediction-markets/config/research_missions/polymarket-*-5m.example.json
Replaces the search_policy_snapshot_id values for the BTC and SOL five-minute research missions.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • proerror77/monday#412: Both changes update prediction MCTS selection-evidence tests and checkpoint-related behavior.
  • proerror77/monday#76: Both update pinned prediction-policy artifacts and mission snapshot references.
  • proerror77/monday#425: Both update the BTC and SOL five-minute mission snapshot identifiers.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the float roundtrip fix in ploy-research.
Description check ✅ Passed The description covers the contract, scope, dependencies, validation, and rollback, with only the optional scope-exception section omitted.
Linked Issues check ✅ Passed The changes match #428 by enabling exact f64 JSON roundtrips, updating checkpoint readback assertions, and keeping the scope limited to dependency behavior.
Out of Scope Changes check ✅ Passed The mission pin and policy identity refreshes are part of the stated contract, and no unrelated subsystem changes are present.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/mcts-checkpoint-float-roundtrip-428

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 deb8447 into main Jul 28, 2026
38 checks passed
@proerror77
proerror77 deleted the codex/mcts-checkpoint-float-roundtrip-428 branch July 28, 2026 07:28
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.

Fail closed: preserve exact f64 values across MCTS checkpoint readback

1 participant