An Evidence Ledger for AI Rollouts: Shadow Runs, Exposure, and Delayed Outcomes
Ship AI workflow changes with a release evidence ledger that distinguishes mirrored tests from real exposure, blocks unsafe side effects, and reconciles delayed quality signals.
On this page
A production rollout of an AI workflow creates three kinds of evidence that are easy to mistake for one another: what the *candidate might have done* on mirrored input, what it *actually did* for an exposed user, and what the user or business system *eventually observed*. These have different meanings and arrive on different clocks.
I would not reduce them to one “online evaluation score.” Instead, I would make the release evidence ledger a first-class service: each decision to widen, pause, or stop an AI release cites immutable records of eligible requests, treatment assignment, real exposure, evaluator coverage, safety outcomes, and delayed product events.
This matters when a deployment passes its offline tests yet changes behavior under live workloads. The underlying SRE concept is well established: Google's canarying chapter describes comparing a small release population with a control, choosing representative metrics, and monitoring the release rather than the service-wide average. The AI-specific challenge is that an HTTP 200 can contain a subtly bad answer, an agent can create side effects, and useful outcomes may arrive after the rollout decision.
This is a proposed architecture, not a report of a measured improvement or a real incident. The example is a supplier-onboarding assistant in a multi-tenant procurement system. It reviews uploaded company documents, suggests missing requirements, and may propose a supplier verification request. The user remains responsible for consequential approvals.
My earlier articles cover CI evaluation gates, keeping evaluation sets representative, and reliability SLOs. Here the new subject is the *provenance and comparability of online release evidence*.
Build the ledger before selecting a rollout percentage
A release controller cannot responsibly act on “candidate quality 0.87” without knowing what was evaluated. At minimum, I would bind every observation to:
| Identity | Required meaning |
|---|---|
| Release candidate | Code, prompt, model, tool schemas, retrieval policy, and evaluator configuration |
| Eligible population | Requests that could have reached either variant under the declared exposure rules |
| Assignment unit | Tenant, user, conversation, or another stable entity; state why it is used |
| Actual exposure | Which version produced the user-visible result—not merely which version was assigned |
| Observation status | Completed, missing, late, filtered, or invalid, with the relevant time window |
| Evaluation version | Judge/policy version, score meaning, approved input scope, and sampling method |
| Outcome reference | Verified downstream event attached to its originating exposure |
| Decision | Stop, hold, expand, or escalate, tied to exact evidence and policy revisions |
An assignment is not the same as an exposure. A feature flag may select a candidate, but provider failure can route the request to the incumbent. A user may leave before the response completes. A queued evaluator can fail to run. Those cases change the denominator and must not disappear from the release report.
Likewise, a model-based score is a measurement, not a ground-truth label. If a customer later completes supplier onboarding, that is a separate observed product event, not something the judge inferred from prose.
Three clocks, three different questions
The pipeline has separate stages that must not inherit each other's claims:
~~~text [Protected release manifest + risk policy] | [Eligible request ledger] | [Stable assignment / eligibility] / \ [Incumbent] [Candidate] | | +---[Real exposure]---+ | | User-visible output + validated actions | [Deterministic safety and contract checks] | [Privacy-approved, sampled semantic evaluator] | [Time-bounded release evidence] | [Hold / stop / expand gate] | [Delayed user and business outcome events] | [Reconciliation + next evaluation release]
Optional shadow branch: copies approved inputs, has NO write authority, and is never counted as a real user-visible exposure. ~~~
Clock one: immediate system evidence. Request failures, schema validity, policy denial, tool execution, end-to-end latency, and spending are usually available near completion. These are important safety and availability signals, but they do not prove answer quality.
Clock two: evaluator evidence. A bounded background judge or deterministic reference check produces a score later. It may be sampled; it may be unavailable because the input could not be released to the evaluator. The result needs its own freshness, coverage, and confidence metadata.
Clock three: real outcomes. A supplier may be approved days later, a document may be corrected after review, or a user may abandon a workflow. Such events can validate whether earlier online signals were useful, but are not guaranteed to mature during a short canary. Do not backfill them into a past release decision as though they were known then.
The decision engine must state which evidence can justify immediate stopping, which evidence is sufficient for expansion, and what delayed events must be investigated afterward.
Shadow execution is a simulation of authority, not authority itself
A shadow candidate receives a copy of approved input while the incumbent remains the user-facing system. This is useful for exploring compatibility with live request shapes and comparing *proposed* actions. It is not a license to run the same side effects twice.
Imagine that the supplier assistant suggests request_external_verification after reviewing documents. On the real path, that operation may create a paid verification case. A naive mirrored agent could create a second case while nobody sees its response.
I would make the shadow path a distinct runtime profile:
- Only read operations over a privacy-approved fact snapshot are allowed.
- Write operations are converted into a typed *proposed intent*, never dispatched to the live service.
- The shadow worker receives no production write credentials, no payment authority, and no unrestricted network egress.
- Proposed intent is compared with reference policy, not counted as a completed side effect.
- The mirrored response is withheld from the user and stored only under approved evaluation retention.
A shadow run with write tools stubbed is *not* a faithful rehearsal of write execution. It can show intent differences and some latency or quality changes, but cannot verify downstream write availability, rate limits, real permission propagation, or user reaction.
The Argo Rollouts traffic-management documentation describes traffic mirroring through supported routers, including Istio. Mirroring mechanics are only the traffic layer; application-level write isolation and data authorization remain necessary.
TypeScript: use separate routes for assignment and actual exposure
A small routing function can make cohort membership stable across requests while leaving the ability to observe what actually ran to the execution layer. It uses a server-controlled key and experiment identifier; it does not let an agent pick its own variant.
~~~typescript import { createHmac } from "node:crypto";
type Arm = "control" | "candidate";
type Eligibility = Readonly<{ tenantId: string; principalId: string; conversationId: string; eligible: boolean; riskTier: "standard" | "restricted"; }>;
type Experiment = Readonly<{ id: string; controlVersion: string; candidateVersion: string; candidateBasisPoints: number; // 0..10_000 allowedRiskTier: "standard" | "restricted"; }>;
function assignArm( request: Eligibility, experiment: Experiment, assignmentKey: Uint8Array, ): Arm { if (!request.eligible || !request.tenantId || !request.principalId || !request.conversationId || !experiment.id || !Number.isInteger(experiment.candidateBasisPoints) || experiment.candidateBasisPoints < 0 || experiment.candidateBasisPoints > 10_000 || assignmentKey.length < 16) { throw new Error("assignment-not-allowed"); }
// Restricted flows need their own explicit eligibility decision. if (request.riskTier === "restricted" && experiment.allowedRiskTier !== "restricted") { throw new Error("restricted-population-not-admitted"); }
const stableUnit = JSON.stringify([ experiment.id, request.tenantId, request.principalId, request.conversationId, ]); const digest = createHmac("sha256", assignmentKey) .update(stableUnit) .digest(); const bucket = digest.readUInt32BE(0) % 10_000; return bucket < experiment.candidateBasisPoints ? "candidate" : "control"; } ~~~
This is an illustrative assignment component, not a complete experimentation platform. It assumes the principal and eligibility flags were derived by an authenticated server, the secret key is protected, and the variant versions and percentage come from a protected release manifest.
The modulo bucket has a negligible but nonzero statistical bias, and consistent hashing alone does not solve tenant-level interference. If many requests from one company influence one another, tenant-level assignment may be more appropriate than conversation-level assignment. Choose the randomization unit around the unit of interference and the outcome you intend to measure, not around the most convenient request identifier.
For live execution, persist two independent events: assigned_to_candidate and served_by_candidate (or control, fallback, or none). The release engine must use the correct denominator for the metric. For example, a candidate connection failure that falls back to control remains an operational failure of the assigned candidate route even though the user saw the control response.
Changing the experiment ID or key reshuffles assignments. A production release service needs stable assignment policy and explicit migration semantics. The function also does not authorize writes or decide whether a supplier document may be sent to an evaluator.
A release report needs missingness alongside scores
The common evaluation failure is to report the average of all judged answers while hiding how many eligible answers were never judged.
Suppose a canary evaluates only responses shorter than a certain limit because long responses time out in the judge queue. The remaining sample may look better even if the candidate got worse on complex cases. This is selection bias, not merely a smaller sample.
I would collect coverage for each defined segment—such as workflow type, document language, tenant tier, or request-length band—using an application-owned sampling decision. For every eligible unit, persist whether evaluation was requested, completed, rejected by privacy policy, or missing due to infrastructure failure. Do not make the model response itself decide whether its evaluation is skipped.
The three populations to keep distinct are:
- Eligible: all requests matching the rollout's declared admission rule.
- Exposed: requests where the specified variant actually produced a user-visible result.
- Scored or outcome-labeled: the subset for which a specific evaluator or downstream measurement returned usable evidence.
A quality average belongs to the third population and must carry a coverage statement relative to the population it purports to describe.
When sampling is uneven across segments, either report stratified results or use a documented weighting scheme consistent with the sampling design. Weighting does not automatically repair nonrandom missingness, especially when inputs fail to score because of the behavior being evaluated.
Python: a conservative evidence-admission gate
I would not auto-promote a candidate based solely on an attractive mean quality score. First decide whether the evidence is complete enough, whether a hard safety invariant has failed, and whether the required evaluation segments have matured.
This simplified policy illustrates that ordering:
~~~python from dataclasses import dataclass from typing import Literal
Decision = Literal["stop", "hold", "eligible_for_review"]
@dataclass(frozen=True) class Segment: name: str eligible: int exposed: int selected_for_scoring: int scored: int critical_violations: int known_contract_failures: int
@dataclass(frozen=True) class Policy: minimum_exposures: int minimum_scored: int minimum_scoring_coverage: float
def evaluate_stage( segments: list[Segment], policy: Policy, monitoring_healthy: bool, ) -> tuple[Decision, list[str]]: if not segments or not (0 < policy.minimum_scoring_coverage <= 1): return "hold", ["invalid-policy-or-population"] if policy.minimum_exposures < 1 or policy.minimum_scored < 1: return "hold", ["invalid-sample-minimums"] if len({s.name for s in segments}) != len(segments): return "hold", ["duplicate-segment"]
reasons: list[str] = [] for s in segments: counts = [s.eligible, s.exposed, s.selected_for_scoring, s.scored, s.critical_violations, s.known_contract_failures] if any(n < 0 for n in counts) or ( s.exposed > s.eligible or s.selected_for_scoring > s.exposed or s.scored > s.selected_for_scoring ): return "hold", ["invalid-evidence-counts"] if s.critical_violations > 0: return "stop", [f"critical-invariant:{s.name}"] if s.known_contract_failures > 0: return "stop", [f"contract-failure:{s.name}"]
if s.exposed < policy.minimum_exposures: reasons.append(f"insufficient-exposure:{s.name}") if s.scored < policy.minimum_scored: reasons.append(f"insufficient-scores:{s.name}") if s.selected_for_scoring == 0 or ( s.scored / s.selected_for_scoring < policy.minimum_scoring_coverage ): reasons.append(f"incomplete-scoring:{s.name}")
if not monitoring_healthy: reasons.append("evidence-service-unhealthy")
return ("hold", reasons) if reasons else ( "eligible_for_review", [] )
policy = Policy(100, 20, 0.9) segment = Segment("synthetic", 150, 130, 30, 29, 0, 0) assert evaluate_stage([segment], policy, True)[0] == ( "eligible_for_review" ) assert evaluate_stage( [Segment("synthetic", 150, 130, 30, 29, 1, 0)], policy, True, )[0] == "stop" ~~~
The numbers in the test are synthetic policy inputs, not proposed universal sample requirements or measured production results. The function checks only admission to the next review stage; it does not assess comparative quality or establish statistical non-inferiority. A real release controller additionally needs a prespecified, statistically defensible candidate-versus-control analysis, risk-tier requirements, latency/cost budgets, and authenticated provenance for the evidence records.
Zero observed critical violations do not prove a zero violation rate. For rare harms, a small canary may have little detection power even when all observed examples pass. Define how much risk is permissible, and choose exposure and monitoring accordingly. For events that must never happen, use independent preventive controls, not only statistical monitoring.
One further issue: the early return on a critical violation assumes the report is an authenticated, complete snapshot of the relevant window. The release service must not accept user-submitted counts or an agent-generated claim of evaluator health.
Keep the comparison fair without confusing canaries with experiments
A canary is primarily an operational exposure-control method. It may support causal estimation when the assignment design, population, and analysis are appropriate, but “5% of requests got v2” is not, by itself, a randomized experiment.
A mature release plan should explicitly document:
- What was randomized: request, conversation, user, or tenant.
- Whether variant selection is sticky throughout the user's workflow.
- Whether candidates and controls share mutable memory, caches, search indexes, or external write services.
- Whether the assignment unit matches the unit of the desired product outcome.
- Which segments are allowed into the canary and whether they represent the later rollout population.
- Whether missing scores, delayed outcomes, and fallback requests are attributed correctly.
The Google SRE canarying guide warns about both unrepresentative canary populations and dependencies shared between control and canary. In a generative workflow, shared memory or retrieval state can influence future answers across arms. Keep versioned snapshots and scope state appropriately; otherwise a control comparison may be contaminated.
A high-quality judge score is not equivalent to supplier-onboarding success. If the business question is whether the candidate reduces manual review, run a separate appropriately designed experiment with mature outcomes. Treat those results as an additional decision, not a substitute for safety and correctness gates.
Delayed outcome reconciliation must be designed up front
The supplier workflow may finish its initial response quickly, but the actual review outcome may arrive days later. Each delayed event should join to the original exposure identity and an authoritative version of the business record.
I would store a durable event for supplier review completion, including source timestamp, observed timestamp, outcome class, and whether it is final or corrected. The ledger joins that event to the model version that produced the suggestion. It should not use the current route configuration: that version may have changed since the user interacted with the feature.
This makes late data visible without rewriting history. The release decision recorded at noon might be “eligible for limited expansion based on immediate guardrails.” A later review may discover that the candidate generated more incomplete requests. That is new evidence requiring a follow-up action, not evidence that the earlier decision had somehow already measured the delayed outcome.
Define retention and reconciliation windows around actual business processes. If a supplier can take weeks to complete verification, a one-hour rollout cannot claim verified business success. It may still proceed under a deliberately narrower safety contract if the risk owner accepts that uncertainty.
Observability should measure the evaluator, too
One easy failure is the missing-score illusion: a broken telemetry or evaluation pipeline emits fewer failures, and a dashboard mistakenly interprets silence as improved quality.
I would keep monitoring coverage independent of judged score. Useful operational measurements include:
| Signal | Why it belongs in the gate |
|---|---|
| Eligible and actual exposures per arm | Prevent denominator drift |
| Selected, completed, and delayed evaluations | Detect scoring pipeline coverage loss |
| Unscored-by-policy and unscored-by-failure counts | Separate privacy restrictions from outages |
| Hard invariant violations | Stop unsafe execution regardless of judge opinion |
| Contract and tool errors | Catch behavior invisible in HTTP status alone |
| Model latency and usage per completed workflow | Detect operational degradation and spend |
| Delayed outcome maturity by cohort | Know which business claims are still unresolved |
| Rollback propagation and pending in-flight work | Verify that disabling a release actually limits exposure |
Follow the OpenTelemetry GenAI conventions through a pinned instrumentation profile; the attribute registry has moved to a separate GenAI conventions repository and includes development-stage attributes. Do not hard-code a dashboard around a field that can change unnoticed. I discuss that separately in telemetry schema migration tests.
Store only approved metadata in standard spans: release ID, arm, tool class, evaluator profile, score result type, and a restricted correlation reference. Prompts, supplier documents, tool payloads, and judge explanations can contain sensitive information. The telemetry data boundary should govern the evaluation path as carefully as the user-serving path.
A model judge is another system with its own error rate, version drift, sampling policy, and costs. Keep it out of the critical user-response path when it is merely diagnostic, but do not hide its outage from the release gate.
Make the stop signal independent of the measured system
The release controller should not let the candidate edit its own guardrail thresholds, tracing policy, or comparison rules. Store the release policy in a protected control plane, bind it to the release artifact, and require appropriate approval for changes.
Argo Rollouts analysis resources illustrate a useful operational distinction: an analysis can succeed, fail, or be inconclusive, and the rollout may continue, abort, or pause accordingly. That is a *deployment-state mechanism*; its template does not automatically know what AI correctness, privacy, or user value means.
Do not translate every unknown evaluator result into success. Do not combine a severe safety violation with a high average answer-quality score and call the weighted mean acceptable. A strong quality gain cannot compensate for a forbidden cross-tenant read.
Rollback also has limits. Switching traffic back does not undo an email, a verification charge, or a database modification already performed. Consequential actions need their own idempotency, permission, and reconciliation policies. See safe side effects for AI agents and tool authorization gates.
A failure-injection plan for the release service itself
I would test the following cases before allowing automatic expansion:
- The candidate is assigned but falls back to the incumbent. The ledger records assignment and actual exposure separately.
- The shadow candidate proposes a write operation. The runtime records intent without executing a production write.
- The evaluator fails preferentially on long responses. Segment-level coverage drops, and the release cannot advance using a biased sample without explicit analysis.
- A tenant's shared memory is accessed by both versions. The integration test exposes cross-arm state contamination.
- The judge's version changes during an experiment. Its scores are kept in separate series unless a validated compatibility rule exists.
- The telemetry exporter drops an interval. The controller identifies degraded evidence rather than treating absent failures as zero.
- A user completes verification after the release has ended. The event is joined to the original exposure without mutating the historic decision.
- The candidate's build is disabled while calls are in flight. New admissions stop; existing actions follow an explicit cancellation/reconciliation policy.
- A single high-risk invariant fails with many positive judge scores. The release stops under the immutable safety policy.
- The cohort is too small or misses a key language or tenant tier. The decision remains inconclusive rather than extrapolating to everyone.
For low-risk wording changes, a small monitored canary may be enough. For a model change that influences financial or identity-related actions, the evidence and approval bar should be higher. The mechanism should scale to risk rather than making every feature launch use an elaborate statistical framework.
What I would actually ship first
Start with the ledger row that connects eligible request, assigned arm, actual served version, and verified completion. Then add a protected safety gate for deterministic contract failures and a visible hold state when metrics are unavailable.
Next, introduce restricted shadow runs for eligible data with no live write authority. Add sampled semantic scoring only after the sampling and privacy rules are documented. For user-facing canaries, keep control and candidate observations separated and account for fallbacks and missing scores. Finally, attach delayed product outcomes to their original exposures, so later decisions can be corrected with actual business evidence.
A reliable online rollout is not a single metric that says “looks good.” It is a record of who was eligible, what was actually exposed, which facts were measured, which facts are still unknown, and why the release was allowed to expand.
That is the information I would want in front of an engineer before the next AI workflow reaches every customer.
Primary technical references
- Google SRE Workbook: Canarying Releases
- Argo Rollouts: Analysis and progressive delivery
- Argo Rollouts: Traffic mirroring
- OpenTelemetry: GenAI attributes and evolving conventions
- OpenTelemetry: GenAI spans
Topic provenance: This engineering subject was identified from Viral Ruparel's October 31, 2026 article about online evaluation during AI rollouts. The supplier-onboarding example, exposure-ledger architecture, assignment and evidence-gate code, delayed-outcome design, diagrams, and release controls here are independently developed.
KEEP READING
Related engineering notes
A Failover Route Is Not a Recovery Path: Proving Independence in AI Infrastructure
Two LLM providers can share the same failure domain. Build an evidence-backed recovery graph that checks cloud, networking, identity, control-plane and capacity dependencies before admitting fallback routes, then test correlated outages without weakening safety.
Read articleAn Eval Platform Sunset Can Erase Your Release Evidence: Build an Evidence-Escrow Migration Gate
When a hosted LLM evaluation platform retires, switching runners is not enough. Preserve the historical evidence, reconstruct grader semantics, validate scoring parity, and enforce a fail-closed release gate that survives the service shutdown.
Read articleWhen the Package Runs Before Your App: Quarantining AI Framework Releases
The 2026 agent-framework PyPI compromise exposed a blind spot in AI build pipelines: Python startup hooks execute before application imports. Design an artifact-quarantine gate, inspect wheels without installing them, separate credentials, and recover from suspected exposure.
Read article