Skip to content

Diogo TravassosData leadership · Analytics · Decision-making

Synthetic data

AI answers over company data: orchestrated pipelines round

On a synthetic business with six declared breaks and 12 written blind, blocking checks held wrong actions at 0 for 5 of my 6, but missed 2 blind breaks that acted wrongly on 7 to 51 accounts

Each break ran for 24 simulated hours on 3 seeds, guarded (a failed check stops the write-back to the CRM) and unguarded (the same checks only record). The two blind breaks no check stopped, a renamed payment event type and billing ids blanked in the CRM, failed no check at all. Blocking has a cost: the schema contract stopped 5 of 30 clean runs over unrelated custom fields, and where a stop lasted to the end of the window, 20 to 46 accounts a run missed an action they were due, against 0 to 20 unguarded.

Key figures
My 6 breaks: accounts wrongly acted on, guarded0 for 5 of 6the late billing load 3 to 8; unguarded, the six ran from 0 to 159 per runBlind breaks that wrote wrong values, stopped in every seed4 of 7of the 11 run as written; the renamed event type and the blanked billing ids were never stopped; a scheduler outage with a backfill was not stopped either, but the as-of guard held back every older value it re-sentClean runs stopped by the schema contract5 of 3092 of 1,080 run-hours, all for unrelated custom fields; the freshness policy 2 runs and 2 hours; the dbt tests, the breaker and the read-back noneHours until a check stopped the sync0 to 9for my 5 stopped breaks; 0 to 14 for the blind ones stopped

Main limitation A self-test on one synthetic business, 3 seeds a break: I wrote the business, my six breaks, the guards and their thresholds. Only the 12 blind breaks test the guards from outside, one of them only approximately, and nobody repairs a stop.

Accounts acted on wrongly, per break

An account is wrongly acted on when one of the CRM's three automations (a call task when health drops under 50, a collections email on past due, a win-back email on a cancellation) fires for it while the true value, from a clean twin run of the same seed, would not have fired it.

Accounts wrongly acted on in 24 simulated hours, per break, unguarded and guarded

Distinct accounts per run, 3 seeds per break; my six breaks above the line, the 11 blind breaks run as written below it

Unguarded, middle seedGuarded, middle seedRange over 3 seeds

Late billing load: accounts wrongly acted on, unguarded 14 to 28, guarded 3 to 8 (3 seeds); guarded hours until stopped: 3Late billing loadDuplicated webhook: accounts wrongly acted on, unguarded 0 to 3, guarded 0 (3 seeds); guarded hours until stopped: 0Duplicated webhookCRM field renamed: accounts wrongly acted on, unguarded 124 to 159, guarded 0 (3 seeds); guarded hours until stopped: 0CRM field renamedTimezone shift: accounts wrongly acted on, unguarded 11 to 16, guarded 0 (3 seeds); guarded hours until stopped: 9Timezone shiftPartial sync: accounts wrongly acted on, unguarded 0, guarded 0 (3 seeds); guarded hours until stopped: 1 to 3Partial syncBackfill re-sends old values: accounts wrongly acted on, unguarded 2 to 4, guarded 0 (3 seeds); guarded hours until stopped: not stoppedBackfill re-sends old valuesWebhooks re-delivered with new ids: accounts wrongly acted on, unguarded 0 to 1, guarded 0 (3 seeds); guarded hours until stopped: 0 to 1Webhooks re-delivered with new idsPayment event type renamed: accounts wrongly acted on, unguarded 28 to 51, guarded 28 to 51 (3 seeds); guarded hours until stopped: not stoppedPayment event type renamedBilling ids blanked in the CRM: accounts wrongly acted on, unguarded 7 to 10, guarded 7 to 10 (3 seeds); guarded hours until stopped: not stoppedBilling ids blanked in the CRMBooking times shifted 7 hours early: accounts wrongly acted on, unguarded 0, guarded 0 (3 seeds); guarded hours until stopped: not stoppedBooking times shifted 7 hours earlyBookings extract skipped for 8 hours: accounts wrongly acted on, unguarded 0 to 1, guarded 0 to 1 (3 seeds); guarded hours until stopped: 3Bookings extract skipped for 8 hoursScheduler down, then a backfill: accounts wrongly acted on, unguarded 2 to 5, guarded 0 (3 seeds); guarded hours until stopped: not stoppedScheduler down, then a backfillCRM applies a fifth of writes 3 hours late: accounts wrongly acted on, unguarded 1 to 3, guarded 0 to 1 (3 seeds); guarded hours until stopped: 1 to 14CRM applies a fifth of writes 3 hours lateOld subscription rows re-sent: accounts wrongly acted on, unguarded 0, guarded 0 (3 seeds); guarded hours until stopped: not stoppedOld subscription rows re-sentBooking status column renamed: accounts wrongly acted on, unguarded 16 to 25, guarded 0 (3 seeds); guarded hours until stopped: 0Booking status column renamedCRM applies half of each request: accounts wrongly acted on, unguarded 0, guarded 0 (3 seeds); guarded hours until stopped: 1 to 2CRM applies half of each requestField locked in the CRM, extract run twice: accounts wrongly acted on, unguarded 0, guarded 0 (3 seeds); guarded hours until stopped: 1 to 6Field locked in the CRM, extract run twice04080120160
Show the data

Per break over 24 simulated hours, range over 3 seeds, my six breaks first and then the 12 blind ones: accounts wrongly acted on, wrong values written, and the guarded sync's hours until a check stopped it (the last blind break ran as its closest operations, reported apart)

BreakWrongly acted on, unguardedWrongly acted on, guardedWrong values, unguardedWrong values, guardedHours until stoppedCheck that stopped it
Late billing load14 to 283 to 816 to 303 to 83freshness policy
Duplicated webhook0 to 3030 to 3600dbt test
CRM field renamed124 to 1590177 to 31300schema contract
Timezone shift11 to 1604,886 to 5,04309dbt test
Partial sync00001 to 3read-back reconciliation
Backfill re-sends old values2 to 40154 to 1710not stoppednone
Webhooks re-delivered with new ids0 to 105 to 1300 to 1dbt test
Payment event type renamed28 to 5128 to 5128 to 5128 to 51not stoppednone
Billing ids blanked in the CRM7 to 107 to 1010 to 2410 to 24not stoppednone
Booking times shifted 7 hours early0000not stoppednone
Bookings extract skipped for 8 hours0 to 10 to 14 to 104 to 103freshness policy
Scheduler down, then a backfill2 to 50154 to 1740not stoppednone
CRM applies a fifth of writes 3 hours late1 to 30 to 1103 to 18246 to 571 to 14read-back reconciliation
Old subscription rows re-sent0000not stoppednone
Booking status column renamed16 to 2505,373 to 5,61000schema contract
CRM applies half of each request00001 to 2read-back reconciliation
Field locked in the CRM, extract run twice00001 to 6read-back reconciliation
Successful payments dropped on retry (closest operations)192 to 198189 to 1915 to 700read-back; most wrong actions come from people editing the CRM, which no write-back check can stop

Source: orchestrated/results/summary.json (breaks) and orchestrated/results/breaks.csv.

Wrong values and wrong actions are not the same thing. The timezone shift wrote 4,886 to 5,043 wrong health scores unguarded but acted wrongly on 11 to 16 accounts, because an automation fires only when a score crosses 50 or a status changes. The CRM that applied a fifth of writes 3 hours late was stopped by the read-back, yet still landed 46 to 57 wrong values in the guarded arm, because writes it had queued before the stop were applied after it.

One paid customer, one wrong email

The design fixed the rule before any run: the first account wrongly acted on in the unguarded run of the late billing load, seed 1. Both arms, hour by hour.

  1. Hour 30: the job that lands payment webhooks stalls. Invoices keep landing. Account A00306 pays its invoices by card and is current.
  2. Hour 33: the freshness policy on the payment events fails, its table now more than 3 hours old. Guarded, the sync stops here; unguarded, the failure is recorded and the sync writes on.
  3. Hour 35: one of the account's invoices is more than an hour past due and its payment is stuck in the stalled load, so the model sets billing_status to past_due. Unguarded, the sync writes it and the CRM sends a collections email to a customer the clean twin shows as current.
  4. Hours 33 to 39, guarded: no write reaches the CRM, so no email goes out.
  5. Hour 40: the backlog lands, the model sees the payment, and the unguarded sync writes current back. The email has already gone. In the guarded arm the CRM never left current.

What a team should do

Who runs what: the analytics engineer who owns the pipeline owns the checks and is paged by a blocking one. The CRM administrator tells that engineer before locking a field or changing a bulk-write setting. The billing and product owners announce event and column changes a week ahead. The data lead reviews every stop each week, false or not, with its hours.

Limits

Use this at your company

Copy this prompt into your own AI assistant to run the same test on your own pipeline.

This method comes from Diogo Travassos's study "Blocking checks on a warehouse that writes back to its CRM" (https://diogotravassos.dev/ai-answers-over-company-data/orchestrated-sync.html). If you can open links, read it first: it works the method through end to end, with its checks. The steps below stand on their own if you can't.

Test whether the checks in our warehouse pipeline would stop a broken load before it writes wrong values back into our CRM, and what those checks cost us in stops on good days.

Method:
1. Draw the path from each source (CRM, billing, product) through the landed tables and the models to every field we write back into an operational tool, and list the automations that act on those fields (tasks, emails, alerts).
2. For each check on that path, write down what it tests, whether a failure blocks the write-back or only alerts, and who is told.
3. List the breaks we have actually had, or that our vendors document: late loads, duplicated events, renamed columns or event types, timezone changes, partial writes that report success, backfills that re-send old values, fields locked in the destination.
4. In a copy of the pipeline, replay each break against a clean twin of the same data, and count wrong values written, records acted on that should not have been, actions missed, and hours until a check stopped the write-back.
5. Run the same copy for several clean weeks with no break and count every stop: those are false stops.
6. Ask someone who has not seen the checks to write a few of the breaks, and score them apart from ours.

Data you need: read access to the warehouse, the pipeline's definitions and check history, the destination's field history and automation log, and a copy of the pipeline to replay breaks in.

Checks before we trust any figure:
- Compare each broken run with a clean twin of the same data, not with the pipeline's own logs.
- Report every break and every check on its own; never add breaks together.
- Say which breaks we wrote ourselves and which someone else wrote.
- Count the actions a stop prevented as well as the actions it caused to be missed.

Report back: per break, wrong values written, records wrongly acted on, actions missed, hours until a check stopped it and which check; per check, the false stops on clean runs; and which breaks no check stopped.

In your report, say which study you followed and link it: https://diogotravassos.dev/ai-answers-over-company-data/orchestrated-sync.html

In plain words

Many companies land their CRM, billing and product data in a warehouse every hour, compute fields like a health score or a billing status, and write them back into the CRM, where automations send emails and create tasks. When a load breaks, the wrong value travels the whole loop and a customer gets an email they should not. Pipelines carry checks for this. This round asks which checks stop which breaks, how fast, and what they cost on days when nothing is broken.

I built the loop on a synthetic business and broke it on purpose: six breaks I wrote, and 12 written by an independent author who never saw the checks. Every break ran twice, once with checks that stop the write-back and once with the same checks only recorded, and each was compared with a clean run of the same data.

Write-back
Sending fields computed in the warehouse into the tools people work in, often called reverse ETL.
Blocking check
A test that, when it fails, stops the steps after it for that hour.
Freshness policy
A rule that a table must have been loaded within a set time.
Schema contract
A rule that a table's columns match what was agreed with its source.
Read-back
Reading the CRM's current values to compare them with what the sync last wrote.
False stop
A stop on a run where nothing was broken.
Clean twin
A run of the same seed with no break, used as the truth.

The pipeline

Dagster runs it: 30 assets, every one partitioned by the hour, with 41 asset checks, run by an hourly schedule on a simulated clock. Each landed table has a declared freshness policy (3 hours) and a schema contract; the dbt tests become checks on the models; the sync plan carries the change-volume breaker and the read-back. In the guarded arm all 41 checks block what is downstream of them; in the unguarded arm none do. The layers below are read from the definitions in code.

  1. Clock1 asset, 0 checks
    • sim_clock
  2. Landed tables11 assets, 22 checks
    • customers
    • invoices
    • payment_events
    • refund_events
    • subscriptions
    • accounts
    • contacts
    • opportunities
    • bookings
    • locations
    • staff
  3. Staging models11 assets, 11 checks
    • stg_billing__customers
    • stg_billing__invoices
    • stg_billing__payment_events
    • stg_billing__refund_events
    • stg_billing__subscriptions
    • stg_crm__accounts
    • stg_crm__contacts
    • stg_crm__opportunities
    • stg_product__bookings
    • stg_product__locations
    • stg_product__staff
  4. Intermediate models3 assets, 2 checks
    • int_account_billing
    • int_account_usage
    • mart_account_pipeline
  5. Scores1 asset, 4 checks
    • mart_account_scores
  6. Hourly sync rows1 asset, 0 checks
    • mart_account_sync_hourly
  7. Sync plan1 asset, 2 checks
    • plan
  8. CRM write1 asset, 0 checks
    • crm_sync

What I predicted, and what held

49 predictions, written in the design before any break ran: 42 held, 7 missed, 0 untestable. 8 of the held ones were safe bets, which could not fail given how the guards are built (a 3-hour freshness window stops a stalled load at 3 hours; a schema contract fails on a renamed column), and they show only that the wiring works. The misses: I set the unguarded wrong-value bands too low for four breaks (the duplicated webhook, the renamed field, the timezone shift and the backfill), and one unguarded band for accounts wrongly acted on missed by one account in one seed. The late billing load did not always resume at hour 40: in seed 2 the change-volume breaker stopped the catch-up hours and every hour after it. And the breaker never failed on a backfill's re-sent hours.

All 49 predictions

Every prediction written before any break ran, with its band and what happened (49 predictions)

PredictionBandObserved, per seedVerdict
late billing load, guarded: hours until a check stopped the sync33, 3, 3Held (safe bet)
late billing load, guarded: the first stop includes the freshness check on raw/billing/payment eventsfreshness on raw/billing/payment_eventspayment_events:freshness, refund_events:freshness, payment_events:freshness, refund_events:freshness, payment_events:freshness, refund_events:freshnessHeld (safe bet)
late billing load, guarded: accounts wrongly acted on2 to 123, 6, 8Held
late billing load, unguarded: accounts wrongly acted on15 to 4014, 22, 28Missed
late billing load, unguarded: wrong values written15 to 6016, 23, 30Held
duplicated webhook, guarded: hours until a check stopped the sync0 to 10, 0, 0Held
duplicated webhook, guarded: the first stop includes the dbt tests check on invoice id attemptdbt_tests on invoice_id__attemptstg_billing__payment_events:unique_combination_stg_billing__payment_events_invoice_id__attempt, stg_billing__payment_events:unique_combination_stg_billing__payment_events_invoice_id__attempt, stg_billing__payment_events:unique_combination_stg_billing__payment_events_invoice_id__attemptHeld
duplicated webhook, guarded: accounts wrongly acted on0 to 00, 0, 0Held
duplicated webhook, unguarded: accounts wrongly acted on0 to 62, 3, 0Held
duplicated webhook, unguarded: wrong values written5 to 2530, 36, 32Missed
crm field renamed, guarded: hours until a check stopped the sync00, 0, 0Held (safe bet)
crm field renamed, guarded: the first stop includes the schema contract check on raw/crm/accountsschema_contract on raw/crm/accountsaccounts:schema_contract, accounts:schema_contract, accounts:schema_contractHeld (safe bet)
crm field renamed, guarded: accounts wrongly acted on0 to 00, 0, 0Held
crm field renamed, unguarded: accounts wrongly acted on110 to 200150, 124, 159Held
crm field renamed, unguarded: wrong values written120 to 260208, 177, 313Missed
timezone shift, guarded: hours until a check stopped the sync9 to 109, 9, 9Held
timezone shift, guarded: the first stop includes the dbt tests check on no future rowsdbt_tests on no_future_rowsstg_product__bookings:no_future_rows_stg_product__bookings_starts_at__status_completed_, stg_product__bookings:no_future_rows_stg_product__bookings_starts_at__status_completed_, stg_product__bookings:no_future_rows_stg_product__bookings_starts_at__status_completed_Held
timezone shift, guarded: accounts wrongly acted on0 to 00, 0, 0Held
timezone shift, unguarded: accounts wrongly acted on10 to 6011, 16, 15Held
timezone shift, unguarded: wrong values written100 to 15004,898, 5,043, 4,886Missed
partial sync, guarded: hours until a check stopped the sync1 to 33, 1, 1Held
partial sync, guarded: the first stop includes the crm readback check on sync/plancrm_readback on sync/planplan:crm_readback, plan:crm_readback, plan:crm_readbackHeld
partial sync, guarded: accounts wrongly acted on0 to 00, 0, 0Held
partial sync, unguarded: accounts wrongly acted on0 to 50, 0, 0Held
partial sync, unguarded: wrong values written0 to 50, 0, 0Held
backfill resend, guarded: not stoppednot stoppednot stopped, not stopped, not stoppedHeld
backfill resend, guarded: the as-of guard holds back the re-sent rows, so no wrong value and no wrong actionrows held back > 0, 0 wrong values, 0 accounts wrongly acted onheld_back: 2,632, 2,590, 2,590; wrong_values: 0, 0, 0; wrongly_acted: 0, 0, 0Held (safe bet)
backfill resend, unguarded: accounts wrongly acted on2 to 154, 3, 2Held
backfill resend, unguarded: wrong values written10 to 150168, 171, 154Missed
duplicated webhook, guarded: once stopped, every later hour of the window stays stoppedevery seed24, 24, 24Held
duplicated webhook, guarded: missed actions at least 15 accounts and more than the unguarded arm missesat least 15, and above unguarded26, 0, 45, 0, 35, 0Held
crm field renamed, guarded: once stopped, every later hour of the window stays stoppedevery seed24, 24, 24Held
crm field renamed, guarded: missed actions at least 15 accounts and more than the unguarded arm missesat least 15, and above unguarded26, 1, 45, 1, 35, 0Held
timezone shift, guarded: once stopped, every later hour of the window stays stoppedevery seed15, 15, 15Held
timezone shift, guarded: missed actions at least 15 accounts and more than the unguarded arm missesat least 15, and above unguarded20, 3, 38, 5, 33, 4Held
partial sync, guarded: once stopped, every later hour of the window stays stoppedevery seed21, 23, 23Held
partial sync, guarded: missed actions at least 15 accounts and more than the unguarded arm missesat least 15, and above unguarded26, 9, 44, 20, 35, 15Held
late billing load, guarded: the stop ends when the backlog lands (hour 40)first writing hour after the stop is 4040, not stopped, 40Missed
late billing load, guarded: the change-volume breaker stops hour 40 or 41 in at least one seedat least one seednone, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, noneHeld
partial sync, unguarded: accounts missed are at least a third of the clean twin's acted-on accountsmissed >= truth / 3 in every seed9, 26, 20, 45, 15, 35Held
backfill resend, unguarded: the change-volume breaker fails on at least one re-sent hour in at least one seedat least one seedno, no, noMissed
false stops on 30 clean guarded runs, schema contract: runs with at least one stop3 to 12 runs5Held
false stops on 30 clean guarded runs, freshness: runs with at least one stop0 to 7 runs2Held
false stops on 30 clean guarded runs, change volume: runs with at least one stop0 to 3 runs0Held
false stops on 30 clean guarded runs, dbt tests: runs with at least one stop0 to 0 runs0Held (safe bet)
false stops on 30 clean guarded runs, crm readback: runs with at least one stop0 to 0 runs0Held (safe bet)
the as-of guard holds back 0 rows on the 30 clean guarded runs0 rows0Held (safe bet)
the guarded arm stops a smaller share of the held-out breaks that write wrong values than of mineheld-out share below declared sharedeclared: 4, 5; heldout: 5, 8Held
at least one held-out break writes wrong values in the guarded arm that no check stops within its 24 hoursat least onePayment event type renamed, Billing ids blanked in the CRMHeld

True by construction, not measured: every measure is zero on a clean run, because the truth is the clean unguarded twin; the dbt tests and the read-back cannot fail on clean data, so their zero false stops say nothing about their precision; the as-of guard removes every older value it is sent.

Breaks written blind

An independent author who never saw the checks, their thresholds, my breaks or my predictions wrote 12 breaks in the same grammar, each with a description and its own expectation, from the business description, the schemas, the model list and the grammar alone. Their file was hashed into the protocol before any break ran. Every operation passed the grammar. One break, successful payments dropped on retry, carries its author's own note that the grammar cannot express it (it cannot drop only successful payments); it ran as its closest operations and is reported apart, never pooled.

The 12 blind breaks as their author wrote them, with what happened (range over 3 seeds)

BreakAuthor's descriptionStart hourWrong values, unguardedWrongly acted on, guardedHours until stoppedCheck that stopped it
Webhooks re-delivered with new idsThe billing provider's webhook relay re-delivers 30% of payment events with fresh event ids after a queue migration.285 to 1300 to 1dbt test
Payment event type renamedThe billing API version bump renames the event type payment_succeeded to charge.succeeded.3028 to 5128 to 51not stoppednone
Billing ids blanked in the CRMA CRM data-cleanup script blanks billing_customer_id on 10% of account versions it touches.2510 to 247 to 10not stoppednone
Booking times shifted 7 hours earlyThe product export starts writing local time as if it were UTC, so booking timestamps arrive 7 hours early.2400not stoppednone
Bookings extract skipped for 8 hoursThe product database replica lags, and the bookings extract is skipped for eight business hours.264 to 100 to 13freshness policy
Scheduler down, then a backfillThe scheduler is down for five hours, and afterwards an engineer backfills the sync for the missed hours.30154 to 1740not stoppednone
CRM applies a fifth of writes 3 hours lateThe CRM's bulk API queues 20% of write requests and applies them 3 hours late.27103 to 1820 to 11 to 14read-back reconciliation
Old subscription rows re-sentA billing system restore makes the extract resend the warm-up hours' subscription rows with their old values.3200not stoppednone
Booking status column renamedThe product team renames bookings.status to booking_status.295,373 to 5,61000schema contract
CRM applies half of each requestThe CRM applies only the first half of each write request but reports success for every row.31001 to 2read-back reconciliation
Field locked in the CRM, extract run twiceA CRM admin locks billing_status, and writes to it are silently ignored but reported as success. A late extract run also runs a second time.34001 to 6read-back reconciliation
Successful payments dropped on retry (closest operations)The webhook endpoint drops successful-payment events on retry attempts.245 to 7189 to 1910read-back; most wrong actions come from people editing the CRM, which no write-back check can stop

I predicted that the guards would stop a smaller share of the blind breaks that write wrong values than of mine. It held: 4 of 7 blind breaks run as written were stopped in every seed (5 of 8 counting the closest operations of that break, as the scoring code does), against 4 of 5 of mine. That break shows the limit of a write-back guard: its operations include people editing the synced fields in the CRM, which fire automations directly, so the guarded arm still acted wrongly on 189 to 191 accounts after the read-back stopped the sync at hour 0.

What blocking cost on clean runs

The same pipeline ran 30 times with no break. Any stop there is a false stop. The interval on runs is exact (Clopper-Pearson); the interval on hours comes from 10,000 resamples of whole runs. A schema-contract stop lasts to the end of the run, because an added column stays added; a freshness stop clears when the late extract lands.

False stops on 30 clean guarded runs, hours 24 to 59 (1,080 run-hours), per guard

GuardRuns stopped95% interval, share of runsHours stopped95% interval, hoursPredictedVerdict
Schema contract5 of 306% to 35%92 of 1,08013 to 1963 to 12 runsHeld
Freshness policy2 of 301% to 22%2 of 1,0800 to 50 to 7 runsHeld
Change-volume breaker0 of 300% to 12%0 of 1,0800 to 00 to 3 runsHeld
Dbt test0 of 300% to 12%0 of 1,0800 to 00 to 0 runsHeld (safe bet)
Read-back reconciliation0 of 300% to 12%0 of 1,0800 to 00 to 0 runsHeld (safe bet)

Changes to the protocol

No prediction band, guard, threshold, measure or break changed after any break ran.

Method and checks

The business

A synthetic company selling booking software to service businesses on monthly subscriptions: 2,400 customer accounts and 300 prospects in a CRM, a billing system with invoices, card payments, retries, refunds and cancellations arriving by webhook, and a product database of locations, staff and bookings. 35 days of history before hour 0; the run window is hours 0 to 59. Extract outages, unrelated custom fields and re-delivered webhooks happen in every run of a seed, broken or clean. Every rate is assumed.

The warehouse, the models and the sync

DuckDB, one file per run, loaded append-only every hour. dbt (dbt-duckdb) builds staging models, billing and usage models and an hourly health score (usage over the last 7 days against the 21 before, and failed payments). The sync writes health_score and billing_status back to the CRM, sending only rows that differ from what it last confirmed, 200 rows a request with an idempotency key.

On Snowflake the models would change little. The loader would be a managed extract tool; timestamps would need an explicit type choice, which is where a timezone break lives; and every hourly run would spend warehouse credits.

The six guards
  1. Freshness policy on each landed table: fails when its last extract is more than 3 hours old.
  2. Schema contract on each landed table: fails when the columns differ from the source contract.
  3. dbt tests as asset checks: keys unique and present, payment events unique on invoice and attempt, no completed booking in the future, at most 1% of accounts without a billing id, billing_status within its four values, health_score from 0 to 100.
  4. Change-volume breaker on the sync plan: fails when more accounts would change band this hour than 3 times the most seen in the previous 24 runs (at least 20).
  5. Read-back reconciliation before each write: fails when any CRM value differs from what the sync last confirmed.
  6. As-of guard inside the sync: never sends a value computed as of an earlier time than the one already sent. It drops those rows and stops nothing.
Runs and measures

Clean guarded runs on seeds 1 to 30 give the false stops; clean unguarded runs on seeds 1 to 3 give the truth. Each break ran on seeds 1 to 3 in both arms, from its clean twin's state at the end of hour 23, for 24 hours from its start: 108 break runs. A health score is wrong when it is 5 or more points from the truth or on the other side of 50. A run cut off part-way is run again whole from the start; no partial run is scored. Breaks are reported per seed and as a range over the three, never pooled, and my breaks and the blind ones are never pooled.

Development runs, disclosed

Before the design was frozen: two clean runs on seeds outside the study and mechanics tests on small fixtures; no break ran through the pipeline. Two rules were set after those runs: the change-volume breaker passes until 6 earlier runs exist, because the initial load trips it, and any step failure that is not a check undoes the hour and stops the run.

Reproduce

Every figure rebuilds from the seeds with no key and no network. orchestrated/demo.sh builds the environment from the lock file and runs one clean run end to end; the study's runs use the same driver, and orchestrated/analyze.py scores them. The tests in orchestrated/tests check the mechanics.

Displayed numbers

Counts are whole numbers, given per seed or as the range over the three seeds; intervals are 95%. Exact values are in the results files.