# Comparison contract (REC-01). Fill it before any query. The comparison can run on the draft;
# until the owner approves it, REC-01 is WARN.
# Never edit it afterwards to bring the numbers closer; write a new version with a reason.
# Example values are fictional (Acme Cloud, Google Ads spend against the warehouse copy).

pair: "Google Ads platform report against stg_ads__daily_spend"
kind: copy                      # copy (must agree) or different_systems (bridge, never forced)
question: "Does the warehouse hold the spend Google Ads reports, account by account and day by day?"
entity: "account-day spend"
eligibility: "every Google Ads account in the manifest (FRS-01), production only"
key: [platform, account_id, date]
period: "2026-10-01 to 2026-10-28"
date_basis_a: "segments.date in the account time zone"
date_basis_b: "date_day, loaded from the same segment, account time zone"
time_zone: "account time zone on both sides (America/Los_Angeles for 1234567890)"
currency_and_value_basis: "account currency, major units (cost_micros / 1,000,000), before any FX conversion"
counting_unit: "money, two decimals"
attribution_scope: "not applicable for spend; for conversions: the same conversion actions, the conversions column, click date"
maturity_cutoff: "days up to run date minus 4; conversions only for the days inside the reload window at the last successful sync"
as_of_a: "2026-11-01T13:20:00Z"  # when side A was extracted; for REC-03, after the last successful sync and before the next
as_of_b: "2026-11-01T13:25:00Z"  # when side B was extracted
tolerance:
  per_key: "max(1%, 1.00 in account currency)"
  per_rollup: "account-month within 0.5% (spend) or 2% (conversions)"
materiality: "rounding only; any other difference is a defect with a check ID"
known_by_design_components: []  # for different_systems pairs, list the bridge components in order
script: "reconcile_exports.py --key platform,account_id,date --measures spend --currency-col currency --rollup platform,account_id,month --month-from date --mature-through 2026-10-28"
owner: "Paid media lead"
approved_on: ""                 # YYYY-MM-DD; empty means drafted, REC-01 WARN
version: 1
