EN

Three rebuilds, eight batches: where should you check an incremental pipeline?

Two checkpoint policies got three rebuilds each. See which dbt faults they caught, which ones healed between checks, and why a full rebuild can still be wrong.

With three clean rebuilds each, evenly spaced checkpoints caught 8 of 9 injected fault cases and risk-based checkpoints caught 7 of 9. I kept the Incremental Replay default of checking every step and left sparse checkpoints explicit. The risk heuristic caught one fewer fault on this nine-case synthetic panel.

Give both policies the same budget

Incremental Replay runs a real dbt model through an ordered series of source snapshots in DuckDB. At a checkpoint, it builds the same model from scratch using the same snapshot and clock, then compares the persisted rows. The benchmark ran eight incremental builds and three clean reference builds for each policy on the same inputs.

Even spacing checked batches 3, 6, and 8. The risk policy checked the final batch and the two most recent batches tagged as a late correction or retry, falling back to regularly spaced checks if needed. I tested three fault families across three fixed seeds and ran clean controls separately. Benchmark protocol

Injected fault Even spacing Risk-based
Destination predicate creates duplicates 3/3 3/3
Strict watermark misses updates 3/3 3/3
Cutoff error heals between batches 2/3 1/3
Total 8/9 7/9

The difference came from the transient cutoff fault. Each policy also produced zero false alarms on three clean controls, counted separately from the nine injected fault cases. A different spread of fault timings could change the outcome.

One order was missing for exactly one batch

In seed 379, order 106 entered the batch 6 snapshot with an amount of $37.58 and an update timestamp exactly equal to the batch clock. The incremental filter used updated_at < as_of while the clean build used updated_at <= as_of. That one-character difference kept the order out of the incremental table for one batch.

Batch What happened to order 106 What the policies saw
6 Missing in the incremental table, present in the clean rebuild Even spacing checked and caught it
7 The clock advanced and the incremental model picked up the order The two outputs agreed again
8 Both outputs still held the correct row Both policies checked and saw agreement

The risk policy selected batches 3, 4, and 8 for this seed. Its next check came after the order was back. A reader looking only at the final result would see a correct table and miss the one-batch gap.

A clean rebuild can share the same bug

The benchmark included a separate negative control. One model variant computed amount_cents + 1 in the shared SELECT list. That expression ran in both the incremental and clean builds, so they agreed on the same wrong amounts at every checkpoint.

The independent Python oracle read the source CSV, selected the rows visible at the batch clock, and used their original integer amounts. It compared those expected rows with the incremental output at every batch and with the clean rebuild at each checkpoint. The oracle found wrong amounts in all six shared-bug runs. I kept these runs outside the nine-case detection denominator because they test the limits of the reference, independent of where a checkpoint lands. Oracle and benchmark code

Reproduce the panel

From the Incremental Replay checkout, with Python and uv installed, run the panel and write the rerun to a separate file.

uv run --locked python benchmarks/checkpoints.py --jobs 3 --output checkpoint-rerun.json

The raw results include the selected batches, the oracle’s first mismatch, and which checks detected it. For a shorter walkthrough of a single fault, try When dbt tests pass and revenue is still wrong.