Yesterday, payment_status = 1 meant SETTLED and 2 meant REVERSED. Today, the producer reuses 1 for AUTHORISED, 2 for SETTLED and adds 3 for REVERSED. The field remains INTEGER. Parsing succeeds. SettledPaymentCount_30d now counts authorisations.
RISK MEANING: WRONG
A complete contract governs structure and economic interpretation
| Layer | Defines | Examples |
|---|---|---|
| Syntactic | Fields, types, required/optional, enum shape, nullability and structure | amount DECIMAL; payment_status required |
| Semantic | Economic meaning, units, time basis, scope, ownership and version | minor units; settled time; principal-only balance |
type SemanticContract = {
field: string;
meaning: string;
unit?: string;
timeBasis?: string;
owner: string;
version: string;
};Ask what status=1 means, whether amount is gross or net, whether time is UTC or local, whether balance includes pending and whether payment date means initiated or settled. Schema validation cannot answer these questions.
Silent drift has six forms that demand different evidence
| Drift | Same technical shape | Economic failure |
|---|---|---|
| Unit | amount = 500 | €500 becomes 500 cents / €5 |
| Scale | utilisation numeric | 0.72 becomes 72 |
| Null meaning | NULL | Unavailable becomes not applicable |
| Timestamp | timestamp | Settlement time becomes processing time |
| Timezone | parseable timestamp | UTC becomes local without offset |
| Sign | numeric amount | Signed reversal becomes positive amount + type |
| Scope | balance numeric | Principal-only becomes principal + interest + fees |
| Aggregation | amount numeric | Transaction row becomes daily aggregate |
Unknown enums must not silently become OTHER when distinctions affect models. Date rounding can leak same-day information; join-key formatting such as 001234 → 1234 can collapse identity coverage without breaking a type.
The registry gives every critical source technical and domain ownership
type DataContract = {
source: string;
object: string;
version: string;
schema: SchemaDefinition;
semantics: SemanticDefinition[];
owner: string;
};The producer declares schema version, semantic version and change type where possible. Consumers declare exactly which fields and interpretations they depend on. Technical owners understand format; domain owners establish economic meaning.
| Class | Example | Governance |
|---|---|---|
| Additive compatible | Unused optional field | Proportional validation; usually non-blocking |
| Syntactic breaking | INTEGER → STRING | Explicit adapter/consumer change |
| Semantic breaking | payment_date redefined | Versioned semantic review and impact assessment |
| Behavioural breaking | Upstream filter changes emitted population | Shadow distributions, features and decisions |
Use meaningful schemaVersion and semanticVersion; do not over-version irrelevant metadata. Compatibility is a producer/consumer matrix, not a label attached only to the producer.
Field-to-decision lineage turns a source change into a measurable blast radius
Each feature value records its source-contract version, canonical mapping version and feature-definition version. Training dataset manifests retain contract versions; otherwise historical reproduction silently uses today's semantics.
Versioned adapters absorb source churn without hiding real semantic change
A source rename should require only an adapter change while canonical output stays stable. If economic meaning truly changes, version the canonical contract rather than conceal it inside mapping logic.
type SourceChangeManifest = {
source: string;
changeVersion: string;
expectedChanges: string[];
effectiveAt: Date;
};During a transition window, process explicit message versions; do not infer them from payload guesses. An unsupported version is quarantined or fails controlled for decision-critical data. Keep the prior adapter available for rollback without deleting received raw events.
Shadow and canary validation must reach the decision layer
| Layer | Compare |
|---|---|
| Canonical | Event type, amount, identity, effective/available timestamps |
| Feature | Entity-level values and distributions |
| Model | Score/band deltas under the same model |
| Decision | Outcome and action transitions by materiality |
Small feature changes can cross policy boundaries, so feature stability does not guarantee decision stability. Before release: contract tests pass, canonical and feature diffs are understood, decision impact is reviewed and rollback is executable. Canary a controlled sample before full cutover.
Runtime sentinels catch unannounced source changes
| Signal | Possible break |
|---|---|
| Unknown enum appears | Unannounced code/version change |
| Amounts become 100× smaller | Unit change |
| Received−event time shifts exactly one hour | Timezone/DST interpretation |
| Null rate 1% → 45% | Producer or population failure |
| Category cardinality changes | Enum/filter drift |
| MappingCoverage falls | Join-key/identity drift |
| Row volume collapses/spikes | Extraction/filter change or genuine seasonality |
| Freshness deteriorates | Cadence/latency contract broken |
Use domain-valid ranges and economic invariants such as reversal amount ≤ original amount or Available = Limit − Drawn − Pending under defined semantics. Distribution shifts are signals, not automatic proof: compare change context and borrower behaviour.
Historical data must retain the semantics effective at the time
A contract change needs effective_from. To rebuild an old feature or decision, load the historical source/canonical interpretation; applying today's adapter to old raw data can rewrite meaning.
| Change | Historical treatment |
|---|---|
| Source correction | Old data were wrong; preserve original and versioned restatement |
| Source redefinition | Meaning changes prospectively from effective date |
| Backfill under new semantics | Label state mode/version; never overwrite decision input history |
| Rollback after bad adapter | Replay durable raw data through corrected adapter into new projection |
Golden semantic cases and mutation tests attack meaning, not only shape
| Case | Input | Expected proof |
|---|---|---|
| A | €500 payment in declared minor units | Canonical amount and currency fixed |
| B | Causally linked reversal | Sign and original reference preserved |
| C | UTC timestamp | Effective ordering unchanged |
| D | Unknown enum | Governed quarantine/failure, never silent coercion |
| E | Missing identifier | Mapping failure visible; affected record not misjoined |
| Mutation | Detection |
|---|---|
| Multiply amount by 100 | Unit invariant/sentinel fails |
| Shift timezone | Timestamp-lag and ordering tests fail |
| Swap status mapping | Golden semantic output and feature diff fail |
| Flip sign convention | Financial-state invariant fails |
| Increase nulls | Null contract and runtime rate fail |
| Add unsupported version | Controlled quarantine/failure |
Run old and new adapters through the full feature and decision pipeline. Only changes declared in the change manifest should differ.
Semantic incidents require end-to-end scope and decision revalidation
Determine the interval from semantic change to detection, then use dependency lineage to identify affected raw records, canonical events, features, scores, decisions and actions.
Reconstruct corrected features/state and compare actual with corrected decisions. Preserve historical outcomes and route remediation through governance rather than overwriting them automatically.
Monitor contracts in economic units and decision outcomes
Also monitor payment totals, exposure, utilisation, reversal ratios and DPD transitions. These business measures reveal failures that parser success, schema registries and infrastructure uptime cannot.
The Entimema architecture gates source change by decision impact
- Define source contract
- Define semantic meaning
- Version changes
- Test compatibility
- Run shadow adapter
- Compare canonical outputs
- Compare features
- Measure decision impact
- Gate release
- Monitor runtime drift
- Roll back and replay if needed
A Data Contract & Semantic Drift Agent can trace silent change without approving it
A controlled agent can monitor versions, unknown fields and enums, null/cardinality/unit anomalies, compare contract versions, trace source fields to affected models, run feature comparisons, quantify decision impact and identify historical decisions affected by semantic defects.
Financial Data
Credit Risk
Decision Automation
Continue with Backpressure and Failure Recovery, From Batch ETL to Event-Driven Credit Risk Architecture, Building a Credit Risk Feature Store, Point-in-Time Correct Features, Streaming Behavioural Features, Decision Engine Monitoring and The Hidden Infrastructure Debt of Modern Lending. Infrastructure feature drift and decision-system observability remain future research directions—not fabricated routes.