Skip to content

Fail Polymarket shadow Gate before observation when cutover target has control or systemd drift #403

Description

@proerror77

Change contract

Before a Polymarket Rust shadow Gate starts its long observation, fail closed when production cutover target state would later reject promotion; re-run the same read-only target-state checks before the cutover transition begins.

Confirmed failure

A complete 4201-second Gate passed, but promotion failed first on an incomplete /opt/monday/control/polymarket-raw-ops directory and then on a runtime DropInPaths entry for polymarket-market-tape-upload.service. Those states predated the Gate but were only checked during cutover. The second failure triggered rollback and changed the immutable baseline PID, forcing another full Gate.

Focused red proof on exact main 076d58486756bbec2080aa6ee2b0a4db55bae443:

gate_preflight= gate_start=735 cutover_preflight= cutover_transition=1071
exit=1

Acceptance evidence

  • A focused contract test deterministically rejects an incomplete/empty global control directory.
  • A focused contract test deterministically rejects any production Polymarket unit DropInPaths value.
  • The shadow Gate calls the preflight before starting the shadow service or its observation clock.
  • Cutover repeats the preflight before transition_started=true.
  • Clean legacy-Python and governed Rust-baseline fixtures remain accepted.
  • Existing Polymarket control-plane tests and shellcheck pass.

Out of scope

Collector data logic, Gate duration, PID/InvocationID binding, immutable evidence policy, snapshot/research logic, #235 raw CLOB temporal completeness, and production cutover itself.

Rollout / rollback

This changes only deployment-control ordering. Rollback is reverting the control scripts; it must not relax fail-closed checks.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions