Skip to content

ops(v2.10+): freeze model/policy promotion, effective-period registry, rollback, and live decision provenance #716

Description

@dmidlo

Parents: #605 #712 #713 #714
Related: #632#646 #681 #693 #697 #698 #710#714

Problem

The project now has contracts for training, preprocessing, model selection, offline/online parity, live validity, and score-to-action policy. What is still missing is one canonical deployment/promotion/rollback registry proving which exact model-policy-feature stack was active for every live decision and allowing deterministic rollback without rewriting historical deployment identity.

A rollback is not 'changing history back'. It is a new effective-period deployment event selecting a previously qualified artifact stack from that point forward.

Immutable deployment identity

Define LiveDeploymentV1 carrying at least:

Any scientifically material change creates a successor deployment identity even if model weights are unchanged.

Effective-period function

For deployment intervals D_i=[a_i,b_i), define active deployment

d(t) = unique i such that a_i <= t < b_i.

Certified live operation requires at most one active decision-authority deployment for each account/universe scope at any timestamp unless an explicit experiment/shadow policy allows multiple non-authoritative deployments.

Container planning fixture with intervals [0,10)->A, [10,20)->B, [20,30)->A_rollback gives deterministic ownership: t=5 -> A, t=10 -> B, t=20 -> A_rollback.

This half-open ownership rule must be consistent with #694/#701 ordering semantics.

Promotion stages

Support separately versioned stages such as:

  1. candidate: qualified offline artifact only;
  2. shadow: receives live features but cannot create authoritative orders;
  3. canary: bounded account/notional/instrument scope;
  4. limited: expanded but capped production scope;
  5. active: normal authorized scope;
  6. disabled: no new decisions;
  7. superseded: retained historical identity.

Promotion criteria must be frozen before observing promotion outcomes where those outcomes would otherwise become selection evidence.

Rollback semantics

Rollback must:

  • select a previously qualified deployment stack or a separately qualified emergency-safe policy;
  • create a new effective-period record;
  • never overwrite the interval during which the superseded deployment actually ran;
  • preserve existing orders/positions under an explicit transition policy;
  • preserve lineage linking triggering evidence, rollback decision, predecessor and successor;
  • remain reproducible in replay.

If model B ran from 10:00 to 10:05 and then rollback selects model A, historical replay must still show B as authoritative in [10:00,10:05) and A again only from rollback effective time onward.

Position/order transition policy

Deployment switches must explicitly define handling for:

  • open positions created by predecessor;
  • pending orders;
  • trailing stops/targets;
  • account state/checkpoints;
  • strategy/decision hysteresis;
  • partial fills in flight;
  • financing/margin state;
  • model-specific state unavailable to successor.

Allowed policies may include inherit_and_manage, cancel_pending_keep_positions, flatten_then_switch, or a separately frozen transition operator. No implicit reset-to-flat.

Promotion evidence

Before authoritative promotion require, as applicable:

An issue being closed is not deployment evidence; retain machine-readable receipts.

Live decision provenance

Every authoritative prediction/action/order must retain or resolve to:

  • deployment ID;
  • model ID;
  • decision-policy ID;
  • feature snapshot/lineage root;
  • validity state;
  • account/risk state;
  • execution-policy identity;
  • broker/plugin/capture identity;
  • exact effective timestamp/order sequence.

Given a historical live order, the system must be able to reconstruct the exact active stack without consulting mutable 'current model' configuration.

Rollback triggers

Triggers may include:

Do not use future realized P&L as if it were contemporaneously known when replaying why a rollback happened; trigger evidence obeys #694 availability semantics.

Canary/traffic allocation

If multiple deployments run simultaneously for experiment/shadow purposes, distinguish decision_authority=false shadow from authoritative allocation.

For authoritative randomized/deterministic allocation across deployment candidates, the routing policy itself requires a stable identity and evidence-unit ownership so outcomes cannot be cherry-picked after the fact. Protected-evaluation/multiple-testing rules from #698 apply.

Rollback correctness metrics

At minimum report:

  • time from trigger-available-at to rollback effective time;
  • number/notional of actions emitted after trigger but before rollback;
  • unresolved pending orders at transition;
  • position/exposure discontinuity attributable to switch;
  • replay mismatch rate;
  • orphan decisions lacking deployment identity.

Acceptance target for orphan authoritative decisions is zero.

Negative controls

Certification must fail/flag:

  • mutable current_model config used as sole historical provenance;
  • rollback overwrites prior model effective interval;
  • model weights unchanged but threshold/policy changed without new deployment identity;
  • serving stack has different preprocessing/schema than promoted receipt;
  • canary/shadow predictions accidentally route authoritative orders;
  • deployment switch silently drops open positions or pending orders;
  • rollback trigger replay uses future outcome not known at trigger time;
  • two authoritative deployments overlap the same account/scope without explicit routing policy;
  • historical order cannot resolve exact model/policy/feature stack;
  • prior deployment artifacts garbage-collected despite retained live decisions depending on them.

Acceptance

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

    data-qualityData quality assessment checks, reports, and validation workflowsscientific-validationFalsifiability, calibration, leakage, reproducibility, and scientific acceptance gatessynthetic-dataSynthetic data generation, constraints, and validation workflows

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions