{
 "faults": [
  {
   "id": "H01",
   "title": "Wrong monthly Business price propagated into billing",
   "kind": "systems_agree",
   "real_world_cause": "The billing catalog was initialized with a mistyped Business monthly price. Every subsequent invoice and refund used that price, while pricing's independently maintained rate card remained correct.",
   "tables": [
    "card_price_list",
    "card_invoice_lines",
    "card_refunds"
   ],
   "outside_records_changed": false,
   "selection": "Evaluate against the original data. Select the one card_price_list row with price_id = 'BUS-M'. Select every card_subscriptions row referencing that price, every card_invoice_lines row for those subscriptions with line_type in ('recurring','proration'), and every card_refunds row referencing those lines. Change all qualifying dependent rows, with no cap; process by price_id, line_id and refund_id ascending respectively. If the price row is absent, do nothing.",
   "changes": "Use decimal arithmetic and round monetary results to cents, half up. Set the selected price row's unit_amount to its original unit_amount + 1.00. For each selected recurring line, set amount = round(quantity * new unit_amount * (1 - subscription.recurring_discount_pct / 100), 2). For each selected proration line, generate the subscription's billing periods from started_on in monthly steps, anchored on the original start day and clamped to month end when necessary; let B and E be the inclusive boundaries of the period containing invoice_date. Set amount = round(quantity * new unit_amount * (1 - recurring_discount_pct / 100) * (E - invoice_date + 1 calendar days) / (E - B + 1 calendar days), 2). For each selected refund, set amount = round(new referenced line amount * max(0, line.period_end - refund_date calendar days) / (line.period_end - line.period_start + 1 calendar days), 2). Preserve all quantities, dates, identifiers and other columns. Do not change pricing_rate_card or any other outside record.",
   "first_month": "2024-07",
   "correct_arr": "Each BUS-M subscription still in service on 2026-09-30 should contribute its seats in effect times the original monthly unit_amount times its recurring discount factor times 12. Usage ARR and sales-led ARR remain unchanged. The fault adds 12 times the discounted month-end seat count in dollars across those subscriptions.",
   "arr_effect": "overstated",
   "reconciliation_would_catch": false,
   "reconciliation_reason": "The warehouse, billing catalog, invoices and refunds all use the same wrong price, so detecting it requires the independent pricing rate card."
  },
  {
   "id": "H02",
   "title": "Lifetime coupons dropped during subscription creation",
   "kind": "systems_agree",
   "real_world_cause": "A September integration omitted redeemed coupons when creating subscriptions in card billing. Billing consistently charged full price even though marketing's coupon registry retained the lifetime discount.",
   "tables": [
    "card_subscriptions",
    "card_invoice_lines"
   ],
   "outside_records_changed": false,
   "selection": "Evaluate against the original data. Select the 3 lowest subscription_id values among card_subscriptions with started_on between 2026-09-01 and 2026-09-30 inclusive, ended_on null, status = 'active', recurring_discount_pct = 20, and a matching promotion_registry row with the same subscription_id and customer_id, percent_off = 20, duration = 'forever', and redeemed_on = started_on. Select all recurring and proration card_invoice_lines for those subscriptions. Use all available subscriptions if fewer than 3 qualify; if none qualify, do nothing. Process dependent lines by line_id ascending.",
   "changes": "Set recurring_discount_pct = 0 on the selected subscriptions. Recompute every selected recurring line amount as round(quantity * its card_price_list.unit_amount, 2). For each selected proration line, generate billing periods from started_on in steps of one month or twelve months according to billing_interval, anchored on the original start day and clamped to month end when necessary. For the inclusive period B through E containing invoice_date, set amount = round(quantity * unit_amount * (E - invoice_date + 1 calendar days) / (E - B + 1 calendar days), 2). Round half up using decimal arithmetic. Include all extracted lines, including October renewals. Preserve every other column. The selected subscriptions have no end date, so no cancellation refunds require adjustment. Leave promotion_registry unchanged.",
   "first_month": "2026-09",
   "correct_arr": "Each selected subscription should contribute its September month-end seats times its listed seat price times 0.80, annualized by 12 for monthly prices or by 1 for annual prices. The fault instead counts the undiscounted value, overstating that recurring ARR by 25 percent of its correct value. Usage ARR is unchanged.",
   "arr_effect": "overstated",
   "reconciliation_would_catch": false,
   "reconciliation_reason": "Subscription terms and every seat charge agree at full price, and only marketing's independent redemption record establishes the missing discount."
  },
  {
   "id": "H03",
   "title": "Signed contract discount entered five points too low",
   "kind": "systems_agree",
   "real_world_cause": "Sales operations mistyped the signed discount while booking an August deal. The CRM then supplied the wrong commercial terms to invoicing and contract seat provisioning, and the customer paid the resulting invoices.",
   "tables": [
    "crm_contracts",
    "crm_opportunities",
    "contract_invoice_lines",
    "contract_payments",
    "product_workspace_monthly"
   ],
   "outside_records_changed": false,
   "selection": "Evaluate against the original data. Select the lowest contract_id among contracts signed between 2026-08-01 and 2026-08-31 inclusive, service_start between 2026-09-01 and 2026-09-30 inclusive, service_end >= 2026-09-30, discount_pct >= 5, and a linked non-null crm_accounts.workspace_id. Require that its opportunity is closed_won, it has no contract_credits, and its account has no other crm_contracts row. Select its opportunity, all its recurring contract invoice lines, existing payments on invoices containing those lines, and all monthly snapshots for its linked workspace with month_end between service_start and service_end inclusive. Select 1 contract, or do nothing if none qualify. Process dependent rows by their identifiers, and snapshots by workspace_id then month_end.",
   "changes": "Set the selected contract's discount_pct to original discount_pct - 5. Set its opportunity.amount to round(sum over its tiers of annual_list_value * (1 - new discount_pct / 100)), 2); each tier is one contract year. For every recurring invoice line of the contract, find the tier covering invoice_date and set amount = round(tier.annual_list_value * (1 - new discount_pct / 100) * P / 12, 2), where P is 12 for annual billing and 3 for quarterly billing. Leave usage and one_off lines unchanged. Set each selected payment.amount to the sum of all invoice line amounts on its invoice after these updates, preserving paid_on. For each selected monthly snapshot, find the tier covering month_end and set active_seats = max(5, floor(tier.annual_list_value * (1 - new discount_pct / 100) / 250)); preserve plan_kind. Use decimal arithmetic and half-up money rounding. Change no other columns or records, including order forms, order form tiers and discount approvals.",
   "first_month": "2026-08",
   "correct_arr": "The selected contract should contribute the September 30 tier's annual_list_value times the original signed discount factor. Its usage ARR should remain unchanged. Using a discount five percentage points lower overstates contracted ARR by 0.05 times that tier's annual_list_value.",
   "arr_effect": "overstated",
   "reconciliation_would_catch": false,
   "reconciliation_reason": "CRM value, licensed seat provisioning, invoices and recorded payments all reflect the same wrong discount, so the signed order form is needed to identify it."
  },
  {
   "id": "H04",
   "title": "Second-year ramp copied from the first year",
   "kind": "systems_agree",
   "real_world_cause": "When a two-year contract was booked, sales operations copied the first-year price into the second-year tier. The reduced total was booked in the opportunity and later drove billing and seat provisioning.",
   "tables": [
    "crm_contract_tiers",
    "crm_opportunities",
    "contract_invoice_lines",
    "contract_payments",
    "product_workspace_monthly"
   ],
   "outside_records_changed": false,
   "selection": "Evaluate against the original data. Select the lowest contract_id among contracts with term_months = 24, signed_on and service_start both in August 2025, exactly two tiers numbered 1 and 2, tier 2 covering 2026-09-30, tier 2 annual_list_value greater than tier 1 annual_list_value, a non-null linked workspace, and no contract_credits. Select tier 2, the contract's opportunity, all recurring invoice lines whose invoice_date falls in tier 2, existing payments on their invoices, and linked-workspace monthly snapshots whose month_end falls in tier 2. Select 1 contract, using no replacement if none qualify. Process dependent rows by identifiers and snapshots by workspace_id then month_end.",
   "changes": "Set tier 2 annual_list_value equal to the original tier 1 annual_list_value, preserving tier dates. Set the contract opportunity.amount to round(sum of the two resulting annual_list_value values * (1 - contract.discount_pct / 100), 2). For each selected recurring invoice line, set amount = round(new tier 2 annual_list_value * (1 - discount_pct / 100) * P / 12, 2), where P is 12 for annual billing and 3 for quarterly billing. Set every selected payment.amount to the sum of all resulting invoice line amounts on its invoice; preserve paid_on. Set each selected monthly snapshot.active_seats to max(5, floor(new tier 2 annual_list_value * (1 - discount_pct / 100) / 250)). Round money half up. Preserve all other columns, first-year invoice amounts, usage lines and one-off fees. Leave all outside records unchanged.",
   "first_month": "2025-08",
   "correct_arr": "The selected contract should contribute the original second-year annual_list_value times its discount factor at September 30, with the scheduled increase classified as expansion. The fault removes that increase and understates contracted ARR by the difference between the original second-year and first-year list values times the discount factor. Usage ARR is unchanged.",
   "arr_effect": "understated",
   "reconciliation_would_catch": false,
   "reconciliation_reason": "The opportunity, tier schedule, invoices, payments and provisioned seats all support the flattened ramp, while the independent signed tier schedule shows the omitted step."
  },
  {
   "id": "H05",
   "title": "September run counts doubled before billing",
   "kind": "systems_agree",
   "real_world_cause": "A metering aggregation job added a replayed September batch to the existing daily counters instead of replacing it. October usage billing consumed those doubled counters, while the product team's separate event collector was unaffected.",
   "tables": [
    "usage_daily",
    "card_invoice_lines"
   ],
   "outside_records_changed": false,
   "selection": "Evaluate against the original data. Select the lowest workspace_id having one card subscription covering every day from 2026-07-01 through 2026-09-30, with ended_on null and product plan self_serve throughout those dates as determined by product_plan_changes. Require at least one September usage_daily row, every September usage row loaded before 2026-10-05 00:00:00, and exactly one card usage line for this workspace with invoice_date = 2026-10-05, period_start = 2026-09-01 and period_end = 2026-09-30. Require that line's quantity equals the original September runs sum and its amount equals round(that sum * 0.01, 2). Also require twice that runs sum to exceed the sum of product_run_events_daily.run_events for the workspace in September, treating absent event days as zero. Select all September usage rows and that one invoice line. Use 1 workspace, or do nothing if none qualify; process usage rows by usage_id.",
   "changes": "For every selected usage_daily row, set runs = 2 * original runs; preserve usage_id, usage_date and loaded_at. Set the selected card invoice line.quantity to the sum of the resulting September runs and amount to round(quantity * 0.01, 2), half up. Preserve all remaining invoice columns. Change no other rows, including product_run_events_daily.",
   "first_month": "2026-09",
   "correct_arr": "The workspace has three complete paid months, July through September. Its correct usage ARR is four times the sum of the original finalized usage revenue for those months. Recurring ARR is unchanged. The fault adds four times the original September runs times 0.01 to usage ARR.",
   "arr_effect": "overstated",
   "reconciliation_would_catch": false,
   "reconciliation_reason": "Metering and the October usage invoice agree on the doubled count, so finance reconciliation needs evidence from the separate product event log or an operational investigation to challenge it."
  },
  {
   "id": "H06",
   "title": "Current ramp tier lost from the CRM extract",
   "kind": "systems_disagree",
   "real_world_cause": "A September incremental export dropped a newly effective ramp tier. The opportunity and invoicing tool retained the complete contract schedule.",
   "tables": [
    "crm_contract_tiers"
   ],
   "outside_records_changed": false,
   "selection": "Evaluate against the original data. Select the lowest (contract_id, tier) pair among crm_contract_tiers with tier >= 2, tier_start between 2026-09-01 and 2026-09-30 inclusive, tier_end >= 2026-09-30, annual_list_value > 0, and a parent contract in service on 2026-09-30 with discount_pct < 100. Require at least one recurring contract_invoice_lines row for that contract whose invoice_date is in the selected tier. Select exactly 1 tier row, or do nothing if none qualify.",
   "changes": "Delete the selected crm_contract_tiers row. Leave every other tier, the parent contract, opportunity, product snapshots, invoices, payments and all outside records unchanged.",
   "first_month": "2026-09",
   "correct_arr": "The selected contract should count the deleted tier's original annual_list_value times the contract discount factor at September 30. With no tier in effect, its extracted schedule cannot support that recurring ARR; an implementation requiring an effective tier loses the entire contribution. Usage ARR is unchanged.",
   "arr_effect": "understated",
   "reconciliation_would_catch": true,
   "reconciliation_reason": "The missing effective tier leaves the warehouse without the recurring value supported by the retained opportunity and recurring invoice."
  },
  {
   "id": "H07",
   "title": "Next-period seat decrease applied in September",
   "kind": "systems_disagree",
   "real_world_cause": "A support correction replaced a scheduled seat reduction's effective date with the customer's request date. Card billing and the product month-end snapshot retained the higher count through the paid period.",
   "tables": [
    "card_seat_changes"
   ],
   "outside_records_changed": false,
   "selection": "Evaluate against the original data. Consider monthly subscriptions in service on 2026-09-30. Generate monthly billing periods from started_on, anchored on its day and clamped to month end if necessary. Select a card_seat_changes row effective between 2026-10-01 and 2026-10-05 inclusive, exactly at the next billing-period start after 2026-09-30, whose seats_after is lower than its immediately preceding seat row's seats_after. Require that predecessor's effective_date < 2026-09-30, no other seat change exists on 2026-09-30, and the September product_workspace_monthly snapshot for the customer's workspace has active_seats equal to the predecessor's seats_after. Rank candidates by subscription_id then change_id and select 1, or do nothing if none qualify. Order preceding seat rows by effective_date then change_id.",
   "changes": "Set the selected card_seat_changes.effective_date to 2026-09-30. Preserve its change_id, subscription_id and seats_after. Do not change invoices, the September monthly snapshot, subscription dates or any other records.",
   "first_month": "2026-09",
   "correct_arr": "The subscription should count the predecessor's higher seat count at September 30 because the reduction belongs to October's next billing period. Its correct recurring ARR is that higher count times the monthly unit price times the discount factor times 12. The fault understates ARR by the seat reduction times that discounted annualized price; usage ARR is unchanged.",
   "arr_effect": "understated",
   "reconciliation_would_catch": true,
   "reconciliation_reason": "The prematurely reduced seat count conflicts with the September product snapshot and the billing-period schedule supporting the higher paid seat count."
  },
  {
   "id": "H08",
   "title": "Annual renewal opt-out recorded as immediate cancellation",
   "kind": "systems_disagree",
   "real_world_cause": "A customer asked to turn off annual renewal on September 15. An integration wrote that request date as the service end without performing the corresponding product cancellation or unused-period refund.",
   "tables": [
    "card_subscriptions"
   ],
   "outside_records_changed": false,
   "selection": "Evaluate against the original data. Select the lowest subscription_id among annual card subscriptions with started_on <= 2026-09-15, ended_on null, status = 'active', a recurring invoice line with period_start <= 2026-09-15 and period_end >= 2026-09-30, and a linked workspace whose product plan is self_serve on every day from 2026-09-15 through 2026-09-30. Require no other subscription for that customer overlapping those days. Select 1 subscription, or do nothing if none qualify.",
   "changes": "Set ended_on = '2026-09-15' and status = 'cancelled' on the selected subscription. Preserve all other columns. Leave its paid invoice, seat changes, product plan history, monthly snapshots, usage and refunds unchanged; in particular, add no refund.",
   "first_month": "2026-09",
   "correct_arr": "The annual subscription should remain in service at September 30 and contribute its seats in effect times its annual unit price times the recurring discount factor. The fault removes that recurring contribution. The workspace's paid product history and usage have not changed, so its usage ARR should remain as originally reported.",
   "arr_effect": "understated",
   "reconciliation_would_catch": true,
   "reconciliation_reason": "The recorded annual cancellation conflicts with continuing paid product service and lacks the unused-period refund required for an actual mid-term cancellation."
  },
  {
   "id": "H09",
   "title": "Recurring card invoice lines duplicated on export",
   "kind": "systems_disagree",
   "real_world_cause": "An invoice export retried a September batch without preserving idempotency. It emitted a second line identifier for each already exported recurring charge.",
   "tables": [
    "card_invoice_lines"
   ],
   "outside_records_changed": false,
   "selection": "Evaluate against the original data. Select the 3 lowest line_id values among card_invoice_lines with line_type = 'recurring', invoice_date between 2026-09-01 and 2026-09-30 inclusive, amount > 0, and a referenced subscription with ended_on null. Use all available rows if fewer than 3 qualify; if none qualify, do nothing. For each selected line, choose the smallest positive integer n such that the string 'H09-' followed by its original line_id followed by '-' followed by n in base 10 without leading zeros is not an existing line_id.",
   "changes": "Insert one row per selected original line. Give every inserted column as follows: line_id = the new collision-free identifier defined in selection; invoice_id = original.invoice_id; customer_id = original.customer_id; subscription_id = original.subscription_id; workspace_id = original.workspace_id, including null; line_type = original.line_type; invoice_date = original.invoice_date; period_start = original.period_start; period_end = original.period_end; quantity = original.quantity; amount = original.amount. Do not modify or delete original rows, and change no other table.",
   "first_month": "2026-09",
   "correct_arr": "Each selected subscription should contribute its existing seats times its subscription price and discount, annualized normally, exactly once. Those subscription inputs are unchanged, so both ARR components remain unchanged. Correct billing records should contain only the original recurring lines, without the inserted duplicates.",
   "arr_effect": "unchanged",
   "reconciliation_would_catch": true,
   "reconciliation_reason": "The duplicated recurring billings exceed the charges supported by the subscription price, seats and billing schedule even though contracted ARR is unchanged."
  },
  {
   "id": "H10",
   "title": "Late August usage relabeled as loaded before cutoff",
   "kind": "systems_disagree",
   "real_world_cause": "A September loader repair replaced actual arrival timestamps with a fixed timestamp before the August close cutoff. Billing retained the original late classification and billed those runs in October.",
   "tables": [
    "usage_daily"
   ],
   "outside_records_changed": false,
   "selection": "Evaluate against the original data. Eligible workspaces have one unchanged paid motion, either self_serve or contract, on every day from 2026-07-01 through 2026-09-30 according to product_plan_changes. Eligible usage_daily rows have usage_date in August 2026, runs > 0, loaded_at >= '2026-09-05 00:00:00' and loaded_at < '2026-09-06 00:00:00'. Require an October 5 usage_late invoice line for the same workspace and August period in card_invoice_lines for self_serve or contract_invoice_lines for contract. Select the 10 lowest usage_id values among all eligible rows. Use all available rows if fewer than 10 qualify; if none qualify, do nothing.",
   "changes": "Set loaded_at = '2026-09-04 23:59:59' on every selected usage_daily row. Preserve all identifiers, dates and runs. Leave September regular usage invoices and October usage_late invoices unchanged, and change no outside records.",
   "first_month": "2026-09",
   "correct_arr": "Every selected workspace has three complete paid months, July through September. Its August finalized revenue must exclude the selected runs because they actually arrived on or after September 5; those runs belong on the restatement list and their later billing must not change reported ARR. The fault overstates September usage ARR by 4 * 0.01 * the sum of selected runs. Contracted recurring ARR is unchanged.",
   "arr_effect": "overstated",
   "reconciliation_would_catch": true,
   "reconciliation_reason": "The altered timestamps classify runs as regular August usage while billing still excludes them from September's regular invoice and includes them as October late usage."
  },
  {
   "id": "H11",
   "title": "Workspace link erased during a September migration",
   "kind": "systems_disagree",
   "real_world_cause": "A CRM account synchronization overwrote a populated workspace link with null when a self-serve customer moved to a contract. Product service and both billing systems retained the migration dates.",
   "tables": [
    "crm_accounts"
   ],
   "outside_records_changed": false,
   "selection": "Evaluate against the original data. Select the lowest account_id among linked crm_accounts having a contract whose service_start is in September 2026, service_end >= 2026-09-30, and referenced opportunity_type = 'migration' with stage = 'closed_won'. Require that the account's linked workspace has a card subscription ending exactly one day before service_start and a product_plan_changes row with effective_date = service_start and plan_kind = 'contract'. If multiple qualifying contracts belong to that account, use the lowest contract_id to describe the migration. Select 1 account, or do nothing if none qualify.",
   "changes": "Set the selected crm_accounts.workspace_id to null. Preserve account_id, segment and created_on. Leave the card customer workspace link, subscription end date, product plan change, contract, opportunity, invoices, refunds and all other records unchanged.",
   "first_month": "2026-09",
   "correct_arr": "September closing contracted ARR should still count the sales-led contract's effective tier net of discount, and usage ARR should still follow the workspace's paid history. Total closing ARR is unchanged. The bridge should link the motions, showing equal migration out and migration in at the old self-serve ARR, with only the value difference classified as expansion or contraction; the fault instead makes the move appear as churn plus a new customer.",
   "arr_effect": "unchanged",
   "reconciliation_would_catch": true,
   "reconciliation_reason": "The CRM migration opportunity and matching card end and contract start dates identify a motion transfer that the missing account link prevents the warehouse bridge from matching."
  },
  {
   "id": "H12",
   "title": "Paid September contract charge missing from invoice extract",
   "kind": "systems_disagree",
   "real_world_cause": "A September invoice-line export omitted a recurring charge after the invoice had already been sent and paid. The CRM schedule and payment export remained complete.",
   "tables": [
    "contract_invoice_lines"
   ],
   "outside_records_changed": false,
   "selection": "Evaluate against the original data. Select the lowest line_id among contract_invoice_lines with line_type = 'recurring', invoice_date between 2026-09-01 and 2026-09-30 inclusive, amount > 0, and a parent contract in service on 2026-09-30. Require exactly one contract_payments row for its invoice_id, paid_on <= 2026-10-05, with amount equal to the original sum of all contract_invoice_lines.amount on that invoice. Select exactly 1 invoice line, or do nothing if none qualify.",
   "changes": "Delete the selected contract_invoice_lines row. Leave every other line on its invoice, its payment, contract, tiers, opportunity and all outside records unchanged. Do not reduce or delete the payment.",
   "first_month": "2026-09",
   "correct_arr": "The contract should count the September 30 tier's annual_list_value net of its contract discount. Neither that schedule nor usage changes, so both ARR components remain unchanged. Correct supporting records should retain the deleted recurring charge, restoring the invoice total to the retained payment amount and the scheduled advance billing.",
   "arr_effect": "unchanged",
   "reconciliation_would_catch": true,
   "reconciliation_reason": "The retained payment exceeds the extracted invoice total by exactly the missing recurring charge, and the CRM billing schedule independently requires that charge."
  }
 ]
}
