feat(alpha): gate MCTS on immutable CEX baselines - #665
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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: 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".
| if gate_revision.registry_kind != CEX_BASELINE_GATE_REGISTRY_KIND | ||
| || gate_revision.revision_id != gate_id | ||
| { |
There was a problem hiding this comment.
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 👍 / 👎.
| 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)?; |
There was a problem hiding this comment.
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 👍 / 👎.
f45ecb6 to
ce90660
Compare
4babdca to
5f8e912
Compare
ce90660 to
58be6af
Compare
5f8e912 to
635f7fc
Compare
1ccbddf to
4b459bf
Compare
635f7fc to
77ca38c
Compare
4b459bf to
ce801b4
Compare
77ca38c to
6069b83
Compare
ce801b4 to
5a4811a
Compare
6069b83 to
71714cf
Compare
71714cf to
fb6f892
Compare
5a4811a to
0d36b4a
Compare
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
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.