Skip to content

fix(polymarket): bind legacy Gate freshness to completed health writes #418

Description

@proerror77

Change contract: The Polymarket shadow Gate must admit a clean legacy Python health snapshot by a fresh, stable atomic file write while preserving exact payload timestamps, strict post-start last_success_at advancement, PID identity, full observation window, and immutable evidence binding.

Acceptance evidence:

  • A focused counterexample reproduces the current production shape: a health file freshly written at cycle completion whose updated_at/last_success_at denote a cycle start more than 240 seconds earlier.
  • The Gate accepts that fresh completed write, but rejects an old file write, future payload timestamps, an unchanged post-start last_success_at, an unbound completion observation, and an inflated parity cutoff.
  • deployment/aliyun/test-polymarket-raw-ops-control-plane.sh passes.
  • Two-axis Standards and Spec review have no unresolved high-priority findings.

Out of scope: Collector/snapshot/research logic, #235, parity semantics, observation duration, PID/restart identity, OSS readback, production cutover, and weakening fail-closed evidence.

Dependency / merge order: Base exact-main b199e1c (PR #417). Merge before rebuilding the next exact-main release artifact.

Rollout / rollback impact: Rebuild the fixed Rust/control artifact and run a new full 3600+601 second Gate. Reverting restores the prior payload-age freshness rule.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions