fix(research): scope evidence completeness to requested symbols - #269
Conversation
|
Warning Review limit reached
Next review available in: 51 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe Polymarket evidence aggregator now accepts requested symbol sets, validates exact per-slot membership, and preserves default BTC/SOL behavior. The snapshot verifier passes requested symbols into aggregation, while BTC and SOL mission configurations receive new policy snapshot identifiers. ChangesPolymarket symbol-scoped verification
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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.
🧹 Nitpick comments (1)
rust_hft/prediction-markets/crates/ploy-market-data/src/polymarket_evidence/set.rs (1)
78-101: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd negative-path tests for requested-symbol validation.
The new public API has separate empty, duplicate, and unsupported-symbol rejection branches, but the added test covers only successful BTC-only aggregation. Add focused tests for each rejection and for SOL-only input to protect the new contract.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@rust_hft/prediction-markets/crates/ploy-market-data/src/polymarket_evidence/set.rs` around lines 78 - 101, Add focused tests for aggregate_verified_polymarket_evidence_for_symbols covering empty required_symbols, duplicate symbols, and unsupported symbols, asserting each returns an error. Also add a SOL-only aggregation success test, alongside the existing BTC-only case, to verify valid single-symbol requests.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In
`@rust_hft/prediction-markets/crates/ploy-market-data/src/polymarket_evidence/set.rs`:
- Around line 78-101: Add focused tests for
aggregate_verified_polymarket_evidence_for_symbols covering empty
required_symbols, duplicate symbols, and unsupported symbols, asserting each
returns an error. Also add a SOL-only aggregation success test, alongside the
existing BTC-only case, to verify valid single-symbol requests.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 70fe1309-3203-438f-be37-c96f88d10924
📒 Files selected for processing (4)
rust_hft/prediction-markets/config/research_missions/polymarket-btc-5m.example.jsonrust_hft/prediction-markets/config/research_missions/polymarket-sol-5m.example.jsonrust_hft/prediction-markets/crates/ploy-market-data/src/polymarket_evidence/set.rsrust_hft/prediction-markets/crates/ploy-research/src/bin/monday-prediction-snapshot.rs
Change contract
Allow the governed snapshot compiler to aggregate an independently verified Polymarket evidence set against the exact requested research symbol set, while preserving the existing default BTCUSDT plus SOLUSDT completeness contract and all fail-closed slot, identity, overlap, digest, token, trade, and settlement checks.
Out of scope
Collector changes; evidence mutation or SOL backfill; snapshot model semantics; evaluator/MCTS; deployment configuration; Paper or Live.
Dependency / merge order
Independent focused defect discovered by #232. Merge before retrying #232. Closes #268.
Focused validation
cargo test --locked -p ploy-market-data(54 passed)cargo test --locked -p ploy-research --features db --bin monday-prediction-snapshot(7 passed)git diff --checkRollout / rollback impact
Research-only verifier context. Revert restores the hard-coded two-symbol aggregate and the known BTC-only rejection; no stored evidence is changed.
Why no PRD
This is a small, already-reproduced mismatch between the snapshot CLI single-symbol invariant and evidence-set aggregation, so Matt TDD is the direct workflow.
Summary by CodeRabbit
New Features
Bug Fixes