Skip to content

Fix authenticated evaluator artifact JSON readback (#424) - #425

Merged
proerror77 merged 1 commit into
mainfrom
codex/authenticated-artifact-readback-424
Jul 28, 2026
Merged

proerror77 merged 1 commit into
mainfrom
codex/authenticated-artifact-readback-424

Conversation

@proerror77

@proerror77 proerror77 commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Change contract

Normalize an authenticated evaluator artifact through the same canonical JSON typed representation used by durable readback before sealing its digest, so a valid artifact remains valid after content-addressed persistence.

Closes #424.

Out of scope

Metric formula changes, explicit metric rounding, repository-wide canonical JSON changes, the #325 three-event fixture, collectors, runtime/deployment, CEX, alpha-harness, and hft-search-kernel.

Dependency / merge order

Base: main at 9d502944eede58508251b31714e58a8c78b10f55.

Merge this PR before rebasing/resuming #325. The original #325 three-task E2E is the dependent post-merge acceptance check.

Focused validation

  • RED before fix, twice: cargo test --locked -p ploy-research --features db evaluator_artifact_digest_survives_canonical_json_readback -- --nocapture failed with held-out evaluator artifact digest mismatch.
  • GREEN after fix: the same test passes through production content-addressed write, bounded verified readback, typed artifact validation, and result receipt validation.
  • cargo test --locked -p ploy-research --features db --lib: 357 passed, 1 database-dependent test ignored.
  • rustfmt --edition 2021 --check crates/ploy-research/src/prediction_mcts_authenticated.rs: passed.
  • git diff --check: passed.
  • cargo clippy --locked -p ploy-research --features db --lib --no-deps -- -D warnings -A clippy::type_complexity: passed. The exact allow covers two unchanged pre-existing lib findings; unscoped --all-targets remains blocked by unrelated existing warnings in examples and binaries.
  • Matt code-review exact range 9d502944...4443c565: Standards 0 findings; Spec 0 findings.

A PRD is unnecessary because #424 is a small, already-specified defect with one trust-boundary behavior and one deterministic regression test.

Rollout / rollback impact

Research artifact identity only. New artifacts receive the synchronized policy identity sha256:76d4afe04854587a2883f06cdcf8a67563853f320630eafb700ef794b5ef9c33; existing mission inputs with the prior policy ID fail closed. Rollback is the single commit and its mechanical BTC/SOL policy digest sync. No live collector or execution state changes.

Summary by CodeRabbit

  • Bug Fixes

    • Improved consistency when creating and validating authenticated prediction results by ensuring their recorded content remains canonical after being saved and reloaded.
    • Added validation coverage to confirm authenticated artifacts retain valid, matching integrity records throughout the readback process.
  • Configuration

    • Updated the search policy snapshots used by the Bitcoin and Solana five-minute prediction-market research configurations.

@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: bcb4f3d0-ed27-4f74-a6b0-d75a50baa37e

📥 Commits

Reviewing files that changed from the base of the PR and between 9d50294 and 4443c56.

📒 Files selected for processing (3)
  • 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/src/prediction_mcts_authenticated.rs

📝 Walkthrough

Walkthrough

The change normalizes authenticated evaluator artifacts through canonical JSON readback, adds a persistence and receipt-validation regression test, and updates pinned search policy snapshot identifiers in the BTC and SOL Polymarket mission examples.

Changes

Authenticated artifact digest stability

Layer / File(s) Summary
Canonical artifact normalization and validation
rust_hft/prediction-markets/crates/ploy-research/src/prediction_mcts_authenticated.rs
AuthenticatedEvaluationArtifact::new canonicalizes its value through JSON deserialization, while a regression test verifies digest preservation after verified readback and successful receipt validation.

Mission snapshot updates

Layer / File(s) Summary
Pinned search policy snapshots
rust_hft/prediction-markets/config/research_missions/polymarket-{btc,sol}-5m.example.json
The BTC and SOL mission examples use new search_policy_snapshot_id values.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately names the main change: fixing authenticated evaluator artifact JSON readback.
Description check ✅ Passed All required sections are present and substantive; only the scope-exception section is implied rather than explicitly labeled.
Linked Issues check ✅ Passed Issue #424's digest-stability fix, regression test, and preserved readback/receipt validation are implemented.
Out of Scope Changes check ✅ Passed The PR stays focused on artifact digest stability; the policy hash sync is directly tied to the new artifact identity.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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/authenticated-artifact-readback-424

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 9455682 into main Jul 28, 2026
38 checks passed
@proerror77
proerror77 deleted the codex/authenticated-artifact-readback-424 branch July 28, 2026 06:10
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.

Make authenticated evaluator artifact digests stable across JSON readback

1 participant