Skip to content

Publish immutable event-local Polymarket candidate evidence #336

Description

@proerror77

Parent

#314

Change contract

For each explicit market_id whose source is closed and whose source triplet identity has passed the existing authentication policy, publish an event-local, content-addressed, no-clobber candidate data / manifest / _SUCCESS triplet containing only rows that actually exist. The candidate manifest records actual counts, including zero, for all five evidence surfaces and is explicitly an untrusted producer carrier, never a Ready decision.

Acceptance criteria

  • Non-Ready source-closed events publish a candidate triplet instead of qualification JSON alone; complete Ready events keep the existing strict v2/v3 path.
  • Candidate normalization reuses the existing event-local authenticated segment selection, row extraction, canonical ordering, digesting, and no-clobber publication paths.
  • Candidate evidence contains one exact market_id, contract, symbol/window, and Up/Down token pair; a complete sibling cannot fill or alter a partial event.
  • All five surface counts are explicit, including zero; missing book/trade/reference/settlement rows are neither synthesized nor inferred from request status.
  • Any completion row that is present must satisfy the existing identity/digest contract; contradictory present rows fail closed.
  • Actual candidate content and manifest digests are bound into the producer qualification bytes before publication.
  • Same-byte replay is Unchanged; conflicting bytes at the same immutable path fail closed.
  • Focused tests cover missing one-sided book, trade completion, reference, and settlement; sibling isolation; same-byte replay; and no-clobber conflict.

Blocked by

#318 (merged)

Out of scope

Independent Ready/Partial/Rejected verification, catalog receipts or queries, OSS acquisition/downloader behavior, snapshot/cohort construction, evaluator/MCTS behavior, and deployment.

Merge order

This issue must merge before the candidate verifier issue and #319. It is an independent collector rollback unit.

Focused validation

cargo test -p hft-collector --locked polymarket_evidence_artifact::tests::source_closed_partial_events_publish_candidate_triplets_without_ready
cargo test -p hft-collector --locked polymarket_evidence_artifact::tests::candidate_triplets_are_event_local_and_no_clobber
cargo test -p hft-collector --locked polymarket_research_normalize::tests::candidate_normalization_preserves_zero_missing_surfaces_without_rows

Rollout / rollback impact

No runtime cutover in this issue. Rollback removes candidate publication while leaving the existing complete evidence path unchanged.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestready-for-agentFully specified and safe for an autonomous agent

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions