AI systems & deployment

What a Shadow Comparison Can Prove Before Release

Diagnose a preprocessing regression, then execute a bounded candidate worker to examine overload, deadlines and the response boundary.

Banking & PaymentsIndependent technical study

Source case: PayPal. The article separates the published design from the data, methods and observations in this local experiment.

The release unit is larger than the trained model

A risk team has a candidate ready for release. Its saved weights load, its output is a valid probability, and an offline report looks acceptable. Yet a serving adapter interprets an amount differently from training. Nothing crashes. The risk policy receives a much larger score and changes its response to a customer.

The release question is whether the complete serving bundle behaves as intended on the contexts it will actually encounter. A model file alone cannot answer it.

PayPal’s 26 October 2021 article, CSV row 715, describes Quokka: self-service release workflows, an automated model pipeline and a separate audit pool. Configurable samples of production traffic reach the audit pool with the same context and access to production data. Shadow scores are logged without participating in adjudication. Execution time, loading behaviour and score distributions support review before promotion. The article also notes that fraud labels mature at different speeds. This is the published live-platform context; the study below does not recreate that infrastructure.

Independent study architecture showing champion scoring and captured caller response, alongside a non-blocking queue offer to a separate candidate worker. Candidate results cannot supply the caller response.Open full-size diagram (opens in a new tab)

Independent study architecture inspired by the source. The local supplement implements the process and queue boundary on authored requests; it does not duplicate live payment traffic.

Design reference: PayPal Technology Blog, 26 October 2021

Compare the same decision context, not merely the same request ID

An informative comparison starts at a defined boundary. Both versions need the same request-time information: amount and unit, feature values, missing-value representation, entity mappings and feature-snapshot identity. If the candidate fetches a later account balance or a refreshed history, the observed difference mixes model change with data change.

For a proposed online service, I would copy or reference an immutable context at that boundary, attach a correlation ID, and record the serving-bundle version on each branch. The candidate must not write business state or supply the customer response. Its failure should be observable without becoming a failure of the champion path. Resource quotas, bounded queues and deadlines matter because sharing an overloaded worker pool could still harm the live path even when candidate outputs are ignored.

The original eight-context replay makes separate copies of each context, captures the champion response, then invokes the candidate sequentially. It establishes numerical and content-preservation evidence. A new supplement executes the missing operational boundary: a separate worker process, one pending queue slot, non-blocking offers and explicit deadline/error records. The two recordings retain different responsibilities.

This also differs from an A/B experiment. Shadow evaluation observes an alternative computation; it does not expose customers to the alternative action. It can identify contract failures and behaviour changes. It cannot establish that the alternative reduces fraud losses or increases successful payments.

Freeze the preprocessing and policy with the weights

The experiment reuses only the fitted logistic weights and scaler from study 04’s synthetic issuer-response model. It does not reuse PayPal’s fraud models, production data or labels. The copied slice records the original parent-file SHA, selector, feature order and synthetic-data lineage. No new model is trained.

Both serving bundles use those same weights, feature snapshots and the same illustrative review threshold. The champion transforms amount with log1p; the candidate intentionally supplies raw amount while retaining the training scaler. This is an authored integration regression, not a purported model improvement.

The eight contexts are selected for diagnosis: low and high amounts, different issuer/history combinations, missing amount, an incompatible unit, a future feature snapshot, and one explicitly injected candidate runtime exception. History counts are authored snapshots, not a reconstructed online feature store. They contain no mature outcomes.

The frozen manifest binds executable code, contexts, model, preprocessing configuration and policy. This prevents a replay from silently substituting a new dependency. In a real release system, the corresponding artifact would also bind schema definitions, runtime dependencies, feature retrieval and approved policy versions. A model hash with an unversioned preprocessor would leave the most important change in this example outside the release contract.

Follow a changed score back to its feature representation

For the amount-40 context, the champion score is 0.0258; the candidate score is 0.9944. The illustrative decision flips from no review flag to a review candidate. The same input hash rules out a different supplied request, and the same model artifact rules out newly learned coefficients.

The first feature explains the change. Correct preprocessing produces log1p(40) = 3.714, about −0.225 standard deviations under the saved training scaler. The candidate passes 40 instead, about 40.687 standard deviations. Holding the other features fixed adds approximately 8.81 to the model’s log-odds. This is a serving representation error, not evidence that the underlying request suddenly became riskier.

Another context receives a review flag from both versions while its score moves from 0.2487 to 1.0. Counting decision agreement alone would hide the regression. A later policy threshold or downstream use of the probability could expose it. Conversely, a small numerical difference need not be operationally material; review should connect the score difference to the policy using it.

Across the four comparable pairs, two decisions change. Those counts describe these deliberately selected contexts, not traffic-wide disagreement rates. The three invalid inputs fail the shared input contract before either version scores. They belong to a different investigation from the explicitly injected candidate-only scoring exception.

Capture the champion response before recording the candidate resultPython19 lines
def replay_pair(scenario, bundles, model, policy):
    """Keep the champion's captured response separate from candidate execution."""
    context = copy.deepcopy(scenario["context"])
    input_sha = digest(context)
    champion = invoke(copy.deepcopy(context), bundles["champion"], model, policy)
    response = {key: copy.deepcopy(champion[key]) for key in ("status", "score", "decision", "error")}
    sealed_response = digest(response)
    candidate = invoke(copy.deepcopy(context), bundles["candidate"], model, policy, scenario["injected_fault"])
    assert digest(response) == sealed_response and digest(context) == input_sha
    comparable = champion["status"] == candidate["status"] == "scored"
    return {
        "id": scenario["id"], "input_sha256": input_sha,
        "champion_input_sha256": input_sha, "candidate_input_sha256": input_sha,
        "champion_response": response, "champion_response_sha256": sealed_response,
        "champion": champion, "candidate": candidate,
        "comparison": {"score_delta": candidate["score"] - champion["score"] if comparable else None,
                       "decision_flip": champion["decision"] != candidate["decision"] if comparable else None,
                       "comparable": comparable, "champion_response_preserved": True},
    }

The response hash remains unchanged for all eight contexts, including the candidate exception. That local invariant concerns response content. The new worker experiment below examines whether response production waits for candidate completion.

Execute the response boundary under a slow candidate

The new run starts a real candidate process using Python’s spawn context. It reuses the previous scoring function, model, preprocessing bundles and policy byte for byte. Twelve authored requests repeat the amount-40 feature context with distinct request IDs. This deliberately isolates dispatch behaviour from model-quality questions.

The first candidate is held after pickup. The second occupies the only pending queue slot. The next ten offers receive dropped_queue_full; they do not wait for space. All twelve champion response objects have been captured while the candidate remains held. The controller checks that no completion record exists, then passes the authored 50ms expiry and releases the worker.

The first accepted task expires before scoring begins. The second executes an explicitly injected scoring exception. A later healthy task is accepted and scored, showing that the worker can continue after both outcomes. This is a more useful operating trace than reporting only that a copied response hash did not change. The expiry check skips already-late work; it does not cancel an inference that has started or enforce an execution timeout.

Actual dispatch: capture the response, then offer shadow work without awaiting itPython15 lines
def dispatch(context, bundles, model, policy, queue, deadline, fault=None):
    """Produce the response, then attempt a bounded non-blocking shadow offer."""
    start = time.perf_counter_ns()
    champion = invoke(copy.deepcopy(context), bundles['champion'], model, policy)
    response = {key: copy.deepcopy(champion[key]) for key in ('status', 'score', 'decision', 'error')}
    captured = digest(response)
    try:
        queue.put_nowait({'context': copy.deepcopy(context), 'deadline': deadline, 'fault': fault})
        shadow = 'accepted'
    except Full:
        shadow = 'dropped_queue_full'
    elapsed = (time.perf_counter_ns() - start) / 1e6
    return {'request_id': context['request_id'], 'response': response,
            'response_sha256': captured, 'shadow_offer': shadow,
            'local_dispatch_ms': elapsed}

The important result is ordering: twelve responses exist before candidate release. Recorded dispatch times include synchronous champion scoring and queue-offer overhead, and range from about 0.037 to 0.495ms in this run. Twelve local calls cannot establish tail latency. Separate processes also share host resources; CPU and memory quotas have not been implemented. Expiry uses the shared host wall clock, whose adjustment is outside this controlled run.

Actual shadow execution coverage: twelve champion responses, two accepted shadow offers, ten queue-full drops; accepted work includes one expired task and one injected candidate error.Open full-size figure (opens in a new tab)
Saved execution counts for the controlled burst. Ten dropped offers remain visible in the denominator; no candidate score is invented for them. A later healthy task is a separate recovery observation.

This establishes a design choice with a cost. A bounded non-blocking queue preserves the caller’s dependency boundary while reducing shadow coverage under overload. The missing comparisons need their own coverage report, preferably by request segment. The queue here is intentionally non-durable; a worker or host failure can lose audit work. A production audit requirement may call for durable capture, but that is a different storage and backpressure design.

Inspect the actual process, queue and deadline observations

Recorded experiment

What the experiment actually shows

Actual separate candidate process, one-slot pending queue and non-blocking offers. Controlled local overload, deadline and candidate-error observations.

Data and comparison boundary

Methods compared

Champion dispatch
Score synchronously, capture the caller response, then offer a copied context without waiting for candidate computation.
Separate candidate process
One running job and one pending job; full-queue offers are discarded. Expired work and injected scoring errors are recorded.

Recorded findings

Responses captured before candidate release
12 / 12

The candidate was deliberately blocked while every champion response object was produced.

Burst shadow offers dropped
10 / 12

The bounded queue preserves an explicit loss-of-coverage signal instead of growing without a limit.

Accepted burst outcomes
1 expired · 1 candidate error

A subsequent healthy job scores successfully; error handling does not silently promote the candidate.

Recorded local dispatch range
0.037–0.495 ms

Twelve loopback-free Python calls on the authoring machine. Includes scoring/offer overhead; no production latency or load-isolation guarantee.

Inspect a recorded example

Slow candidate while the champion continues
Input

{ "burst_requests": 12, "pending_queue_capacity": 1, "candidate_deadline_seconds": 0.05, "order": "one held running candidate; one waiting candidate; ten dropped offers" }

Baseline output

{ "request_id": "async-00", "response": { "status": "scored", "score": 0.02580674665225191, "decision": "no_review_flag", "error": null }, "response_sha256": "9c4d545d14e9b0faa6f96d8b9699a2e544654d03847f60c379f85818e29b9c16", "shadow_offer": "accepted", "local_dispatch_ms": 0.494667 }

Candidate output

{ "stage": "completed", "request_id": "async-00", "context_sha256": "85ca2c901444ffd90054814aef685c054c6a87ff531179fc7ab761135cc9e3d4", "candidate": { "status": "deadline_expired", "score": null } }

These are saved results. Switching examples runs no model or external service.

Limits of this experiment

  • Spawned processes separate candidate execution; they do not enforce CPU, memory, host or network resource quotas.
  • One authored burst and twelve repeated feature vectors do not establish p95/p99 or a production SLA.
  • Expiry uses the shared host wall clock; clock adjustments and distributed clock skew are outside the controlled run.
  • The candidate queue is intentionally non-durable; process loss can lose audit work. No live traffic or customer action is connected.
Inspect the recorded provenance
{
  "basis": {
    "run.py": "8f307ec7f246d5c259a3d4259f7ec28ac91ad603fe9b07804d8da937721d7fcf",
    "scoring.py": "65be482749bd5d23ff1f930aa3cc295f5d709587b71f609478a7f4313e493f7a",
    "model.json": "79fbfef4d60f37c270af0bae1b12949a2baed6ca18e9216251b5f0073ae428bc",
    "policy.json": "37d5d33bfed74f572ae35655cbf3943717fd0b06dcd34c5a2d1406ca9fb03888",
    "bundles.json": "04cf843efced9fa24c791217872245ed08eea9fdc957489b0a80c512df23a0fa",
    "fixtures.json": "201592d0e1104b402c71fc2c3e6b3e471bb0216a5d3a88f77a040fe0e7a2a9c8",
    "lineage.json": "6742de317e60d8a5380f7629d1c70cf931a45e0ac3936c7f7bcc42b283543afe",
    "sources.json": "92472f3f2e362558c887fea4f07a702672dcd9af00dd9a731eb12417ed603f29"
  },
  "lineage": {
    "scoring.py": {
      "parent": "engineering-lab/paypal-shadow/core.py",
      "sha256": "65be482749bd5d23ff1f930aa3cc295f5d709587b71f609478a7f4313e493f7a"
    },
    "model.json": {
      "parent": "engineering-lab/paypal-shadow/model.json",
      "sha256": "79fbfef4d60f37c270af0bae1b12949a2baed6ca18e9216251b5f0073ae428bc"
    },
    "policy.json": {
      "parent": "engineering-lab/paypal-shadow/policy.json",
      "sha256": "37d5d33bfed74f572ae35655cbf3943717fd0b06dcd34c5a2d1406ca9fb03888"
    },
    "bundles.json": {
      "parent": "engineering-lab/paypal-shadow/bundles.json",
      "sha256": "04cf843efced9fa24c791217872245ed08eea9fdc957489b0a80c512df23a0fa"
    },
    "fixtures.json": {
      "parent": "engineering-lab/paypal-shadow/fixtures.json",
      "sha256": "201592d0e1104b402c71fc2c3e6b3e471bb0216a5d3a88f77a040fe0e7a2a9c8"
    }
  },
  "recording_sha256": "6a2ae06fb6ed5b5fcbfcbfcecac98bd5298225656e9573ee619ba72627de4036",
  "source": {
    "article": "https://medium.com/paypal-tech/machine-learning-model-ci-cd-and-shadow-platform-8c4f44998c78",
    "implementation": "Independent local process/queue supplement to study 08",
    "python": "https://docs.python.org/3/library/multiprocessing.html"
  }
}

A clean shadow sample can still miss the release risk

A production sampling plan should identify which segments and failure modes it needs to cover. Uniform sampling may barely observe a new issuer, a rare missing feature, a particular integration version or a high-value request. Deliberately oversampling these segments improves diagnosis, but unweighted score distributions from that sample no longer describe ordinary traffic.

I would retain inclusion rules and probabilities, segment counts and the number of comparable pairs. Shared input rejection, candidate-only failure and valid-score disagreement require separate denominators. A candidate that fails on a difficult segment must not appear successful because only its completed scores enter the comparison.

Observed score drift also needs interpretation. It could reflect a changed model, a preprocessing regression, a shifted population or a stale feature feed. In this controlled example one deliberately changed transform explains the numerical shift. An online comparison would require artifact and feature evidence before assigning that cause.

Accuracy needs another join: outcome definition, label maturity and eligibility at the time of the request. Agreement with the champion is not ground truth. Without mature labels, a technically clean candidate can be ready for longer non-decisioning observation while remaining unproven as a better model.

Turn findings into an owned release decision

The decision is not “all scores must match.” A genuinely new model should sometimes disagree. The review needs an expected change specification and a reason to accept its operational consequences.

For the proposed release process, I would make the following responsibilities explicit:

FindingRequired next actionOwner
Undeclared transform, schema or unit changeHold promotion; reconcile the serving bundle with the training feature contract.Serving and feature engineers
Candidate-only exception or invalid outputDiagnose the failing stage and verify recovery behaviour before further exposure.Service owner
Unexpected score or policy changes in a segmentInspect representative contexts and the intended change; do not treat disagreement as an accuracy label.Model and policy owners
Performance budget or outcome evidence unavailableContinue bounded observation; gather deployment-representative measurements and mature labels.Release owner with operations and risk reviewers

The local candidate should not be promoted: its preprocessing change is an acknowledged regression, and its injected failure demonstrates an error-recording path rather than successful recovery. The appropriate remedy is a new, reviewed bundle and a new comparison—not editing this recorded candidate into a success.

A proposed online rollback should select a known compatible bundle, including feature and policy dependencies. Restoring old weights alone is insufficient if the old feature representation is no longer available. Promotion and rollback conditions should be agreed before examining traffic, with an owner and a bounded exposure plan.

Keep the evidence proportional to the experiment

The paired replay locates the intentionally changed feature. The new worker run adds observed non-blocking ordering, bounded-queue loss and explicit expiry/error handling. Neither supplies representative online throughput, tail latency, label quality or business lift.

Execution budgets and end-to-end response budgets would need separate measurements under representative load. The local queue bounds pending work, but does not enforce host-level resource budgets. I would keep this candidate unpromoted even though the worker is operational: a functional observation path does not repair the deliberately incorrect serving bundle.

Inspect the recorded comparison and reproduce it offline

Recorded experiment

What the experiment actually shows

Independent CPU file replay of frozen synthetic contexts and serving bundles. No live shadow traffic, fraud model or A/B intervention.

Data and comparison boundary

Methods compared

Champion serving bundle
Copied study-04 synthetic logistic weights and scaler, with log1p(amount) preprocessing and a fixed review-flag threshold.
Candidate serving bundle
The identical model artifact with a deliberately incorrect identity amount transform. One separate fixture injects a runtime exception.

Recorded findings

Decision changes among comparable pairs
2 / 4

Derived from actual CPU scores on the four comparable contexts; disagreement does not establish accuracy.

Candidate-only failures
1

One explicitly injected runtime exception; the champion response remains captured and unchanged.

Shared context rejections
3

Both bundles reject invalid context before scoring. This is an input-contract problem, not a candidate-only model regression.

Champion response content preserved
8 / 8

Copies and response hashes preserve content in this sequential replay. No asynchronous latency-isolation claim follows.

Inspect a recorded example

Low amount: compare scores even if the decision agrees
Input

{ "request_id": "synthetic-01", "amount": "1.25", "amount_unit": "synthetic_units", "issuer": 0, "hour": 12, "weekday": 1, "card_history": { "declines": 0, "attempts": 0 }, "issuer_history": { "declines": 3, "attempts": 100 }, "feature_snapshot_version": "history-v1", "feature_snapshot_at": "2026-12-01T09:59:59Z", "requested_at": "2026-12-01T10:00:00Z" }

Baseline output

{ "status": "scored", "score": 0.01235692456724194, "decision": "no_review_flag", "feature_vector": [ 0.8109302162163288, 0, 0, 0, 0, 0.05, 0.03333333333333333 ], "error": null, "trace": [ { "stage": "input_contract", "status": "passed" }, { "stage": "preprocessing", "status": "completed", "vector_sha256": "c599a2378e88613c2bde9e2bfd7b0fe00b6777c50636c0a60b8081b8d70e12a8" }, { "stage": "scoring", "status": "completed" }, { "stage": "policy", "status": "completed" } ] }

Candidate output

{ "status": "scored", "score": 0.013727744568024048, "decision": "no_review_flag", "feature_vector": [ 1.25, 0, 0, 0, 0, 0.05, 0.03333333333333333 ], "error": null, "trace": [ { "stage": "input_contract", "status": "passed" }, { "stage": "preprocessing", "status": "completed", "vector_sha256": "0b4912dca1bf52a0e60c522988f0f05ec76b62aebc5ac824c1bb95524e00735e" }, { "stage": "scoring", "status": "completed" }, { "stage": "policy", "status": "completed" } ] }

These are saved results. Switching examples runs no model or external service.

Limits of this experiment

  • The source concerns fraud-model deployment; this local example uses a synthetic decline predictor only to study a serving contract.
  • All contexts are hand-authored and lack mature outcome labels; score agreement, differences or flags do not establish fraud or decline accuracy.
  • The preprocessing bug and runtime exception are intentional fixtures, not naturally observed production incidents.
  • This is sequential file replay, not an online fan-out, isolated worker pool, load test, SLA measurement or causal experiment.
  • Input history counts are authored feature snapshots; no online feature store, payment system or risk adjudication is integrated.
Inspect the recorded provenance
{
  "artifacts": {
    "core.py": "65be482749bd5d23ff1f930aa3cc295f5d709587b71f609478a7f4313e493f7a",
    "run.py": "00e1f88894834b70d080fb787f78d4e2d5a2498eff3031b71cb6885eed6136cd",
    "fixtures.json": "201592d0e1104b402c71fc2c3e6b3e471bb0216a5d3a88f77a040fe0e7a2a9c8",
    "model.json": "79fbfef4d60f37c270af0bae1b12949a2baed6ca18e9216251b5f0073ae428bc",
    "lineage.json": "993179ee9fbac51f13311c66a1ba8724c3ab1ec41b7e6fc9204dfd8f556b18ea",
    "bundles.json": "04cf843efced9fa24c791217872245ed08eea9fdc957489b0a80c512df23a0fa",
    "policy.json": "37d5d33bfed74f572ae35655cbf3943717fd0b06dcd34c5a2d1406ca9fb03888",
    "sources.json": "4c6b4c10d192d3e3e2c8dee7019a49026484c0cf8ae1eefdd7a47fa41ed21843"
  },
  "model_lineage": {
    "repository_parent_path": "engineering-lab/paypal/results.json",
    "parent_sha256": "f9c9fd30f11c897cb7801a5d22bf91122026cd3fef5934a929f87cad2db2dd59",
    "selector": "/provenance/fitted_model",
    "model_slice_sha256": "ed55b7a21697107f3f8305652b03933088de1f0322bc430e7146f2cbc7122f5d",
    "feature_names": [
      "log_amount",
      "night",
      "weekend",
      "issuer_1",
      "issuer_2",
      "prior_card_decline_rate",
      "prior_issuer_decline_rate"
    ],
    "original_training_source_sha256": "20366589609101ef48e6920b35d760762869e5c24d3a07a7678adba6b7467a24",
    "original_events_sha256": "5b5829abf4bd3d92aa5b748a7339b7ca5f59c0e6063cf4bed6afb5ca50a388b4",
    "boundary": "The copied weights were fitted in study 04 on authored synthetic issuer-response data. This study performs no fitting and uses no PayPal fraud model or outcome data."
  },
  "bundles": {
    "champion": {
      "id": "champion-serving-v1",
      "input_schema": "request-context-v1",
      "feature_order": "seven-features-v1",
      "feature_snapshot_version": "history-v1",
      "model_artifact": "model.json",
      "policy_version": "review-flag-v1",
      "preprocessing": {
        "version": "preprocess-v1",
        "amount_transform": "log1p"
      }
    },
    "candidate": {
      "id": "candidate-serving-v2-bug",
      "input_schema": "request-context-v1",
      "feature_order": "seven-features-v1",
      "feature_snapshot_version": "history-v1",
      "model_artifact": "model.json",
      "policy_version": "review-flag-v1",
      "preprocessing": {
        "version": "preprocess-v2-intentional-bug",
        "amount_transform": "identity"
      },
      "authoring_note": "Intentional serving-integration bug: raw amount replaces log1p(amount), while the same training scaler and weights remain. This is not a new trained candidate."
    }
  },
  "policy": {
    "version": "review-flag-v1",
    "threshold": 0.1,
    "flag_label": "review_candidate",
    "no_flag_label": "no_review_flag",
    "executed_action": "none",
    "boundary": "Teaching decision threshold borrowed from study 04, not a payment or fraud policy. No real action is taken."
  },
  "source": {
    "csv": {
      "logical_row_including_header": 715,
      "title": "Deploying Large-scale Fraud Detection Machine Learning Models at PayPal",
      "url": "https://medium.com/paypal-tech/machine-learning-model-ci-cd-and-shadow-platform-8c4f44998c78"
    },
    "primary": {
      "published": "2021-10-26",
      "checked": "2026-12-01",
      "mechanisms": [
        "Separate audit pool receives sampled production context without participating in adjudication",
        "Package models and dependent features through a release workflow",
        "Observe runtime failures, execution budgets and score distributions before promotion",
        "Fraud tags mature at different times"
      ],
      "boundary": "The published platform uses live sampled domain traffic. This independent directory performs local file replay of authored contexts, not PayPal traffic or Quokka."
    },
    "rights": "All request contexts, serving configuration, code and diagrams are authored teaching material. The reused model is a standard-library fit on the author's synthetic study-04 data. No company model, production source body or private payment information is redistributed."
  },
  "runs": [
    {
      "id": "LOW_AMOUNT",
      "input_sha256": "1915867bf9cdf443e0aa4b4c46babc05794c99589cf4d022bdf93e34c01eb623",
      "champion_input_sha256": "1915867bf9cdf443e0aa4b4c46babc05794c99589cf4d022bdf93e34c01eb623",
      "candidate_input_sha256": "1915867bf9cdf443e0aa4b4c46babc05794c99589cf4d022bdf93e34c01eb623",
      "champion_response": {
        "status": "scored",
        "score": 0.01235692456724194,
        "decision": "no_review_flag",
        "error": null
      },
      "champion_response_sha256": "64fb0df45ff375296720bb24c7ad306b74cf08d66ffede83b44dbc54fa13934e",
      "champion": {
        "status": "scored",
        "score": 0.01235692456724194,
        "decision": "no_review_flag",
        "feature_vector": [
          0.8109302162163288,
          0,
          0,
          0,
          0,
          0.05,
          0.03333333333333333
        ],
        "error": null,
        "trace": [
          {
            "stage": "input_contract",
            "status": "passed"
          },
          {
            "stage": "preprocessing",
            "status": "completed",
            "vector_sha256": "c599a2378e88613c2bde9e2bfd7b0fe00b6777c50636c0a60b8081b8d70e12a8"
          },
          {
            "stage": "scoring",
            "status": "completed"
          },
          {
            "stage": "policy",
            "status": "completed"
          }
        ]
      },
      "candidate": {
        "status": "scored",
        "score": 0.013727744568024048,
        "decision": "no_review_flag",
        "feature_vector": [
          1.25,
          0,
          0,
          0,
          0,
          0.05,
          0.03333333333333333
        ],
        "error": null,
        "trace": [
          {
            "stage": "input_contract",
            "status": "passed"
          },
          {
            "stage": "preprocessing",
            "status": "completed",
            "vector_sha256": "0b4912dca1bf52a0e60c522988f0f05ec76b62aebc5ac824c1bb95524e00735e"
          },
          {
            "stage": "scoring",
            "status": "completed"
          },
          {
            "stage": "policy",
            "status": "completed"
          }
        ]
      },
      "comparison": {
        "score_delta": 0.0013708200007821088,
        "decision_flip": false,
        "comparable": true,
        "champion_response_preserved": true
      }
    },
    {
      "id": "AMOUNT_SCALE",
      "input_sha256": "8ea81b5754ca65de7e8c12f1b4ed8f5f895bd7ff7d5a7e20a991d93964252277",
      "champion_input_sha256": "8ea81b5754ca65de7e8c12f1b4ed8f5f895bd7ff7d5a7e20a991d93964252277",
      "candidate_input_sha256": "8ea81b5754ca65de7e8c12f1b4ed8f5f895bd7ff7d5a7e20a991d93964252277",
      "champion_response": {
        "status": "scored",
        "score": 0.02580674665225191,
        "decision": "no_review_flag",
        "error": null
      },
      "champion_response_sha256": "9c4d545d14e9b0faa6f96d8b9699a2e544654d03847f60c379f85818e29b9c16",
      "champion": {
        "status": "scored",
        "score": 0.02580674665225191,
        "decision": "no_review_flag",
        "feature_vector": [
          3.713572066704308,
          0,
          0,
          0,
          0,
          0.05,
          0.04090909090909091
        ],
        "error": null,
        "trace": [
          {
            "stage": "input_contract",
            "status": "passed"
          },
          {
            "stage": "preprocessing",
            "status": "completed",
            "vector_sha256": "623e945b8defd47bc5fc406abbac3c103b85dba760fa5c1e9dd72dc0599196a5"
          },
          {
            "stage": "scoring",
            "status": "completed"
          },
          {
            "stage": "policy",
            "status": "completed"
          }
        ]
      },
      "candidate": {
        "status": "scored",
        "score": 0.9943931404765799,
        "decision": "review_candidate",
        "feature_vector": [
          40,
          0,
          0,
          0,
          0,
          0.05,
          0.04090909090909091
        ],
        "error": null,
        "trace": [
          {
            "stage": "input_contract",
            "status": "passed"
          },
          {
            "stage": "preprocessing",
            "status": "completed",
            "vector_sha256": "5aff38525632c55d212c7e6fd32a9e9c9ad20ab00574776ada426e4caea7b479"
          },
          {
            "stage": "scoring",
            "status": "completed"
          },
          {
            "stage": "policy",
            "status": "completed"
          }
        ]
      },
      "comparison": {
        "score_delta": 0.968586393824328,
        "decision_flip": true,
        "comparable": true,
        "champion_response_preserved": true
      }
    },
    {
      "id": "HIGH_SCORE",
      "input_sha256": "a3df0cf06013ded75042d51ddee287694ff831794b851ac6970e3b2ac3945eae",
      "champion_input_sha256": "a3df0cf06013ded75042d51ddee287694ff831794b851ac6970e3b2ac3945eae",
      "candidate_input_sha256": "a3df0cf06013ded75042d51ddee287694ff831794b851ac6970e3b2ac3945eae",
      "champion_response": {
        "status": "scored",
        "score": 0.2487156265485303,
        "decision": "review_candidate",
        "error": null
      },
      "champion_response_sha256": "1bb63705afcb5b7f999d3c8de1dc904d11c871184b3f2d0140490684269586ca",
      "champion": {
        "status": "scored",
        "score": 0.2487156265485303,
        "decision": "review_candidate",
        "feature_vector": [
          6.111467339502679,
          1,
          1,
          0,
          1,
          0.11818181818181818,
          0.07380952380952381
        ],
        "error": null,
        "trace": [
          {
            "stage": "input_contract",
            "status": "passed"
          },
          {
            "stage": "preprocessing",
            "status": "completed",
            "vector_sha256": "ad2623ae934071fc6eef59e99e154ddba1aedf4ff951f78c64967b718f0c4567"
          },
          {
            "stage": "scoring",
            "status": "completed"
          },
          {
            "stage": "policy",
            "status": "completed"
          }
        ]
      },
      "candidate": {
        "status": "scored",
        "score": 1,
        "decision": "review_candidate",
        "feature_vector": [
          450,
          1,
          1,
          0,
          1,
          0.11818181818181818,
          0.07380952380952381
        ],
        "error": null,
        "trace": [
          {
            "stage": "input_contract",
            "status": "passed"
          },
          {
            "stage": "preprocessing",
            "status": "completed",
            "vector_sha256": "bbb6519c710ef0a1d56677032cc8a3f6e1dd96ab2db50f8b95da4418c43d6d06"
          },
          {
            "stage": "scoring",
            "status": "completed"
          },
          {
            "stage": "policy",
            "status": "completed"
          }
        ]
      },
      "comparison": {
        "score_delta": 0.7512843734514697,
        "decision_flip": false,
        "comparable": true,
        "champion_response_preserved": true
      }
    },
    {
      "id": "OTHER_ISSUER",
      "input_sha256": "ddbb8717c490bdbaba51280c61a2e250f894b430b95fb7c14c62730c4d44dee3",
      "champion_input_sha256": "ddbb8717c490bdbaba51280c61a2e250f894b430b95fb7c14c62730c4d44dee3",
      "candidate_input_sha256": "ddbb8717c490bdbaba51280c61a2e250f894b430b95fb7c14c62730c4d44dee3",
      "champion_response": {
        "status": "scored",
        "score": 0.043339946880905526,
        "decision": "no_review_flag",
        "error": null
      },
      "champion_response_sha256": "fb6db5398adf0d67a6452762f0714b9e2d463c442f125c9340202b284446e76b",
      "champion": {
        "status": "scored",
        "score": 0.043339946880905526,
        "decision": "no_review_flag",
        "feature_vector": [
          4.2626798770413155,
          0,
          1,
          1,
          0,
          0.06,
          0.04032258064516129
        ],
        "error": null,
        "trace": [
          {
            "stage": "input_contract",
            "status": "passed"
          },
          {
            "stage": "preprocessing",
            "status": "completed",
            "vector_sha256": "89fc97faa692dc78e9f6452091498e185932b3182b453715a851ef044e13c9af"
          },
          {
            "stage": "scoring",
            "status": "completed"
          },
          {
            "stage": "policy",
            "status": "completed"
          }
        ]
      },
      "candidate": {
        "status": "scored",
        "score": 0.9999974114791426,
        "decision": "review_candidate",
        "feature_vector": [
          70,
          0,
          1,
          1,
          0,
          0.06,
          0.04032258064516129
        ],
        "error": null,
        "trace": [
          {
            "stage": "input_contract",
            "status": "passed"
          },
          {
            "stage": "preprocessing",
            "status": "completed",
            "vector_sha256": "a85438db8e978096b478db4438fce973e38296da9e6fda9f4f574a7efc264c09"
          },
          {
            "stage": "scoring",
            "status": "completed"
          },
          {
            "stage": "policy",
            "status": "completed"
          }
        ]
      },
      "comparison": {
        "score_delta": 0.9566574645982371,
        "decision_flip": true,
        "comparable": true,
        "champion_response_preserved": true
      }
    },
    {
      "id": "MISSING_AMOUNT",
      "input_sha256": "9b9b74eb2b2c95b3f82022f73fa0cff04555238536eb4b52a3279d87c211e9e8",
      "champion_input_sha256": "9b9b74eb2b2c95b3f82022f73fa0cff04555238536eb4b52a3279d87c211e9e8",
      "candidate_input_sha256": "9b9b74eb2b2c95b3f82022f73fa0cff04555238536eb4b52a3279d87c211e9e8",
      "champion_response": {
        "status": "error",
        "score": null,
        "decision": null,
        "error": {
          "stage": "input_contract",
          "code": "invalid_amount",
          "injected": false
        }
      },
      "champion_response_sha256": "567a2e7df85a05558f2ec9bc61bde061a210176c1e37e78a523a8c8fae07ce95",
      "champion": {
        "status": "error",
        "score": null,
        "decision": null,
        "feature_vector": null,
        "error": {
          "stage": "input_contract",
          "code": "invalid_amount",
          "injected": false
        },
        "trace": [
          {
            "stage": "input_contract",
            "status": "failed",
            "code": "invalid_amount"
          }
        ]
      },
      "candidate": {
        "status": "error",
        "score": null,
        "decision": null,
        "feature_vector": null,
        "error": {
          "stage": "input_contract",
          "code": "invalid_amount",
          "injected": false
        },
        "trace": [
          {
            "stage": "input_contract",
            "status": "failed",
            "code": "invalid_amount"
          }
        ]
      },
      "comparison": {
        "score_delta": null,
        "decision_flip": null,
        "comparable": false,
        "champion_response_preserved": true
      }
    },
    {
      "id": "FUTURE_CONTEXT",
      "input_sha256": "366ba0f705afc86ca06d5a945e14658d828a2b64cadda5b2e20505ec6cb9fb4a",
      "champion_input_sha256": "366ba0f705afc86ca06d5a945e14658d828a2b64cadda5b2e20505ec6cb9fb4a",
      "candidate_input_sha256": "366ba0f705afc86ca06d5a945e14658d828a2b64cadda5b2e20505ec6cb9fb4a",
      "champion_response": {
        "status": "error",
        "score": null,
        "decision": null,
        "error": {
          "stage": "input_contract",
          "code": "future_or_unavailable_feature_snapshot",
          "injected": false
        }
      },
      "champion_response_sha256": "94f38cf91a06e368d0dd9ea5c683259faca094c8ba075b016f2a14ce04ae93de",
      "champion": {
        "status": "error",
        "score": null,
        "decision": null,
        "feature_vector": null,
        "error": {
          "stage": "input_contract",
          "code": "future_or_unavailable_feature_snapshot",
          "injected": false
        },
        "trace": [
          {
            "stage": "input_contract",
            "status": "failed",
            "code": "future_or_unavailable_feature_snapshot"
          }
        ]
      },
      "candidate": {
        "status": "error",
        "score": null,
        "decision": null,
        "feature_vector": null,
        "error": {
          "stage": "input_contract",
          "code": "future_or_unavailable_feature_snapshot",
          "injected": false
        },
        "trace": [
          {
            "stage": "input_contract",
            "status": "failed",
            "code": "future_or_unavailable_feature_snapshot"
          }
        ]
      },
      "comparison": {
        "score_delta": null,
        "decision_flip": null,
        "comparable": false,
        "champion_response_preserved": true
      }
    },
    {
      "id": "CANDIDATE_RUNTIME",
      "input_sha256": "a113487ba496fd50e6bb60a84f1ff4058c464c40455732b4cffb67d8fdceeb1a",
      "champion_input_sha256": "a113487ba496fd50e6bb60a84f1ff4058c464c40455732b4cffb67d8fdceeb1a",
      "candidate_input_sha256": "a113487ba496fd50e6bb60a84f1ff4058c464c40455732b4cffb67d8fdceeb1a",
      "champion_response": {
        "status": "scored",
        "score": 0.025996396373536734,
        "decision": "no_review_flag",
        "error": null
      },
      "champion_response_sha256": "2bda7cf136538c80207da4a568e67b30252171f1048ffead3baeb19d78a2d9a1",
      "champion": {
        "status": "scored",
        "score": 0.025996396373536734,
        "decision": "no_review_flag",
        "feature_vector": [
          3.9318256327243257,
          0,
          0,
          0,
          0,
          0.05,
          0.03333333333333333
        ],
        "error": null,
        "trace": [
          {
            "stage": "input_contract",
            "status": "passed"
          },
          {
            "stage": "preprocessing",
            "status": "completed",
            "vector_sha256": "f3b8222c030e84d80d76a47f0e37b56fcf2e18675c3e511796188a8fa753b930"
          },
          {
            "stage": "scoring",
            "status": "completed"
          },
          {
            "stage": "policy",
            "status": "completed"
          }
        ]
      },
      "candidate": {
        "status": "error",
        "score": null,
        "decision": null,
        "feature_vector": null,
        "error": {
          "stage": "scoring",
          "code": "SIMULATED_CANDIDATE_RUNTIME_FAILURE",
          "injected": true
        },
        "trace": [
          {
            "stage": "input_contract",
            "status": "passed"
          },
          {
            "stage": "preprocessing",
            "status": "completed",
            "vector_sha256": "f9c863bc481ff02f2bcd5a8b2408881541d8845fd50cad16fa90389a4c92ab71"
          },
          {
            "stage": "scoring",
            "status": "failed",
            "code": "SIMULATED_CANDIDATE_RUNTIME_FAILURE"
          }
        ]
      },
      "comparison": {
        "score_delta": null,
        "decision_flip": null,
        "comparable": false,
        "champion_response_preserved": true
      }
    },
    {
      "id": "UNIT_CHANGE",
      "input_sha256": "cb6649a2158faf6d17bb74bfa7181082df90f5d7d464796f13b6d802dce53865",
      "champion_input_sha256": "cb6649a2158faf6d17bb74bfa7181082df90f5d7d464796f13b6d802dce53865",
      "candidate_input_sha256": "cb6649a2158faf6d17bb74bfa7181082df90f5d7d464796f13b6d802dce53865",
      "champion_response": {
        "status": "error",
        "score": null,
        "decision": null,
        "error": {
          "stage": "input_contract",
          "code": "unsupported_amount_unit",
          "injected": false
        }
      },
      "champion_response_sha256": "7c9c4670eec9320ab701402975d79aafc21476acd806a1b48536f73ff1120514",
      "champion": {
        "status": "error",
        "score": null,
        "decision": null,
        "feature_vector": null,
        "error": {
          "stage": "input_contract",
          "code": "unsupported_amount_unit",
          "injected": false
        },
        "trace": [
          {
            "stage": "input_contract",
            "status": "failed",
            "code": "unsupported_amount_unit"
          }
        ]
      },
      "candidate": {
        "status": "error",
        "score": null,
        "decision": null,
        "feature_vector": null,
        "error": {
          "stage": "input_contract",
          "code": "unsupported_amount_unit",
          "injected": false
        },
        "trace": [
          {
            "stage": "input_contract",
            "status": "failed",
            "code": "unsupported_amount_unit"
          }
        ]
      },
      "comparison": {
        "score_delta": null,
        "decision_flip": null,
        "comparable": false,
        "champion_response_preserved": true
      }
    }
  ],
  "verification_scope": "Copied model slice and frozen files are verified locally. Inside the portfolio checkout the parent-file SHA is also checked; a standalone package cannot verify the absent whole parent file.",
  "timing": "No latency values or production-performance claims are recorded.",
  "labels": "No outcomes are invented; all mature labels are unavailable."
}

From the standalone study directory, run python3 verify_recording.py and python3 run.py. Both use Python’s standard library. The runner checks frozen artifact hashes and the copied model slice; inside the portfolio checkout it also verifies the original parent file. A standalone package cannot verify that absent whole file. No training, API, model runtime or payment system is involved.

For the process supplement, run python3 run.py in engineering-lab/shadow-worker to verify and export the saved execution. A fresh copy without recording.json accepts python3 run.py --execute. Its manifest includes the copied scoring dependencies and their parent hashes. The original eight-pair recording remains unchanged.