Decode typed Polymarket evidence rows - #106
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds an internal Polymarket evidence wire module that validates JSON row schemas, rejects unsupported fields, converts decimal values, and deserializes contract, book, reference, trade, and settlement rows into typed variants. ChangesEvidence wire parser
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Sequence Diagram(s)sequenceDiagram
participant Frame
participant parse_row
participant serde_json
participant RawRow
Frame->>parse_row: JSON byte frame
parse_row->>serde_json: Deserialize JSON value
parse_row->>parse_row: Validate schema and allowed fields
parse_row->>RawRow: Deserialize surface-specific row
🚥 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 |
Change contract
Decode current Polymarket evidence NDJSON into crate-private typed rows and fail closed on stale schemas, derived fields, and unknown fields before semantic verification.
Out of scope
Sealed-triplet semantic verification, public
VerifiedPolymarketEvidenceprojections, research snapshot compilation, OSS selection/download, database import, runtime activation, and deployment.Dependency or merge order
Base:
main. Merge this decoder layer before the dependent semantic-verifier PR. The module remains private and has no runtime consumer in this layer; the narrowly scoped dead-code allowance is removed by the dependent PR.Focused validation
cargo fmt --all -- --checkcargo metadata --locked --no-deps --format-version 1cargo test --locked -p ploy-market-data(12 passed)cargo clippy --locked -p ploy-market-data --all-targets --no-deps -- -D warningscargo check --locked -p ploy-research --bin monday-prediction-researchRollout / rollback impact
No public API or runtime path changes. Rollout only makes the private decoder available to the next stacked layer. Roll back by reverting this PR before or together with its dependent verifier PR.
Summary by CodeRabbit
New Features
Bug Fixes