{
 "protocol": "DESIGN-realization.md",
 "generator_seed": 52817,
 "measured_year": {
  "start_month_end": "2025-09-30",
  "first_day": "2025-10-01",
  "last_day": "2026-09-30",
  "days": 365
 },
 "code_sha256": "796e6f96551c9c2903d3515514bf2d6a6dfa5d293912e0e2fb36d4cf09a89c88",
 "versions": {
  "python": "3.12.3",
  "duckdb": "1.5.6",
  "dbt_core": "1.12.5",
  "dbt_duckdb": "1.11.0"
 },
 "checks": [
  {
   "check": "waterfall_ties_to_arr_spine",
   "kind": "identity",
   "runs_in": "dbt"
  },
  {
   "check": "nrr_bridge_closes",
   "kind": "identity",
   "runs_in": "dbt"
  },
  {
   "check": "nrr_ties_to_company_bridge",
   "kind": "identity",
   "runs_in": "dbt"
  },
  {
   "check": "discounts_within_price_book",
   "kind": "can_fail",
   "runs_in": "dbt"
  },
  {
   "check": "realization_matches_generator",
   "kind": "can_fail",
   "runs_in": "python"
  },
  {
   "check": "nrr_matches_generator",
   "kind": "can_fail",
   "runs_in": "python"
  }
 ],
 "summary": {
  "clean_checks_passed": 6,
  "checks": 6,
  "clean_schema_tests_passed": 8,
  "schema_tests": 8,
  "controls_scored": 5,
  "controls_held": 5,
  "checks_with_a_positive_control": [
   "waterfall_ties_to_arr_spine",
   "nrr_bridge_closes",
   "nrr_ties_to_company_bridge",
   "discounts_within_price_book",
   "realization_matches_generator",
   "nrr_matches_generator"
  ],
  "errored_checks_any_run": 0
 },
 "clean": {
  "census": {},
  "checks": {
   "waterfall_ties_to_arr_spine": "pass",
   "nrr_bridge_closes": "pass",
   "nrr_ties_to_company_bridge": "pass",
   "discounts_within_price_book": "pass",
   "realization_matches_generator": "pass",
   "nrr_matches_generator": "pass"
  },
  "schema_tests": [
   {
    "test": "accepted_values_int_price_daily_discount_type__contract_discount__migration_discount__self_serve_discount",
    "status": "pass"
   },
   {
    "test": "accepted_values_int_price_daily_motion__self_serve__sales_led",
    "status": "pass"
   },
   {
    "test": "not_null_fct_nrr_bridge_customer_group",
    "status": "pass"
   },
   {
    "test": "not_null_fct_nrr_windows_start_month",
    "status": "pass"
   },
   {
    "test": "not_null_int_price_daily_line_id",
    "status": "pass"
   },
   {
    "test": "unique_combination_fct_price_realization_motion__segment",
    "status": "pass"
   },
   {
    "test": "unique_fct_nrr_bridge_customer_group",
    "status": "pass"
   },
   {
    "test": "unique_fct_nrr_windows_start_month",
    "status": "pass"
   }
  ],
  "generator_checks": {
   "realization_matches_generator": {
    "status": "pass",
    "differences": [],
    "differences_total": 0
   },
   "nrr_matches_generator": {
    "status": "pass",
    "differences": [],
    "differences_total": 0
   }
  },
  "verdict": {
   "fired": [],
   "errored": [],
   "predicted_fire": [],
   "held": true
  },
  "marts": {
   "realization": [
    {
     "motion": "sales_led",
     "segment": "large",
     "list_value": 1306441.92,
     "contract_discount": 183356.05,
     "migration_discount": 0.0,
     "self_serve_discount": 0.0,
     "realized_recurring": 1123085.86,
     "credits": 1750.0,
     "realized_value": 1121335.86,
     "realization": 0.858313
    },
    {
     "motion": "sales_led",
     "segment": "mid_market",
     "list_value": 1444201.64,
     "contract_discount": 152841.89,
     "migration_discount": 1193.56,
     "self_serve_discount": 0.0,
     "realized_recurring": 1290166.19,
     "credits": 21689.4,
     "realized_value": 1268476.79,
     "realization": 0.878324
    },
    {
     "motion": "self_serve",
     "segment": "none",
     "list_value": 714629.52,
     "contract_discount": 0.0,
     "migration_discount": 0.0,
     "self_serve_discount": 14101.36,
     "realized_recurring": 700528.16,
     "credits": 0.0,
     "realized_value": 700528.16,
     "realization": 0.980268
    },
    {
     "motion": "usage",
     "segment": "none",
     "list_value": 258550.51,
     "contract_discount": 0.0,
     "migration_discount": 0.0,
     "self_serve_discount": 0.0,
     "realized_recurring": 258550.51,
     "credits": 0.0,
     "realized_value": 258550.51,
     "realization": 1.0
    }
   ],
   "nrr_bridge": [
    {
     "customer_group": "cohort",
     "customers": 344,
     "customers_at_end": 271,
     "starting_arr": 2542577.52,
     "new": 0.0,
     "expansion": 334810.8,
     "contraction": 26548.8,
     "churn": 370207.2,
     "reactivation": 17673.6,
     "migration_in": 30120.0,
     "migration_out": 30120.0,
     "usage_rise": 34316.56,
     "usage_fall": 34216.76,
     "ending_arr": 2498405.72,
     "nrr": 0.982627,
     "grr": 0.830498
    },
    {
     "customer_group": "outside",
     "customers": 477,
     "customers_at_end": 442,
     "starting_arr": 0.0,
     "new": 1989173.2,
     "expansion": 50150.0,
     "contraction": 12028.8,
     "churn": 57076.8,
     "reactivation": 27571.2,
     "migration_in": 12667.2,
     "migration_out": 12667.2,
     "usage_rise": 143979.34,
     "usage_fall": 0.0,
     "ending_arr": 2141768.14,
     "nrr": null,
     "grr": null
    }
   ],
   "nrr_windows": [
    {
     "start_month": "2025-04-01",
     "end_month": "2026-04-01",
     "customers": 210,
     "starting_arr": 1465818.9,
     "ending_arr": 1294225.6,
     "nrr": 0.882937,
     "naive_starting_arr": 2751949.68,
     "naive_ending_arr": 3126606.12,
     "naive_nrr": 1.136142
    },
    {
     "start_month": "2025-05-01",
     "end_month": "2026-05-01",
     "customers": 237,
     "starting_arr": 1772005.58,
     "ending_arr": 1655511.14,
     "nrr": 0.934258,
     "naive_starting_arr": 2934602.76,
     "naive_ending_arr": 3473352.96,
     "naive_nrr": 1.183585
    },
    {
     "start_month": "2025-06-01",
     "end_month": "2026-06-01",
     "customers": 265,
     "starting_arr": 1907592.06,
     "ending_arr": 1784712.76,
     "nrr": 0.935584,
     "naive_starting_arr": 2126533.2,
     "naive_ending_arr": 2238927.12,
     "naive_nrr": 1.052853
    },
    {
     "start_month": "2025-07-01",
     "end_month": "2026-07-01",
     "customers": 293,
     "starting_arr": 2123654.52,
     "ending_arr": 2050526.34,
     "nrr": 0.965565,
     "naive_starting_arr": 2087277.96,
     "naive_ending_arr": 2025582.72,
     "naive_nrr": 0.970442
    },
    {
     "start_month": "2025-08-01",
     "end_month": "2026-08-01",
     "customers": 318,
     "starting_arr": 2332435.98,
     "ending_arr": 2264546.24,
     "nrr": 0.970893,
     "naive_starting_arr": 1927237.56,
     "naive_ending_arr": 1826991.6,
     "naive_nrr": 0.947985
    },
    {
     "start_month": "2025-09-01",
     "end_month": "2026-09-01",
     "customers": 344,
     "starting_arr": 2542577.52,
     "ending_arr": 2498405.72,
     "nrr": 0.982627,
     "naive_starting_arr": 3093183.36,
     "naive_ending_arr": 3013026.36,
     "naive_nrr": 0.974086
    }
   ],
   "lines_in_service": [
    {
     "motion": "sales_led",
     "segment": "large",
     "lines": 21
    },
    {
     "motion": "sales_led",
     "segment": "mid_market",
     "lines": 83
    },
    {
     "motion": "self_serve",
     "segment": "none",
     "lines": 754
    }
   ]
  }
 },
 "generator": {
  "realization": [
   {
    "motion": "sales_led",
    "segment": "large",
    "list_value": 1306441.92,
    "contract_discount": 183356.05,
    "migration_discount": 0.0,
    "self_serve_discount": 0.0,
    "credits": 1750.0,
    "realized_value": 1121335.86
   },
   {
    "motion": "sales_led",
    "segment": "mid_market",
    "list_value": 1444201.64,
    "contract_discount": 152841.89,
    "migration_discount": 1193.56,
    "self_serve_discount": 0.0,
    "credits": 21689.4,
    "realized_value": 1268476.79
   },
   {
    "motion": "self_serve",
    "segment": "none",
    "list_value": 714629.52,
    "contract_discount": 0.0,
    "migration_discount": 0.0,
    "self_serve_discount": 14101.36,
    "credits": 0.0,
    "realized_value": 700528.16
   },
   {
    "motion": "usage",
    "segment": "none",
    "list_value": 258550.51,
    "contract_discount": 0.0,
    "migration_discount": 0.0,
    "self_serve_discount": 0.0,
    "credits": 0.0,
    "realized_value": 258550.51
   }
  ],
  "nrr": {
   "customers": 344,
   "customers_at_end": 271,
   "starting_arr": 2542577.52,
   "new": 0.0,
   "expansion": 334810.8,
   "contraction": 26548.8,
   "churn": 370207.2,
   "reactivation": 17673.6,
   "migration_in": 30120.0,
   "migration_out": 30120.0,
   "usage_rise": 34316.56,
   "usage_fall": 34216.76,
   "ending_arr": 2498405.72,
   "nrr": 0.9826271570276449,
   "grr": 0.8304976911775732
  },
  "nrr_every_account_linked": {
   "customers": 340,
   "customers_at_end": 267,
   "starting_arr": 2542577.52,
   "new": 0.0,
   "expansion": 337810.8,
   "contraction": 26548.8,
   "churn": 360967.2,
   "reactivation": 17673.6,
   "migration_in": 39360.0,
   "migration_out": 39360.0,
   "usage_rise": 35993.04,
   "usage_fall": 34216.76,
   "ending_arr": 2512322.2,
   "nrr": 0.9881005319357972,
   "grr": 0.8341317986639007
  }
 },
 "controls": [
  {
   "control": "contract_discount_above_price_book",
   "kind": "data",
   "scored": true,
   "census": {
    "contract": "CT-0003",
    "discount_before": 0,
    "discount_after": 40,
    "invoices_rewritten": 8
   },
   "checks": {
    "waterfall_ties_to_arr_spine": "pass",
    "nrr_bridge_closes": "pass",
    "nrr_ties_to_company_bridge": "pass",
    "discounts_within_price_book": "fail",
    "realization_matches_generator": "fail",
    "nrr_matches_generator": "fail"
   },
   "schema_tests": [
    {
     "test": "accepted_values_int_price_daily_discount_type__contract_discount__migration_discount__self_serve_discount",
     "status": "pass"
    },
    {
     "test": "accepted_values_int_price_daily_motion__self_serve__sales_led",
     "status": "pass"
    },
    {
     "test": "not_null_fct_nrr_bridge_customer_group",
     "status": "pass"
    },
    {
     "test": "not_null_fct_nrr_windows_start_month",
     "status": "pass"
    },
    {
     "test": "not_null_int_price_daily_line_id",
     "status": "pass"
    },
    {
     "test": "unique_combination_fct_price_realization_motion__segment",
     "status": "pass"
    },
    {
     "test": "unique_fct_nrr_bridge_customer_group",
     "status": "pass"
    },
    {
     "test": "unique_fct_nrr_windows_start_month",
     "status": "pass"
    }
   ],
   "generator_checks": {
    "realization_matches_generator": {
     "status": "fail",
     "differences": [
      {
       "row": "sales_led/mid_market",
       "field": "contract_discount",
       "warehouse": 164626.11,
       "generator": 152841.89
      },
      {
       "row": "sales_led/mid_market",
       "field": "realized_value",
       "warehouse": 1256692.57,
       "generator": 1268476.79
      }
     ],
     "differences_total": 2
    },
    "nrr_matches_generator": {
     "status": "fail",
     "differences": [
      {
       "field": "starting_arr",
       "warehouse": 2533017.52,
       "generator": 2542577.52
      },
      {
       "field": "expansion",
       "warehouse": 332450.8,
       "generator": 334810.8
      },
      {
       "field": "ending_arr",
       "warehouse": 2486485.72,
       "generator": 2498405.72
      },
      {
       "field": "nrr",
       "warehouse": 0.98163,
       "generator": 0.982627
      },
      {
       "field": "grr",
       "warehouse": 0.829858,
       "generator": 0.830498
      }
     ],
     "differences_total": 5
    }
   },
   "verdict": {
    "fired": [
     "discounts_within_price_book",
     "realization_matches_generator",
     "nrr_matches_generator"
    ],
    "errored": [],
    "predicted_fire": [
     "discounts_within_price_book",
     "realization_matches_generator",
     "nrr_matches_generator"
    ],
    "held": true
   }
  },
  {
   "control": "card_left_active_after_migration",
   "kind": "data",
   "scored": true,
   "census": {
    "subscriptions_left_active": 6,
    "invoice_lines_added": 14,
    "refunds_removed": 5
   },
   "checks": {
    "waterfall_ties_to_arr_spine": "pass",
    "nrr_bridge_closes": "pass",
    "nrr_ties_to_company_bridge": "pass",
    "discounts_within_price_book": "pass",
    "realization_matches_generator": "fail",
    "nrr_matches_generator": "fail"
   },
   "schema_tests": [
    {
     "test": "accepted_values_int_price_daily_discount_type__contract_discount__migration_discount__self_serve_discount",
     "status": "pass"
    },
    {
     "test": "accepted_values_int_price_daily_motion__self_serve__sales_led",
     "status": "pass"
    },
    {
     "test": "not_null_fct_nrr_bridge_customer_group",
     "status": "pass"
    },
    {
     "test": "not_null_fct_nrr_windows_start_month",
     "status": "pass"
    },
    {
     "test": "not_null_int_price_daily_line_id",
     "status": "pass"
    },
    {
     "test": "unique_combination_fct_price_realization_motion__segment",
     "status": "pass"
    },
    {
     "test": "unique_fct_nrr_bridge_customer_group",
     "status": "pass"
    },
    {
     "test": "unique_fct_nrr_windows_start_month",
     "status": "pass"
    }
   ],
   "generator_checks": {
    "realization_matches_generator": {
     "status": "fail",
     "differences": [
      {
       "row": "self_serve/none",
       "field": "list_value",
       "warehouse": 719474.83,
       "generator": 714629.52
      },
      {
       "row": "self_serve/none",
       "field": "self_serve_discount",
       "warehouse": 14260.25,
       "generator": 14101.36
      },
      {
       "row": "self_serve/none",
       "field": "realized_value",
       "warehouse": 705214.58,
       "generator": 700528.16
      }
     ],
     "differences_total": 3
    },
    "nrr_matches_generator": {
     "status": "fail",
     "differences": [
      {
       "field": "new",
       "warehouse": 21690.0,
       "generator": 0.0
      },
      {
       "field": "expansion",
       "warehouse": 328576.8,
       "generator": 334810.8
      },
      {
       "field": "churn",
       "warehouse": 364495.2,
       "generator": 370207.2
      },
      {
       "field": "migration_in",
       "warehouse": 14664.0,
       "generator": 30120.0
      },
      {
       "field": "migration_out",
       "warehouse": 14664.0,
       "generator": 30120.0
      },
      {
       "field": "ending_arr",
       "warehouse": 2519573.72,
       "generator": 2498405.72
      },
      {
       "field": "nrr",
       "warehouse": 0.990953,
       "generator": 0.982627
      },
      {
       "field": "grr",
       "warehouse": 0.832744,
       "generator": 0.830498
      }
     ],
     "differences_total": 8
    }
   },
   "verdict": {
    "fired": [
     "realization_matches_generator",
     "nrr_matches_generator"
    ],
    "errored": [],
    "predicted_fire": [
     "realization_matches_generator",
     "nrr_matches_generator"
    ],
    "held": true
   }
  },
  {
   "control": "discount_wrong_consistent",
   "kind": "data",
   "scored": false,
   "census": {
    "contracts": 3,
    "invoices_rewritten": 24
   },
   "checks": {
    "waterfall_ties_to_arr_spine": "pass",
    "nrr_bridge_closes": "pass",
    "nrr_ties_to_company_bridge": "pass",
    "discounts_within_price_book": "pass",
    "realization_matches_generator": "fail",
    "nrr_matches_generator": "fail"
   },
   "schema_tests": [
    {
     "test": "accepted_values_int_price_daily_discount_type__contract_discount__migration_discount__self_serve_discount",
     "status": "pass"
    },
    {
     "test": "accepted_values_int_price_daily_motion__self_serve__sales_led",
     "status": "pass"
    },
    {
     "test": "not_null_fct_nrr_bridge_customer_group",
     "status": "pass"
    },
    {
     "test": "not_null_fct_nrr_windows_start_month",
     "status": "pass"
    },
    {
     "test": "not_null_int_price_daily_line_id",
     "status": "pass"
    },
    {
     "test": "unique_combination_fct_price_realization_motion__segment",
     "status": "pass"
    },
    {
     "test": "unique_fct_nrr_bridge_customer_group",
     "status": "pass"
    },
    {
     "test": "unique_fct_nrr_windows_start_month",
     "status": "pass"
    }
   ],
   "generator_checks": {
    "realization_matches_generator": {
     "status": "fail",
     "differences": [
      {
       "row": "sales_led/large",
       "field": "contract_discount",
       "warehouse": 196361.05,
       "generator": 183356.05
      },
      {
       "row": "sales_led/large",
       "field": "realized_value",
       "warehouse": 1108330.86,
       "generator": 1121335.86
      },
      {
       "row": "sales_led/mid_market",
       "field": "contract_discount",
       "warehouse": 165240.97,
       "generator": 152841.89
      },
      {
       "row": "sales_led/mid_market",
       "field": "realized_value",
       "warehouse": 1256077.71,
       "generator": 1268476.79
      }
     ],
     "differences_total": 4
    },
    "nrr_matches_generator": {
     "status": "fail",
     "differences": [
      {
       "field": "starting_arr",
       "warehouse": 2518007.52,
       "generator": 2542577.52
      },
      {
       "field": "expansion",
       "warehouse": 333925.8,
       "generator": 334810.8
      },
      {
       "field": "ending_arr",
       "warehouse": 2472950.72,
       "generator": 2498405.72
      },
      {
       "field": "nrr",
       "warehouse": 0.982106,
       "generator": 0.982627
      },
      {
       "field": "grr",
       "warehouse": 0.828844,
       "generator": 0.830498
      }
     ],
     "differences_total": 5
    }
   },
   "verdict": {
    "fired": [
     "realization_matches_generator",
     "nrr_matches_generator"
    ],
    "errored": []
   }
  },
  {
   "control": "list_ignores_seat_changes",
   "kind": "code",
   "scored": true,
   "mutation": {
    "file": "realization/dbt/models/int_price_daily.sql",
    "line_as_written": "and d.day between seats.valid_from and seats.valid_to",
    "faulty_line": "and seats.valid_from = s.started_on"
   },
   "checks": {
    "waterfall_ties_to_arr_spine": "fail",
    "nrr_bridge_closes": "pass",
    "nrr_ties_to_company_bridge": "pass",
    "discounts_within_price_book": "pass",
    "realization_matches_generator": "fail",
    "nrr_matches_generator": "pass"
   },
   "generator_checks": {
    "realization_matches_generator": {
     "status": "fail",
     "differences": [
      {
       "row": "self_serve/none",
       "field": "list_value",
       "warehouse": 649330.98,
       "generator": 714629.52
      },
      {
       "row": "self_serve/none",
       "field": "self_serve_discount",
       "warehouse": 12913.37,
       "generator": 14101.36
      }
     ],
     "differences_total": 2
    },
    "nrr_matches_generator": {
     "status": "pass",
     "differences": [],
     "differences_total": 0
    }
   },
   "verdict": {
    "fired": [
     "waterfall_ties_to_arr_spine",
     "realization_matches_generator"
    ],
    "errored": [],
    "predicted_fire": [
     "waterfall_ties_to_arr_spine",
     "realization_matches_generator"
    ],
    "held": true
   }
  },
  {
   "control": "bridge_drops_returns",
   "kind": "code",
   "scored": true,
   "mutation": {
    "file": "realization/dbt/models/fct_nrr_bridge.sql",
    "line_as_written": "coalesce(m.reactivation, 0) as reactivation,",
    "faulty_line": "0 as reactivation,"
   },
   "checks": {
    "waterfall_ties_to_arr_spine": "pass",
    "nrr_bridge_closes": "fail",
    "nrr_ties_to_company_bridge": "fail",
    "discounts_within_price_book": "pass",
    "realization_matches_generator": "pass",
    "nrr_matches_generator": "fail"
   },
   "generator_checks": {
    "realization_matches_generator": {
     "status": "pass",
     "differences": [],
     "differences_total": 0
    },
    "nrr_matches_generator": {
     "status": "fail",
     "differences": [
      {
       "field": "reactivation",
       "warehouse": 0.0,
       "generator": 17673.6
      }
     ],
     "differences_total": 1
    }
   },
   "verdict": {
    "fired": [
     "nrr_bridge_closes",
     "nrr_ties_to_company_bridge",
     "nrr_matches_generator"
    ],
    "errored": [],
    "predicted_fire": [
     "nrr_bridge_closes",
     "nrr_ties_to_company_bridge",
     "nrr_matches_generator"
    ],
    "held": true
   }
  },
  {
   "control": "outside_means_first_arr_in_year",
   "kind": "code",
   "scored": true,
   "mutation": {
    "file": "realization/dbt/models/fct_nrr_bridge.sql",
    "line_as_written": "when k.start_arr = 0 then 'outside'",
    "faulty_line": "when k.first_month > {{ d('start_month') }} then 'outside'"
   },
   "checks": {
    "waterfall_ties_to_arr_spine": "pass",
    "nrr_bridge_closes": "pass",
    "nrr_ties_to_company_bridge": "fail",
    "discounts_within_price_book": "pass",
    "realization_matches_generator": "pass",
    "nrr_matches_generator": "pass"
   },
   "generator_checks": {
    "realization_matches_generator": {
     "status": "pass",
     "differences": [],
     "differences_total": 0
    },
    "nrr_matches_generator": {
     "status": "pass",
     "differences": [],
     "differences_total": 0
    }
   },
   "verdict": {
    "fired": [
     "nrr_ties_to_company_bridge"
    ],
    "errored": [],
    "predicted_fire": [
     "nrr_ties_to_company_bridge"
    ],
    "held": true
   }
  }
 ]
}
