Skip to content

feat(research): derive immutable event cohort partition - #362

Merged
proerror77 merged 4 commits into
mainfrom
codex/event-cohort-partition-322-v2
Jul 26, 2026
Merged

feat(research): derive immutable event cohort partition#362
proerror77 merged 4 commits into
mainfrom
codex/event-cohort-partition-322-v2

Conversation

@proerror77

@proerror77 proerror77 commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Closes #322

Change contract

Derive one immutable EventCohortPartition only from #319’s complete authenticated PolymarketReadyEventCatalog projection. 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 no ResearchSnapshot input. 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

  • PASS: cargo fmt --check -p ploy-research
  • PASS: cargo test -p ploy-research event_cohort_partition::tests --no-default-features (8/8)
  • PASS: cargo test -p ploy-research prediction_loop::tests::checked_in_btc_and_sol_templates_pin_current_brief_and_rust_policy --no-default-features
  • PASS: cargo 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.

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a deterministic EventCohortPartition for validated Polymarket ready-event catalogs, including boundary-based market assignment, canonical SHA-256 identity, validation, accessors, tests, and public crate re-exports.

Changes

Event cohort partitioning

Layer / File(s) Summary
Partition contracts and receipt validation
rust_hft/prediction-markets/crates/ploy-research/src/event_cohort_partition.rs
Defines partition types and validates receipt state, SHA-256 identity, market IDs, and reference-path windows.
Assignment and partition digest
rust_hft/prediction-markets/crates/ploy-research/src/event_cohort_partition.rs
Classifies markets around the common boundary, rejects duplicates, and computes a canonical partition digest.
Public API wiring and behavioral tests
rust_hft/prediction-markets/crates/ploy-research/src/lib.rs, rust_hft/prediction-markets/crates/ploy-research/src/event_cohort_partition.rs
Registers and re-exports the module, with tests covering assignments, digest changes, validation errors, and boundary behavior.

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
Loading

Possibly related issues

Possibly related PRs

  • proerror77/monday#348 — Provides the verified ready-event catalog and deterministic receipt identity consumed by this partition.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR implements the shared deterministic partition artifact, digest binding, validation, and boundary exclusion required by #322.
Out of Scope Changes check ✅ Passed The changes stay focused on the new partition artifact and its public re-export, with no unrelated code paths introduced.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title is concise and accurately summarizes the main change.
Description check ✅ Passed The description covers the template's core sections and validation details, with only minor heading differences and a missing none-style scope note.
✨ 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/event-cohort-partition-322-v2

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

@proerror77
proerror77 merged commit e337b4e into main Jul 26, 2026
38 checks passed
@proerror77
proerror77 deleted the codex/event-cohort-partition-322-v2 branch July 26, 2026 03: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.

Use one immutable common-time event partition across Polymarket research tasks

1 participant