feat(research): allow baseline-only prediction missions - #156
Conversation
📝 WalkthroughWalkthroughThe PR updates BTC and SOL Polymarket mission policy snapshot identifiers and adds baseline-only search-budget validation. Tests verify invalid budget combinations and confirm baseline-only runs execute once without proposal or LLM-call activity. ChangesBaseline-only mission execution
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant run_or_resume
participant validate_prediction_mission
participant baseline_evaluator
participant proposal_client
participant loop_state
run_or_resume->>validate_prediction_mission: validate baseline-only budget
validate_prediction_mission-->>run_or_resume: accept valid budget
run_or_resume->>baseline_evaluator: execute baseline once
run_or_resume-->>proposal_client: no proposal call
run_or_resume->>loop_state: persist BudgetExhausted terminal state
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 |
40f68f1 to
fd4804d
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 40f68f1bd4
ℹ️ 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 mission.search_budget.max_candidates == 0 | ||
| || mission.search_budget.max_llm_calls == 0 | ||
| || mission.search_budget.max_seconds == 0 | ||
| if mission.search_budget.max_seconds == 0 { |
There was a problem hiding this comment.
Refresh the checked-in policy snapshot IDs
Because prediction_policy_sources() hashes this entire file (lines 293–294), this edit changes the current policy ID from the templates' sha256:5d1512… to sha256:cdacb8…, but neither checked-in BTC/SOL mission JSON was updated. Consequently, the existing test at lines 4015–4018 fails, and operators using either template will be rejected by validate_prediction_mission for a stale search_policy_snapshot_id; update both template IDs alongside this hashed policy change.
Useful? React with 👍 / 👎.
Change contract
Allow an exact
max_candidates=0,max_llm_calls=0, positive-time prediction mission to execute its governed baseline exactly once and terminate before any proposal/LLM call.Out of scope
Evaluator/report artifact changes, cohort windowing, candidate replay, live trading, and any relaxation of governed positive search budgets.
Dependencies and merge order
None. This focused PR is based on current
mainatc4870199and may merge independently.Focused validation
0/N,N/0) budgets and0/0/0remain fail-closed.cargo fmt --package ploy-researchandgit diff --check: pass.Rollout and rollback
No live execution impact. Baseline-only behavior is opt-in through an exact zero/zero budget; rollback is reverting this commit to restore the previous positive-only validation.
Scope exception
None.
Summary by CodeRabbit
New Features
Bug Fixes