fix(collector): pin PM tape validator contract for quote_collection_failure - #543
Conversation
…ailure Issue #533 reports production PM tape segments rejected with "unsupported update kind 'quote_collection_failure'". The current validator already accepts the recorder's QuoteCollectionFailure shape (fail-closed per-field checks on request_status/collection_result, request_started_at/ts timing, error_kind allowlist, and the error_kind/http_status pairing), so this change pins that contract with regression tests reproducing the production scenario: - a tape mixing quotes and quote_collection_failure passes validation, and failure records count as request attempts/failures but never as quotes in event_types, quality counters, or quote coverage fields; - malformed failure records (missing explicit status, unknown error_kind, invalid http_status pairing, inverted request timing, missing token_id) still fail closed. Refs #533
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
Next review available in: 59 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 (1)
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
Pin the PM tape upload validator's
quote_collection_failurecontract with regression tests. No production-code change: investigation (prompted by 14 retained segments on the Tokyo host failingunsupported update kind 'quote_collection_failure'since 2026-07-30T22:00) found the validator at main already supports the kind — the deployed host binary predates #239. This PR adds the missing regression coverage so the contract can't silently regress.Out of scope
validate_reference_tape_for_recovery) deliberately unchanged — quote kinds can never legitimately appear in reference tapesDependency / merge order
None. Independent. Merge first among the current batch.
Focused validation
polymarket_upload.rs: recorder-shaped tape with failure records passes (failures excluded from quote counts/coverage), 5 malformed variants fail closedcargo test -p hft-collector --locked: 58 polymarket_upload tests + full suite greenRollout / rollback impact
None — tests only.
Issue relationship
Refs #533