Skip to content

feat(alpha): gate MCTS on immutable CEX baselines - #665

Open
proerror77 wants to merge 4 commits into
mainfrom
codex/cex-ridge-cart-baselines-600
Open

feat(alpha): gate MCTS on immutable CEX baselines#665
proerror77 wants to merge 4 commits into
mainfrom
codex/cex-ridge-cart-baselines-600

Conversation

@proerror77

@proerror77 proerror77 commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Change contract

Require an immutable, content-bound, replay-verified, passing Ridge/CART Gate before the shared MCTS fan-in, then fail closed until the Factor-Bank subset adapter in #601 exists.

Issue relationship

Refs #600

Out of scope

Factor-Bank add/remove/swap MCTS (#601), sealed-holdout evaluation, ACK/OSS execution, and Paper/Shadow/Live.

Dependencies and merge order

Stacked on #664, #668, #663, and #662. Merge last. After the stack lands and this PR is retargeted to main, update the issue relationship to the final completion form.

Focused validation

  • cargo test -p alpha-harness --locked (131 passed)
  • cargo clippy -p alpha-harness --locked -- -D warnings
  • cargo fmt -p alpha-harness -- --check
  • Missing, mismatched, failed, wrong-parent, or replay-invalid Gate evidence rejects before MCTS construction.

Rollout and rollback

Research control-plane admission only. No MCTS search is enabled, and no ACK, OSS, collector, or trading runtime is touched. Roll back independently from producer persistence.

Scope exception

None.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 40be387b-9077-4c10-b793-4e733185f084

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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: 0ea82520d2

ℹ️ 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".

Comment on lines +166 to +168
if gate_revision.registry_kind != CEX_BASELINE_GATE_REGISTRY_KIND
|| gate_revision.revision_id != gate_id
{

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Bind the decoded gate to the frozen revision ID

When a registry row is stored under mission.baseline_artifact_id but contains another valid gate payload, this check accepts it because get_registry_revision(gate_id) already looked up that same key, making gate_revision.revision_id != gate_id ineffective. Since the subsequently decoded gate.gate_id is never compared with the frozen mission ID, validation follows the payload's dependencies and treats the mismatched gate as valid; explicitly require gate.gate_id == gate_id before accepting its evidence.

AGENTS.md reference: AGENTS.md:L38-L41

Useful? React with 👍 / 👎.

Comment on lines +217 to +220
let control_mission: CexResearchMissionArtifactV1 =
serde_json::from_value(control_revision.payload.clone())
.context("MCTS source research mission payload is invalid")?;
control_mission.validate().map_err(anyhow::Error::msg)?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Bind the Factor Bank lineage to its source mission

When a valid Factor Bank shares the runtime dataset and partition but was produced under a different search lineage or GP/screening policy, this validation still accepts it: factor_bank.validate() only checks the bank internally, while control_mission.validate() and the baseline artifact bindings never compare factor_bank.search_lineage_id, gp_policy, screening_policy, or evaluation_policy with the source mission's frozen fields. This allows the fan-in gate to admit factors generated outside the claimed source mission contract; validate those bank-to-mission relationships before accepting the gate.

AGENTS.md reference: AGENTS.md:L40-L41

Useful? React with 👍 / 👎.

@proerror77
proerror77 force-pushed the codex/cex-baseline-producer-600 branch from f45ecb6 to ce90660 Compare August 3, 2026 21:37
@proerror77
proerror77 force-pushed the codex/cex-ridge-cart-baselines-600 branch 2 times, most recently from 4babdca to 5f8e912 Compare August 3, 2026 21:45
@proerror77
proerror77 force-pushed the codex/cex-baseline-producer-600 branch from ce90660 to 58be6af Compare August 3, 2026 21:45
@proerror77
proerror77 force-pushed the codex/cex-ridge-cart-baselines-600 branch from 5f8e912 to 635f7fc Compare August 3, 2026 21:49
@proerror77
proerror77 force-pushed the codex/cex-baseline-producer-600 branch 2 times, most recently from 1ccbddf to 4b459bf Compare August 3, 2026 21:51
@proerror77
proerror77 force-pushed the codex/cex-ridge-cart-baselines-600 branch from 635f7fc to 77ca38c Compare August 3, 2026 21:51
@proerror77
proerror77 force-pushed the codex/cex-baseline-producer-600 branch from 4b459bf to ce801b4 Compare August 3, 2026 22:02
@proerror77
proerror77 force-pushed the codex/cex-ridge-cart-baselines-600 branch from 77ca38c to 6069b83 Compare August 3, 2026 22:02
@proerror77
proerror77 force-pushed the codex/cex-baseline-producer-600 branch from ce801b4 to 5a4811a Compare August 3, 2026 22:08
@proerror77
proerror77 force-pushed the codex/cex-ridge-cart-baselines-600 branch from 6069b83 to 71714cf Compare August 3, 2026 22:08
@proerror77
proerror77 force-pushed the codex/cex-ridge-cart-baselines-600 branch from 71714cf to fb6f892 Compare August 3, 2026 22:25
@proerror77
proerror77 force-pushed the codex/cex-baseline-producer-600 branch from 5a4811a to 0d36b4a Compare August 3, 2026 22:25
Base automatically changed from codex/cex-baseline-producer-600 to main August 3, 2026 22:30
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.

1 participant