feat(research): derive immutable event cohort partition - #362
Conversation
📝 WalkthroughWalkthroughAdds a deterministic ChangesEvent cohort partitioning
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Catalog
participant Partition
participant Digest
Catalog->>Partition: provide ready event catalog and boundary
Partition->>Partition: validate and classify entries
Partition->>Digest: serialize canonical partition payload
Digest-->>Partition: return sha256 identity
Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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: 8e6848b45f
ℹ️ 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".
Closes #322
Change contract
Derive one immutable
EventCohortPartitiononly from #319’s complete authenticatedPolymarketReadyEventCatalogprojection. Its digest binds ordered ready receipt identity, market ID, reference-path window, verified settlement-label availability, the independent label-availability cutoff, the versioned causal projection policy identity, common boundary, and exactly-one cohort assignment; it has noResearchSnapshotinput. The cutoff is the first retained held-out decision (or the common boundary when none is retained), and train assignment fails closed when the official settlement label is unavailable at that cutoff. The causal policy identity explicitly fingerprints the partition source alongside the controlled policy sources.Out of scope
Evaluator metrics, MCTS/search policy behavior, snapshot construction, collector/runtime/deployment, and Mission schema. The two checked-in mission templates are updated only to synchronize their existing policy identity with the intentional controlled-policy source change.
Dependency / merge order
Base:
fe48eab78a683ceece835863a91a58890cc6d967(main). #348 is merged and supplies the #319 authenticated ready-event catalog. #321 is closed. No stacked PR.Focused validation
cargo fmt --check -p ploy-researchcargo test -p ploy-research event_cohort_partition::tests --no-default-features(8/8)cargo test -p ploy-research prediction_loop::tests::checked_in_btc_and_sol_templates_pin_current_brief_and_rust_policy --no-default-featurescargo test -p ploy-research --lib --no-default-features(305/305)Rollout / rollback impact
No runtime or collector rollout. Consumers must opt in to the new artifact. Roll back by reverting these four commits; no persisted state or execution authority changes.