Skip to content

fix(collector): pin PM tape validator contract for quote_collection_failure - #543

Merged
proerror77 merged 1 commit into
mainfrom
codex/pm-upload-qcf
Aug 1, 2026
Merged

fix(collector): pin PM tape validator contract for quote_collection_failure#543
proerror77 merged 1 commit into
mainfrom
codex/pm-upload-qcf

Conversation

@proerror77

@proerror77 proerror77 commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Change contract

Pin the PM tape upload validator's quote_collection_failure contract with regression tests. No production-code change: investigation (prompted by 14 retained segments on the Tokyo host failing unsupported 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

Dependency / merge order

None. Independent. Merge first among the current batch.

Focused validation

  • 6 new tests in polymarket_upload.rs: recorder-shaped tape with failure records passes (failures excluded from quote counts/coverage), 5 malformed variants fail closed
  • cargo test -p hft-collector --locked: 58 polymarket_upload tests + full suite green

Rollout / rollback impact

None — tests only.

Issue relationship

Refs #533

…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
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@proerror77, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 18fc2e2a-fc75-4ce8-9e68-2392d6fa1953

📥 Commits

Reviewing files that changed from the base of the PR and between 322372e and 2e79ac6.

📒 Files selected for processing (1)
  • rust_hft/tools/collector/src/polymarket_upload.rs

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@proerror77
proerror77 merged commit 1baa21c into main Aug 1, 2026
40 of 42 checks passed
@proerror77
proerror77 deleted the codex/pm-upload-qcf branch August 1, 2026 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant