AI System DesignData and Feature InfrastructureModule 02 — Data and feature infrastructure

Reconciling AI Predictions Across Conflicting Real-Time and Historical Feature Snapshots

Question 33 of 47 · Updated

On this page

Reconcile the evidence that produced the predictions before reconciling the scores. Define the logical prediction target and decision cutoff, distinguish event time from the time information became available, and identify the exact feature snapshot and model release behind each prediction. Select the approved snapshot for the intended use through a versioned consistency contract, not by which pipeline finished last or gave a more confident answer. If the approved snapshot has no valid prediction, recompute on that snapshot or abstain. Preserve the original as-served prediction and any later corrected result as separate artifacts; do not retrospectively insert future information into a historical evaluation.

How would you reconcile predictions from independently updated real-time and historical feature pipelines when their snapshots disagree?

ASD-010 | Module 02 — Data and feature infrastructure | Learning order 20. ASD-009 establishes the reusable source capture substrate. The MLOps lessons on point-in-time retrieval, feature materialization, shared feature definitions, feature freshness and source-to-model lineage establish the ingredients for this problem. Here the approved learning boundary is the reconciliation of already-produced predictions based on inconsistent feature snapshots, including the selection of a canonical evidence revision, counterfactual rescoring, late correction, live-versus-retrospective authority and recovery. ASD-084 combines different required estimates with distinct validity windows; ASD-087 addresses genuinely competing model outputs. In this lesson two predictions may disagree even when the exact same model is used, because their inputs differ. Neither generic feature-store setup nor model ensembling resolves that discrepancy.

All cases, numerical assumptions, policies and SLO examples are fictional. The local Python fixture uses synthetic artifacts and was executed on Python 3.13.5. No actual feature store, stream, warehouse or trained model was evaluated.

1. Begin with the prediction identity, not the feature table#

Consider a delivery platform predicting whether an order will arrive late. A streaming pipeline computes a 30-minute restaurant-delay feature and recent order backlog. A historical batch pipeline recomputes the same features from reconciled source data each hour. Both invoke model release r1 for order O17. At 10:00 the live pipeline predicts 20% late-arrival probability. At 10:10 the historical pipeline reprocesses the feature window ending at 10:00 and produces a score of 70%.

Which is correct? The question is underspecified until we know the intended use. A retrospective audit of what the dispatcher knew at 10:00 must reproduce the original information set. A data-quality investigation may use subsequently corrected facts to measure sensitivity. A new decision at 10:10 requires a valid current target, state and evidence, not necessarily the old target window. The historical batch's later publication does not by itself make its prediction the correct one to substitute.

Define a logical prediction key containing tenant and entity, target event and horizon, reference intervention or policy, decision/as-of cutoff and compatible output contract. A prediction artifact additionally identifies model, calibration, feature definitions, exact snapshot(s), actual issued time, expiration where applicable, and lineage. Predictions for different horizons or interventions are different questions even when the values share a probability scale.

Reconciliation intentInformation setOutput
Original decision replayFacts and features actually available to the original serving pathOriginal artifact or explicitly reconstructed as-known prediction
Corrected retrospective analysisFacts valid for the original feature cutoff but learned laterNew corrected analysis linked to original; not original prediction
Current operational decisionApproved currently usable evidence, current target and policyNew eligible prediction or explicit abstention
Batch evaluation/trainingDeclared historical availability policy and label observation windowPinned dataset and prediction artifacts without leakage

Keep these modes distinct in APIs, dashboards, storage, evaluation and audit. A batch score obtained after an intervention may not predict the same counterfactual outcome as the original pre-intervention score. Replaying the original input does not change the actual action or what the user knew.

2. Architecture: reconcile through a feature evidence authority#

Loading diagram…

The feature owner defines approved meaning, input revisions, cutoffs and coverage. Pipeline teams own their implementation and health. A trusted manifest registry identifies the admissible feature evidence for a specific mode and target. The reconciliation service verifies the candidate predictions against that registry, records its disposition and, if needed, requests a bounded recomputation. The model owner specifies compatible feature versions and deterministic or stochastic execution semantics. The downstream decision owner still enforces current authorization and business constraints.

This can be implemented within one application or via separate services. It is not necessary to make a cross-store transaction cover both feature computation paths. Immutable artifacts and conditionally updated approval pointers can provide a clear local consistency boundary, with explicit version checks at the consumer. If a required source is externally mutable, the manifest must identify a snapshot or evidence that can be verified. An identifier pointing to a mutable latest table is not reproducibility.

A prediction is selected because its evidence is admissible for the requested use, not because its producing pipeline is globally considered authoritative. Different feature families may have different source owners and correction policies. Resolve an approved feature bundle, rather than selecting an entire pipeline simply on its name.

3. Feature snapshot contracts: what must be identical?#

A feature snapshot is a logical, immutable representation of the feature vector and the provenance that makes it meaningful. In a bulk pipeline, a table snapshot ID may cover millions of entities; in a serving system, a per-request vector manifest might pin multiple source revisions or include an authorized copy of the actual input. Merely logging the feature store name, batch job ID or latest materialization timestamp is insufficient.

FieldWhy it is required
Scope and entity keyPrevent cross-tenant or wrong-entity comparisons
Feature definition bundleNames, units, windows, null treatment, transformation and feature contract versions
Feature as-of cutoffThe latest permitted event/effective time under this feature policy
Knowledge/availability cutoffLatest information allowed to be included for the intended mode
Source snapshot and position vectorExact evidence membership and partition coverage
Effective revisions and correction lineageDistinguish original, corrected and superseded facts
Missingness and quality statusIncomplete data cannot silently stand for zero
Published/available timeWhen the feature vector could actually be read by the relevant inference path
Integrity digest and immutable referenceVerify identity and retrieve permitted evidence
Model and preprocessing compatibilityDetermine whether the vector is eligible for the model release

Illustrative manifest, not an official standard schema:

JSON
{ "snapshot_id": "features-O17-s2", "scope": "tenant-a/order-O17", "feature_contract": "delivery-delay-features/v1", "event_cutoff": "2026-01-15T10:00:00Z", "knowledge_cutoff": "2026-01-15T10:10:00Z", "available_to_path_at": "2026-01-15T10:10:05Z", "source_versions": { "restaurant_events": "snapshot-91", "orders": "snapshot-44" }, "coverage_ref": "manifest-91-44", "supersedes_for_corrected_analysis": "features-O17-s1", "validation": "approved_for_corrected_analysis", "vector_ref": "authorized-immutable-artifact" }

The historical corrected snapshot is explicitly not an as-known-at-10:00 artifact. Knowledge cutoff, feature publication time and model issue time are different. For exact historical reproduction, also verify the model could access the vector at the historical decision time (or preserve its original logged input). A newly built historical reconstruction may use only records known at the original time, but its creation time is later; label it reconstructed rather than claim it was served then. Store availability evidence at the relevant boundary, not just a timestamp generated by an upstream producer.

Feature vector equality and evidence equality are also different: two snapshots may contain numerically equal values while using different source revisions, permissions or coverage. Conversely, physical table snapshot IDs can differ yet represent equivalent feature vectors under an approved equivalence contract. Use explicit semantic and provenance checks, not string equality of arbitrary storage versions. The strict local fixture later uses exact manifest identity as a simplified policy.

4. Event time, processing time and late corrections#

A source event has at least two useful clocks: when it happened or became effective, and when the relevant pipeline had access to it. Processing time describes when a computation executed, not necessarily either of those. Distinguish the feature's logical cutoff, the source's availability time, the feature's publication time and the prediction issue time.

Suppose a restaurant's delay events arrive as follows. Values are synthetic minutes; the feature is mean delay over the interval [09:30,10:00). The operational feature policy in this toy example accepts a partial window at 10:00 if the minimum required source checks pass.

Event IDEvent timeAvailable to feature pathDelay
e109:4009:412
e209:5009:514
e309:5510:0818
e410:0110:0220

At the 10:00 decision the as-known mean over eligible e1 and e2 is 3 minutes. At 10:10 the corrected retrospective mean for the same event window is (2+4+18)/3 = 8 minutes. e4 is excluded from both because its event time lies outside the feature window. A later correction to e2 may replace its original value under the source revision rules; it must not be counted as another independent event.

The fact that e3 occurred before the cutoff does not make it available before the cutoff. Event-time-only historical joins can leak late data. The point-in-time MLOps lesson explains availability-aware joins; the additional reconciliation requirement here is to preserve both predictions and distinguish which evidence policy each represents. A corrected historical prediction can be valuable for evaluating sensitivity to delayed inputs without being a valid simulation of production performance.

A watermark is an estimate or contract-specific indication of event-time progress. Its actual strength depends on source guarantees and pipeline implementation. A watermark passing 10:00 does not universally prove that no late or corrected event can appear. Define allowed lateness, whether results are early/on-time/final under the contract, how idle partitions are handled, and which events trigger retractions or new generations. A source position is a different concept: a contiguous captured range can still omit an event the source has not delivered yet. Track both completeness and knowledge/availability constraints.

Loading diagram…

For mutable source facts, preserve effective time and recorded/available time (a bitemporal-style model), stable business identity and revision. Reconstruct the revision that was eligible at each knowledge cutoff. If the producer supplies retractions, interpret them under its defined correction semantics. If exact original availability is not retained, mark reconstruction uncertain or unavailable rather than manufacture a precise historical score.

5. Diagnose the type of disagreement#

Before rescoring, pair predictions by the exact logical target and inspect the evidence differences. The following matrix is more useful than a blanket "offline wins" rule.

ConflictExampleResolution
Different targetCurrent 30-minute horizon versus original 30-minute horizonNot comparable; treat as distinct predictions
Expected availability lagHistorical path includes late e3Select mode-specific evidence; keep correction separate
Stale materializationOnline path still uses revision 7 despite approved revision 8 being availableRefresh/repair and rescore if permitted
Inconsistent source cutBatch sees one side of a multi-record updateHold and establish compatible source manifest
Feature semantic skewOne path reports seconds, other minutesIncompatible contract; fix transformation, revalidate model
Different missingness policyStream uses approved missing indicator, batch substitutes zeroCheck approved feature contract; reject incompatible vector
Source correctionHistorical ledger replaces a duplicated eventNew evidence revision and scoped impact assessment
Same approved vector and model, different scoreRuntime bug or nondeterminismInvestigate output integrity under declared tolerance; do not blame input freshness
Different model releaseSame input but new weights/calibratorSeparate model effect from evidence effect

A common failure occurs when a nightly backfill has a newer processing timestamp but an older event-time cutoff. A last-write-wins materializer can overwrite a real-time feature representing newer business state. Conversely, an online feature with newer event time may rely on a missing source partition. Neither later timestamp nor newer-looking revision alone is sufficient. Compare source revisions within their actual lineage and scope; unrelated pipeline counters do not establish a total order.

When the inputs differ, use feature-level diffs with definitions, units, null handling, source membership, correction reason and effect on the target. A normalized feature hash helps find changed vectors; retain per-feature or per-group attribution where authorized. Use a bounded diagnostic reproduction rather than inspect sensitive raw data indiscriminately.

6. Deterministic precedence and consistency contracts#

The product and data owners should specify the precedence policy before observing scores. Selecting the more convenient probability is a form of outcome-dependent evidence selection.

A strict operational contract might require the current approved feature bundle, compatible model release, bounded source lag, known complete critical source coverage, no withdrawal, and a valid target. For a retrospective replay use the exact original manifest. For corrected analysis choose a separately approved historical manifest for the same event cutoff and later knowledge boundary. The approved snapshot can differ per purpose.

ContractPermitted selectionConsequence
Exact-as-served replayOriginal logged feature vector and model versionHighest fidelity for historical decisions; unavailable if evidence was not retained
Strict approved generationOnly the current eligible manifest for the declared modeStrong consistency; may require rescore or hold
Bounded-staleness liveApproved older generation within explicit lag/quality boundsBetter availability, residual stale-decision risk
Finalized historicalReconciled event-time window under declared completeness and correction policyUseful for corrected analytics, not original replay
Provisional streamApproved early evidence and explicit missingness/finality contractLow latency with potential later correction

Use deterministic precedence over trusted evidence attributes. For example, require approved source completeness, exact target and feature definition, then prefer the current manifest pointer for the specific mode. A corrected source revision can invalidate its predecessor for current use but should not rewrite historical truth. Do not merge individual features from two snapshots merely because each is freshest; the combined vector may never have existed under any admissible state. Only compose feature groups if the manifest explicitly permits compatible source revisions and causal constraints, then create a new identified vector and rescore.

A historical pipeline may be authoritative for final transaction reconciliation and a streaming pipeline for currently available device state. Authority is feature-specific and purpose-specific; if both rely on an unresolved upstream error, neither wins automatically. If a trusted registry cannot establish a coherent required bundle, abstain or invoke a separately evaluated fallback. A fallback predictor that uses fewer features has a different contract and requires its own validation.

The decision to allow a provisional or stale result must reflect the actual error cost, not system convenience. An exploratory chart may show both clearly labeled. A consequential automated decision may require current verified evidence and reject a provisional bundle.

7. Reconciliation algorithm and immutable output#

Loading diagram…

An implementation can follow these steps:

  1. Resolve the logical target and intended use from trusted context. Require current authorization before any feature or prediction lookup.
  2. Obtain the approved manifest and policy version for that scope and cutoff. Check source coverage, knowledge and actual availability, semantic compatibility, validity and known invalidations.
  3. Retrieve immutable prediction artifacts by target, evidence digest and compatible model/calibration version. Validate declared output semantics and prediction freshness.
  4. If multiple artifacts claim the same deterministic input and release, check equality under the declared numeric tolerance. If not consistent, hold and investigate. For stochastic inference, define an explicit execution seed/distribution/artifact identity and evaluation contract; do not assume exact equality.
  5. If no matching artifact exists, recompute using the pinned evidence and approved model, if authorized and within deadline. Do not fetch mutable latest features during a pinned rescore. If the model release is no longer permitted, use an approved separate analysis route or return unavailable.
  6. Publish a new immutable reconciliation record containing selected artifact or abstention, rejected alternatives and reasons, snapshot/model identities, mode, policy version and evaluation time. Update a current pointer only if the expected evidence generation is still current.
  7. Revalidate the exact record when used for an operation that requires live evidence. Historical replay is not authorization to repeat a past decision.

Use a rescore key scoped by tenant, logical target, mode, feature manifest, model/calibrator/preprocessing release and relevant scoring contract. Deduplicate equivalent work, not merely equal numeric values. If a corrected snapshot is superseded before scoring completes, keep the result as permitted history but do not activate it as current. If historical analysis is explicitly pinned, newer data does not invalidate the reproducibility of the older analysis; it may change whether the result is relevant today.

The result must expose why the two original scores differed, at least to authorized operators. A reason such as LATE_SOURCE_EVENT_INCLUDED is more informative than "reconciled". Some conflicts remain unresolved; do not claim a root cause without evidence. Preserve an explicit unknown category.

8. Worked prediction comparison: isolate the input effect#

Continue the restaurant example. Define a toy deterministic scoring function, not a trained or calibrated model:

score = clamp(-0.1 + 0.1 * mean_delay_minutes, 0, 1)

For the original mean 3 the score is 0.2; for the corrected mean 8 it is 0.7. The difference is 0.5 (50 percentage points on this illustrative bounded score scale). The function is an arithmetic teaching model, not empirical evidence that the output is a probability. A real model may be nonlinear and use interacting features; one cannot attribute the entire score difference to a single feature merely because its value changed.

For this toy policy assume the original as-known snapshot is approved for original-decision audit and the corrected snapshot is approved for corrected analysis. The arbiter selects 0.2 for audit, 0.7 for corrected analysis, and neither automatically for a new live decision after 10:10. A new operational request must pin current eligible features and the new target/horizon as appropriate. If the corrected historical score was issued at 10:11, it cannot appear in a 10:00 as-known record. Even a corrected analysis whose knowledge cutoff is 10:10 may have been computed later; record both facts.

If both models and features changed simultaneously, consider a controlled 2-by-2 replay, only where both model releases support both feature contracts:

Original snapshot s1Corrected snapshot s2
Model r10.200.70
Model r20.250.60

These invented values illustrate the method. At fixed r1, the snapshot effect is +0.50. At fixed r2 it is +0.35. At fixed s1, the model change is +0.05; at fixed s2 it is −0.10. The difference-in-differences is −0.15, showing an interaction between feature and model changes. These are output differences on one synthetic case, not population-level causal effects or measured model improvements. Evaluate representative paired cases and uncertainty. If r2 expects a different feature definition, the cross-combinations are invalid unless explicitly adapted and evaluated; do not construct a misleading factorial comparison.

Score reconciliation is not probability pooling: the two results describe different information sets. Averaging 0.2 and 0.7 to 0.45 produces a third unsupported estimate unless a validated predictor explicitly defines such an operation and its input contracts. ASD-087 covers joint reliability of genuinely comparable predictors.

9. Tested implementation: approved-snapshot prediction selection#

The standard-library Python example deliberately isolates the arbitration step. A trusted data owner supplies a manifest already selected for the requested reconciliation mode. The code checks scope, target, feature cutoff, model and feature-definition compatibility, exact snapshot identity and knowledge boundary. It requests a rescore when no matching prediction exists rather than select a different snapshot. For the deterministic toy scoring contract, unequal valid scores for the exact same approved evidence are a conflict.

PYTHON
from dataclasses import dataclass, replace from math import isfinite @dataclass(frozen=True) class Prediction: scope: str target: str cutoff: int known_at: int definition: str model: str snapshot: str value: float @dataclass(frozen=True) class Approved: snapshot: str scope: str cutoff: int known_at: int complete: bool def reconcile(rows, approved, *, scope, target, cutoff, as_known_at): # One trusted manifest selected by the data owner, not by score or arrival. if (approved.scope != scope or approved.cutoff != cutoff or not approved.complete or approved.known_at > as_known_at): return ('HOLD', None) eligible = [] for p in rows: if (p.scope != scope or p.target != target or p.cutoff != cutoff or p.definition != 'features/v1' or p.model != 'model/r1'): continue if p.snapshot != approved.snapshot or p.known_at != approved.known_at: continue if type(p.value) not in (int, float) or not isfinite(p.value) or not 0 <= p.value <= 1: return ('INVALID', None) eligible.append(p.value) if not eligible: return ('RESCORE', None) if max(eligible) != min(eligible): return ('CONFLICT', None) return ('SELECTED', eligible[0]) live = Prediction('a/x', 'late/v1', 100, 99, 'features/v1', 'model/r1', 's1', .2) corrected = replace(live, known_at=110, snapshot='s2', value=.7) first = Approved('s1', 'a/x', 100, 99, True) second = Approved('s2', 'a/x', 100, 110, True) def run(rows=(live, corrected), approved=first, as_known_at=100): return reconcile(rows, approved, scope='a/x', target='late/v1', cutoff=100, as_known_at=as_known_at) assert run() == ('SELECTED', .2) assert run((corrected, live)) == run() assert run(approved=second) == ('HOLD', None) assert run(approved=second, as_known_at=111) == ('SELECTED', .7) assert run((live,), second, 111) == ('RESCORE', None) assert run((corrected,)) == ('RESCORE', None) assert run(approved=replace(first, complete=False))[0] == 'HOLD' assert run(approved=replace(first, scope='b/x'))[0] == 'HOLD' assert run(approved=replace(first, cutoff=101))[0] == 'HOLD' assert run((replace(live, scope='b/x'),))[0] == 'RESCORE' assert run((replace(live, target='other'),))[0] == 'RESCORE' assert run((replace(live, cutoff=101),))[0] == 'RESCORE' assert run((replace(live, definition='features/v2'),))[0] == 'RESCORE' assert run((replace(live, model='model/r2'),))[0] == 'RESCORE' assert run((replace(live, known_at=100),))[0] == 'RESCORE' assert run((live, live)) == run() assert run((live, replace(live, value=.3)))[0] == 'CONFLICT' assert run((replace(live, value=float('nan')),))[0] == 'INVALID' assert run((replace(live, value=True),))[0] == 'INVALID' assert run((replace(live, value=1.1),))[0] == 'INVALID' assert run(()) == ('RESCORE', None) print('21 checks passed')

Actual local execution on Python 3.13.5:

21 checks passed

The 21 assertions verify original selection, arrival-order invariance, later-knowledge exclusion, corrected selection at an eligible knowledge boundary, missing approved prediction, incomplete/incorrect approved manifests, wrong candidate scope/target/cutoff/feature/model/knowledge identity, duplicate equal results, conflicting same-snapshot results, NaN, Boolean and out-of-range scores, and absent candidates. The tested code MD5 excluding its terminal newline is c79afd7a13afa7949060e2ed3a3d58e5.

This is intentionally a narrow fixture, not an implementation of a feature store or as-of join. The supplied Approved object is trusted; the example does not select or authenticate it, inspect actual feature values, validate source offsets, calculate a watermark, evaluate validity/expiry, enforce access, verify actual serving availability, or run inference. known_at represents the declared evidence knowledge boundary, not prediction issue or publication time. In production, separately check actual artifact availability for original replay; reconstructed artifacts may be issued later but must be labeled as such. The fixture assumes validated normalized metadata, one model and feature release and a simple bounded deterministic score; exact floating-point equality is deliberate for the fixture, not a general model policy. Nonmatching candidates are skipped, and the return contains only the disposition and value rather than the full audit record. Production should return exact selected artifact identity and structured exclusion reasons, and handle duplicate-identity collisions before arbitration. The example does not execute RESCORE or perform any business effect. No concurrency, distributed consistency, actual late data processing or production security was tested.

With n candidate predictions, the scan is O(n) time and O(n) worst-case additional space; min/max could instead be tracked in constant extra space when retaining no diagnostic detail. Real latency is dominated by authorized retrieval, manifest validation, source reconciliation and inference. There is no measured service throughput claim.

10. Correcting an already-used prediction#

A corrected feature snapshot must not silently overwrite the prediction that led to an actual decision. Consider the original 10:00 score used to assign a delivery route. At 10:08 late evidence arrives, and at 10:11 a corrected score is produced. The system records that the original decision was made using s1 and that later analysis using s2 differs. It separately determines whether the current route can or should be revised under current policy. It cannot pretend the dispatcher used the corrected value at 10:00.

Loading diagram…

The diagram separates historical evidence from operational action. The original result may remain valid as a record of what was known even when it is no longer usable for current decisions. A corrected source may reveal a serious issue requiring incident handling. Identify affected decisions and receipts through lineage, withdraw unsafe current evidence, notify authorized owners as appropriate, and apply independently authorized remediation. Correction of a score is not reversal of a payment, route assignment or other effect.

For future scoring, fix the upstream source or transformation and publish a new approved feature generation. Recompute only affected entities/windows where impact can be proved. Aggregate features such as rolling counts may affect many subsequent windows; maintain a reverse dependency index or conservatively rebuild the affected range. Stateful models or derived labels may require broader reevaluation. Do not indiscriminately rewrite every historical prediction under a new model.

Use conditional current-pointer updates so a delayed historical rebuild cannot replace a newer live generation. If revocation or deletion invalidates original artifacts, preserve only permitted audit evidence and prevent replay from restoring deleted data or access. ASD-011 addresses large-scale backfills and live-state isolation in more depth.

11. Point-in-time evaluation and leakage-resistant monitoring#

A production model may have been trained on cleaner, more complete historical inputs than it receives at serving time. A strong offline score on corrected features can hide actual production degradation. Construct separate evaluation datasets:

  • As-served or availability-aware replay: use the features and missingness actually eligible at original scoring time, with mature labels under the correct target contract.
  • Corrected historical: use approved later corrections for the same event cutoff; label this as hindsight evidence.
  • Current operational: measure actual live task outcomes and feature coverage under current policies.
  • Same-input parity: run approved implementations against identical pinned vectors and model releases to isolate transformation or runtime errors.

Compare on matched logical targets and report missing pairs. Do not compare aggregate metrics from different populations without accounting for selection. Labels may mature after the prediction or reflect an intervention that changed the outcome. Use appropriate policy-aware or causal evaluation where required. A discrepancy between corrected and live scores is not a measured error unless outcome evidence supports that interpretation.

Hypothetical audit: 20,000 live predictions sampled; 18,000 have comparable historical records, 2,000 lack a valid pair. Of the pairs, 900 exceed an agreed absolute score-difference threshold of 0.10. Pair coverage is 90%, conditional discrepancy rate 5%, and observed discrepancy among all sampled cases is at least 4.5% (the unpaired cases' status is unknown). Do not present the 5% paired rate as an unconditional error rate or count the missing cases as agreement.

Suppose 600 paired differences are attributable to late data, 200 to a known transformation defect, and 100 remain unexplained after review. These are reason classifications, not correctness labels. A legitimate late arrival can create expected divergence; a transformation defect can harm even predictions whose final score remains nearly unchanged. Report feature-level differences, score and decision-boundary changes, missingness, availability, critical slices and outcomes. A score difference threshold is a diagnostic trigger, not automatically a safety bound.

12. Production scaling and recovery design#

Continuous full rescoring of every historical update can be expensive and can overload the live inference path. Use immutable manifest identities, change sets and dependency indexes to identify affected prediction targets. Separate current decision refresh, historical audit and corrected analytics into governed queues with independent priorities and resource budgets. Deduplicate equivalent rescoring requests by exact evidence and execution identity.

Illustrative capacity: 2,000 live predictions/s, with a representative 1% audit sample, yields 20 paired comparisons/s. If 5% of comparable pairs require a rescore and all sampled pairs are available, the average extra scoring load is 1/s. A late correction affecting 60,000 predictions is different: at a reserved 100 rescoring tasks/s the ideal isolated drain time is 600 seconds, or 10 minutes, before retries and lookup costs. At 40 new correction tasks/s entering the same queue the net drain rate is 60/s, making ideal catch-up 1,000 seconds (16.7 minutes). Live requests need separate protected capacity; do not extrapolate a steady average to an incident burst. Count actual model/feature lookup costs, artifact writes and retention.

For a hypothetical 2 million daily predictions, a 1 KB lineage manifest per prediction is about 2 GB/day, or 60 GB over 30 days in decimal units before indexes, replicas and compression. Store references to immutable feature bundles where possible instead of duplicating sensitive raw vectors, but verify the retention and authorized retrieval contract. If exact as-served replay is required, retaining only a digest with no retrievable evidence is insufficient. Feature vectors themselves can contain sensitive derived data; access and deletion must be governed.

An operational recovery procedure:

  1. Identify the affected feature definition, source revision, scope, event-time range, processing generation and prediction artifacts. Stop unsafe current publication while preserving unrelated valid paths.
  2. Distinguish late expected data, missing capture, materialization lag, schema/semantic skew, source corruption and model/runtime mismatch. Reconcile against independently trusted source evidence.
  3. Restore or reconstruct the required feature state in an isolated generation, preserving actual historical availability where the purpose is as-known replay.
  4. Run completeness and semantic validation, same-input parity, representative prediction comparisons and current decision-policy gates. Obtain data/model owner approval for corrected manifest promotion.
  5. Rescore affected targets on pinned evidence, conditionally activate the current generation, and keep prior records and remediation links. Reconcile actual decisions separately.
  6. Monitor convergence and recurrence. If history is missing or a source cannot establish the promised cutoff, report that limitation and use an approved recovery or abstention route.

Do not repair an offline dataset and then immediately copy its values into an online store merely because it finished later. Publication must respect the current entity revision and approved live frontier. Historical replay should not emit duplicate business notifications or actions.

13. Observability, security and ownership#

SignalWhat it establishes
Paired prediction coverageAbility to compare the same target and evidence contract
Source event and availability lag, by partitionDistinguishes delayed input from delayed processing
Snapshot age, completeness and manifest mismatchEligibility of input evidence
Semantic definition/version mismatchTransformation or deployment incompatibility
Feature differences on identical cutoffs and knowledge boundariesActual parity rather than different information sets
Conditional score delta and decision flip rateOperational impact of mismatches
Same-vector, same-release score divergenceRuntime or stochastic execution issue
Rescore success, queue age and abstentionResolution availability
Correction-to-invalidation and correction-to-eligible-rescore lagExposure to superseded evidence
Actual outcome quality by evidence modeWhether the chosen consistency policy works

Set distinct SLOs for live availability, paired audit coverage and correction recovery, with meaningful denominators. For example, a fictional high-risk flow might require no known invalidated snapshot at commitment and a specified maximum correction propagation latency. Verify at the authoritative resource where needed; a monitoring alert is not a prevention control. Do not relax approved safety checks just to keep live coverage high.

Feature owners govern semantic correctness and source revisions; stream/batch owners manage their capture and processing state; model owners approve input compatibility; reconciliation owners define and maintain evidence selection; downstream owners define action eligibility and remediation. Establish incident ownership across these boundaries instead of assigning all mismatches to the feature-store team.

Scope all prediction, snapshot, replay, diagnostics and lineage access by authorized tenant, entity and purpose. A feature vector may include private attributes that the viewer is not entitled to see. Expose safe reason codes and restricted detailed evidence rather than raw vectors in general logs. Snapshot IDs and hashes do not authorize access. Protect correction and approval pointers from untrusted input and enforce current revocation and deletion requirements.

14. Production test plan#

Test the real-time and historical pipelines on the same approved source fixture, including event and availability timestamps, out-of-order updates, late arrivals, correction/retraction, duplicate IDs, idle partitions and source epoch reset. Verify semantic parity at identical evidence cutoffs before evaluating different snapshots. Test exact window endpoints, missing mandatory features, per-source availability limits, incompatible model/feature versions, mismatched target horizon and scope.

Exercise prediction reconciliation with delayed results, multiple artifact revisions, approved snapshots without matching scores, invalid numeric scores, deliberate same-evidence conflicts and bounded rescore failure. Confirm deterministic precedence is unaffected by arrival order and score magnitude. Test stochastic-model handling where relevant using its declared contract, not a blanket equality requirement. Test actual availability-aware historical reconstruction against logged serving vectors; a replay that includes a late-arriving event in an earlier decision must fail acceptance.

Test the deployed storage and activation protocol with concurrent correction and live score publication, stale worker completion, crash after staging, replay, partial source outage, deletion, source retention exhaustion and invalidation races. Verify actual action-time rechecks and the distinction between correction and remediation. Validate access to tenant-scoped feature and prediction artifacts, and test unauthorized requests and malicious metadata. Benchmark live inference and correction recovery separately, including shared resource contention. Confirm quality and calibration on representative mature outcomes using as-served data rather than only corrected historical data.

The executed local fixture proves selected arbitration invariants, not these end-to-end properties. No actual pipeline, model, data store concurrency, cloud infrastructure or security test was run.

15. Interview-ready answer#

I would begin by defining the logical prediction key, target horizon, event cutoff and intended reconciliation mode. I would require each prediction to carry exact feature evidence, source revision and availability lineage, model and feature-definition versions, and validity. I would preserve original live inputs and separate later corrected historical evidence. I would compare predictions only after aligning the target, source semantics and knowledge boundary, and diagnose whether differences reflect legitimate late data, stale materialization, incompatible transformations, source corruption or model behavior.

I would use a trusted, versioned evidence-selection policy to resolve the admissible feature manifest for the intended use. I would select a valid matching prediction, rescore on that exact pinned vector if necessary, or abstain if completeness or compatibility cannot be established. I would never average incompatible scores or select the result that arrived last. Corrections would create new immutable artifacts and conditionally update appropriate current pointers without changing what an earlier decision actually saw. Protected actions would revalidate current policy and evidence.

Finally I would measure paired coverage, expected versus unexplained disagreement, feature and score differences, decision changes, actual as-served quality and recovery latency. I would validate late-data handling, historical availability, concurrent publication and rollback, with bounded rescore capacity and scoped provenance.

The decisive distinction is between what was true for an event time, what was knowable at a decision time, and what is approved for the intended use today. A correct reconciliation preserves all three.

References and research transparency#

The authorized offline research exception applies. These references identify established streaming research, feature retrieval documentation, data versioning, lineage and evaluation guidance. Current URL availability, contents and the Supabase changelog could not be live-verified. Four meaningful standard triple-backtick Mermaid diagrams received structural review; Mermaid parser and frontend rendering were not tested. The exact Python fixture was executed locally using Python 3.13.5, with 21 assertions passing. All numerical scenarios and contracts are illustrative. No actual streaming pipeline, feature store, model inference, historical dataset, distributed consistency, security or load test was performed.

Related questions

Explore other topics:Forward Deployed EngineeringMachine LearningMLOpsPython