← Back

2026-09-14

The Regulatory Audit Sampling Problem: Why BES Pipelines Are Optimized for Full Populations and Collapse Under Spot Checks

Every BES data team I have worked with has a moment they do not talk about publicly. EGM or SEDDK sends a list of ten participant certificate numbers and asks for the full computation trail behind a specific field — usually a state contribution eligibility flag, a fon dağılımı at a specific valör date, or a giriş aidatı deduction. The team knows the monthly submission was correct. The reconciliation totals matched. The aggregate reports passed every control. And yet nobody can reproduce those ten records on demand without rerunning the entire pipeline against a full month of data and grep-ing the output.

This is not a data problem. It is an architectural problem, and it is almost universal in Turkish pension and insurance shops.

The Batch Assumption Baked Into Everything

BES pipelines are almost always designed around one operating mode: process the full participant population, join against fon fiyatları, apply devlet katkısı rules, calculate hak kazanma, produce the EGM file. The logic is written assuming the batch context exists — the temp tables are populated, the reference snapshots are loaded, the calendar tables are joined, the previous month's balances are available in staging.

Remove that context and the code cannot execute. Some concrete examples I have seen:

The pipeline is correct. It is also completely opaque at the record level.

Why This Fails Under Regulatory Sampling

EGM and SEDDK do not audit datasets. They audit records. Their forensic methodology is explicitly designed around small samples — five, ten, twenty participant files — because the point is to trace the logic, not verify the arithmetic. When the auditor asks "why did this participant receive 23.47 TL of devlet katkısı in March instead of 24.10 TL", the expected answer is a deterministic trace: input values, rule references, intermediate calculations, final output.

What the auditor typically gets instead:

That last point is the one that turns a routine spot check into a finding. If you cannot reproduce the exact number that was submitted, you have implicitly admitted that your submission is not reproducible. And non-reproducibility, in a regulated pension context, is not a technical issue — it is a control weakness.

The Reproducibility Test Nobody Runs

Here is the test I recommend to every BES data lead: pick ten random certificate numbers from last month's submission. Without rerunning the batch, and using only code that exists in production, reproduce every calculated field for those ten records and produce the input values, the rule versions, and the intermediate steps.

Most teams fail this test on the first attempt. The failures cluster in predictable places:

None of these are exotic problems. They are the natural consequence of optimizing for throughput and reconciliation totals rather than for record-level explainability.

What Record-Level Auditability Actually Requires

Building a BES pipeline that survives regulatory sampling means treating single-record execution as a first-class use case, not an afterthought. Practically:

The architectural shift is significant. It means separating rule logic from orchestration logic, which most BES pipelines conflate. It means investing in reference data versioning, which most teams have deferred for years. It means accepting that the pipeline that processes ten million records and the tool that explains one record are the same system, not two.

The Uncomfortable Reframe

Auditability is not a report you generate. It is not a control you attest to. It is a property of whether your pipeline can answer, in isolation and after the fact, the question "why is this number what it is" for any single record you have ever submitted.

If the answer requires rerunning the batch, you do not have an auditable pipeline. You have a pipeline that has not yet been audited properly. The regulator's ten-record sample is not a stress test of your data. It is a stress test of your architecture. Most BES pipelines in Turkey would fail it today, and the teams running them know it.

The fix is not more controls on the output. The fix is designing the pipeline, from the beginning, to explain one record as clearly as it explains all of them.