{
  "basis": {
    "app_commit": "0a6e4cdd6207423f27e4d5de5333a2d4e593488a",
    "docs_commit": "5cda2d33",
    "date": "2026-10-03",
    "method": "Canonical definitions + schema declaration mapping, static call/error/constraint inventory, selected full manual boundary review. No production access, no DB execution, no product edits.",
    "scope": "All stats canonical functions and tables; all data_module canonical functions plus shell get_data_modules; calendar projection tables and listed direct workout/read dependencies. Historical migrations excluded from current-code inventory.",
    "limits": "Regex call scan is not a SQL parser; dynamic SQL and trigger execution require manual boundary review; full arithmetic correctness, production data incidence, query timing, migration replay and fault injection are unverified."
  },
  "counts": {
    "write_read_dependency": 41,
    "read_module": 68,
    "statistics_function": 115,
    "statistics_table": 48
  },
  "review_counts": {
    "inventory_and_failure_boundary_scan": 202,
    "manual_boundary_and_contract_review": 70
  },
  "items": [
    {
      "path": "supabase/definitions/calendar/functions/calendar_strength_day_metrics_map_v1.sql",
      "name": "calendar_strength_day_metrics_map_v1",
      "category": "write_read_dependency",
      "lines": 41,
      "sha256": "2bd2c4457ea9bbdf426caac40392a2ff596f8f24589da58c24b792683e6ac483",
      "schema_line": 3446,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/calendar/functions/calendar_strength_session_metrics_map_v1.sql",
      "name": "calendar_strength_session_metrics_map_v1",
      "category": "write_read_dependency",
      "lines": 73,
      "sha256": "b26d7cc5f4c3336ff65694da78df06a65f3f119b10cdba2c6ab5aeb5b8567bf7",
      "schema_line": 3483,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/calendar/functions/data_module_calendar_day_plans_v1.sql",
      "name": "data_module_calendar_day_plans_v1",
      "category": "read_module",
      "lines": 15,
      "sha256": "c2800f079a7e0d47f0599aa0eec948df1c786159a31d950cf5845569c6b725b1",
      "schema_line": 5833,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "planned_session_cards_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/calendar/functions/data_module_calendar_day_sessions_v1.sql",
      "name": "data_module_calendar_day_sessions_v1",
      "category": "read_module",
      "lines": 254,
      "sha256": "eaadbe241e98100c1d092658e04e1991feb6faa1e3a2326527a748be50d26f82",
      "schema_line": 5844,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "attach_strength_metrics_to_json_v1",
        "bounded_text_array_json",
        "calendar_strength_session_metrics_map_v1",
        "exercise_ref_json",
        "jsonb_text_array_v1",
        "left_utf8_bytes",
        "merge_strength_aggregate_array_v1",
        "sort_recording_fields_v1",
        "text_array_was_truncated"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/calendar/functions/data_module_calendar_day_top_sets_v1.sql",
      "name": "data_module_calendar_day_top_sets_v1",
      "category": "read_module",
      "lines": 41,
      "sha256": "3fe1602dbf4a6ec301c30ef74f62557be4aea43ed38d4346ac803908de57e36a",
      "schema_line": 6094,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "attach_strength_metrics_to_json_v1",
        "exercise_ref_json"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/calendar/functions/data_module_calendar_day_totals_v1.sql",
      "name": "data_module_calendar_day_totals_v1",
      "category": "read_module",
      "lines": 79,
      "sha256": "6e4bdb99ad8639975acc4f25d7528f3c9d7d2af07e8140c6772262878816c059",
      "schema_line": 6131,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "calendar_strength_day_metrics_map_v1",
        "empty_strength_aggregate_json_v1",
        "left_utf8_bytes"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/calendar/functions/data_module_calendar_month_days_v1.sql",
      "name": "data_module_calendar_month_days_v1",
      "category": "read_module",
      "lines": 262,
      "sha256": "aef8e7d88004e4a9399b56a4c6d4657dcede60b51752d0798c217a0c7ca1631d",
      "schema_line": 6206,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "calendar_strength_day_metrics_map_v1",
        "calendar_strength_session_metrics_map_v1",
        "exercise_ref_json",
        "left_utf8_bytes",
        "merge_strength_aggregate_array_v1",
        "planned_session_cards_v1",
        "require_passed_actor_v1",
        "session_set_totals_v1"
      ],
      "raises": [
        {
          "line": 20,
          "text": "raise exception 'from/to dates are required' using errcode = '22023';"
        },
        {
          "line": 23,
          "text": "raise exception 'to date must be greater than or equal to from date' using errcode = '22023';"
        },
        {
          "line": 26,
          "text": "raise exception 'calendar range must stay within one calendar month' using errcode = '22023';"
        },
        {
          "line": 29,
          "text": "raise exception 'calendar month range is too large' using errcode = '22023';"
        },
        {
          "line": 253,
          "text": "raise exception 'calendar.month_days payload exceeds 1200000 UTF-8 bytes'"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/calendar/functions/data_module_calendar_range_totals_v1.sql",
      "name": "data_module_calendar_range_totals_v1",
      "category": "read_module",
      "lines": 156,
      "sha256": "ff8b12f63e4242b3f9aa677fa365a9cb4f2b43b953e45a76e714e4da0dabbe7b",
      "schema_line": 6464,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "exercise_ref_json",
        "require_passed_actor_v1"
      ],
      "raises": [
        {
          "line": 21,
          "text": "raise exception 'p_from and p_to must form a non-empty range' using errcode = '22023';"
        },
        {
          "line": 25,
          "text": "raise exception 'calendar range summary supports at most 93 days' using errcode = '22023';"
        },
        {
          "line": 147,
          "text": "raise exception 'calendar.range_totals payload exceeds 64000 UTF-8 bytes'"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/calendar/functions/data_module_family_calendar_v1.sql",
      "name": "data_module_family_calendar_v1",
      "category": "read_module",
      "lines": 52,
      "sha256": "2c72b911242044a38a6887956ab2821d1502ce93cc746cb8afda48d3fe6d77ea",
      "schema_line": 6798,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "data_module_calendar_day_plans_v1",
        "data_module_calendar_day_sessions_v1",
        "data_module_calendar_day_top_sets_v1",
        "data_module_calendar_day_totals_v1",
        "data_module_calendar_month_days_v1",
        "data_module_calendar_range_totals_v1",
        "require_passed_actor_v1"
      ],
      "raises": [
        {
          "line": 18,
          "text": "raise exception 'Invalid from/to for %', p_module using errcode = '22023';"
        },
        {
          "line": 21,
          "text": "raise exception 'from/to are required for %', p_module using errcode = '22023';"
        },
        {
          "line": 32,
          "text": "raise exception 'Invalid date for %', p_module using errcode = '22023';"
        },
        {
          "line": 35,
          "text": "raise exception 'date is required for %', p_module using errcode = '22023';"
        },
        {
          "line": 44,
          "text": "raise exception 'Unknown data module: %', p_module using errcode = '22023';"
        }
      ],
      "catches": [
        {
          "line": 17,
          "text": "exception when others then"
        },
        {
          "line": 31,
          "text": "exception when others then"
        }
      ],
      "checks": []
    },
    {
      "path": "supabase/definitions/calendar/functions/get_calendar_day_summary.sql",
      "name": "get_calendar_day_summary",
      "category": "write_read_dependency",
      "lines": 33,
      "sha256": "2e995c92d5353a728e0d1aa551ef061312a7956358a41d93eff6c271c6b014d8",
      "schema_line": 11875,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "data_module_calendar_day_plans_v1",
        "data_module_calendar_day_sessions_v1",
        "data_module_calendar_day_top_sets_v1",
        "data_module_calendar_day_totals_v1",
        "require_actor_v1"
      ],
      "raises": [
        {
          "line": 12,
          "text": "raise exception 'date is required' using errcode = '22023';"
        },
        {
          "line": 22,
          "text": "raise exception 'get_calendar_day_summary v5 payload exceeds 1200000 UTF-8 bytes'"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/calendar/functions/get_log_table_cell_detail.sql",
      "name": "get_log_table_cell_detail",
      "category": "write_read_dependency",
      "lines": 25,
      "sha256": "9d03f7ef71dbf906ecb7ac5e1a627c75fdff47fbc05b764703a60285208ca282",
      "schema_line": 13576,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "attach_strength_metrics_to_json_v1",
        "get_log_table_cell_detail_v1_core"
      ],
      "raises": [
        {
          "line": 14,
          "text": "raise exception 'get_log_table_cell_detail v2 payload exceeds 48000 UTF-8 bytes'"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/calendar/functions/get_log_table_month.sql",
      "name": "get_log_table_month",
      "category": "write_read_dependency",
      "lines": 56,
      "sha256": "2e00d6e575c74c944b8447f10ca77baf5ea727694e33908ccabd49db8991edf3",
      "schema_line": 13710,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "get_log_table_month_v2_core",
        "stats_scope_freshness_v1"
      ],
      "raises": [
        {
          "line": 45,
          "text": "raise exception 'get_log_table_month v3 payload exceeds 900000 UTF-8 bytes'"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/calendar/functions/get_log_table_month_v2_core.sql",
      "name": "get_log_table_month_v2_core",
      "category": "write_read_dependency",
      "lines": 64,
      "sha256": "49daff4b9f117fb6d6880e568d237e9561f6823a5386f67aa6dea44cad65c9a6",
      "schema_line": 13760,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "require_passed_actor_v1"
      ],
      "raises": [
        {
          "line": 15,
          "text": "raise exception 'from/to dates are required' using errcode = '22023';"
        },
        {
          "line": 18,
          "text": "raise exception 'to date must be greater than or equal to from date' using errcode = '22023';"
        },
        {
          "line": 21,
          "text": "raise exception 'log table range must stay within one calendar month' using errcode = '22023';"
        },
        {
          "line": 24,
          "text": "raise exception 'exerciseIds must contain at most 30 values' using errcode = '22023';"
        },
        {
          "line": 57,
          "text": "raise exception 'get_log_table_month payload exceeds 900000 UTF-8 bytes'"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/calendar/tables/user_calendar_day_summaries.sql",
      "name": "user_calendar_day_summaries",
      "category": "write_read_dependency",
      "lines": 69,
      "sha256": "85d66515581a09503dc45d74f4ae58dd2cc3836a1d0ff82dc4ae17fa346072b0",
      "schema_line": 1900,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": [
        {
          "line": 39,
          "text": "CONSTRAINT \"user_calendar_day_summaries_completed_session_count_check\" CHECK ((\"completed_session_count\" >= 0)),"
        },
        {
          "line": 40,
          "text": "CONSTRAINT \"user_calendar_day_summaries_duration_minutes_check\" CHECK ((\"duration_minutes\" >= 0)),"
        },
        {
          "line": 41,
          "text": "CONSTRAINT \"user_calendar_day_summaries_exercise_count_check\" CHECK ((\"exercise_count\" >= 0)),"
        },
        {
          "line": 42,
          "text": "CONSTRAINT \"user_calendar_day_summaries_main_reps_check\" CHECK ((\"main_reps\" >= 0)),"
        },
        {
          "line": 43,
          "text": "CONSTRAINT \"user_calendar_day_summaries_pr_count_check\" CHECK ((\"pr_count\" >= 0)),"
        },
        {
          "line": 44,
          "text": "CONSTRAINT \"user_calendar_day_summaries_set_count_check\" CHECK ((\"set_count\" >= 0)),"
        },
        {
          "line": 45,
          "text": "CONSTRAINT \"user_calendar_day_summaries_set_score_histogram_check\" CHECK (((\"cardinality\"(\"set_score_histogram_counts\") = 8) AND (\"array_position\"(\"set_score_histogram_counts\", NULL::integer) IS NULL) AND (0 <= ALL (\"set_score_histogram_counts\")))),"
        },
        {
          "line": 46,
          "text": "CONSTRAINT \"user_calendar_day_summaries_strength_counts_check\" CHECK (((\"intensity_set_count\" >= 0) AND (\"strength_set_count\" >= 0) AND (\"hypertrophy_set_count\" >= 0) AND (\"endurance_set_count\" >= 0) AND (\"intensity_lt50_set_count\" >= 0) AND (\"intensity_50_70_set_count\" >= 0) AND (\"intensity_70_85_set_count\" >= 0) AND (\"intensity_gte85_set_count\" >= 0) AND (\"rpe_set_count\" >= 0) AND (\"rpe_lt6_set_count\" >= 0) AND (\"rpe_6_set_count\" >= 0) AND (\"rpe_7_set_count\" >= 0) AND (\"rpe_8_set_count\" >= 0) AND (\"rpe_9_set_count\" >= 0) AND (\"rpe_10_set_count\" >= 0) AND (\"intensity_set_count\" = (((\"intensity_lt50_set_count\" + \"intensity_50_70_set_count\") + \"intensity_70_85_set_count\") + \"intensity_gte85_set_count\")) AND (\"rpe_set_count\" = (((((\"rpe_lt6_set_count\" + \"rpe_6_set_count\") + \"rpe_7_set_count\") + \"rpe_8_set_count\") + \"rpe_9_set_count\") + \"rpe_10_set_count\")))),"
        },
        {
          "line": 47,
          "text": "CONSTRAINT \"user_calendar_day_summaries_total_reps_check\" CHECK ((\"total_reps\" >= 0)),"
        },
        {
          "line": 48,
          "text": "CONSTRAINT \"user_calendar_day_summaries_volume_check\" CHECK ((\"volume\" >= (0)::numeric))"
        }
      ]
    },
    {
      "path": "supabase/definitions/calendar/tables/user_calendar_summary_dirty_dates.sql",
      "name": "user_calendar_summary_dirty_dates",
      "category": "write_read_dependency",
      "lines": 20,
      "sha256": "5cbfc629aad31cf69cecbc1cd9633feb66081bd0c900a23e66199f74478cc386",
      "schema_line": 36434,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/catalog/functions/canonical_distance_meters_v1.sql",
      "name": "canonical_distance_meters_v1",
      "category": "write_read_dependency",
      "lines": 24,
      "sha256": "f88c7cee441a3314244973bd3f3b0dd2d725a7d79ef287f044a1a20b2b5d2857",
      "schema_line": 3552,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/catalog/functions/canonical_duration_seconds_v1.sql",
      "name": "canonical_duration_seconds_v1",
      "category": "write_read_dependency",
      "lines": 22,
      "sha256": "a4b18f7e3f6ab19e17899b72801ad2218c69d9dec7acfbd2ba40fc596afabcd5",
      "schema_line": 3572,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/catalog/functions/data_module_catalog_my_recency_v1.sql",
      "name": "data_module_catalog_my_recency_v1",
      "category": "read_module",
      "lines": 29,
      "sha256": "4332afcfa357818d194e3ae173afb16beac362a939a350a1e69e00d76782b4e7",
      "schema_line": 6616,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/catalog/functions/data_module_catalog_usage_signals_v1.sql",
      "name": "data_module_catalog_usage_signals_v1",
      "category": "read_module",
      "lines": 24,
      "sha256": "3d4cd7c3a7955493b6c88228d2f0d8e34f5a96fb4c6e752eae079761319bc484",
      "schema_line": 6641,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/catalog/functions/data_module_family_catalog_v1.sql",
      "name": "data_module_family_catalog_v1",
      "category": "read_module",
      "lines": 23,
      "sha256": "bc528266cd4ba53525248d686f1cfb5721314a60db7a504d8b21e9ffc3819f4a",
      "schema_line": 6846,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "data_module_catalog_my_recency_v1",
        "data_module_catalog_usage_signals_v1",
        "require_passed_actor_v1"
      ],
      "raises": [
        {
          "line": 15,
          "text": "raise exception 'Unknown data module: %', p_module using errcode = '22023';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/group/functions/data_module_family_group_v1.sql",
      "name": "data_module_family_group_v1",
      "category": "read_module",
      "lines": 72,
      "sha256": "5fddcb8ae2fbf42add71c560768b8af575d8ea91a7322da7ab2a2c0bd0a56e50",
      "schema_line": 6917,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "data_module_group_board_dates_v1",
        "data_module_group_invites_v1",
        "data_module_group_my_groups_v1",
        "data_module_group_notice_v1",
        "data_module_group_today_v1",
        "group_require_member_v1",
        "require_passed_actor_v1"
      ],
      "raises": [
        {
          "line": 26,
          "text": "raise exception 'Invalid group_id for %', p_module using errcode = '22023';"
        },
        {
          "line": 29,
          "text": "raise exception 'group_id is required for %', p_module using errcode = '22023';"
        },
        {
          "line": 37,
          "text": "raise exception 'Invalid date for %', p_module using errcode = '22023';"
        },
        {
          "line": 51,
          "text": "raise exception 'Invalid date window for %', p_module using errcode = '22023';"
        },
        {
          "line": 54,
          "text": "raise exception 'date window must be 0..62 days for %', p_module using errcode = '22023';"
        },
        {
          "line": 61,
          "text": "raise exception 'Unknown data module: %', p_module using errcode = '22023';"
        }
      ],
      "catches": [
        {
          "line": 25,
          "text": "exception when others then"
        },
        {
          "line": 36,
          "text": "exception when others then"
        },
        {
          "line": 50,
          "text": "exception when others then"
        }
      ],
      "checks": []
    },
    {
      "path": "supabase/definitions/group/functions/data_module_group_board_dates_v1.sql",
      "name": "data_module_group_board_dates_v1",
      "category": "read_module",
      "lines": 17,
      "sha256": "d99ff58876f42af39ad19953fbf915579351de1b59545c7006ac7d82ed701a84",
      "schema_line": 7165,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/group/functions/data_module_group_invites_v1.sql",
      "name": "data_module_group_invites_v1",
      "category": "read_module",
      "lines": 21,
      "sha256": "5076321d7f6cab4820b0d8d19c709209dd5de24a025232ca921f6dcb52b2441a",
      "schema_line": 7178,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "session_comment_author_json_v1",
        "social_content_visible_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/group/functions/data_module_group_my_groups_v1.sql",
      "name": "data_module_group_my_groups_v1",
      "category": "read_module",
      "lines": 42,
      "sha256": "2e1afa69a5b4a7524a52b41c8ad4c4379e7030f75aa167fd36fd424b774ad55d",
      "schema_line": 7195,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "build_group_summary_v1",
        "group_board_session_id_v1",
        "session_comment_author_json_v1",
        "social_content_visible_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/group/functions/data_module_group_notice_v1.sql",
      "name": "data_module_group_notice_v1",
      "category": "read_module",
      "lines": 25,
      "sha256": "9568e55a1e48539a61ed3f71dff9882a732fd354885bbc4a36c4e7d7ad02131a",
      "schema_line": 7233,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "group_content_hidden_v1",
        "session_comment_author_json_v1",
        "social_content_visible_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/group/functions/data_module_group_today_v1.sql",
      "name": "data_module_group_today_v1",
      "category": "read_module",
      "lines": 41,
      "sha256": "016b020d5d93276e7cfd7fa8222b7b5b38dd5809e27eb062145f6b1750a84b64",
      "schema_line": 7254,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "group_board_card_json_v1",
        "group_board_completion_members_v1",
        "group_board_session_id_v1",
        "payload_value_v1",
        "social_visible_person_json_v1"
      ],
      "raises": [
        {
          "line": 12,
          "text": "raise exception 'preview_exercises must be between 0 and 20 for group.today' using errcode = '22023';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/home/functions/data_module_family_home_v1.sql",
      "name": "data_module_family_home_v1",
      "category": "read_module",
      "lines": 31,
      "sha256": "861522b315530518913f96a540c8806f555ab8885ae070cd08668b8ce98d0fe8",
      "schema_line": 6985,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "data_module_home_benchmark_prs_v1",
        "data_module_home_month_plans_v1",
        "data_module_home_month_sessions_v1",
        "data_module_home_month_summary_v1",
        "data_module_home_period_totals_v1",
        "data_module_home_profile_summary_v1",
        "data_module_home_versions_v1",
        "data_module_home_week_activity_v1"
      ],
      "raises": [
        {
          "line": 10,
          "text": "raise exception 'owner is required' using errcode = '22023';"
        },
        {
          "line": 23,
          "text": "raise exception 'Unknown data module: %', p_module using errcode = '22023';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/home/functions/data_module_home_benchmark_prs_v1.sql",
      "name": "data_module_home_benchmark_prs_v1",
      "category": "read_module",
      "lines": 20,
      "sha256": "593f9d8cd2607c81d92f43e557601c1dcd942de40143c7865ec544588e999a74",
      "schema_line": 7291,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "get_user_home_benchmark_prs_json"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/home/functions/data_module_home_month_plans_v1.sql",
      "name": "data_module_home_month_plans_v1",
      "category": "read_module",
      "lines": 17,
      "sha256": "7508a09326005dfddb9397756cd46dd6a6d7cc1e8cfb174deeee16eb144beeff",
      "schema_line": 7307,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "planned_session_cards_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/home/functions/data_module_home_month_sessions_v1.sql",
      "name": "data_module_home_month_sessions_v1",
      "category": "read_module",
      "lines": 95,
      "sha256": "78f80096348ee0406b084a73a2f2947d8ce63925e11619b01feed49f5a49209a",
      "schema_line": 7320,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "left_utf8_bytes",
        "session_set_totals_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/home/functions/data_module_home_month_summary_v1.sql",
      "name": "data_module_home_month_summary_v1",
      "category": "read_module",
      "lines": 78,
      "sha256": "a4de3cc218f97477c59e14c11b2725ae6041754efa75116e925b2207379ae69c",
      "schema_line": 7411,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "user_pr_event_count_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/home/functions/data_module_home_period_row_v1.sql",
      "name": "data_module_home_period_row_v1",
      "category": "read_module",
      "lines": 21,
      "sha256": "11960d0128c469236f2f29fd5197d2588d8047a37edffafbbb1b111ee9419438",
      "schema_line": 7485,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/home/functions/data_module_home_period_totals_v1.sql",
      "name": "data_module_home_period_totals_v1",
      "category": "read_module",
      "lines": 24,
      "sha256": "dd72bd92229c81893a6d5dad7c95031041240075cd3aced315db07126a572794",
      "schema_line": 7502,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "data_module_home_period_row_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/home/functions/data_module_home_profile_summary_v1.sql",
      "name": "data_module_home_profile_summary_v1",
      "category": "read_module",
      "lines": 27,
      "sha256": "d8fc0e72c35f348b2484991894e1b8e40230046063cd2144cadfa29cb5516a06",
      "schema_line": 7522,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "user_pr_event_count_v1",
        "volume_level_progress_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/home/functions/data_module_home_versions_v1.sql",
      "name": "data_module_home_versions_v1",
      "category": "read_module",
      "lines": 18,
      "sha256": "bb226322f234e81492de955bb1e6ce93724f62447c5c5ce0c7fde2be136518f9",
      "schema_line": 7545,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "exercise_catalog_latest_seq_v1",
        "get_user_stats_refresh_freshness"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/home/functions/data_module_home_week_activity_v1.sql",
      "name": "data_module_home_week_activity_v1",
      "category": "read_module",
      "lines": 47,
      "sha256": "0557b5a7516c9ab8db06fbefdf930aa0f8a5be02e83d128ba16029fb00e6be6c",
      "schema_line": 7559,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "get_user_stats_refresh_freshness"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/home/functions/get_home_year_activity.sql",
      "name": "get_home_year_activity",
      "category": "write_read_dependency",
      "lines": 90,
      "sha256": "97adcb0b93528b209ee6041201f9218cb48ffd488c0c0aadf295030c2b67ecbc",
      "schema_line": 13492,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "require_actor_v1",
        "seoul_today_v1"
      ],
      "raises": [
        {
          "line": 18,
          "text": "raise exception 'asOf year must be between 2000 and 2200'"
        },
        {
          "line": 22,
          "text": "raise exception 'year must be between % and %', v_current_year - 9, v_current_year"
        },
        {
          "line": 74,
          "text": "raise exception 'get_home_year_activity exceeded its one-year row bound'"
        },
        {
          "line": 78,
          "text": "raise exception 'get_home_year_activity payload exceeds 192000 UTF-8 bytes'"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/home/functions/get_user_home_benchmark_prs_json.sql",
      "name": "get_user_home_benchmark_prs_json",
      "category": "write_read_dependency",
      "lines": 62,
      "sha256": "e66931ab03d7df294dca01633a1f132417d6198994aafab9492678dc3efead2c",
      "schema_line": 14575,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "left_utf8_bytes",
        "user_pr_summary_read_v1"
      ],
      "raises": [
        {
          "line": 9,
          "text": "raise exception 'user_id, non-negative generation, and as_of are required' using errcode = '22023';"
        },
        {
          "line": 54,
          "text": "raise exception 'Home benchmark measured PR payload exceeded its bound' using errcode = '54000';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/home/functions/get_user_recent_prs_json.sql",
      "name": "get_user_recent_prs_json",
      "category": "write_read_dependency",
      "lines": 55,
      "sha256": "a088654b1af204403f1fd9d0000068921f46d6d13ec7ead342fe7c34486259a1",
      "schema_line": 14633,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "left_utf8_bytes",
        "seoul_today_v1",
        "user_pr_record_title_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/onboarding/functions/data_module_family_onboarding_v1.sql",
      "name": "data_module_family_onboarding_v1",
      "category": "read_module",
      "lines": 24,
      "sha256": "7c0af44e911cb46103623f1abf1d07a457a93f59cf539c21b154d71604bd0e6e",
      "schema_line": 7031,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "data_module_onboarding_consent_requirements_v1",
        "data_module_onboarding_exercise_set_v1",
        "data_module_onboarding_progress_v1",
        "require_passed_actor_v1"
      ],
      "raises": [
        {
          "line": 16,
          "text": "raise exception 'Unknown data module: %', p_module using errcode = '22023';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/onboarding/functions/data_module_onboarding_consent_requirements_v1.sql",
      "name": "data_module_onboarding_consent_requirements_v1",
      "category": "read_module",
      "lines": 31,
      "sha256": "01671b223595b5811b29d2973644bd1801f4932019ab3a16f13d7bc55466c7bb",
      "schema_line": 7726,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "onboarding_consent_requirements"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/onboarding/functions/data_module_onboarding_exercise_set_v1.sql",
      "name": "data_module_onboarding_exercise_set_v1",
      "category": "read_module",
      "lines": 21,
      "sha256": "5e1a819a7f622e7d13a0761d0f31b9b0f2e7150bdcf8098f7889defab4da8254",
      "schema_line": 7753,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/onboarding/functions/data_module_onboarding_progress_v1.sql",
      "name": "data_module_onboarding_progress_v1",
      "category": "read_module",
      "lines": 31,
      "sha256": "87b87784d9e750751ab5db1a8e7eb6480322588a4dcb7944ef566e0decee613e",
      "schema_line": 7770,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "onboarding_consent_requirements"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/pr/functions/data_module_exercise_cardio_distance_table_v1.sql",
      "name": "data_module_exercise_cardio_distance_table_v1",
      "category": "read_module",
      "lines": 21,
      "sha256": "dd5dc95a9106caec47ca2c3ad4edb7cd5d134a2fe68f86cf839196b9ee177753",
      "schema_line": 6661,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "record_metric_cardio_by_distance_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/pr/functions/data_module_exercise_metric_timeline_v1.sql",
      "name": "data_module_exercise_metric_timeline_v1",
      "category": "read_module",
      "lines": 27,
      "sha256": "5d827976ab755377d4272c351d6f407b3c40b2e85b9c5cd74eacd76d305adae4",
      "schema_line": 6678,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "seoul_today_v1"
      ],
      "raises": [
        {
          "line": 9,
          "text": "RAISE EXCEPTION 'kind must be reps, hold or cardio for exercise.metric_timeline' USING ERRCODE='22023';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/pr/functions/data_module_exercise_pr_year_count_v1.sql",
      "name": "data_module_exercise_pr_year_count_v1",
      "category": "read_module",
      "lines": 15,
      "sha256": "e55b41dfc5e883f83757b4efc4bcfd22aaf653dc765288f9246c83ae748ce61d",
      "schema_line": 6701,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/pr/functions/data_module_exercise_record_state_v1.sql",
      "name": "data_module_exercise_record_state_v1",
      "category": "read_module",
      "lines": 26,
      "sha256": "ed384199260118bbd6ea78f1b3e57e60f6b4411496c8ac3ab0b7270215af3d1e",
      "schema_line": 6712,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "get_user_exercise_nrm_states_json"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/pr/functions/data_module_exercise_year_activity_v1.sql",
      "name": "data_module_exercise_year_activity_v1",
      "category": "read_module",
      "lines": 41,
      "sha256": "815237173df7b86fbf9786dfb518130e55ec0ffbed54a8143961833a0718304a",
      "schema_line": 6734,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/pr/functions/data_module_exercise_year_summaries_v1.sql",
      "name": "data_module_exercise_year_summaries_v1",
      "category": "read_module",
      "lines": 31,
      "sha256": "fd9d4fc84998c32287f2e3f8ad406cb751d4d65b1a73dcafa380d3f79594ae03",
      "schema_line": 6771,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/pr/functions/data_module_family_exercise_v1.sql",
      "name": "data_module_family_exercise_v1",
      "category": "read_module",
      "lines": 56,
      "sha256": "f4c297d690877a968e65c5691bd433949ff9ece9965b017431521d8fd25289a4",
      "schema_line": 6865,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "data_module_exercise_cardio_distance_table_v1",
        "data_module_exercise_metric_timeline_v1",
        "data_module_exercise_pr_year_count_v1",
        "data_module_exercise_record_state_v1",
        "data_module_exercise_year_activity_v1",
        "data_module_exercise_year_summaries_v1",
        "validate_exercise_identity_scope"
      ],
      "raises": [
        {
          "line": 15,
          "text": "raise exception 'Invalid exercise_id for %', p_module using errcode = '22023';"
        },
        {
          "line": 18,
          "text": "raise exception 'exercise_id is required for %', p_module using errcode = '22023';"
        },
        {
          "line": 25,
          "text": "raise exception 'Invalid year for %', p_module using errcode = '22023';"
        },
        {
          "line": 28,
          "text": "raise exception 'year must be between % and % for %', v_current_year - 9, v_current_year, p_module using errcode = '22023';"
        },
        {
          "line": 43,
          "text": "raise exception 'year is required for %', p_module using errcode = '22023';"
        },
        {
          "line": 45,
          "text": "raise exception 'Unknown data module: %', p_module using errcode = '22023';"
        }
      ],
      "catches": [
        {
          "line": 14,
          "text": "exception when others then"
        },
        {
          "line": 24,
          "text": "exception when others then"
        }
      ],
      "checks": []
    },
    {
      "path": "supabase/definitions/pr/functions/data_module_family_manual_v1.sql",
      "name": "data_module_family_manual_v1",
      "category": "read_module",
      "lines": 23,
      "sha256": "169ad07f770db7a68e7185f0afbc2249c1bb1b003b7ea04bb8a1556fb4d6ace8",
      "schema_line": 7012,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "data_module_manual_pr_records_v1",
        "data_module_manual_record_metrics_v1",
        "require_passed_actor_v1"
      ],
      "raises": [
        {
          "line": 15,
          "text": "raise exception 'Unknown data module: %', p_module using errcode = '22023';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/pr/functions/data_module_family_pr_v1.sql",
      "name": "data_module_family_pr_v1",
      "category": "read_module",
      "lines": 29,
      "sha256": "2c5fdebcd2b057e6c29f7e9b2cce9a56d6dc5c281ae32149673e18ff3d3f05de",
      "schema_line": 7104,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "data_module_pr_exercise_records_v1",
        "data_module_pr_exercise_summaries_v1",
        "data_module_pr_profession_standards_v1",
        "data_module_pr_recent_events_v1",
        "data_module_pr_strength_standards_v1",
        "data_module_pr_year_count_v1"
      ],
      "raises": [
        {
          "line": 10,
          "text": "raise exception 'owner is required' using errcode = '22023';"
        },
        {
          "line": 21,
          "text": "raise exception 'Unknown data module: %', p_module using errcode = '22023';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/pr/functions/data_module_manual_pr_records_v1.sql",
      "name": "data_module_manual_pr_records_v1",
      "category": "read_module",
      "lines": 65,
      "sha256": "c099739ea8be2edadab35e5cb0eda7a957b63b162a02ba70a517fdb8bb6911fb",
      "schema_line": 7602,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "exercise_ref_json"
      ],
      "raises": [
        {
          "line": 11,
          "text": "raise exception 'Manual page limit must be 1 to 50' using errcode='22023';"
        },
        {
          "line": 15,
          "text": "raise exception 'Manual page cursor is incomplete' using errcode='22023';"
        },
        {
          "line": 57,
          "text": "raise exception 'manual.pr_records exceeded its 2000-row bound' using errcode = '54000';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/pr/functions/data_module_manual_record_metrics_v1.sql",
      "name": "data_module_manual_record_metrics_v1",
      "category": "read_module",
      "lines": 67,
      "sha256": "aac88ae3ecbae8f6cff52377f04794554500f5b1c18e3dd9c00e955536946c14",
      "schema_line": 7663,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "exercise_ref_json"
      ],
      "raises": [
        {
          "line": 11,
          "text": "raise exception 'Manual page limit must be 1 to 50' using errcode='22023';"
        },
        {
          "line": 15,
          "text": "raise exception 'Manual page cursor is incomplete' using errcode='22023';"
        },
        {
          "line": 59,
          "text": "raise exception 'manual.record_metrics exceeded its 2000-row bound' using errcode = '54000';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/pr/functions/data_module_pr_exercise_records_v1.sql",
      "name": "data_module_pr_exercise_records_v1",
      "category": "read_module",
      "lines": 60,
      "sha256": "4c66cd5ec6fe0ebab7db739f90ad4fd1be1716e2ef36b248b195624645bfd94b",
      "schema_line": 8034,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "data_module_pr_scope_exercise_ids_v1",
        "exercise_region_ko_v1",
        "left_utf8_bytes",
        "user_pr_records_read_v1",
        "user_pr_summary_candidates_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/pr/functions/data_module_pr_exercise_summaries_v1.sql",
      "name": "data_module_pr_exercise_summaries_v1",
      "category": "read_module",
      "lines": 25,
      "sha256": "5bbc252f8c7db73ff9988a2ef1eb29baf053d1cf95fec3afe8d55c123972f85a",
      "schema_line": 8090,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "data_module_pr_exercise_records_v1",
        "user_pr_activity_read_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/pr/functions/data_module_pr_profession_standards_v1.sql",
      "name": "data_module_pr_profession_standards_v1",
      "category": "read_module",
      "lines": 33,
      "sha256": "4ac148efd0db443fe2f3d5ee3f0cf05eb8400045f877fea68f60f2e36598bbe9",
      "schema_line": 8111,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "data_module_pr_standard_gender_v1",
        "left_utf8_bytes"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/pr/functions/data_module_pr_recent_events_v1.sql",
      "name": "data_module_pr_recent_events_v1",
      "category": "read_module",
      "lines": 21,
      "sha256": "0e59967dd7ec3ac4698d283dccd8fd48aff861ab1de3eec49fc1612efad1b5f9",
      "schema_line": 8140,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "get_user_recent_prs_json"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/pr/functions/data_module_pr_scope_exercise_ids_v1.sql",
      "name": "data_module_pr_scope_exercise_ids_v1",
      "category": "read_module",
      "lines": 57,
      "sha256": "f18d054a55972d58ecb275d34a76e5c5f99a3da595d7e233088fb34394aaf3f5",
      "schema_line": 8157,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "user_pr_records_read_v1"
      ],
      "raises": [
        {
          "line": 45,
          "text": "raise exception 'pr scope \"ids\" requires options.exercise_ids with 1..32 ids' using errcode = '22023';"
        },
        {
          "line": 51,
          "text": "raise exception 'Unknown pr scope: %', v_scope using errcode = '22023';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/pr/functions/data_module_pr_standard_gender_v1.sql",
      "name": "data_module_pr_standard_gender_v1",
      "category": "read_module",
      "lines": 15,
      "sha256": "41b1873c5b980dce41bc3f7549400c6c873500b3ee2de528fa03cabb22e5e88a",
      "schema_line": 8210,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/pr/functions/data_module_pr_strength_standards_v1.sql",
      "name": "data_module_pr_strength_standards_v1",
      "category": "read_module",
      "lines": 52,
      "sha256": "84070f5de4f1fd06aa4ceb8512cda59b8402f11bc377b27c8c87ae4ed264aa90",
      "schema_line": 8221,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "data_module_pr_scope_exercise_ids_v1",
        "data_module_pr_standard_gender_v1",
        "left_utf8_bytes",
        "user_pr_summary_candidates_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/pr/functions/data_module_pr_year_count_v1.sql",
      "name": "data_module_pr_year_count_v1",
      "category": "read_module",
      "lines": 11,
      "sha256": "99089a5b40db591424d73d7791316b4eb5ed37026fb6f3bb67f8b73747ea2a0e",
      "schema_line": 8269,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "user_pr_event_count_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/profile/functions/data_module_family_profile_v1.sql",
      "name": "data_module_family_profile_v1",
      "category": "read_module",
      "lines": 22,
      "sha256": "49732cc06f2a1cd024382e9987df24e1957917f4248de3272708318b44b1ed04",
      "schema_line": 7129,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "data_module_profile_body_metric_v1",
        "require_passed_actor_v1"
      ],
      "raises": [
        {
          "line": 14,
          "text": "raise exception 'Unknown data module: %', p_module using errcode = '22023';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/profile/functions/data_module_profile_body_metric_v1.sql",
      "name": "data_module_profile_body_metric_v1",
      "category": "read_module",
      "lines": 25,
      "sha256": "b54b4c815c4e2a212208388824a127d784a35a6d1ad96ce1e8dfc91a0f5db0dd",
      "schema_line": 8276,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/shell/functions/get_data_modules_v1.sql",
      "name": "get_data_modules_v1",
      "category": "read_module",
      "lines": 92,
      "sha256": "e997648c2c794995e5c5b329f0f220cfd78710d095e379259557fe140508bb06",
      "schema_line": 11945,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "canonical_seoul_report_as_of_v1",
        "data_module_family_calendar_v1",
        "data_module_family_catalog_v1",
        "data_module_family_exercise_v1",
        "data_module_family_group_v1",
        "data_module_family_home_v1",
        "data_module_family_manual_v1",
        "data_module_family_onboarding_v1",
        "data_module_family_period_v1",
        "data_module_family_pr_v1",
        "data_module_family_profile_v1",
        "data_module_family_social_v1",
        "get_user_stats_refresh_freshness",
        "profile_feed_can_view_v1",
        "profile_page_can_view_v1",
        "profile_page_modules_v1",
        "require_actor_v1",
        "social_view_denied_v1",
        "stats_scope_freshness_v1"
      ],
      "raises": [
        {
          "line": 27,
          "text": "raise exception 'Data module requests must be an array of 1..32 items' using errcode = '22023';"
        },
        {
          "line": 32,
          "text": "raise exception 'Data module request must be an object' using errcode = '22023';"
        },
        {
          "line": 38,
          "text": "raise exception 'Invalid data module name: %', coalesce(v_module, 'null') using errcode = '22023';"
        },
        {
          "line": 41,
          "text": "raise exception 'Scope and options for % must be objects', v_module using errcode = '22023';"
        },
        {
          "line": 48,
          "text": "raise exception 'Data module family % is private to the caller', v_family using errcode = '42501';"
        },
        {
          "line": 64,
          "text": "raise exception 'Unknown data module family: %', v_family using errcode = '22023';"
        },
        {
          "line": 68,
          "text": "raise exception 'Data module % exceeds byte budget', v_module using errcode = '54000';"
        },
        {
          "line": 82,
          "text": "raise exception 'Data modules exceed byte budget' using errcode = '54000';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/social/functions/data_module_family_social_v1.sql",
      "name": "data_module_family_social_v1",
      "category": "read_module",
      "lines": 22,
      "sha256": "fd6079860d24d741811c4e446908b07661d3a92be0ba72f8ba4cce52c6b53da6",
      "schema_line": 7147,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "data_module_social_leaderboard_v1",
        "data_module_social_league_v1",
        "data_module_social_versus_v1",
        "require_passed_actor_v1"
      ],
      "raises": [
        {
          "line": 9,
          "text": "if p_scope <> '{}'::jsonb then raise exception 'Social scope must be the caller' using errcode = '22023'; end if;"
        },
        {
          "line": 15,
          "text": "if v_payload is null then raise exception 'Unknown data module: %', p_module using errcode = '22023'; end if;"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/social/functions/data_module_social_leaderboard_v1.sql",
      "name": "data_module_social_leaderboard_v1",
      "category": "read_module",
      "lines": 54,
      "sha256": "67487d156c928386e5077ccbc3e4306182314a791e673540106d635ec8fe7bb5",
      "schema_line": 8297,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "social_leaderboard_metric_v1",
        "social_leaderboard_people_v1"
      ],
      "raises": [
        {
          "line": 15,
          "text": "raise exception 'Invalid leaderboard page or metric' using errcode = '22023';"
        },
        {
          "line": 18,
          "text": "raise exception 'Exercise is not visible' using errcode = '42501';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/social/functions/data_module_social_league_v1.sql",
      "name": "data_module_social_league_v1",
      "category": "read_module",
      "lines": 56,
      "sha256": "76f61338f22fdda1e3d4f9ef118943ccf0affdada40403b31adda8bdc38ccaa8",
      "schema_line": 8347,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "left_utf8_bytes",
        "social_content_visible_v1"
      ],
      "raises": [
        {
          "line": 14,
          "text": "raise exception 'Invalid league page or circle' using errcode = '22023';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/social/functions/data_module_social_versus_v1.sql",
      "name": "data_module_social_versus_v1",
      "category": "read_module",
      "lines": 54,
      "sha256": "a78b94cfd95ce2a2640230564129423d6b9417188a2b125b04b87ffea0349d4f",
      "schema_line": 8399,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "left_utf8_bytes",
        "profile_page_can_view_v1",
        "social_leaderboard_metric_v1",
        "social_leaderboard_people_v1"
      ],
      "raises": [
        {
          "line": 13,
          "text": "raise exception 'Versus requires at most 128 exercises' using errcode = '22023';"
        },
        {
          "line": 18,
          "text": "raise exception 'Opponent is not visible' using errcode = '42501';"
        },
        {
          "line": 27,
          "text": "if v_other is null then raise exception 'Opponent is not visible' using errcode = '42501'; end if;"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/assemble_user_exercise_period_rows_v1.sql",
      "name": "assemble_user_exercise_period_rows_v1",
      "category": "statistics_function",
      "lines": 117,
      "sha256": "b62a0f4208898446ad14dc3d3caf072ddcf701f178c453e6e7a2c6821ab20a11",
      "schema_line": 2077,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "report_histogram_counts_v1",
        "set_score_projection_observations_v1",
        "strength_display_frame_kg_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/assemble_user_training_period_rows_v1.sql",
      "name": "assemble_user_training_period_rows_v1",
      "category": "statistics_function",
      "lines": 148,
      "sha256": "9be577255d7b98f4ac5dfeacde04cf55894b61f44d3fce5462668e05c743f675",
      "schema_line": 2218,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "attendance_weekly_target_days_v1",
        "session_set_totals_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/attach_strength_metrics_map_to_json_v1.sql",
      "name": "attach_strength_metrics_map_to_json_v1",
      "category": "statistics_function",
      "lines": 28,
      "sha256": "aea85f589df0b5da1c0902a73b8a69b3f31c547cc3577b17b33c827ae4ddba4b",
      "schema_line": 2428,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "attach_strength_metrics_map_to_json_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/attach_strength_metrics_to_json_v1.sql",
      "name": "attach_strength_metrics_to_json_v1",
      "category": "statistics_function",
      "lines": 16,
      "sha256": "0f6f089a45f5ab0362c89fdec1c4f93924ca0ace68c885cc98e8779b2549dc6d",
      "schema_line": 2452,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "attach_strength_metrics_map_to_json_v1",
        "collect_json_uuid_candidates_v1",
        "strength_set_metrics_map_json"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/calculate_max_rep_observation_v2.sql",
      "name": "calculate_max_rep_observation_v2",
      "category": "statistics_function",
      "lines": 62,
      "sha256": "ae79076c9749a81eb66ed3c6fea39d12cec89aad27949d78c24092b558abb662",
      "schema_line": 3158,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [],
      "raises": [
        {
          "line": 15,
          "text": "raise exception 'Unsupported max-rep estimation policy: %@%',"
        },
        {
          "line": 19,
          "text": "raise exception 'perceived_rpe out of range (1.0~10.0): %', p_rpe using errcode = '22023';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/calculate_strength_observation_v2.sql",
      "name": "calculate_strength_observation_v2",
      "category": "statistics_function",
      "lines": 139,
      "sha256": "c18a7a98458487d09e4402148bb6210b95424e2a37350c36f36e1e8a6850330e",
      "schema_line": 3216,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "strength_estimation_load_percent_v1"
      ],
      "raises": [
        {
          "line": 23,
          "text": "raise exception 'Unsupported strength estimation policy/curve: %/%',"
        },
        {
          "line": 28,
          "text": "raise exception 'perceived_rpe out of range (1.0~10.0): %', p_rpe using errcode = '22023';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/check_own_stats_core_v1.sql",
      "name": "check_own_stats_core_v1",
      "category": "statistics_function",
      "lines": 58,
      "sha256": "5d81f56770a911d8b7994ccc5dd087ef9b334c8bd51c7815902f52b7ed497056",
      "schema_line": 4085,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "enqueue_user_exercise_stats_refresh_job_core",
        "mutation_payload_v1",
        "payload_value_v1",
        "require_actor_v1",
        "user_stats_self_checks"
      ],
      "raises": [
        {
          "line": 18,
          "text": "RAISE EXCEPTION 'own stats check belongs to another account' USING ERRCODE = '42501';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/check_own_stats_v1.sql",
      "name": "check_own_stats_v1",
      "category": "statistics_function",
      "lines": 21,
      "sha256": "65a88a3c7af206d6f6ccdfccf010cd2a19610ef17d897e286624422fecf74ffc",
      "schema_line": 4139,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "account_signed_in_core_v1",
        "mutation_receipt_commit_v1",
        "mutation_receipt_replay_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/claim_stats_projection_job_v1__.sql",
      "name": "claim_stats_projection_job_v1__",
      "category": "statistics_function",
      "lines": 13,
      "sha256": "1bbde6d0bfe8385dd38f8633970e861e08b721272e5813d2c8d530b67fc56912",
      "schema_line": 4181,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "claim_stats_projection_job_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/claim_stats_projection_job_v1__text.sql",
      "name": "claim_stats_projection_job_v1__text",
      "category": "statistics_function",
      "lines": 88,
      "sha256": "4ffd3668f8d349d40fd248149d4049c907b74c7733be7904f0c1dcd35fce2a12",
      "schema_line": 4190,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "claim_user_exercise_stats_refresh_job_v1",
        "seoul_today_v1",
        "stats_lock_run_v1",
        "stats_lock_v1",
        "stats_projection_revivable_jobs_v1",
        "stats_projection_source_v1",
        "stats_projection_worker_settings_v1",
        "user_stats_projection_runs"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/claim_user_exercise_stats_refresh_job_v1.sql",
      "name": "claim_user_exercise_stats_refresh_job_v1",
      "category": "statistics_function",
      "lines": 110,
      "sha256": "0f7418214f4d35d2dcd2125597c49fb1f65cbe3201eaaaa1a5312f492741415c",
      "schema_line": 4374,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "stats_lock_job_v1",
        "stats_lock_v1",
        "stats_refresh_scope_merge_v1"
      ],
      "raises": [
        {
          "line": 16,
          "text": "raise exception 'user_id is required' using errcode = '22023';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/classify_set_purpose_v3.sql",
      "name": "classify_set_purpose_v3",
      "category": "statistics_function",
      "lines": 23,
      "sha256": "038d2e56ab10aad7baf34f81b1d19a155f856fd278e39e4f7a13972b5190640e",
      "schema_line": 4480,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/compute_stats_projection_job_engine_v1.sql",
      "name": "compute_stats_projection_job_engine_v1",
      "category": "statistics_function",
      "lines": 229,
      "sha256": "aec855d645c5b8c6597d0fea57f9bf607f11580000d1431fb0fdd98d7de2e0e9",
      "schema_line": 4740,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "run_stats_projection_step_v1",
        "seoul_today_v1",
        "stats_lock_run_v1",
        "stats_lock_v1",
        "stats_projection_reset_context_v1",
        "stats_projection_row_columns_v1",
        "stats_projection_run_lease_check_v1",
        "stats_projection_scope_window_v1",
        "stats_projection_seed_window_v1",
        "stats_projection_source_v1",
        "stats_projection_stale_v1",
        "stats_projection_stop_v1",
        "stats_projection_table_window_v1",
        "stats_projection_tables_v1",
        "stats_projection_worker_settings_v1",
        "stats_refresh_scope_range_v1",
        "stats_sequential_exercise_ids_v1"
      ],
      "raises": [
        {
          "line": 75,
          "text": "RAISE EXCEPTION 'Statistics batch input or private output changed' USING ERRCODE='40001';"
        }
      ],
      "catches": [
        {
          "line": 188,
          "text": "EXCEPTION WHEN query_canceled OR OTHERS THEN"
        }
      ],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/compute_stats_projection_job_v1.sql",
      "name": "compute_stats_projection_job_v1",
      "category": "statistics_function",
      "lines": 14,
      "sha256": "25b5fc0f42106d24b441d44d4adb789acdaaf28c1d9516af11b6fda1954eae92",
      "schema_line": 4965,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "compute_stats_projection_job_engine_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/empty_strength_aggregate_json_v1.sql",
      "name": "empty_strength_aggregate_json_v1",
      "category": "statistics_function",
      "lines": 35,
      "sha256": "460985475ae77ff5369c5bf88c59b0f92921f90abfbf68ce10321a28195419de",
      "schema_line": 8841,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/enqueue_manual_max_rep_score_refresh_v2.sql",
      "name": "enqueue_manual_max_rep_score_refresh_v2",
      "category": "statistics_function",
      "lines": 29,
      "sha256": "62d2d1b4f8ebb648be73b1e4f5418986fd9df7f9f14ea9ea794c44975fd5a003",
      "schema_line": 8941,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "enqueue_user_exercise_stats_refresh_job",
        "manual_record_stats_scope_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/enqueue_user_exercise_stats_refresh_job.sql",
      "name": "enqueue_user_exercise_stats_refresh_job",
      "category": "statistics_function",
      "lines": 19,
      "sha256": "07f595a276a662763b59f30c3bc9142ae9b02999b5e6b547ec43213f6cfd3f6d",
      "schema_line": 9065,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "enqueue_user_exercise_stats_refresh_job_core"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/enqueue_user_exercise_stats_refresh_job_core.sql",
      "name": "enqueue_user_exercise_stats_refresh_job_core",
      "category": "statistics_function",
      "lines": 30,
      "sha256": "0f8977604394ba113cc3f765b2b99560f878e7698ce40c3e6206680d1217bf45",
      "schema_line": 9080,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "enqueue_user_exercise_stats_refresh_scope_v1",
        "stats_refresh_scope_build_v1"
      ],
      "raises": [
        {
          "line": 10,
          "text": "raise exception 'user_id is required';"
        },
        {
          "line": 13,
          "text": "raise exception 'event_type is required';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/enqueue_user_exercise_stats_refresh_scope_v1.sql",
      "name": "enqueue_user_exercise_stats_refresh_scope_v1",
      "category": "statistics_function",
      "lines": 177,
      "sha256": "27bf4ce111bedd236d7b5266c86e931a1f284ec305f511861ca877128f00211f",
      "schema_line": 9106,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "stats_lock_job_v1",
        "stats_lock_v1",
        "stats_projection_worker_kick_v1",
        "stats_refresh_scope_merge_v1",
        "stats_refresh_scope_range_v1",
        "stats_refresh_scope_valid_v1",
        "user_exercise_stats_refresh_jobs",
        "user_stats_refresh_state"
      ],
      "raises": [
        {
          "line": 22,
          "text": "raise exception 'user_id is required';"
        },
        {
          "line": 25,
          "text": "raise exception 'event_type is required';"
        },
        {
          "line": 33,
          "text": "raise exception 'Unknown stats refresh event_type: %', v_event_type;"
        },
        {
          "line": 36,
          "text": "raise exception 'Invalid stats refresh scope: %', coalesce(v_scope::text, 'null') using errcode = '22023';"
        },
        {
          "line": 82,
          "text": "raise exception 'Statistics enqueue must assign exactly one generation' using errcode = '55000';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/get_user_stats_refresh_freshness.sql",
      "name": "get_user_stats_refresh_freshness",
      "category": "statistics_function",
      "lines": 29,
      "sha256": "f40e9dd25a23beec53fae4aa74d550672f2bcec51c00c970ff6c6ed9f88a86d0",
      "schema_line": 14684,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "left_utf8_bytes"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/guard_user_stats_refresh_projection_publication.sql",
      "name": "guard_user_stats_refresh_projection_publication",
      "category": "statistics_function",
      "lines": 19,
      "sha256": "0fcc53161baa7773873ac6576860561a297fe6fb91371540354b62e6d2acf0a5",
      "schema_line": 15151,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "validate_stats_projection_payload_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/max_rep_recording_profile_eligible_v1.sql",
      "name": "max_rep_recording_profile_eligible_v1",
      "category": "statistics_function",
      "lines": 17,
      "sha256": "d611f695c9f3c3e49dc18b722b5b83f0d5587c2ed207f9696b71f643e88213ec",
      "schema_line": 17175,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/merge_strength_aggregate_array_v1.sql",
      "name": "merge_strength_aggregate_array_v1",
      "category": "statistics_function",
      "lines": 19,
      "sha256": "65d0de848dc330c1564db4034064a9027358759c123116177531d358da31aae3",
      "schema_line": 17202,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "empty_strength_aggregate_json_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/numeric_period_window_v1.sql",
      "name": "numeric_period_window_v1",
      "category": "statistics_function",
      "lines": 26,
      "sha256": "8717167cdb304b9ada371a94c53ecc879aee071120f9439e7d0ce9cfe5fed6a1",
      "schema_line": 17597,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/publish_stats_projection_job_engine_v1.sql",
      "name": "publish_stats_projection_job_engine_v1",
      "category": "statistics_function",
      "lines": 130,
      "sha256": "d333e662b366215bb8ddfd9664eff93a8345a2f9b237766da8775f5278fd86ac",
      "schema_line": 19739,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "seoul_today_v1",
        "stats_lock_run_v1",
        "stats_lock_v1",
        "stats_lock_wait_budget_v1",
        "stats_projection_reset_context_v1",
        "stats_projection_row_columns_v1",
        "stats_projection_run_lease_check_v1",
        "stats_projection_stale_v1",
        "stats_projection_stop_v1",
        "stats_projection_table_window_v1",
        "stats_projection_tables_v1",
        "stats_projection_worker_settings_v1",
        "validate_stats_projection_payload_v1"
      ],
      "raises": [
        {
          "line": 43,
          "text": "RAISE EXCEPTION 'Snapshot calendar window advanced; recompute the same generation'"
        }
      ],
      "catches": [
        {
          "line": 114,
          "text": "EXCEPTION WHEN query_canceled OR OTHERS THEN"
        }
      ],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/publish_stats_projection_job_v1.sql",
      "name": "publish_stats_projection_job_v1",
      "category": "statistics_function",
      "lines": 14,
      "sha256": "2e9798de4112e6219dee9848b32848e2944a2490b109d3f0e795076b0ba04bdb",
      "schema_line": 19865,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "publish_stats_projection_job_engine_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/refresh_session_numeric_contributions_v1.sql",
      "name": "refresh_session_numeric_contributions_v1",
      "category": "statistics_function",
      "lines": 45,
      "sha256": "65a32aa0c6ca80d3f6eeacaf4b2d667ae6bded1c55d479bac59df2c17f0eea3a",
      "schema_line": 20744,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "session_numeric_inputs_v1",
        "user_exercise_numeric_periods"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/refresh_user_exercise_period_buckets_v1.sql",
      "name": "refresh_user_exercise_period_buckets_v1",
      "category": "statistics_function",
      "lines": 72,
      "sha256": "64050812f09d2b2d09d56527f85e59edf64b1ed3b6a9cbf948cc2e7b5b69f2d7",
      "schema_line": 20816,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "assemble_user_exercise_period_rows_v1"
      ],
      "raises": [
        {
          "line": 9,
          "text": "raise exception 'D06 user and bucket array are required' using errcode='22023';"
        },
        {
          "line": 15,
          "text": "raise exception 'D06 invalid exercise bucket' using errcode='22023';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/refresh_user_exercise_summary_from_rollups_v1.sql",
      "name": "refresh_user_exercise_summary_from_rollups_v1",
      "category": "statistics_function",
      "lines": 168,
      "sha256": "b29bd0413e082653537ae823db9dc5dafe41a7920f6ccbc3ad81afa0914d0c51",
      "schema_line": 20884,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "max_rep_recording_profile_eligible_v1",
        "measurement_type_from_recording_fields_v1",
        "strength_display_frame_kg_v1"
      ],
      "raises": [
        {
          "line": 10,
          "text": "if v_user_id is null then raise exception 'user_id is required' using errcode = '22023'; end if;"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/refresh_user_max_rep_projection_from_v1.sql",
      "name": "refresh_user_max_rep_projection_from_v1",
      "category": "statistics_function",
      "lines": 201,
      "sha256": "8758e4535939b4e55a52b2bc2400780bc62a5908250fd1752631221b6ab69989",
      "schema_line": 21048,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "calculate_max_rep_observation_v2",
        "refresh_user_max_rep_projection_from_v1",
        "set_score_recent_next_v1",
        "stats_sequential_checkpoint_start_v1",
        "stats_sequential_checkpoint_write_v1",
        "stats_set_observation_inputs_v1"
      ],
      "raises": [
        {
          "line": 19,
          "text": "raise exception 'user_id is required' using errcode = '22023';"
        },
        {
          "line": 22,
          "text": "raise exception 'generation must be non-negative' using errcode = '22023';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/refresh_user_measured_pr_projection_from_v1.sql",
      "name": "refresh_user_measured_pr_projection_from_v1",
      "category": "statistics_function",
      "lines": 287,
      "sha256": "c879fe059b4a07126606e889b4716ea98b1a0b71f5823cc78dc2010f34907832",
      "schema_line": 21245,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "refresh_user_measured_pr_projection_from_v1",
        "stats_sequential_checkpoint_start_v1",
        "stats_sequential_checkpoint_write_v1",
        "stats_set_observation_inputs_v1"
      ],
      "raises": [
        {
          "line": 17,
          "text": "if v_user_id is null then raise exception 'user_id is required' using errcode = '22023'; end if;"
        },
        {
          "line": 18,
          "text": "if v_generation < 0 then raise exception 'generation must be non-negative' using errcode = '22023'; end if;"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/refresh_user_metric_events_v1.sql",
      "name": "refresh_user_metric_events_v1",
      "category": "statistics_function",
      "lines": 48,
      "sha256": "caa7b3983c5a2e6e5a727f970549f962dbf0093c4c65f8ede03b6fc6dc080ed3",
      "schema_line": 21528,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "cardio_reference_distances_v1",
        "stats_metric_inputs_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/refresh_user_period_calendar_projection_v1.sql",
      "name": "refresh_user_period_calendar_projection_v1",
      "category": "statistics_function",
      "lines": 142,
      "sha256": "c9c08ba752b1bffc03cbf644ad7db94ba78cc2605c8b8f94f0ae69a0254dbc98",
      "schema_line": 21572,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "refresh_user_calendar_day_buckets_v1",
        "refresh_user_exercise_period_buckets_v1",
        "refresh_user_training_period_buckets_v1",
        "stats_refresh_scope_session_ids_v1"
      ],
      "raises": [
        {
          "line": 32,
          "text": "raise exception 'D06 requires complete, matching derived impact v1' using errcode='55000';"
        },
        {
          "line": 39,
          "text": "raise exception 'D06 requires source scope v1' using errcode='22023';"
        },
        {
          "line": 46,
          "text": "raise exception 'D06 invalid derived change' using errcode='22023';"
        },
        {
          "line": 53,
          "text": "if array_position(v_derived_ids,null) is not null then raise exception 'D06 null exercise id' using errcode='22023'; end if;"
        },
        {
          "line": 58,
          "text": "if array_position(v_source_ids,null) is not null then raise exception 'D06 null source exercise id' using errcode='22023'; end if;"
        },
        {
          "line": 64,
          "text": "raise exception 'D06 suffix requires a replay date' using errcode='22023';"
        },
        {
          "line": 105,
          "text": "raise exception 'Statistics scope window insufficient for derived impacts' using errcode='55P90';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/refresh_user_sequential_projections_v1.sql",
      "name": "refresh_user_sequential_projections_v1",
      "category": "statistics_function",
      "lines": 55,
      "sha256": "876e6630c4563f09b4af8b255badb4e3b935bdd3b87bff7fada2280274b4d507",
      "schema_line": 21710,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "refresh_user_measured_pr_projection_from_v1",
        "refresh_user_set_score_observations_v1",
        "refresh_user_strength_projection_bundle_from_v1",
        "stats_sequential_checkpoint_read_v1",
        "stats_sequential_exercise_ids_v1",
        "stats_sequential_impact_rows_v1",
        "stats_sequential_replay_context_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/refresh_user_session_rollups_v1.sql",
      "name": "refresh_user_session_rollups_v1",
      "category": "statistics_function",
      "lines": 248,
      "sha256": "6f7da14218afa524995bf6340354c71b9eb77711f1b1b4305d9fc88d8daff350",
      "schema_line": 21761,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "strength_display_frame_kg_v1"
      ],
      "raises": [
        {
          "line": 16,
          "text": "raise exception 'user_id is required' using errcode = '22023';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/refresh_user_set_observations_v1.sql",
      "name": "refresh_user_set_observations_v1",
      "category": "statistics_function",
      "lines": 123,
      "sha256": "1017b756c0a7909a5e3a8cfe2f5870af1b4339044c073be9118e98277cdcba60",
      "schema_line": 22005,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "seoul_instant_v1"
      ],
      "raises": [
        {
          "line": 16,
          "text": "raise exception 'user_id is required' using errcode = '22023';"
        },
        {
          "line": 19,
          "text": "raise exception 'generation must be non-negative' using errcode = '22023';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/refresh_user_set_score_observations_v1.sql",
      "name": "refresh_user_set_score_observations_v1",
      "category": "statistics_function",
      "lines": 37,
      "sha256": "afcf38b886af59d30d0d4942a23a310c2d07aa672ee02607a4a74fbaa405f0be",
      "schema_line": 22124,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "stats_sequential_checkpoint_start_v1",
        "stats_sequential_checkpoint_write_v1",
        "stats_sequential_score_parts_v1",
        "stats_sequential_score_references_v1"
      ],
      "raises": [
        {
          "line": 8,
          "text": "IF p_user_id IS NULL THEN RAISE EXCEPTION 'user_id is required' USING ERRCODE='22023'; END IF;"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/refresh_user_strength_estimation_projection_from_v1.sql",
      "name": "refresh_user_strength_estimation_projection_from_v1",
      "category": "statistics_function",
      "lines": 70,
      "sha256": "f93219ef719dcfa4313bde8fce7f3ac169a124d5e3f7de5eb6a62b838f451128",
      "schema_line": 22157,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "stats_sequential_checkpoint_start_v1",
        "strength_checkpoints_write_v1",
        "strength_daily_state_apply_v1",
        "strength_observations_project_v1",
        "strength_recent_1rm_apply_v1",
        "strength_session_reference_apply_v1",
        "strength_set_purpose_apply_v1",
        "strength_votes_build_v1"
      ],
      "raises": [
        {
          "line": 14,
          "text": "raise exception 'user_id is required' using errcode = '22023';"
        },
        {
          "line": 17,
          "text": "raise exception 'generation must be non-negative' using errcode = '22023';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/refresh_user_strength_projection_bundle_from_v1.sql",
      "name": "refresh_user_strength_projection_bundle_from_v1",
      "category": "statistics_function",
      "lines": 19,
      "sha256": "2f1a999a513e5bde36faac5d198c9b44186eee716a0904f14d2334f3955d523a",
      "schema_line": 22223,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "refresh_user_max_rep_projection_from_v1",
        "refresh_user_strength_estimation_projection_from_v1",
        "stats_sequential_replay_context_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/refresh_user_training_period_buckets_v1.sql",
      "name": "refresh_user_training_period_buckets_v1",
      "category": "statistics_function",
      "lines": 35,
      "sha256": "e897b53672dbf8d927f0c3d9bc407ba876427b855fc9291bca5aa6a6f9cb0322",
      "schema_line": 22238,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "assemble_user_training_period_rows_v1"
      ],
      "raises": [
        {
          "line": 9,
          "text": "raise exception 'D06 user and bucket array are required' using errcode='22023';"
        },
        {
          "line": 12,
          "text": "raise exception 'D06 invalid bucket' using errcode='22023';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/reuse_stats_projection_rows_v1.sql",
      "name": "reuse_stats_projection_rows_v1",
      "category": "statistics_function",
      "lines": 49,
      "sha256": "6b01aeb49ecf40547c068aee1f089dcd02deedef62d41fc5f7b2f591e7cee7f9",
      "schema_line": 23384,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "stats_projection_tables_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/run_stats_projection_step_v1.sql",
      "name": "run_stats_projection_step_v1",
      "category": "statistics_function",
      "lines": 113,
      "sha256": "21efeeedceee20d064b5bd60e13d3d55f8cb1454e3a74f1dc43b8e6ff99f9f08",
      "schema_line": 23429,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "refresh_user_exercise_summary_from_rollups_v1",
        "refresh_user_metric_events_v1",
        "refresh_user_period_calendar_projection_v1",
        "refresh_user_sequential_projections_v1",
        "refresh_user_session_rollups_v1",
        "refresh_user_set_observations_v1",
        "reuse_stats_projection_rows_v1",
        "seoul_today_v1",
        "stats_projection_source_v1",
        "stats_projection_stale_v1",
        "stats_refresh_scope_session_ids_v1",
        "stats_sequential_replay_context_v1"
      ],
      "raises": [
        {
          "line": 18,
          "text": "if v_user_id is null then raise exception 'user_id is required' using errcode = '22023'; end if;"
        },
        {
          "line": 19,
          "text": "if p_job_id is null then raise exception 'job_id is required' using errcode = '22023'; end if;"
        },
        {
          "line": 21,
          "text": "raise exception 'Unknown statistics computation stage' using errcode='22023';"
        },
        {
          "line": 24,
          "text": "raise exception 'D11 calculation requires private staged outputs' using errcode='55000';"
        },
        {
          "line": 28,
          "text": "raise exception 'Statistics calendar day changed between batches' using errcode='40001';"
        },
        {
          "line": 44,
          "text": "raise exception 'Stats refresh job does not identify a processing job of this user' using errcode = '55000';"
        },
        {
          "line": 48,
          "text": "raise exception 'Stats refresh job generation % is already applied (applied %)',"
        },
        {
          "line": 58,
          "text": "raise exception 'Stats refresh job generation % must wait for a lower unsettled generation',"
        },
        {
          "line": 98,
          "text": "raise exception 'Incomplete D11 projection stage' using errcode='55000';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/session_numeric_inputs_v1.sql",
      "name": "session_numeric_inputs_v1",
      "category": "statistics_function",
      "lines": 20,
      "sha256": "853f3f59c0c86d4c916e46af9e3970758a6b0322f2cd7f06da1c9ca40898c3ac",
      "schema_line": 25057,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/session_stats_inputs_v1.sql",
      "name": "session_stats_inputs_v1",
      "category": "statistics_function",
      "lines": 40,
      "sha256": "e50943ccaf3626bb4b533ba03a9a9b221b0dcfef7c38029bac41df6adf16c8e0",
      "schema_line": 25621,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "stats_non_input_columns_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/set_score_observations_v1.sql",
      "name": "set_score_observations_v1",
      "category": "statistics_function",
      "lines": 22,
      "sha256": "fdf8e0081fb4ad1ba252374dbaba074b8bc76bbf87872ba413165e39585da92c",
      "schema_line": 26301,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "stats_set_score_cached_parts_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/set_score_projection_observations_v1.sql",
      "name": "set_score_projection_observations_v1",
      "category": "statistics_function",
      "lines": 13,
      "sha256": "c897120fe0111795176250a75287541fac2340a8418ab2fb0eec055e8982bba8",
      "schema_line": 26319,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "set_score_observations_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/set_score_recent_next_v1.sql",
      "name": "set_score_recent_next_v1",
      "category": "statistics_function",
      "lines": 34,
      "sha256": "4fdedeb54e2d6e160f9727ee0b557971d7d9deb14eeeeab1b6f279c65aeb8d27",
      "schema_line": 26328,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/set_score_session_v2.sql",
      "name": "set_score_session_v2",
      "category": "statistics_function",
      "lines": 103,
      "sha256": "792ef49e37444bc0e81806f3e6c4db49ed062d9d37b8bd2a2075dce7ecad22b1",
      "schema_line": 26358,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "calculate_max_rep_observation_v2",
        "calculate_strength_observation_v2",
        "max_rep_recording_profile_eligible_v1",
        "measurement_type_from_recording_fields_v1",
        "seoul_instant_v1",
        "strength_estimation_load_percent_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_catalog_changed_v1.sql",
      "name": "stats_catalog_changed_v1",
      "category": "statistics_function",
      "lines": 25,
      "sha256": "5169b9037cd66e9a6a94b46be2eac15096c9b41aa3967d458b0302d0e6ffd791",
      "schema_line": 27525,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "enqueue_user_exercise_stats_refresh_job_core"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_lock_job_v1.sql",
      "name": "stats_lock_job_v1",
      "category": "statistics_function",
      "lines": 27,
      "sha256": "1c4111e3a356dbbed83cd59c0b6cfd42d432d49cff872bd69a5048ffafc9cfa1",
      "schema_line": 27546,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_lock_run_v1.sql",
      "name": "stats_lock_run_v1",
      "category": "statistics_function",
      "lines": 27,
      "sha256": "690a7ddf76971c9b4ff1a321b73b99751c509fa64b5ea46d470994a1badbab90",
      "schema_line": 27591,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_lock_v1.sql",
      "name": "stats_lock_v1",
      "category": "statistics_function",
      "lines": 53,
      "sha256": "f4b1b9d5d95fb06e2689869be780a8dd2664a805da9662ea390b6e469ba71bd6",
      "schema_line": 27614,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [],
      "raises": [
        {
          "line": 19,
          "text": "raise exception 'Unknown stats lock level % (user %)', p_level, p_user_id using errcode = '22023';"
        },
        {
          "line": 39,
          "text": "raise exception 'Stats lock order violation: account requested while holding the queue lock'"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_lock_wait_budget_v1.sql",
      "name": "stats_lock_wait_budget_v1",
      "category": "statistics_function",
      "lines": 16,
      "sha256": "f0bacf9ed7a806dd91b01a3f69d0a8698813b6405d39cc59b678acc97b47e85b",
      "schema_line": 27663,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "stats_projection_worker_settings_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_metric_inputs_v1.sql",
      "name": "stats_metric_inputs_v1",
      "category": "statistics_function",
      "lines": 32,
      "sha256": "223b31d28b56ee0bf76a745bff312acc4e8038c7c9d89ee7f229452661a56538",
      "schema_line": 27675,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_non_input_columns_v1.sql",
      "name": "stats_non_input_columns_v1",
      "category": "statistics_function",
      "lines": 14,
      "sha256": "778cf08fb341a3d03a39e1349c77ff38f9d5edaec1385a92f3013b047354640d",
      "schema_line": 27703,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_projection_output_cleanup_v1.sql",
      "name": "stats_projection_output_cleanup_v1",
      "category": "statistics_function",
      "lines": 18,
      "sha256": "0d3ade79ac3e62f2bd3350c122582d3a8b836873a60d253b22702a43624f09c7",
      "schema_line": 27713,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "stats_projection_tables_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_projection_output_guard_v1.sql",
      "name": "stats_projection_output_guard_v1",
      "category": "statistics_function",
      "lines": 43,
      "sha256": "0d1c5560838d888ebbe23f7d91038f48349a0776e6fb4e6b32e641b78eb57c52",
      "schema_line": 27729,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "stats_lock_run_v1"
      ],
      "raises": [
        {
          "line": 9,
          "text": "RAISE EXCEPTION 'Projection outputs require their run lifecycle' USING ERRCODE='55000';"
        },
        {
          "line": 19,
          "text": "RAISE EXCEPTION 'Projection run is held by another worker' USING ERRCODE='55P03';"
        },
        {
          "line": 22,
          "text": "RAISE EXCEPTION 'Projection output has no run' USING ERRCODE='23503';"
        },
        {
          "line": 28,
          "text": "RAISE EXCEPTION 'Projection output belongs to another lease' USING ERRCODE='55P03';"
        },
        {
          "line": 31,
          "text": "RAISE EXCEPTION 'Computed projection outputs are immutable' USING ERRCODE='55000';"
        },
        {
          "line": 34,
          "text": "RAISE EXCEPTION 'Projection output owner mismatch' USING ERRCODE='55000';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_projection_reset_context_v1.sql",
      "name": "stats_projection_reset_context_v1",
      "category": "statistics_function",
      "lines": 19,
      "sha256": "4cf4263e3fad843a765b74c80a75a1721320d4214be7e6e9eb36df8560910842",
      "schema_line": 27770,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "stats_projection_tables_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_projection_revivable_jobs_v1.sql",
      "name": "stats_projection_revivable_jobs_v1",
      "category": "statistics_function",
      "lines": 20,
      "sha256": "b870357bf372198bf4d027db76eaaa37195c38962288d44cdcf81f9506ab6a2f",
      "schema_line": 27785,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "stats_projection_worker_settings_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_projection_row_columns_v1.sql",
      "name": "stats_projection_row_columns_v1",
      "category": "statistics_function",
      "lines": 14,
      "sha256": "2a65816b294c2d34478fafc8a3e9a40274e8c72dd3fd30579d819dc12db573d1",
      "schema_line": 27801,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_projection_run_lease_check_v1.sql",
      "name": "stats_projection_run_lease_check_v1",
      "category": "statistics_function",
      "lines": 17,
      "sha256": "d64e6e78b743f0c7dcc57b2e8f26b1439114f217502a14041c51a70b2257395a",
      "schema_line": 27811,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [
        {
          "line": 8,
          "text": "raise exception 'Stats projection run % is leased by another worker', p_job_id"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_projection_scope_window_v1.sql",
      "name": "stats_projection_scope_window_v1",
      "category": "statistics_function",
      "lines": 37,
      "sha256": "76d15c0c6bc114a49650ec946e68adcc4f48bd0d66029aeac92bc861205e9aaf",
      "schema_line": 27824,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "seoul_today_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_projection_seed_window_v1.sql",
      "name": "stats_projection_seed_window_v1",
      "category": "statistics_function",
      "lines": 62,
      "sha256": "17d2b852d754a17c6c34e62ec0c97f00e434e47447f56f6263afbf5d41c23362",
      "schema_line": 27857,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "stats_projection_row_columns_v1",
        "stats_sequential_checkpoint_read_v1"
      ],
      "raises": [
        {
          "line": 54,
          "text": ") THEN RAISE EXCEPTION 'Statistics prefix seed requires full replay' USING ERRCODE='55P90'; END IF;"
        },
        {
          "line": 56,
          "text": "RAISE EXCEPTION 'Statistics prefix seed is malformed; full replay required' USING ERRCODE='55P90';"
        }
      ],
      "catches": [
        {
          "line": 55,
          "text": "EXCEPTION WHEN invalid_text_representation OR datetime_field_overflow OR numeric_value_out_of_range THEN"
        }
      ],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_projection_source_refs_v1.sql",
      "name": "stats_projection_source_refs_v1",
      "category": "statistics_function",
      "lines": 34,
      "sha256": "e02f8ccc3fa2f5d3fa5855377cb3b3854fd6461406f2269cd1a6208408404d97",
      "schema_line": 27915,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_projection_source_v1.sql",
      "name": "stats_projection_source_v1",
      "category": "statistics_function",
      "lines": 16,
      "sha256": "3f0cbfa89c788a56f528ac846a45914c3475133b61718b63d1be3a72f4174774",
      "schema_line": 27945,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "stats_sequential_policy_fingerprint_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_projection_stale_v1.sql",
      "name": "stats_projection_stale_v1",
      "category": "statistics_function",
      "lines": 13,
      "sha256": "515e851fa035f79b2b0d5e13e3d1af655ceb1c31da8d93de22674d81926cf3df",
      "schema_line": 27957,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [
        {
          "line": 7,
          "text": "raise exception '%', p_reason using errcode = 'LG412';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_projection_statement_budget_v1.sql",
      "name": "stats_projection_statement_budget_v1",
      "category": "statistics_function",
      "lines": 20,
      "sha256": "aa4116f8244b6d92ae048475a30d8f002c281be58220748b4e9d596d8eb42ea5",
      "schema_line": 27966,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "stats_projection_worker_settings_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_projection_stop_v1.sql",
      "name": "stats_projection_stop_v1",
      "category": "statistics_function",
      "lines": 50,
      "sha256": "3ded905a811c0275c21fd5463c3a6f5bd80747869a7d7c9a888d9711654cf848",
      "schema_line": 27982,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "stats_projection_run_lease_check_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_projection_table_window_v1.sql",
      "name": "stats_projection_table_window_v1",
      "category": "statistics_function",
      "lines": 35,
      "sha256": "0306d29d8869d4bd2605abb341a425092a4a45c6608f8bca5bb0382972f3d2ad",
      "schema_line": 28028,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_projection_tables_v1.sql",
      "name": "stats_projection_tables_v1",
      "category": "statistics_function",
      "lines": 20,
      "sha256": "7b97aaf2f922cf135eaf07eecfb8f1a829cdb83a9a17c71a6d2737e3d455b400",
      "schema_line": 28059,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_projection_worker_kick_v1.sql",
      "name": "stats_projection_worker_kick_v1",
      "category": "statistics_function",
      "lines": 30,
      "sha256": "2f0177090c213ed024c8e9451398777d5586f19b25ac7b2475ebf42cc00eb445",
      "schema_line": 28075,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [],
      "raises": [
        {
          "line": 21,
          "text": "raise warning 'stats worker kick failed: % (%)', sqlerrm, sqlstate;"
        }
      ],
      "catches": [
        {
          "line": 20,
          "text": "exception when others then"
        }
      ],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_projection_worker_register_v1.sql",
      "name": "stats_projection_worker_register_v1",
      "category": "statistics_function",
      "lines": 23,
      "sha256": "1721881d3303d3aec5e37c44c7a5362ef72c0e875a02972c95fe01a8110921c7",
      "schema_line": 28101,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [
        {
          "line": 11,
          "text": "raise exception 'stats worker url must be <origin>/functions/v1/stats-worker' using errcode = '22023';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_projection_worker_settings_v1.sql",
      "name": "stats_projection_worker_settings_v1",
      "category": "statistics_function",
      "lines": 19,
      "sha256": "a4a6313230e465f78065067f125f2430a2541da3be4400f18a4ec9b97c1fe924",
      "schema_line": 28147,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [
        {
          "line": 11,
          "text": "raise exception 'stats_projection_worker_settings row 1 is missing' using errcode = '55000';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_refresh_job_scope_sync_v1.sql",
      "name": "stats_refresh_job_scope_sync_v1",
      "category": "statistics_function",
      "lines": 25,
      "sha256": "a7d902d52602352e0464f3d00ffc42afc766d3e70f0449cd3dbebf6b4569544a",
      "schema_line": 28162,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "stats_refresh_scope_from_legacy_v1",
        "stats_refresh_scope_range_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_refresh_scope_build_v1.sql",
      "name": "stats_refresh_scope_build_v1",
      "category": "statistics_function",
      "lines": 88,
      "sha256": "75293c7170f67182dbae3c877309b64fd4c86b2c1e28db7f428802dfe8f04d7a",
      "schema_line": 28183,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "stats_refresh_scope_valid_v1"
      ],
      "raises": [
        {
          "line": 16,
          "text": "raise exception 'event_type is required';"
        },
        {
          "line": 19,
          "text": "raise exception 'Unknown stats refresh scope origin: %', p_origin using errcode = '22023';"
        },
        {
          "line": 26,
          "text": "raise exception 'Unknown stats refresh event_type: %', btrim(p_event_type);"
        },
        {
          "line": 29,
          "text": "raise exception 'scope sessions must be a JSON array' using errcode = '22023';"
        },
        {
          "line": 80,
          "text": "raise exception 'Built stats refresh scope is invalid: %', v_scope::text using errcode = '55000';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_refresh_scope_from_legacy_v1.sql",
      "name": "stats_refresh_scope_from_legacy_v1",
      "category": "statistics_function",
      "lines": 11,
      "sha256": "374c0551365f47652aa78753ec867ae5afd13f0e8cbc38ab4ab78f1ef76e3aec",
      "schema_line": 28267,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "stats_refresh_scope_build_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_refresh_scope_merge_v1.sql",
      "name": "stats_refresh_scope_merge_v1",
      "category": "statistics_function",
      "lines": 86,
      "sha256": "1e6e329368f22c982c029d93a23e6d2614a53a8d745932c0591fdd4250363568",
      "schema_line": 28274,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "stats_refresh_scope_valid_v1"
      ],
      "raises": [
        {
          "line": 24,
          "text": "raise exception 'Cannot merge invalid stats refresh scopes' using errcode = '22023';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_refresh_scope_range_v1.sql",
      "name": "stats_refresh_scope_range_v1",
      "category": "statistics_function",
      "lines": 15,
      "sha256": "5088569f74fd4299f8e6f2de2d1160740cdf832d64c908261749258193bb03b0",
      "schema_line": 28356,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_refresh_scope_receipt_v1.sql",
      "name": "stats_refresh_scope_receipt_v1",
      "category": "statistics_function",
      "lines": 15,
      "sha256": "950231a11745fda693813bbf8a5907fec8099c3f40c87dddde104a1d8efa0557",
      "schema_line": 28367,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "stats_refresh_scope_range_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_refresh_scope_session_ids_v1.sql",
      "name": "stats_refresh_scope_session_ids_v1",
      "category": "statistics_function",
      "lines": 28,
      "sha256": "41a7037d4b1e7c7281836b79c8f33f622a15dfd5998bcad520cf8cfb0a7721f9",
      "schema_line": 28378,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_refresh_scope_session_inputs_v1.sql",
      "name": "stats_refresh_scope_session_inputs_v1",
      "category": "statistics_function",
      "lines": 28,
      "sha256": "daa9a0b6e80e3bf8ddd6ec2e80ecd0dbd3c8c4193a9db455de9857100a1bae6b",
      "schema_line": 28402,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "stats_refresh_session_scope_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_refresh_scope_valid_v1.sql",
      "name": "stats_refresh_scope_valid_v1",
      "category": "statistics_function",
      "lines": 77,
      "sha256": "e9be05d0fbf4ec735d27da5214fa9d3146eaa41e88cdd5038f9e4572d6720c0c",
      "schema_line": 4274,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_refresh_session_scope_v1.sql",
      "name": "stats_refresh_session_scope_v1",
      "category": "statistics_function",
      "lines": 43,
      "sha256": "d0c31ad47e78b126074fc1e2d72787055d33519348b9b24e5c074bb7fc511309",
      "schema_line": 28426,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "stats_refresh_scope_build_v1"
      ],
      "raises": [
        {
          "line": 12,
          "text": "raise exception 'session_id is required' using errcode = '22023';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_scope_freshness_v1.sql",
      "name": "stats_scope_freshness_v1",
      "category": "statistics_function",
      "lines": 58,
      "sha256": "4fa4793703e9e0851d70ba81b9b836ce8dbafe60c216f3e01ac88ad6cb0df361",
      "schema_line": 28465,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "left_utf8_bytes"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_sequential_checkpoint_digest_v1.sql",
      "name": "stats_sequential_checkpoint_digest_v1",
      "category": "statistics_function",
      "lines": 11,
      "sha256": "e7df53ee8895ac49f4f1081a89220a4db0b6a2db081600def8e8cc925230af85",
      "schema_line": 28519,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_sequential_checkpoint_read_v1.sql",
      "name": "stats_sequential_checkpoint_read_v1",
      "category": "statistics_function",
      "lines": 80,
      "sha256": "613a7130778cc91ccb55c96b8471dc4e9d0bce8f25a8223561e539c683960741",
      "schema_line": 28526,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "stats_sequential_checkpoint_digest_v1",
        "stats_sequential_policy_fingerprint_v1",
        "stats_sequential_source_fingerprint_v1"
      ],
      "raises": [
        {
          "line": 17,
          "text": "RAISE EXCEPTION 'Invalid sequential checkpoint request' USING ERRCODE='22023';"
        }
      ],
      "catches": [
        {
          "line": 41,
          "text": "EXCEPTION WHEN invalid_text_representation OR numeric_value_out_of_range OR invalid_parameter_value THEN"
        },
        {
          "line": 67,
          "text": "EXCEPTION WHEN invalid_text_representation OR datetime_field_overflow THEN reason:='corrupt';"
        }
      ],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_sequential_checkpoint_start_v1.sql",
      "name": "stats_sequential_checkpoint_start_v1",
      "category": "statistics_function",
      "lines": 26,
      "sha256": "c3604aad4bb2fcd89214cf31fa01b91c06554776aecbc567229d3d8b1870e2cb",
      "schema_line": 28602,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "stats_sequential_checkpoint_read_v1",
        "stats_sequential_replay_context_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_sequential_checkpoint_write_v1.sql",
      "name": "stats_sequential_checkpoint_write_v1",
      "category": "statistics_function",
      "lines": 41,
      "sha256": "1babe1d6b3269ac8f98af2754cda86d064e2a838344ce73a63a7f337576a169e",
      "schema_line": 28624,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "stats_sequential_checkpoint_digest_v1",
        "stats_sequential_policy_fingerprint_v1",
        "stats_sequential_source_fingerprint_v1"
      ],
      "raises": [
        {
          "line": 13,
          "text": "RAISE EXCEPTION 'Invalid sequential checkpoint' USING ERRCODE='22023';"
        },
        {
          "line": 20,
          "text": "RAISE EXCEPTION 'Checkpoint generation is neither processing nor published' USING ERRCODE='55000';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_sequential_exercise_ids_v1.sql",
      "name": "stats_sequential_exercise_ids_v1",
      "category": "statistics_function",
      "lines": 33,
      "sha256": "5102c9b9cdae1c641a308a23eec220ebfd3b3f0a2806574ea935442b5b3634a7",
      "schema_line": 28661,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_sequential_impact_rows_v1.sql",
      "name": "stats_sequential_impact_rows_v1",
      "category": "statistics_function",
      "lines": 56,
      "sha256": "2fea7a01a53f31afa200dd01cceff02c98d7a5cc466b155ff210aca45c954c76",
      "schema_line": 28690,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_sequential_policy_fingerprint_v1.sql",
      "name": "stats_sequential_policy_fingerprint_v1",
      "category": "statistics_function",
      "lines": 19,
      "sha256": "9e68cd1d404edef0c3a4556859fd839311222e50792df276c78312c543a8fe3b",
      "schema_line": 28742,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_sequential_replay_context_v1.sql",
      "name": "stats_sequential_replay_context_v1",
      "category": "statistics_function",
      "lines": 19,
      "sha256": "c38858f38d9ce4027adb34b87b5695c8f4cdfb2ab5dd560ff90e6b77e0c1a0f7",
      "schema_line": 28757,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_sequential_score_inputs_v1.sql",
      "name": "stats_sequential_score_inputs_v1",
      "category": "statistics_function",
      "lines": 18,
      "sha256": "59fddb0c4eb44d7cfdcfd4a2446936b0fb2eac69f19efafd094c40ca2aec6183",
      "schema_line": 28772,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "stats_set_observation_inputs_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_sequential_score_parts_v1.sql",
      "name": "stats_sequential_score_parts_v1",
      "category": "statistics_function",
      "lines": 44,
      "sha256": "e1c01a006ec92649799fa8f78f3ee7f4ecda9542d1cc132e384952d0d49e9fda",
      "schema_line": 28786,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "calculate_max_rep_observation_v2",
        "calculate_strength_observation_v2",
        "stats_sequential_score_inputs_v1",
        "stats_sequential_score_references_v1",
        "strength_estimation_load_percent_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_sequential_score_references_v1.sql",
      "name": "stats_sequential_score_references_v1",
      "category": "statistics_function",
      "lines": 73,
      "sha256": "fa71117939256aa6aec054c58752fcd063bb6c90eb1df7074d7089a5e7a18890",
      "schema_line": 28826,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "stats_sequential_score_inputs_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_sequential_source_fingerprint_v1.sql",
      "name": "stats_sequential_source_fingerprint_v1",
      "category": "statistics_function",
      "lines": 19,
      "sha256": "a961ab7286e718f70b9cfc297404b7ae2af6092bde2df2cc9282540639aeca8d",
      "schema_line": 28895,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_set_observation_inputs_v1.sql",
      "name": "stats_set_observation_inputs_v1",
      "category": "statistics_function",
      "lines": 36,
      "sha256": "590396936bb6e49f3c0383b7f878722ef9f2ae3d95e2215c0500316f798086e0",
      "schema_line": 28910,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "max_rep_recording_profile_eligible_v1",
        "measurement_type_from_recording_fields_v1"
      ],
      "raises": [
        {
          "line": 8,
          "text": "raise exception 'user_id is required' using errcode = '22023';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/stats_set_score_cached_parts_v1.sql",
      "name": "stats_set_score_cached_parts_v1",
      "category": "statistics_function",
      "lines": 20,
      "sha256": "7caed984d8e489fba00aca7f6526eefb60af13e1dee4d4b4044cc901bc77de4c",
      "schema_line": 28942,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/strength_checkpoints_write_v1.sql",
      "name": "strength_checkpoints_write_v1",
      "category": "statistics_function",
      "lines": 55,
      "sha256": "114302487235ad4f26eea3376e6fdf26a7cce5abd1ddc0c55bc2b3c1839841bb",
      "schema_line": 28958,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "stats_sequential_checkpoint_write_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/strength_daily_state_apply_v1.sql",
      "name": "strength_daily_state_apply_v1",
      "category": "statistics_function",
      "lines": 124,
      "sha256": "a34f0f6190b707fd30929a3a65ad005957a0c9b7fe26547efc969d8fb77d9744",
      "schema_line": 29009,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/strength_display_frame_kg_v1.sql",
      "name": "strength_display_frame_kg_v1",
      "category": "statistics_function",
      "lines": 22,
      "sha256": "6b0957510eb45fdb8af9e993dd50a3ebad0b3b96de5c2670540b206372d229d3",
      "schema_line": 29129,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "strength_display_kg_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/strength_display_kg_v1.sql",
      "name": "strength_display_kg_v1",
      "category": "statistics_function",
      "lines": 12,
      "sha256": "edf7a7abf5a580dfe489f0b7c6cfc5edef75309d9c0a65da09fea6d634956cfc",
      "schema_line": 29147,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/strength_estimation_load_percent_v1.sql",
      "name": "strength_estimation_load_percent_v1",
      "category": "statistics_function",
      "lines": 76,
      "sha256": "c1e811a8888d18e614009e2122a85b22b56d4d33e0375f1f42e1e7da2d9b8882",
      "schema_line": 29155,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [],
      "raises": [
        {
          "line": 14,
          "text": "raise exception 'effective_reps must be between 1 and 20' using errcode = '22023';"
        },
        {
          "line": 17,
          "text": "raise exception 'reference must be low, center, or high' using errcode = '22023';"
        },
        {
          "line": 57,
          "text": "raise exception 'Curve % does not bracket effective reps % for reference %',"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/strength_observations_project_v1.sql",
      "name": "strength_observations_project_v1",
      "category": "statistics_function",
      "lines": 91,
      "sha256": "c863234f9d9166e788da5775895cb35f05c86c2bbe9f1b826a9e9e32ebdf23c5",
      "schema_line": 29227,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "calculate_strength_observation_v2"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/strength_recent_1rm_apply_v1.sql",
      "name": "strength_recent_1rm_apply_v1",
      "category": "statistics_function",
      "lines": 85,
      "sha256": "96fac752c25d40a1bb246c1bbc5dd77ff082a63e92de0c25e2ac6272cdb6feb6",
      "schema_line": 29314,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "set_score_recent_next_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/strength_session_reference_apply_v1.sql",
      "name": "strength_session_reference_apply_v1",
      "category": "statistics_function",
      "lines": 162,
      "sha256": "85ef64272c920c6a2bf4cb96e9783a5b7bd0792050cc5da02c96252d493dd689",
      "schema_line": 29395,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "seoul_instant_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/strength_set_metrics_map_json.sql",
      "name": "strength_set_metrics_map_json",
      "category": "statistics_function",
      "lines": 179,
      "sha256": "5d7aa543e2ed7b643898b0a498162c8b413e490d595ec5d83486049b863ac8b5",
      "schema_line": 29553,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "calculate_max_rep_observation_v2",
        "calculate_strength_observation_v2",
        "max_rep_recording_profile_eligible_v1",
        "measurement_type_from_recording_fields_v1",
        "owner_sessions_visible_v1",
        "set_score_session_v2"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/strength_set_purpose_apply_v1.sql",
      "name": "strength_set_purpose_apply_v1",
      "category": "statistics_function",
      "lines": 22,
      "sha256": "f4fa746e4cd21ac1ef06d4465d64574e2db0e94e6d488f3482dc577aab767cb5",
      "schema_line": 29730,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "classify_set_purpose_v3"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/strength_votes_build_v1.sql",
      "name": "strength_votes_build_v1",
      "category": "statistics_function",
      "lines": 167,
      "sha256": "4ff04e8e3faff2b9cb8aee20bfd446b1732b4f96a0bbb75f731a1a21861ff196",
      "schema_line": 29748,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/sync_user_stats_refresh_state_from_job.sql",
      "name": "sync_user_stats_refresh_state_from_job",
      "category": "statistics_function",
      "lines": 158,
      "sha256": "5f1c138ae99e999ace49d85bcfba31e5584d6e18940215e35270dd286fcddf88",
      "schema_line": 29943,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "stats_lock_v1",
        "user_stats_refresh_state"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/validate_stats_projection_payload_v1.sql",
      "name": "validate_stats_projection_payload_v1",
      "category": "statistics_function",
      "lines": 99,
      "sha256": "4fd98735f952f99ed6a3945af2e737b9b751817f922928582fb9f16e95592b86",
      "schema_line": 32414,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "seoul_today_v1",
        "stats_projection_source_refs_v1",
        "stats_projection_source_v1",
        "stats_projection_stale_v1",
        "stats_projection_tables_v1"
      ],
      "raises": [
        {
          "line": 13,
          "text": "IF NOT FOUND THEN RAISE EXCEPTION 'D11 publication requires a computed run' USING ERRCODE='55000'; END IF;"
        },
        {
          "line": 20,
          "text": "RAISE EXCEPTION 'D11 legacy payload requires recomputation' USING ERRCODE='40001';"
        },
        {
          "line": 30,
          "text": "RAISE EXCEPTION 'D11 typed results require the current publisher' USING ERRCODE='40001';"
        },
        {
          "line": 41,
          "text": "RAISE EXCEPTION 'D11 incomplete orchestration certificate' USING ERRCODE='55000';"
        },
        {
          "line": 69,
          "text": "RAISE EXCEPTION 'D11 incomplete output %',v_table USING ERRCODE='55000';"
        },
        {
          "line": 71,
          "text": "IF v_bad THEN RAISE EXCEPTION 'D11 mixed owner or generation in %',v_table USING ERRCODE='55000'; END IF;"
        },
        {
          "line": 84,
          "text": "IF v_bad THEN RAISE EXCEPTION 'D11 stale or unverified row provenance in %',v_table USING ERRCODE='55000'; END IF;"
        },
        {
          "line": 92,
          "text": "RAISE EXCEPTION 'D11 mixed checkpoint generation' USING ERRCODE='55000';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/validate_user_exercise_stats_integrity.sql",
      "name": "validate_user_exercise_stats_integrity",
      "category": "statistics_function",
      "lines": 28,
      "sha256": "327e6d4422f2dc9814963d6775677404eaea57c6a1c75366448bb21469cc7a2e",
      "schema_line": 32509,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "is_lift_guild_admin",
        "require_passed_actor_v1",
        "validate_user_exercise_stats_integrity_engine_v1"
      ],
      "raises": [
        {
          "line": 15,
          "text": "if v_user_id is null then raise exception 'user_id is required' using errcode = '22023'; end if;"
        },
        {
          "line": 18,
          "text": "raise exception 'Cannot validate another user exercise stats' using errcode = '42501';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/validate_user_exercise_stats_integrity_engine_v1.sql",
      "name": "validate_user_exercise_stats_integrity_engine_v1",
      "category": "statistics_function",
      "lines": 708,
      "sha256": "a00cb7dedede0b257dd279bef6a1a32473e50792a3693699402d704dd4746c79",
      "schema_line": 32531,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "calculate_strength_observation_v2",
        "strength_display_frame_kg_v1",
        "strength_estimation_load_percent_v1"
      ],
      "raises": [
        {
          "line": 25,
          "text": "if p_user_id is null then raise exception 'user_id is required' using errcode = '22023'; end if;"
        },
        {
          "line": 26,
          "text": "if v_user_id is null then raise exception 'user_id is required' using errcode = '22023'; end if;"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/validate_user_max_rep_integrity.sql",
      "name": "validate_user_max_rep_integrity",
      "category": "statistics_function",
      "lines": 353,
      "sha256": "5a987c4d31eb145d92a6a41ec7dcc2c11e9d185760dd5257e7132d9bd8ccab1d",
      "schema_line": 33237,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "calculate_max_rep_observation_v2",
        "is_lift_guild_admin",
        "max_rep_recording_profile_eligible_v1",
        "measurement_type_from_recording_fields_v1",
        "require_passed_actor_v1"
      ],
      "raises": [
        {
          "line": 28,
          "text": "raise exception 'user_id is required' using errcode = '22023';"
        },
        {
          "line": 32,
          "text": "raise exception 'Cannot validate another user max-rep projection'"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/functions/validate_user_set_purpose_integrity.sql",
      "name": "validate_user_set_purpose_integrity",
      "category": "statistics_function",
      "lines": 86,
      "sha256": "da76232715f8a930d8ef9356ccc14cbae2eec6bed32097e09172562b395656a3",
      "schema_line": 33584,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "classify_set_purpose_v3",
        "is_lift_guild_admin",
        "require_passed_actor_v1"
      ],
      "raises": [
        {
          "line": 22,
          "text": "raise exception 'user_id is required' using errcode = '22023';"
        },
        {
          "line": 26,
          "text": "raise exception 'Cannot validate another user set purpose' using errcode = '42501';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/tables/max_rep_estimation_policy_versions.sql",
      "name": "max_rep_estimation_policy_versions",
      "category": "statistics_table",
      "lines": 27,
      "sha256": "8d59bd05087976381f23c3127ac0eece3add3072664d53e8490317d314add674",
      "schema_line": 35648,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/tables/session_numeric_contributions.sql",
      "name": "session_numeric_contributions",
      "category": "statistics_table",
      "lines": 42,
      "sha256": "8d2232a5b98db70dc2b67991e68ff99e8a7b49ac4873903e01f6981a9b47bbd8",
      "schema_line": 35761,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/tables/set_purpose_policy_versions.sql",
      "name": "set_purpose_policy_versions",
      "category": "statistics_table",
      "lines": 26,
      "sha256": "4352852799ce3821d475ebbc58f5fe195a094aa9ed8f7d0bbe185d579107c7c6",
      "schema_line": 35815,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/tables/stats_maintenance_catalog.sql",
      "name": "stats_maintenance_catalog",
      "category": "statistics_table",
      "lines": 20,
      "sha256": "d4b7812da90a74b9602b7a38a4409df26316e43b36a5e30aefbef5b54a08ed4d",
      "schema_line": 35824,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/tables/stats_maintenance_cursors.sql",
      "name": "stats_maintenance_cursors",
      "category": "statistics_table",
      "lines": 25,
      "sha256": "82cec41f1f05affd9708d278e5e361a5ddb3013e46b877ff8bd91355a6cac36e",
      "schema_line": 35833,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": [
        {
          "line": 12,
          "text": "CONSTRAINT \"stats_maintenance_cursors_calls_check\" CHECK ((\"calls\" >= 0)),"
        },
        {
          "line": 13,
          "text": "CONSTRAINT \"stats_maintenance_cursors_examined_check\" CHECK ((\"examined\" >= 0)),"
        },
        {
          "line": 14,
          "text": "CONSTRAINT \"stats_maintenance_cursors_source_check\" CHECK ((\"source\" = ANY (ARRAY['sessions'::\"text\", 'parts'::\"text\", 'rollups'::\"text\", 'owners'::\"text\"]))),"
        },
        {
          "line": 15,
          "text": "CONSTRAINT \"stats_maintenance_cursors_sweep_check\" CHECK ((\"sweep\" >= 0))"
        }
      ]
    },
    {
      "path": "supabase/definitions/stats/tables/stats_maintenance_requests.sql",
      "name": "stats_maintenance_requests",
      "category": "statistics_table",
      "lines": 30,
      "sha256": "eba6525a27700bbe7e70789fa3101245fc28a710be62279825f486c5b9223fd6",
      "schema_line": 35849,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": [
        {
          "line": 8,
          "text": "CONSTRAINT \"stats_maintenance_requests_target_version_check\" CHECK ((\"target_version\" > 0))"
        }
      ]
    },
    {
      "path": "supabase/definitions/stats/tables/stats_maintenance_retries.sql",
      "name": "stats_maintenance_retries",
      "category": "statistics_table",
      "lines": 26,
      "sha256": "321b16c435456128e25fe82fe2ab00459a15ccfe3e0c29289a5a62c16b6a156c",
      "schema_line": 35858,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": [
        {
          "line": 9,
          "text": "CONSTRAINT \"stats_maintenance_retries_attempts_check\" CHECK ((\"attempts\" >= 0))"
        }
      ]
    },
    {
      "path": "supabase/definitions/stats/tables/stats_output_user_calendar_day_summaries.sql",
      "name": "stats_output_user_calendar_day_summaries",
      "category": "statistics_table",
      "lines": 61,
      "sha256": "819e4c8edb746abfe7c3a84d5934bae24992ae3f64083df676dbc27958d5abf8",
      "schema_line": 35868,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/tables/stats_output_user_calendar_summary_dirty_dates.sql",
      "name": "stats_output_user_calendar_summary_dirty_dates",
      "category": "statistics_table",
      "lines": 28,
      "sha256": "cbb267cd2b834a857ae93eab789358c258a182fb8d4df24b7bc992e4a2d45059",
      "schema_line": 35909,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/tables/stats_output_user_exercise_max_rep_observations.sql",
      "name": "stats_output_user_exercise_max_rep_observations",
      "category": "statistics_table",
      "lines": 55,
      "sha256": "6e4c84c0e7f41f6cbd749aa86241850aef9257a1265e2a915786264c2ec22078",
      "schema_line": 35917,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/tables/stats_output_user_exercise_metric_events.sql",
      "name": "stats_output_user_exercise_metric_events",
      "category": "statistics_table",
      "lines": 47,
      "sha256": "d2cdaf8b8832eebe0a0ff2c936ccef0ca789daa32af97433dee56c29bd24e38e",
      "schema_line": 35952,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": [
        {
          "line": 24,
          "text": "CONSTRAINT \"user_exercise_metric_events_metric_kind_check\" CHECK ((\"metric_kind\" = ANY (ARRAY['reps'::\"text\", 'hold'::\"text\", 'cardio'::\"text\", 'distance'::\"text\"])))"
        }
      ]
    },
    {
      "path": "supabase/definitions/stats/tables/stats_output_user_exercise_period_stats.sql",
      "name": "stats_output_user_exercise_period_stats",
      "category": "statistics_table",
      "lines": 65,
      "sha256": "f36de0d958d9954d4fcbd6f79fcfa46fae1bb59f5a44b39721a9324dc2db0ccd",
      "schema_line": 35977,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/tables/stats_output_user_exercise_pr_events.sql",
      "name": "stats_output_user_exercise_pr_events",
      "category": "statistics_table",
      "lines": 43,
      "sha256": "bc362a5a8e5dcb6c721b21c6e75f2a0cc05401cdd34332b76ef6934216f71be8",
      "schema_line": 36022,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/tables/stats_output_user_exercise_pr_states.sql",
      "name": "stats_output_user_exercise_pr_states",
      "category": "statistics_table",
      "lines": 38,
      "sha256": "42988f143dac9daedf9e3e042bbb66f452837ce408e933565e9440f990b7b3fb",
      "schema_line": 36045,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/tables/stats_output_user_exercise_records.sql",
      "name": "stats_output_user_exercise_records",
      "category": "statistics_table",
      "lines": 43,
      "sha256": "4cf2c008b90d3666afce992e07ad03a5d160da31f0a9a91a3f6c7caa11eda69e",
      "schema_line": 36063,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/tables/stats_output_user_exercise_session_rollups.sql",
      "name": "stats_output_user_exercise_session_rollups",
      "category": "statistics_table",
      "lines": 73,
      "sha256": "01403159245ebd07c1a5d70f2ae3c78babdfa8676e7e9f318679a5c1b7a5f2ac",
      "schema_line": 36086,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/tables/stats_output_user_exercise_set_observations.sql",
      "name": "stats_output_user_exercise_set_observations",
      "category": "statistics_table",
      "lines": 60,
      "sha256": "b6700745bcbfa869ff14c645643f4f076f3a3fc8776de7b850634b718853b83b",
      "schema_line": 36139,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/tables/stats_output_user_exercise_stats.sql",
      "name": "stats_output_user_exercise_stats",
      "category": "statistics_table",
      "lines": 45,
      "sha256": "f482979ee594a9943687279c89ed143888f62c11e7549bd7fb01f3d1aa229e57",
      "schema_line": 36179,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/tables/stats_output_user_exercise_strength_daily.sql",
      "name": "stats_output_user_exercise_strength_daily",
      "category": "statistics_table",
      "lines": 49,
      "sha256": "6df9328d0f2840cbcea96c5ec66da403018ba6921214d213603e43bf6148e847",
      "schema_line": 36204,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/tables/stats_output_user_exercise_strength_observations.sql",
      "name": "stats_output_user_exercise_strength_observations",
      "category": "statistics_table",
      "lines": 77,
      "sha256": "802280cb3f7c1e70c3541e7a8cf7cccc84120bf9d71d0f9fc1a328f141fc1635",
      "schema_line": 36233,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/tables/stats_output_user_exercise_strength_states.sql",
      "name": "stats_output_user_exercise_strength_states",
      "category": "statistics_table",
      "lines": 45,
      "sha256": "3a44087c35cb49190f744e25f30998d0199c1ee11e75f9b741b0244f5828aff0",
      "schema_line": 36290,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/tables/stats_output_user_stats_sequential_days.sql",
      "name": "stats_output_user_stats_sequential_days",
      "category": "statistics_table",
      "lines": 31,
      "sha256": "4b5d60ab535c727e3fb178cb07f6963dc326621690c4b83eeabb3253369a7643",
      "schema_line": 36315,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/tables/stats_output_user_training_period_stats.sql",
      "name": "stats_output_user_training_period_stats",
      "category": "statistics_table",
      "lines": 40,
      "sha256": "461a113de11692b212419b9e58aeb557e19905307dc7615ddc45d8cde4d80862",
      "schema_line": 36326,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/tables/stats_projection_worker_settings.sql",
      "name": "stats_projection_worker_settings",
      "category": "statistics_table",
      "lines": 36,
      "sha256": "a1ac7b2c0707944dfdc96804ac8891f0499dfc08454452da63af84701ad1aaa3",
      "schema_line": 28120,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": [
        {
          "line": 16,
          "text": "CONSTRAINT \"stats_projection_worker_settings_claim_timeout_ms_check\" CHECK (((\"claim_timeout_ms\" >= 500) AND (\"claim_timeout_ms\" <= 30000))),"
        },
        {
          "line": 17,
          "text": "CONSTRAINT \"stats_projection_worker_settings_compute_timeout_ms_check\" CHECK (((\"compute_timeout_ms\" >= 1000) AND (\"compute_timeout_ms\" <= 600000))),"
        },
        {
          "line": 18,
          "text": "CONSTRAINT \"stats_projection_worker_settings_id_check\" CHECK ((\"id\" = 1)),"
        },
        {
          "line": 19,
          "text": "CONSTRAINT \"stats_projection_worker_settings_lease_covers_stages_check\" CHECK (((\"lease_seconds\" * 1000) > (\"compute_timeout_ms\" + \"publish_timeout_ms\"))),"
        },
        {
          "line": 20,
          "text": "CONSTRAINT \"stats_projection_worker_settings_lease_seconds_check\" CHECK (((\"lease_seconds\" >= 30) AND (\"lease_seconds\" <= 3600))),"
        },
        {
          "line": 21,
          "text": "CONSTRAINT \"stats_projection_worker_settings_lock_timeout_ms_check\" CHECK (((\"lock_timeout_ms\" >= 50) AND (\"lock_timeout_ms\" <= 5000) AND (\"lock_timeout_ms\" < \"publish_timeout_ms\"))),"
        },
        {
          "line": 22,
          "text": "CONSTRAINT \"stats_projection_worker_settings_max_active_leases_check\" CHECK (((\"max_active_leases\" >= 1) AND (\"max_active_leases\" <= 10))),"
        },
        {
          "line": 23,
          "text": "CONSTRAINT \"stats_projection_worker_settings_max_attempts_check\" CHECK (((\"max_attempts\" >= 1) AND (\"max_attempts\" <= 10))),"
        },
        {
          "line": 24,
          "text": "CONSTRAINT \"stats_projection_worker_settings_projection_mode_check\" CHECK ((\"projection_mode\" = ANY (ARRAY['full'::\"text\", 'incremental'::\"text\"]))),"
        },
        {
          "line": 25,
          "text": "CONSTRAINT \"stats_projection_worker_settings_publish_timeout_ms_check\" CHECK (((\"publish_timeout_ms\" >= 500) AND (\"publish_timeout_ms\" < 8000))),"
        },
        {
          "line": 26,
          "text": "CONSTRAINT \"stats_projection_worker_settings_retry_backoff_seconds_check\" CHECK (((\"retry_backoff_seconds\" >= 0) AND (\"retry_backoff_seconds\" <= 3600)))"
        }
      ]
    },
    {
      "path": "supabase/definitions/stats/tables/stats_refresh_event_types.sql",
      "name": "stats_refresh_event_types",
      "category": "statistics_table",
      "lines": 20,
      "sha256": "8e87341a26a4d997814d9c130ccdcb73480d29cf2df7801a90e84b78ff4bb0bf",
      "schema_line": 36346,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": [
        {
          "line": 12,
          "text": "CONSTRAINT \"stats_refresh_event_types_exercise_scope_check\" CHECK ((\"exercise_scope\" = ANY (ARRAY['single'::\"text\", 'multiple'::\"text\", 'session'::\"text\", 'all'::\"text\"])))"
        }
      ]
    },
    {
      "path": "supabase/definitions/stats/tables/strength_estimation_curve_points.sql",
      "name": "strength_estimation_curve_points",
      "category": "statistics_table",
      "lines": 31,
      "sha256": "7f38bfa9107bd04e8e9a30f9861869541bd8707bd731e225379bc709a3d429de",
      "schema_line": 36359,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": [
        {
          "line": 8,
          "text": "CONSTRAINT \"strength_estimation_curve_points_load_percent_check\" CHECK (((\"load_percent\" > (0)::numeric) AND (\"load_percent\" <= (100)::numeric))),"
        },
        {
          "line": 9,
          "text": "CONSTRAINT \"strength_estimation_curve_points_mean_repetitions_check\" CHECK ((\"mean_repetitions\" > (0)::numeric)),"
        },
        {
          "line": 10,
          "text": "CONSTRAINT \"strength_estimation_curve_points_sd_repetitions_check\" CHECK ((\"sd_repetitions\" >= (0)::numeric))"
        }
      ]
    },
    {
      "path": "supabase/definitions/stats/tables/strength_estimation_curve_versions.sql",
      "name": "strength_estimation_curve_versions",
      "category": "statistics_table",
      "lines": 32,
      "sha256": "bd46b58ff2e46a1147ec557a88e60b27816ba1e7650ea915fdea42bcc0409cd6",
      "schema_line": 36370,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": [
        {
          "line": 13,
          "text": "CONSTRAINT \"strength_estimation_curve_ve_curve_breaking_fingerprint_s_check\" CHECK ((\"curve_breaking_fingerprint_sha256\" ~ '^[0-9A-F]{64}$'::\"text\")),"
        },
        {
          "line": 14,
          "text": "CONSTRAINT \"strength_estimation_curve_version_derived_artifact_sha256_check\" CHECK ((\"derived_artifact_sha256\" ~ '^[0-9A-F]{64}$'::\"text\")),"
        },
        {
          "line": 15,
          "text": "CONSTRAINT \"strength_estimation_curve_versions_canonical_csv_sha256_check\" CHECK ((\"canonical_csv_sha256\" ~ '^[0-9A-F]{64}$'::\"text\")),"
        },
        {
          "line": 16,
          "text": "CONSTRAINT \"strength_estimation_curve_versions_source_sha256_check\" CHECK ((\"source_sha256\" ~ '^[0-9A-F]{64}$'::\"text\"))"
        }
      ]
    },
    {
      "path": "supabase/definitions/stats/tables/strength_estimation_integer_lookup_snapshots.sql",
      "name": "strength_estimation_integer_lookup_snapshots",
      "category": "statistics_table",
      "lines": 31,
      "sha256": "b94c43f17be23848d524bccf4f4da775ae108d30004a357331fe5a0a10e9a816",
      "schema_line": 36387,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": [
        {
          "line": 9,
          "text": "CONSTRAINT \"strength_estimation_integer_lookup_snapsho_effective_reps_check\" CHECK (((\"effective_reps\" >= 1) AND (\"effective_reps\" <= 20))),"
        },
        {
          "line": 10,
          "text": "CONSTRAINT \"strength_estimation_integer_lookup_snapshots_check\" CHECK (((\"load_pct_reference_low\" <= \"load_pct_reference_center\") AND (\"load_pct_reference_center\" <= \"load_pct_reference_high\")))"
        }
      ]
    },
    {
      "path": "supabase/definitions/stats/tables/strength_estimation_policy_versions.sql",
      "name": "strength_estimation_policy_versions",
      "category": "statistics_table",
      "lines": 36,
      "sha256": "2aceaa8f3829e129942f7964b863d5cb3336e0319da23652c6015137f9264064",
      "schema_line": 36398,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": [
        {
          "line": 13,
          "text": "CONSTRAINT \"strength_estimation_policy_ve_breaking_fingerprint_sha256_check\" CHECK ((\"breaking_fingerprint_sha256\" ~ '^[0-9A-F]{64}$'::\"text\"))"
        }
      ]
    },
    {
      "path": "supabase/definitions/stats/tables/user_exercise_max_rep_observations.sql",
      "name": "user_exercise_max_rep_observations",
      "category": "statistics_table",
      "lines": 90,
      "sha256": "f164e2e807e29042f4a8730fc2f36d97669f1753698a4b5fbfaccce20dbcea53",
      "schema_line": 36471,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": [
        {
          "line": 33,
          "text": "CONSTRAINT \"user_exercise_max_rep_observ_estimated_max_reps_confidenc_check\" CHECK ((\"estimated_max_reps_confidence\" = ANY (ARRAY['high'::\"text\", 'medium'::\"text\", 'low'::\"text\"]))),"
        },
        {
          "line": 34,
          "text": "CONSTRAINT \"user_exercise_max_rep_observa_max_rep_observed_floor_reps_check\" CHECK ((\"max_rep_observed_floor_reps\" > 0)),"
        },
        {
          "line": 35,
          "text": "CONSTRAINT \"user_exercise_max_rep_observation_estimated_max_reps_kind_check\" CHECK ((\"estimated_max_reps_kind\" = ANY (ARRAY['observed_max'::\"text\", 'point'::\"text\", 'range'::\"text\", 'conditional_open'::\"text\", 'observed_floor'::\"text\"]))),"
        },
        {
          "line": 36,
          "text": "CONSTRAINT \"user_exercise_max_rep_observations_applied_version_check\" CHECK ((\"applied_version\" >= 0)),"
        },
        {
          "line": 37,
          "text": "CONSTRAINT \"user_exercise_max_rep_observations_bodyweight_factor_check\" CHECK (((\"bodyweight_factor\" >= (0)::numeric) AND (\"bodyweight_factor\" <= (2)::numeric))),"
        },
        {
          "line": 38,
          "text": "CONSTRAINT \"user_exercise_max_rep_observations_bounds_check\" CHECK (((\"estimated_max_reps_lower\" >= (\"max_rep_observed_floor_reps\")::numeric) AND ((\"estimated_max_reps_representative\" IS NULL) OR (\"estimated_max_reps_representative\" >= \"estimated_max_reps_lower\")) AND ((\"estimated_max_reps_upper\" IS NULL) OR (\"estimated_max_reps_upper\" >= COALESCE(\"estimated_max_reps_representative\", \"estimated_max_reps_lower\"))) AND (((\"estimated_max_reps_kind\" = ANY (ARRAY['observed_max'::\"text\", 'point'::\"text\"])) AND (\"estimated_max_reps_lower\" = \"estimated_max_reps_representative\") AND (\"estimated_max_reps_representative\" = \"estimated_max_reps_upper\") AND (NOT \"upper_bound_open\")) OR ((\"estimated_max_reps_kind\" = 'range'::\"text\") AND (\"estimated_max_reps_representative\" IS NOT NULL) AND (\"estimated_max_reps_upper\" IS NOT NULL) AND (NOT \"upper_bound_open\")) OR ((\"estimated_max_reps_kind\" = ANY (ARRAY['conditional_open'::\"text\", 'observed_floor'::\"text\"])) AND (\"estimated_max_reps_representative\" IS NULL) AND (\"estimated_max_reps_upper\" IS NULL) AND \"upper_bound_open\")))),"
        },
        {
          "line": 39,
          "text": "CONSTRAINT \"user_exercise_max_rep_observations_measurement_type_check\" CHECK ((\"measurement_type\" = ANY (ARRAY['reps'::\"text\", 'bodyweight_reps'::\"text\"]))),"
        },
        {
          "line": 40,
          "text": "CONSTRAINT \"user_exercise_max_rep_observations_raw_reps_check\" CHECK ((\"raw_reps\" > 0)),"
        },
        {
          "line": 41,
          "text": "CONSTRAINT \"user_exercise_max_rep_observations_session_body_weight_kg_check\" CHECK (((\"session_body_weight_kg\" IS NULL) OR ((\"session_body_weight_kg\" >= (20)::numeric) AND (\"session_body_weight_kg\" <= (400)::numeric)))),"
        },
        {
          "line": 42,
          "text": "CONSTRAINT \"user_exercise_max_rep_observations_set_position_check\" CHECK ((\"set_position\" > 0)),"
        },
        {
          "line": 43,
          "text": "CONSTRAINT \"user_exercise_max_rep_observations_set_result_check\" CHECK ((\"set_result\" = ANY (ARRAY['completed'::\"text\", 'rep_failure'::\"text\"]))),"
        },
        {
          "line": 44,
          "text": "CONSTRAINT \"user_exercise_max_rep_observations_set_type_check\" CHECK ((\"set_type\" = ANY (ARRAY['main'::\"text\", 'top'::\"text\"]))),"
        },
        {
          "line": 45,
          "text": "CONSTRAINT \"user_exercise_max_rep_observations_stats_load_kg_check\" CHECK ((\"stats_load_kg\" = (0)::numeric))"
        }
      ]
    },
    {
      "path": "supabase/definitions/stats/tables/user_exercise_metric_events.sql",
      "name": "user_exercise_metric_events",
      "category": "statistics_table",
      "lines": 54,
      "sha256": "766867fc941eab8596564d2e7129d5337b6f188133fc027c0f1e6c08d4fde2cb",
      "schema_line": 36521,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": [
        {
          "line": 22,
          "text": "CONSTRAINT \"user_exercise_metric_events_metric_kind_check\" CHECK ((\"metric_kind\" = ANY (ARRAY['reps'::\"text\", 'hold'::\"text\", 'cardio'::\"text\", 'distance'::\"text\"])))"
        }
      ]
    },
    {
      "path": "supabase/definitions/stats/tables/user_exercise_numeric_periods.sql",
      "name": "user_exercise_numeric_periods",
      "category": "statistics_table",
      "lines": 32,
      "sha256": "f93b3188a29d0d5301716909cdf4a2fa72641d67915d54e0945c386dd0516239",
      "schema_line": 36544,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": [
        {
          "line": 10,
          "text": "CONSTRAINT \"user_exercise_numeric_periods_period_type_check\" CHECK ((\"period_type\" = ANY (ARRAY['day'::\"text\", 'month'::\"text\", 'year'::\"text\"])))"
        }
      ]
    },
    {
      "path": "supabase/definitions/stats/tables/user_exercise_period_stats.sql",
      "name": "user_exercise_period_stats",
      "category": "statistics_table",
      "lines": 77,
      "sha256": "50c2976ab24bd60b98bb448e6b294fd41e588dd1cd62abe23ee5c72b06b31d16",
      "schema_line": 2027,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": [
        {
          "line": 43,
          "text": "CONSTRAINT \"user_exercise_period_stats_intensity_set_count_check\" CHECK (((\"intensity_set_count\" >= 0) AND (\"strength_set_count\" >= 0) AND (\"hypertrophy_set_count\" >= 0) AND (\"endurance_set_count\" >= 0) AND (\"intensity_lt50_set_count\" >= 0) AND (\"intensity_50_70_set_count\" >= 0) AND (\"intensity_70_85_set_count\" >= 0) AND (\"intensity_gte85_set_count\" >= 0) AND (\"rpe_set_count\" >= 0) AND (\"rpe_lt6_set_count\" >= 0) AND (\"rpe_6_set_count\" >= 0) AND (\"rpe_7_set_count\" >= 0) AND (\"rpe_8_set_count\" >= 0) AND (\"rpe_9_set_count\" >= 0) AND (\"rpe_10_set_count\" >= 0) AND (\"intensity_set_count\" = (((\"intensity_lt50_set_count\" + \"intensity_50_70_set_count\") + \"intensity_70_85_set_count\") + \"intensity_gte85_set_count\")) AND (\"rpe_set_count\" = (((((\"rpe_lt6_set_count\" + \"rpe_6_set_count\") + \"rpe_7_set_count\") + \"rpe_8_set_count\") + \"rpe_9_set_count\") + \"rpe_10_set_count\")))),"
        },
        {
          "line": 44,
          "text": "CONSTRAINT \"user_exercise_period_stats_main_reps_check\" CHECK ((\"main_reps\" >= 0)),"
        },
        {
          "line": 45,
          "text": "CONSTRAINT \"user_exercise_period_stats_period_type_check\" CHECK ((\"period_type\" = ANY (ARRAY['day'::\"text\", 'week'::\"text\", 'month'::\"text\", 'quarter'::\"text\", 'year'::\"text\"]))),"
        },
        {
          "line": 46,
          "text": "CONSTRAINT \"user_exercise_period_stats_session_count_check\" CHECK ((\"session_count\" >= 0)),"
        },
        {
          "line": 47,
          "text": "CONSTRAINT \"user_exercise_period_stats_set_count_check\" CHECK ((\"set_count\" >= 0)),"
        },
        {
          "line": 48,
          "text": "CONSTRAINT \"user_exercise_period_stats_set_score_histogram_check\" CHECK (((\"cardinality\"(\"set_score_histogram_counts\") = 8) AND (\"array_position\"(\"set_score_histogram_counts\", NULL::integer) IS NULL) AND (0 <= ALL (\"set_score_histogram_counts\")))),"
        },
        {
          "line": 49,
          "text": "CONSTRAINT \"user_exercise_period_stats_volume_check\" CHECK ((\"volume\" >= (0)::numeric))"
        }
      ]
    },
    {
      "path": "supabase/definitions/stats/tables/user_exercise_pr_events.sql",
      "name": "user_exercise_pr_events",
      "category": "statistics_table",
      "lines": 82,
      "sha256": "94233eed4b357f7689d837422cf47c3cb08a15bae6b48758e8e53437dfc1ea53",
      "schema_line": 31942,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": [
        {
          "line": 25,
          "text": "CONSTRAINT \"user_exercise_pr_events_applied_version_check\" CHECK ((\"applied_version\" >= 0)),"
        },
        {
          "line": 26,
          "text": "CONSTRAINT \"user_exercise_pr_events_check\" CHECK ((\"value\" > COALESCE(\"previous_value\", (0)::numeric))),"
        },
        {
          "line": 27,
          "text": "CONSTRAINT \"user_exercise_pr_events_check1\" CHECK ((\"source_reps\" = \"target_reps\")),"
        },
        {
          "line": 28,
          "text": "CONSTRAINT \"user_exercise_pr_events_check2\" CHECK ((\"source_load\" = \"value\")),"
        },
        {
          "line": 29,
          "text": "CONSTRAINT \"user_exercise_pr_events_check3\" CHECK ((((\"source_kind\" = 'session_set'::\"text\") AND (NOT \"is_baseline\") AND (\"achieved_on\" IS NOT NULL) AND (\"session_id\" IS NOT NULL) AND (\"session_exercise_id\" IS NOT NULL)) OR ((\"source_kind\" = 'historical_1rm'::\"text\") AND (\"target_reps\" = 1) AND (\"session_id\" IS NULL) AND (\"session_exercise_id\" IS NULL) AND ((\"is_baseline\" AND (\"achieved_on\" IS NULL)) OR ((NOT \"is_baseline\") AND (\"achieved_on\" IS NOT NULL)))))),"
        },
        {
          "line": 30,
          "text": "CONSTRAINT \"user_exercise_pr_events_previous_value_check\" CHECK (((\"previous_value\" IS NULL) OR (\"previous_value\" > (0)::numeric))),"
        },
        {
          "line": 31,
          "text": "CONSTRAINT \"user_exercise_pr_events_source_kind_check\" CHECK ((\"source_kind\" = ANY (ARRAY['session_set'::\"text\", 'historical_1rm'::\"text\"]))),"
        },
        {
          "line": 32,
          "text": "CONSTRAINT \"user_exercise_pr_events_source_load_check\" CHECK ((\"source_load\" > (0)::numeric)),"
        },
        {
          "line": 33,
          "text": "CONSTRAINT \"user_exercise_pr_events_source_reps_check\" CHECK (((\"source_reps\" >= 1) AND (\"source_reps\" <= 20))),"
        },
        {
          "line": 34,
          "text": "CONSTRAINT \"user_exercise_pr_events_target_reps_check\" CHECK (((\"target_reps\" >= 1) AND (\"target_reps\" <= 20))),"
        },
        {
          "line": 35,
          "text": "CONSTRAINT \"user_exercise_pr_events_value_check\" CHECK (((\"value\" > (0)::numeric) AND (\"value\" <= (5000)::numeric)))"
        }
      ]
    },
    {
      "path": "supabase/definitions/stats/tables/user_exercise_pr_states.sql",
      "name": "user_exercise_pr_states",
      "category": "statistics_table",
      "lines": 63,
      "sha256": "75c9898025c877cc71339a1d859c4b2f03bb676d136be7c4e9feffae8ecf94a6",
      "schema_line": 36555,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": [
        {
          "line": 20,
          "text": "CONSTRAINT \"user_exercise_pr_states_applied_version_check\" CHECK ((\"applied_version\" >= 0)),"
        },
        {
          "line": 21,
          "text": "CONSTRAINT \"user_exercise_pr_states_check\" CHECK ((\"current_value\" > COALESCE(\"previous_value\", (0)::numeric))),"
        },
        {
          "line": 22,
          "text": "CONSTRAINT \"user_exercise_pr_states_check1\" CHECK (((\"source_kind\" <> 'historical_1rm'::\"text\") OR (\"target_reps\" = 1))),"
        },
        {
          "line": 23,
          "text": "CONSTRAINT \"user_exercise_pr_states_check2\" CHECK (((\"is_baseline\" AND (\"achieved_on\" IS NULL) AND (\"source_kind\" = 'historical_1rm'::\"text\")) OR ((NOT \"is_baseline\") AND (\"achieved_on\" IS NOT NULL)))),"
        },
        {
          "line": 24,
          "text": "CONSTRAINT \"user_exercise_pr_states_current_value_check\" CHECK (((\"current_value\" > (0)::numeric) AND (\"current_value\" <= (5000)::numeric))),"
        },
        {
          "line": 25,
          "text": "CONSTRAINT \"user_exercise_pr_states_previous_value_check\" CHECK (((\"previous_value\" IS NULL) OR (\"previous_value\" > (0)::numeric))),"
        },
        {
          "line": 26,
          "text": "CONSTRAINT \"user_exercise_pr_states_source_kind_check\" CHECK ((\"source_kind\" = ANY (ARRAY['session_set'::\"text\", 'historical_1rm'::\"text\"]))),"
        },
        {
          "line": 27,
          "text": "CONSTRAINT \"user_exercise_pr_states_target_reps_check\" CHECK (((\"target_reps\" >= 1) AND (\"target_reps\" <= 20)))"
        }
      ]
    },
    {
      "path": "supabase/definitions/stats/tables/user_exercise_records.sql",
      "name": "user_exercise_records",
      "category": "statistics_table",
      "lines": 58,
      "sha256": "b09213fc8ebeb8222e5441a5f9d98a55e28c8f26a26c21612e079229c639c620",
      "schema_line": 36583,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/tables/user_exercise_session_rollups.sql",
      "name": "user_exercise_session_rollups",
      "category": "statistics_table",
      "lines": 102,
      "sha256": "8f24613cb0d8dc4f63b1b3e23ebf8f96f7ca0f2fa3eafc372322ca61b1c38eaa",
      "schema_line": 36604,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": [
        {
          "line": 51,
          "text": "CONSTRAINT \"user_exercise_session_rollups_main_reps_check\" CHECK ((\"main_reps\" >= 0)),"
        },
        {
          "line": 52,
          "text": "CONSTRAINT \"user_exercise_session_rollups_max_rep_check\" CHECK ((((\"best_observed_reps\" IS NULL) AND (\"estimated_max_reps_lower\" IS NULL) AND (\"estimated_max_reps_representative\" IS NULL) AND (\"estimated_max_reps_upper\" IS NULL) AND (\"estimated_max_reps_confidence\" IS NULL) AND (\"estimated_max_reps_kind\" IS NULL) AND (\"estimated_max_reps_source_set_id\" IS NULL) AND (\"max_rep_body_weight_kg\" IS NULL) AND (\"max_rep_bodyweight_factor\" IS NULL) AND (\"max_rep_policy_id\" IS NULL) AND (\"max_rep_policy_version\" IS NULL)) OR ((\"best_observed_reps\" > 0) AND (\"estimated_max_reps_lower\" >= (\"best_observed_reps\")::numeric) AND ((\"estimated_max_reps_representative\" IS NULL) OR (\"estimated_max_reps_representative\" >= \"estimated_max_reps_lower\")) AND ((\"estimated_max_reps_upper\" IS NULL) OR (\"estimated_max_reps_upper\" >= COALESCE(\"estimated_max_reps_representative\", \"estimated_max_reps_lower\"))) AND (\"estimated_max_reps_confidence\" = ANY (ARRAY['high'::\"text\", 'medium'::\"text\", 'low'::\"text\"])) AND (\"estimated_max_reps_kind\" = ANY (ARRAY['observed_max'::\"text\", 'point'::\"text\", 'range'::\"text\", 'conditional_open'::\"text\", 'observed_floor'::\"text\"])) AND (\"estimated_max_reps_source_set_id\" IS NOT NULL) AND ((\"max_rep_body_weight_kg\" IS NULL) OR ((\"max_rep_body_weight_kg\" >= (20)::numeric) AND (\"max_rep_body_weight_kg\" <= (400)::numeric))) AND ((\"max_rep_bodyweight_factor\" >= (0)::numeric) AND (\"max_rep_bodyweight_factor\" <= (2)::numeric)) AND (\"max_rep_policy_id\" IS NOT NULL) AND (\"max_rep_policy_version\" IS NOT NULL)))),"
        },
        {
          "line": 53,
          "text": "CONSTRAINT \"user_exercise_session_rollups_set_count_check\" CHECK ((\"set_count\" >= 0)),"
        },
        {
          "line": 54,
          "text": "CONSTRAINT \"user_exercise_session_rollups_strength_counts_check\" CHECK (((\"intensity_set_count\" >= 0) AND (\"strength_set_count\" >= 0) AND (\"hypertrophy_set_count\" >= 0) AND (\"endurance_set_count\" >= 0) AND (\"intensity_lt50_set_count\" >= 0) AND (\"intensity_50_70_set_count\" >= 0) AND (\"intensity_70_85_set_count\" >= 0) AND (\"intensity_gte85_set_count\" >= 0) AND (\"rpe_set_count\" >= 0) AND (\"rpe_lt6_set_count\" >= 0) AND (\"rpe_6_set_count\" >= 0) AND (\"rpe_7_set_count\" >= 0) AND (\"rpe_8_set_count\" >= 0) AND (\"rpe_9_set_count\" >= 0) AND (\"rpe_10_set_count\" >= 0) AND (\"intensity_set_count\" = (((\"intensity_lt50_set_count\" + \"intensity_50_70_set_count\") + \"intensity_70_85_set_count\") + \"intensity_gte85_set_count\")) AND (\"rpe_set_count\" = (((((\"rpe_lt6_set_count\" + \"rpe_6_set_count\") + \"rpe_7_set_count\") + \"rpe_8_set_count\") + \"rpe_9_set_count\") + \"rpe_10_set_count\")))),"
        },
        {
          "line": 55,
          "text": "CONSTRAINT \"user_exercise_session_rollups_volume_check\" CHECK ((\"volume\" >= (0)::numeric))"
        }
      ]
    },
    {
      "path": "supabase/definitions/stats/tables/user_exercise_set_observations.sql",
      "name": "user_exercise_set_observations",
      "category": "statistics_table",
      "lines": 85,
      "sha256": "b4d60c3c7d1ab2d85a4a92d60b2015f76aed43bd31ba60835174febfbe74088b",
      "schema_line": 36660,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": [
        {
          "line": 38,
          "text": "CONSTRAINT \"user_exercise_set_observations_applied_version_check\" CHECK ((\"applied_version\" >= 0)),"
        },
        {
          "line": 39,
          "text": "CONSTRAINT \"user_exercise_set_observations_composite_part_count_check\" CHECK ((\"composite_part_count\" >= 1)),"
        },
        {
          "line": 40,
          "text": "CONSTRAINT \"user_exercise_set_observations_entry_position_check\" CHECK ((\"entry_position\" > 0)),"
        },
        {
          "line": 41,
          "text": "CONSTRAINT \"user_exercise_set_observations_session_intent_check\" CHECK ((\"session_intent\" = ANY (ARRAY['training'::\"text\", 'rm_test'::\"text\"]))),"
        },
        {
          "line": 42,
          "text": "CONSTRAINT \"user_exercise_set_observations_set_position_check\" CHECK ((\"set_position\" > 0)),"
        },
        {
          "line": 43,
          "text": "CONSTRAINT \"user_exercise_set_observations_set_result_check\" CHECK ((\"set_result\" = ANY (ARRAY['completed'::\"text\", 'rep_failure'::\"text\"]))),"
        },
        {
          "line": 44,
          "text": "CONSTRAINT \"user_exercise_set_observations_set_type_check\" CHECK ((\"set_type\" = ANY (ARRAY['warmup'::\"text\", 'main'::\"text\", 'top'::\"text\", 'total'::\"text\"]))),"
        },
        {
          "line": 45,
          "text": "CONSTRAINT \"user_exercise_set_observations_source_check\" CHECK ((\"source\" = ANY (ARRAY['barbelic'::\"text\", 'wodup'::\"text\", 'motra'::\"text\"])))"
        }
      ]
    },
    {
      "path": "supabase/definitions/stats/tables/user_exercise_stats.sql",
      "name": "user_exercise_stats",
      "category": "statistics_table",
      "lines": 66,
      "sha256": "c30d09c5a469dab47c3af6cca6e32512ef7d83001e6356b0513373c6c19cc628",
      "schema_line": 36706,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": [
        {
          "line": 23,
          "text": "CONSTRAINT \"user_exercise_stats_best_reps_check\" CHECK ((\"best_reps\" >= 0)),"
        },
        {
          "line": 24,
          "text": "CONSTRAINT \"user_exercise_stats_session_count_check\" CHECK ((\"session_count\" >= 0)),"
        },
        {
          "line": 25,
          "text": "CONSTRAINT \"user_exercise_stats_set_count_check\" CHECK ((\"set_count\" >= 0)),"
        },
        {
          "line": 26,
          "text": "CONSTRAINT \"user_exercise_stats_total_volume_check\" CHECK ((\"total_volume\" >= (0)::numeric))"
        }
      ]
    },
    {
      "path": "supabase/definitions/stats/tables/user_exercise_stats_refresh_jobs.sql",
      "name": "user_exercise_stats_refresh_jobs",
      "category": "statistics_table",
      "lines": 62,
      "sha256": "b2555c061f4409e435b96e631ff133bf1a1ccc84bc7ab1d2a95a54f77b729c31",
      "schema_line": 4347,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": [
        {
          "line": 22,
          "text": "CONSTRAINT \"user_exercise_stats_refresh_jobs_attempts_check\" CHECK ((\"attempts\" >= 0)),"
        },
        {
          "line": 23,
          "text": "CONSTRAINT \"user_exercise_stats_refresh_jobs_exercise_identities_check\" CHECK ((\"array_position\"(\"exercise_ids\", NULL::\"uuid\") IS NULL)),"
        },
        {
          "line": 24,
          "text": "CONSTRAINT \"user_exercise_stats_refresh_jobs_scope_check\" CHECK (((\"scope\" IS NOT NULL) AND \"public\".\"stats_refresh_scope_valid_v1\"(\"scope\"))),"
        },
        {
          "line": 25,
          "text": "CONSTRAINT \"user_exercise_stats_refresh_jobs_status_check\" CHECK ((\"status\" = ANY (ARRAY['pending'::\"text\", 'processing'::\"text\", 'completed'::\"text\", 'failed'::\"text\", 'superseded'::\"text\"]))),"
        },
        {
          "line": 26,
          "text": "CONSTRAINT \"user_exercise_stats_refresh_jobs_target_version_check\" CHECK ((\"target_version\" >= 0))"
        }
      ]
    },
    {
      "path": "supabase/definitions/stats/tables/user_exercise_strength_daily.sql",
      "name": "user_exercise_strength_daily",
      "category": "statistics_table",
      "lines": 74,
      "sha256": "baf0608c70dc8c6fd63589e2d31859cebafada5707cebf09b518e3ff91a0dcf5",
      "schema_line": 36733,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": [
        {
          "line": 27,
          "text": "CONSTRAINT \"user_exercise_strength_daily_applied_version_check\" CHECK ((\"applied_version\" >= 0)),"
        },
        {
          "line": 28,
          "text": "CONSTRAINT \"user_exercise_strength_daily_e1rm_confidence_check\" CHECK ((\"e1rm_confidence\" = ANY (ARRAY['high'::\"text\", 'medium'::\"text\", 'low'::\"text\"]))),"
        },
        {
          "line": 29,
          "text": "CONSTRAINT \"user_exercise_strength_daily_e1rm_estimate_kind_check\" CHECK ((\"e1rm_estimate_kind\" = ANY (ARRAY['point'::\"text\", 'range'::\"text\", 'conditional_open'::\"text\", 'censored_high'::\"text\"]))),"
        },
        {
          "line": 30,
          "text": "CONSTRAINT \"user_exercise_strength_daily_session_vote_count_check\" CHECK ((\"session_vote_count\" > 0))"
        }
      ]
    },
    {
      "path": "supabase/definitions/stats/tables/user_exercise_strength_observations.sql",
      "name": "user_exercise_strength_observations",
      "category": "statistics_table",
      "lines": 112,
      "sha256": "d8333ac7d245ff1e1bad8a625a20032b24b7c25be3dbda9247b454638c719540",
      "schema_line": 36764,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": [
        {
          "line": 55,
          "text": "CONSTRAINT \"user_exercise_strength_observations_applied_version_check\" CHECK ((\"applied_version\" >= 0)),"
        },
        {
          "line": 56,
          "text": "CONSTRAINT \"user_exercise_strength_observations_e1rm_confidence_check\" CHECK ((\"e1rm_confidence\" = ANY (ARRAY['high'::\"text\", 'medium'::\"text\", 'low'::\"text\"]))),"
        },
        {
          "line": 57,
          "text": "CONSTRAINT \"user_exercise_strength_observations_e1rm_estimate_kind_check\" CHECK ((\"e1rm_estimate_kind\" = ANY (ARRAY['point'::\"text\", 'range'::\"text\", 'conditional_open'::\"text\", 'censored_high'::\"text\"]))),"
        },
        {
          "line": 58,
          "text": "CONSTRAINT \"user_exercise_strength_observations_information_weight_check\" CHECK ((\"information_weight\" > (0)::numeric)),"
        },
        {
          "line": 59,
          "text": "CONSTRAINT \"user_exercise_strength_observations_session_intent_check\" CHECK ((\"session_intent\" = ANY (ARRAY['training'::\"text\", 'rm_test'::\"text\"]))),"
        },
        {
          "line": 60,
          "text": "CONSTRAINT \"user_exercise_strength_observations_set_result_check\" CHECK ((\"set_result\" = ANY (ARRAY['completed'::\"text\", 'rep_failure'::\"text\"]))),"
        },
        {
          "line": 61,
          "text": "CONSTRAINT \"user_exercise_strength_observations_set_type_check\" CHECK ((\"set_type\" = ANY (ARRAY['warmup'::\"text\", 'main'::\"text\", 'top'::\"text\"]))),"
        },
        {
          "line": 62,
          "text": "CONSTRAINT \"user_exercise_strength_observations_stimulus_class_check\" CHECK (((\"stimulus_class\" IS NULL) OR (\"stimulus_class\" = ANY (ARRAY['strength'::\"text\", 'hypertrophy'::\"text\", 'endurance'::\"text\"]))))"
        }
      ]
    },
    {
      "path": "supabase/definitions/stats/tables/user_exercise_strength_states.sql",
      "name": "user_exercise_strength_states",
      "category": "statistics_table",
      "lines": 67,
      "sha256": "2dc291740760b8bdf4eb8da29cbf668fd1764ed1181ee5055c58ec489f7e9818",
      "schema_line": 36827,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": [
        {
          "line": 23,
          "text": "CONSTRAINT \"user_exercise_strength_state_trusted_reference_confidence_check\" CHECK (((\"trusted_reference_confidence\" IS NULL) OR (\"trusted_reference_confidence\" = ANY (ARRAY['high'::\"text\", 'medium'::\"text\"])))),"
        },
        {
          "line": 24,
          "text": "CONSTRAINT \"user_exercise_strength_states_applied_version_check\" CHECK ((\"applied_version\" >= 0)),"
        },
        {
          "line": 25,
          "text": "CONSTRAINT \"user_exercise_strength_states_current_confidence_check\" CHECK ((\"current_confidence\" = ANY (ARRAY['high'::\"text\", 'medium'::\"text\", 'low'::\"text\"]))),"
        },
        {
          "line": 26,
          "text": "CONSTRAINT \"user_exercise_strength_states_current_estimate_kind_check\" CHECK ((\"current_estimate_kind\" = ANY (ARRAY['point'::\"text\", 'range'::\"text\", 'conditional_open'::\"text\", 'censored_high'::\"text\"]))),"
        },
        {
          "line": 27,
          "text": "CONSTRAINT \"user_exercise_strength_states_trusted_reference_check\" CHECK ((((\"trusted_reference_e1rm_kg\" IS NULL) AND (\"trusted_reference_observed_on\" IS NULL) AND (\"trusted_reference_source_set_id\" IS NULL) AND (\"trusted_reference_confidence\" IS NULL)) OR ((\"trusted_reference_e1rm_kg\" > (0)::numeric) AND (\"trusted_reference_observed_on\" IS NOT NULL) AND (\"trusted_reference_source_set_id\" IS NOT NULL) AND (\"trusted_reference_confidence\" = ANY (ARRAY['high'::\"text\", 'medium'::\"text\"])))))"
        }
      ]
    },
    {
      "path": "supabase/definitions/stats/tables/user_stats_projection_runs.sql",
      "name": "user_stats_projection_runs",
      "category": "statistics_table",
      "lines": 47,
      "sha256": "85135b0d611495a582b53c83a153902d30fb3d5fb759c23363964d40cc0df7ff",
      "schema_line": 27569,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": [
        {
          "line": 21,
          "text": "CONSTRAINT \"user_stats_projection_runs_phase_check\" CHECK ((\"phase\" = ANY (ARRAY['claimed'::\"text\", 'computed'::\"text\", 'completed'::\"text\", 'failed'::\"text\", 'superseded'::\"text\"])))"
        }
      ]
    },
    {
      "path": "supabase/definitions/stats/tables/user_stats_refresh_state.sql",
      "name": "user_stats_refresh_state",
      "category": "statistics_table",
      "lines": 35,
      "sha256": "0f272d47ac2d34e03d915f64e91be5d460bb0b990a864d11fa0ad64b46ea8818",
      "schema_line": 36934,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": [
        {
          "line": 12,
          "text": "CONSTRAINT \"user_stats_refresh_state_applied_version_check\" CHECK ((\"applied_version\" >= 0)),"
        },
        {
          "line": 13,
          "text": "CONSTRAINT \"user_stats_refresh_state_check\" CHECK ((\"applied_version\" <= \"requested_version\")),"
        },
        {
          "line": 14,
          "text": "CONSTRAINT \"user_stats_refresh_state_requested_version_check\" CHECK ((\"requested_version\" >= 0))"
        }
      ]
    },
    {
      "path": "supabase/definitions/stats/tables/user_stats_self_checks.sql",
      "name": "user_stats_self_checks",
      "category": "statistics_table",
      "lines": 20,
      "sha256": "af5ef69a3877b738a4ea945606a902376b34f07cac59d8f281a7b945db150020",
      "schema_line": 36949,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/stats/tables/user_stats_sequential_days.sql",
      "name": "user_stats_sequential_days",
      "category": "statistics_table",
      "lines": 34,
      "sha256": "6eef07842c1356335402f2853278617670af765083bac2ff3b1fbe4c107b0894",
      "schema_line": 36955,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": [
        {
          "line": 9,
          "text": "CONSTRAINT \"user_stats_sequential_days_applied_version_check\" CHECK ((\"applied_version\" >= 0)),"
        },
        {
          "line": 10,
          "text": "CONSTRAINT \"user_stats_sequential_days_families_check\" CHECK ((\"jsonb_typeof\"(\"families\") = 'object'::\"text\"))"
        }
      ]
    },
    {
      "path": "supabase/definitions/stats/tables/user_training_period_stats.sql",
      "name": "user_training_period_stats",
      "category": "statistics_table",
      "lines": 54,
      "sha256": "f5160a5a4f45a2a9ee9770dc4b4bcbb386deed9db4c3fce6aa153bd84eb37d35",
      "schema_line": 2190,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": [
        {
          "line": 18,
          "text": "CONSTRAINT \"user_training_period_stats_attendance_week_check\" CHECK (((\"attendance_week_count\" IS NULL) OR (\"attendance_week_total\" IS NULL) OR ((\"attendance_week_count\" >= 0) AND (\"attendance_week_count\" <= \"attendance_week_total\")))),"
        },
        {
          "line": 19,
          "text": "CONSTRAINT \"user_training_period_stats_day_count_check\" CHECK ((\"day_count\" >= 0)),"
        },
        {
          "line": 20,
          "text": "CONSTRAINT \"user_training_period_stats_duration_minutes_check\" CHECK ((\"duration_minutes\" >= 0)),"
        },
        {
          "line": 21,
          "text": "CONSTRAINT \"user_training_period_stats_duration_session_counts_check\" CHECK (((\"cardinality\"(\"duration_session_counts\") = 5) AND (\"array_position\"(\"duration_session_counts\", NULL::integer) IS NULL) AND (0 <= ALL (\"duration_session_counts\")) AND (\"session_count\" >= ((((\"duration_session_counts\"[1] + \"duration_session_counts\"[2]) + \"duration_session_counts\"[3]) + \"duration_session_counts\"[4]) + \"duration_session_counts\"[5])))),"
        },
        {
          "line": 22,
          "text": "CONSTRAINT \"user_training_period_stats_main_reps_check\" CHECK ((\"main_reps\" >= 0)),"
        },
        {
          "line": 23,
          "text": "CONSTRAINT \"user_training_period_stats_period_type_check\" CHECK ((\"period_type\" = ANY (ARRAY['day'::\"text\", 'week'::\"text\", 'month'::\"text\", 'quarter'::\"text\", 'year'::\"text\"]))),"
        },
        {
          "line": 24,
          "text": "CONSTRAINT \"user_training_period_stats_session_count_check\" CHECK ((\"session_count\" >= 0)),"
        },
        {
          "line": 25,
          "text": "CONSTRAINT \"user_training_period_stats_set_count_check\" CHECK ((\"set_count\" >= 0)),"
        },
        {
          "line": 26,
          "text": "CONSTRAINT \"user_training_period_stats_time_slot_counts_check\" CHECK (((\"cardinality\"(\"time_slot_counts\") = 36) AND (\"array_position\"(\"time_slot_counts\", NULL::integer) IS NULL) AND (0 <= ALL (\"time_slot_counts\")) AND (\"session_count\" >= ALL (\"time_slot_counts\")))),"
        },
        {
          "line": 27,
          "text": "CONSTRAINT \"user_training_period_stats_volume_check\" CHECK ((\"volume\" >= (0)::numeric))"
        }
      ]
    },
    {
      "path": "supabase/definitions/volume/functions/data_module_family_period_v1.sql",
      "name": "data_module_family_period_v1",
      "category": "read_module",
      "lines": 57,
      "sha256": "75ee32efea75445fe61e2e468cb40be3c6399e3a410f4c6501be2fe31c411682",
      "schema_line": 7051,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "data_module_period_attendance_v1",
        "data_module_period_daily_volume_v1",
        "data_module_period_distributions_v1",
        "data_module_period_duration_zones_v1",
        "data_module_period_growth_v1",
        "data_module_period_index_v1",
        "data_module_period_stimulus_counts_v1",
        "data_module_period_summary_v1",
        "data_module_period_taxonomy_axes_v1",
        "data_module_period_time_slots_v1",
        "data_module_period_top_exercises_v1"
      ],
      "raises": [
        {
          "line": 14,
          "text": "raise exception 'Invalid period scope for %', p_module using errcode = '22023';"
        },
        {
          "line": 20,
          "text": "raise exception 'Invalid period_start for %', p_module using errcode = '22023';"
        },
        {
          "line": 26,
          "text": "raise exception 'Invalid period scope for %', p_module using errcode = '22023';"
        },
        {
          "line": 46,
          "text": "raise exception 'Unknown data module: %', p_module using errcode = '22023';"
        }
      ],
      "catches": [
        {
          "line": 19,
          "text": "exception when others then"
        }
      ],
      "checks": []
    },
    {
      "path": "supabase/definitions/volume/functions/data_module_period_attendance_v1.sql",
      "name": "data_module_period_attendance_v1",
      "category": "read_module",
      "lines": 17,
      "sha256": "ab7c0e87c93d0f4d2b8ae5c30fcb7f93d017927c4db948cfd882fbe9073dc623",
      "schema_line": 7797,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/volume/functions/data_module_period_daily_volume_v1.sql",
      "name": "data_module_period_daily_volume_v1",
      "category": "read_module",
      "lines": 18,
      "sha256": "8b5e14bfd6a2135b9b744dd78de5a5958d338ed738bc200192c8119bd7e875aa",
      "schema_line": 7810,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/volume/functions/data_module_period_distributions_v1.sql",
      "name": "data_module_period_distributions_v1",
      "category": "read_module",
      "lines": 38,
      "sha256": "ad5604cf16243230d6d223e5fd124eb21a3488ae7fe4b1066b4ceea51e6eaf8d",
      "schema_line": 7824,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/volume/functions/data_module_period_duration_zones_v1.sql",
      "name": "data_module_period_duration_zones_v1",
      "category": "read_module",
      "lines": 14,
      "sha256": "744cc7c107896cedb6453eaaa52b7383c6d6fab37b916fe643237209de6fd14b",
      "schema_line": 7858,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/volume/functions/data_module_period_growth_v1.sql",
      "name": "data_module_period_growth_v1",
      "category": "read_module",
      "lines": 11,
      "sha256": "4ee7206789669457c2f73c7286c10054fed639954a4efe5f14065096983203f1",
      "schema_line": 7868,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "report_favorite_growth_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/volume/functions/data_module_period_index_v1.sql",
      "name": "data_module_period_index_v1",
      "category": "read_module",
      "lines": 33,
      "sha256": "1f96f60eee4ff495a01a0f727f7063b28ae1c73b8d734732819b1c399d2b4703",
      "schema_line": 7875,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/volume/functions/data_module_period_stimulus_counts_v1.sql",
      "name": "data_module_period_stimulus_counts_v1",
      "category": "read_module",
      "lines": 16,
      "sha256": "2b5d04d57253bf7448beb2edbaff747b58c4af906ef00bdba7862a7716fd94d2",
      "schema_line": 7904,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/volume/functions/data_module_period_summary_v1.sql",
      "name": "data_module_period_summary_v1",
      "category": "read_module",
      "lines": 26,
      "sha256": "0565ac227d76f53bd9a673bfa7a0e8c19d79106729e109ff5c465a8e67d51e8d",
      "schema_line": 7916,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/volume/functions/data_module_period_taxonomy_axes_v1.sql",
      "name": "data_module_period_taxonomy_axes_v1",
      "category": "read_module",
      "lines": 50,
      "sha256": "e4614e310f20d691b13cb224efa6d8ca783532ff7e5e13db4b04813129075fc7",
      "schema_line": 7938,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/volume/functions/data_module_period_time_slots_v1.sql",
      "name": "data_module_period_time_slots_v1",
      "category": "read_module",
      "lines": 14,
      "sha256": "fee00f32755e0b44f482efa7da71272098d42086afa8c365a58b1ae6008e25be",
      "schema_line": 7984,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/volume/functions/data_module_period_top_exercises_v1.sql",
      "name": "data_module_period_top_exercises_v1",
      "category": "read_module",
      "lines": 44,
      "sha256": "2e739296f243ca55e0ab67f00d13f8d17e05e04fb5e31a0da91884a204b1a1a1",
      "schema_line": 7994,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "left_utf8_bytes"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/workout/functions/build_session_record_v1.sql",
      "name": "build_session_record_v1",
      "category": "write_read_dependency",
      "lines": 175,
      "sha256": "c66ab2986dec5f98cf9230f2940fee95ddc1ccce08d1944ebb40ae48830fc18d",
      "schema_line": 2877,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "attach_strength_metrics_map_to_json_v1",
        "collect_json_uuid_candidates_v1",
        "exercise_ref_json",
        "left_utf8_bytes",
        "session_duration_label_v1",
        "session_write_role_v1",
        "social_content_visible_v1",
        "social_visible_person_json_v1",
        "strength_set_metrics_map_json"
      ],
      "raises": [
        {
          "line": 13,
          "text": "raise exception 'session_id is required' using errcode = '22023';"
        },
        {
          "line": 17,
          "text": "raise exception 'Session not found' using errcode = 'P0002';"
        },
        {
          "line": 165,
          "text": "raise exception 'Session record exceeds the 2000000-byte response ceiling.'"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/workout/functions/delete_session_v5.sql",
      "name": "delete_session_v5",
      "category": "write_read_dependency",
      "lines": 33,
      "sha256": "20201635c43670585417387437825594a638c2f6341bbdffcf98f70f1cf7c9d7",
      "schema_line": 8739,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "delete_session_v5_engine",
        "require_actor_v1",
        "session_write_answer_v1",
        "session_write_inbox_interpreted_v1",
        "session_write_inbox_open_v1"
      ],
      "raises": [
        {
          "line": 16,
          "text": "raise exception 'client_mutation_id is required' using errcode = '22023';"
        }
      ],
      "catches": [
        {
          "line": 21,
          "text": "exception when others then"
        }
      ],
      "checks": []
    },
    {
      "path": "supabase/definitions/workout/functions/delete_session_v5_engine.sql",
      "name": "delete_session_v5_engine",
      "category": "write_read_dependency",
      "lines": 79,
      "sha256": "6815d13f8d83593675e05fffd5ce9f919e457bd7a46298f9b7f59448290eb3ec",
      "schema_line": 8766,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "enqueue_user_exercise_stats_refresh_scope_v1",
        "get_session_mutation_receipt_v2",
        "refresh_session_numeric_contributions_v1",
        "session_write_denied_v1",
        "session_write_role_v1",
        "stats_refresh_scope_receipt_v1",
        "stats_refresh_session_scope_v1",
        "workout_mutation_receipt_record_v1",
        "workout_mutation_replay_v1",
        "workout_mutation_request_hash_v1",
        "workout_source_tombstones"
      ],
      "raises": [
        {
          "line": 23,
          "text": "raise exception 'p_actor is required' using errcode = '22023';"
        },
        {
          "line": 26,
          "text": "raise exception 'p_source must be barbelic, wodup or motra' using errcode = '22023';"
        },
        {
          "line": 30,
          "text": "raise exception 'session_id and client_mutation_id are required' using errcode = '22023';"
        },
        {
          "line": 33,
          "text": "raise exception 'request_hash must be a lowercase SHA-256 hex digest' using errcode = '22023';"
        },
        {
          "line": 52,
          "text": "raise exception 'Session changed after it was loaded'"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/workout/functions/exercise_set_part_before_row_core_v1.sql",
      "name": "exercise_set_part_before_row_core_v1",
      "category": "write_read_dependency",
      "lines": 34,
      "sha256": "9668e1b048b43e45d87db1d1e10dcb6a029210929a4ce4d63e87f10bce806144",
      "schema_line": 9792,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "normalize_exercise_set_load_unit_core",
        "normalize_exercise_set_outcome_core_v1",
        "populate_wodup_atomic_set_values_core_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/workout/functions/exercise_set_part_before_row_v1.sql",
      "name": "exercise_set_part_before_row_v1",
      "category": "write_read_dependency",
      "lines": 13,
      "sha256": "5039636051a8fb70e6cde02c79b284b402fb6840d49b3dddb0524617073d8d82",
      "schema_line": 9822,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "exercise_set_part_before_row_core_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/workout/functions/get_session_mutation_receipt_v2.sql",
      "name": "get_session_mutation_receipt_v2",
      "category": "write_read_dependency",
      "lines": 61,
      "sha256": "f6d65b8350a26f87e2a333fdcd94efca4bd24576e35d793ef84abe4174ec63f3",
      "schema_line": 14100,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "projection_changes_v1",
        "workout_mutation_receipt_v1",
        "workout_set_score_preview_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/workout/functions/normalize_exercise_set_load_unit_core.sql",
      "name": "normalize_exercise_set_load_unit_core",
      "category": "write_read_dependency",
      "lines": 129,
      "sha256": "46b96a04d77453bd5fefced7e0bc9858a1bd28a8ab2f301bfe7fee13469022dc",
      "schema_line": 17394,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [
        {
          "line": 62,
          "text": "raise exception 'Invalid canonical kg load override'"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/workout/functions/normalize_exercise_set_outcome_core_v1.sql",
      "name": "normalize_exercise_set_outcome_core_v1",
      "category": "write_read_dependency",
      "lines": 22,
      "sha256": "388d229e6707ee5329c9275aab760bc92bec1150e883c6c56758284e94ad7d09",
      "schema_line": 17519,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/workout/functions/record_part_load_snapshot_v1.sql",
      "name": "record_part_load_snapshot_v1",
      "category": "write_read_dependency",
      "lines": 20,
      "sha256": "944099ede764741362730a8b94b57a990b12645042a08f16b780c5a5be7cac48",
      "schema_line": 20613,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/workout/functions/save_session_state_v1.sql",
      "name": "save_session_state_v1",
      "category": "write_read_dependency",
      "lines": 37,
      "sha256": "2d6fc9020eb37066cc0d795e54c748d10eae70861492ba3451bdbb1002074d79",
      "schema_line": 23947,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "require_actor_v1",
        "retire_workout_draft_checkpoint_of_request_v1",
        "save_session_state_v1_engine",
        "session_write_answer_v1",
        "session_write_inbox_interpreted_v1",
        "session_write_inbox_open_v1"
      ],
      "raises": [
        {
          "line": 16,
          "text": "raise exception 'client_mutation_id is required' using errcode = '22023';"
        }
      ],
      "catches": [
        {
          "line": 25,
          "text": "exception when others then"
        }
      ],
      "checks": []
    },
    {
      "path": "supabase/definitions/workout/functions/save_session_state_v1_engine.sql",
      "name": "save_session_state_v1_engine",
      "category": "write_read_dependency",
      "lines": 93,
      "sha256": "ad1622c96f902689878a4abdbcbf6194f07f560bb239b757fda3f7876573712b",
      "schema_line": 23978,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "delete_session_v5_engine",
        "get_session_mutation_receipt_v2",
        "payload_value_v1",
        "save_group_board_v2_engine",
        "save_session_v5_engine",
        "session_client_edit",
        "session_state_photos_apply_v1",
        "session_write_denied_v1",
        "session_write_role_v1"
      ],
      "raises": [
        {
          "line": 19,
          "text": "raise exception 'Session state contract_version must be 1' using errcode = '22023';"
        },
        {
          "line": 22,
          "text": "raise exception 'record_id must be a uuid' using errcode = '22023';"
        },
        {
          "line": 27,
          "text": "raise exception 'edited_at is required' using errcode = '22023';"
        },
        {
          "line": 32,
          "text": "raise exception 'content is required unless deleted' using errcode = '22023';"
        },
        {
          "line": 35,
          "text": "raise exception 'content cannot name its target — the state door does' using errcode = '22023';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/workout/functions/save_session_v5.sql",
      "name": "save_session_v5",
      "category": "write_read_dependency",
      "lines": 35,
      "sha256": "f89676be8c1e58f6fbcc4f4f585ad74987d42ff830d3beb410790442dc0b92a9",
      "schema_line": 24067,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "require_actor_v1",
        "retire_workout_draft_checkpoint_of_request_v1",
        "save_session_v5_engine",
        "session_write_answer_v1",
        "session_write_inbox_interpreted_v1",
        "session_write_inbox_open_v1"
      ],
      "raises": [
        {
          "line": 16,
          "text": "raise exception 'client_mutation_id is required' using errcode = '22023';"
        }
      ],
      "catches": [
        {
          "line": 23,
          "text": "exception when others then"
        }
      ],
      "checks": []
    },
    {
      "path": "supabase/definitions/workout/functions/save_session_v5_engine.sql",
      "name": "save_session_v5_engine",
      "category": "write_read_dependency",
      "lines": 161,
      "sha256": "6c198000cd91b644299b3753924bf15067c0293e28b8ae8d95c9cfec0e557fe4",
      "schema_line": 24096,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "enqueue_user_exercise_stats_refresh_scope_v1",
        "refresh_session_numeric_contributions_v1",
        "session_create_id_v1",
        "session_document_insert_v1",
        "session_document_update_v1",
        "session_restore_revision_v1",
        "session_revision_publish_v1",
        "session_stats_inputs_v1",
        "session_superseded_by_delete_v1",
        "session_transition_check_v1",
        "session_write_denied_v1",
        "session_write_role_v1",
        "stats_refresh_scope_receipt_v1",
        "stats_refresh_scope_session_inputs_v1",
        "validate_session_payload_v5_core",
        "workout_mutation_commit_v1",
        "workout_mutation_replay_v1",
        "workout_mutation_request_hash_v1"
      ],
      "raises": [
        {
          "line": 31,
          "text": "raise exception 'p_actor is required' using errcode = '22023';"
        },
        {
          "line": 34,
          "text": "raise exception 'p_source must be barbelic, wodup or motra' using errcode = '22023';"
        },
        {
          "line": 39,
          "text": "raise exception 'client_mutation_id is required' using errcode = '22023';"
        },
        {
          "line": 42,
          "text": "raise exception 'request_hash must be a lowercase SHA-256 hex digest' using errcode = '22023';"
        },
        {
          "line": 45,
          "text": "raise exception 'Authenticated user does not match expected session owner' using errcode = '42501';"
        },
        {
          "line": 57,
          "text": "raise exception 'source_ref is required' using errcode = '22023';"
        },
        {
          "line": 66,
          "text": "raise exception 'source_ref was already committed with another request'"
        },
        {
          "line": 88,
          "text": "raise exception 'source_ref belongs to a deleted session'"
        },
        {
          "line": 94,
          "text": "raise exception 'create_id already names another session'"
        },
        {
          "line": 108,
          "text": "raise exception 'Session was deleted after this edit was received' using errcode = 'P0002', detail = v_superseded::text;"
        },
        {
          "line": 117,
          "text": "raise exception 'Session changed after it was loaded'"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/workout/functions/session_document_insert_v1.sql",
      "name": "session_document_insert_v1",
      "category": "write_read_dependency",
      "lines": 35,
      "sha256": "f42833ee96ef6c95a828d5ed7c03a6633c495fed0cbae78751fbde46d6f9ec41",
      "schema_line": 24879,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "session",
        "write_session_children_v5"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/workout/functions/session_document_update_v1.sql",
      "name": "session_document_update_v1",
      "category": "write_read_dependency",
      "lines": 33,
      "sha256": "8ade4f04a0ef3fb55b351e6104fee8d9871b3f7029159aa7b1b212fa36795f09",
      "schema_line": 24910,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "write_session_children_v5"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/workout/functions/session_set_totals_v1.sql",
      "name": "session_set_totals_v1",
      "category": "write_read_dependency",
      "lines": 60,
      "sha256": "74de60f3b6dbb9576ae65374c9baaf992cc4366ccc2abe976327e236f83fc235",
      "schema_line": 25448,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/workout/functions/session_write_answer_kind_v1.sql",
      "name": "session_write_answer_kind_v1",
      "category": "write_read_dependency",
      "lines": 15,
      "sha256": "dacbb17da29dd8e88eee1afacfeefdb90b68290da032bf9ea8b2c9b5541217c2",
      "schema_line": 25712,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/workout/functions/session_write_answer_v1.sql",
      "name": "session_write_answer_v1",
      "category": "write_read_dependency",
      "lines": 45,
      "sha256": "5663ca03528fde4b27abe271ab2041612e735aea95e8ad549c3a7fb2f779971f",
      "schema_line": 25723,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "session_write_answer_kind_v1"
      ],
      "raises": [],
      "catches": [
        {
          "line": 14,
          "text": "exception when others then"
        }
      ],
      "checks": []
    },
    {
      "path": "supabase/definitions/workout/functions/session_write_inbox_interpreted_v1.sql",
      "name": "session_write_inbox_interpreted_v1",
      "category": "write_read_dependency",
      "lines": 17,
      "sha256": "8b718d48e56ff6f943d15629caa72fc9569405a0fc3a809c3405fef7cbb33efc",
      "schema_line": 25779,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/workout/functions/session_write_inbox_open_v1.sql",
      "name": "session_write_inbox_open_v1",
      "category": "write_read_dependency",
      "lines": 21,
      "sha256": "16085d77320adf03e46d879bd71c3a4b6aa2e352ea645cd6a4a51e4c76c8d248",
      "schema_line": 25792,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "session_write_inbox"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/workout/functions/training_effective_load.sql",
      "name": "training_effective_load",
      "category": "write_read_dependency",
      "lines": 22,
      "sha256": "615bde94c565cb6ed68486a50845c137b3aaf67b6b3358790b2e121180186afb",
      "schema_line": 30126,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/workout/functions/validate_session_payload_v5_core.sql",
      "name": "validate_session_payload_v5_core",
      "category": "write_read_dependency",
      "lines": 231,
      "sha256": "529e5cb4b3f7b24dae1aa57a3ea8c9223f8e69382fa8762c975ab50c8f11c54d",
      "schema_line": 32187,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "client_row_id_of_v1",
        "payload_value_v1"
      ],
      "raises": [
        {
          "line": 25,
          "text": "raise exception 'Session payload must be a JSON object' using errcode = '22023';"
        },
        {
          "line": 35,
          "text": "raise exception 'Unsupported session field: %', v_key using errcode = '22023';"
        },
        {
          "line": 38,
          "text": "raise exception 'Session payload contract_version must be 5' using errcode = '22023';"
        },
        {
          "line": 42,
          "text": "raise exception 'Session status must be planned, completed or program' using errcode = '22023';"
        },
        {
          "line": 47,
          "text": "raise exception 'A program has no date' using errcode = '22023';"
        },
        {
          "line": 51,
          "text": "raise exception 'Session date must be a real ISO calendar date' using errcode = '22023';"
        },
        {
          "line": 55,
          "text": "raise exception 'Session date must be a real ISO calendar date' using errcode = '22023';"
        },
        {
          "line": 59,
          "text": "raise exception 'session_intent must be training or rm_test' using errcode = '22023';"
        },
        {
          "line": 62,
          "text": "raise exception 'raw_payload must be an object' using errcode = '22023';"
        },
        {
          "line": 65,
          "text": "raise exception 'Create payload cannot carry a session id' using errcode = '22023';"
        },
        {
          "line": 68,
          "text": "raise exception 'Session payload requires an exercises array' using errcode = '22023';"
        },
        {
          "line": 72,
          "text": "raise exception 'A completed session carries at least one exercise (a plan may be empty)' using errcode = '22023';"
        },
        {
          "line": 79,
          "text": "raise exception 'Every exercise must be an object' using errcode = '22023';"
        },
        {
          "line": 85,
          "text": "raise exception 'Unsupported exercise field: %', v_key using errcode = '22023';"
        },
        {
          "line": 88,
          "text": "raise exception 'Create payload cannot contain existing child identities' using errcode = '22023';"
        },
        {
          "line": 93,
          "text": "raise exception 'Exercise positions must be unique positive integers' using errcode = '22023';"
        },
        {
          "line": 98,
          "text": "raise exception 'Exercise kind must be exercise or note' using errcode = '22023';"
        },
        {
          "line": 101,
          "text": "raise exception 'Every exercise requires a sets array' using errcode = '22023';"
        },
        {
          "line": 106,
          "text": "raise exception 'A note exercise carries at most one part and no sets' using errcode = '22023';"
        },
        {
          "line": 110,
          "text": "raise exception 'Every exercise part must be an object' using errcode = '22023';"
        },
        {
          "line": 116,
          "text": "raise exception 'Unsupported note part field: %', v_key using errcode = '22023';"
        },
        {
          "line": 119,
          "text": "raise exception 'Create payload cannot contain existing child identities' using errcode = '22023';"
        },
        {
          "line": 126,
          "text": "raise exception 'An exercise requires a parts array' using errcode = '22023';"
        },
        {
          "line": 130,
          "text": "raise exception 'An exercise carries at least one part' using errcode = '22023';"
        },
        {
          "line": 134,
          "text": "raise exception 'Every exercise part must be an object' using errcode = '22023';"
        },
        {
          "line": 141,
          "text": "raise exception 'Unsupported exercise part field: %', v_key using errcode = '22023';"
        },
        {
          "line": 144,
          "text": "raise exception 'Create payload cannot contain existing child identities' using errcode = '22023';"
        },
        {
          "line": 147,
          "text": "raise exception 'Every exercise part requires a canonical UUID exercise_id' using errcode = '22023';"
        },
        {
          "line": 150,
          "text": "raise exception 'recording_fields must be an array' using errcode = '22023';"
        },
        {
          "line": 153,
          "text": "raise exception 'raw_payload must be an object' using errcode = '22023';"
        },
        {
          "line": 164,
          "text": "raise exception 'Every set must be an object' using errcode = '22023';"
        },
        {
          "line": 172,
          "text": "raise exception 'Unsupported set field: %', v_key using errcode = '22023';"
        },
        {
          "line": 175,
          "text": "raise exception 'Create payload cannot contain existing child identities' using errcode = '22023';"
        },
        {
          "line": 180,
          "text": "raise exception 'Set positions must be unique positive integers within an exercise' using errcode = '22023';"
        },
        {
          "line": 184,
          "text": "raise exception 'set_type must be warmup, main, top or total' using errcode = '22023';"
        },
        {
          "line": 187,
          "text": "raise exception 'Every set carries one value object per exercise part' using errcode = '22023';"
        },
        {
          "line": 191,
          "text": "raise exception 'Every set part must be an object' using errcode = '22023';"
        },
        {
          "line": 198,
          "text": "raise exception 'Unsupported set part field: %', v_key using errcode = '22023';"
        },
        {
          "line": 201,
          "text": "raise exception 'Create payload cannot contain existing child identities' using errcode = '22023';"
        },
        {
          "line": 204,
          "text": "raise exception 'set_result must be completed or rep_failure' using errcode = '22023';"
        },
        {
          "line": 207,
          "text": "raise exception 'raw_payload must be an object' using errcode = '22023';"
        },
        {
          "line": 211,
          "text": "raise exception 'reps must be a non-negative integer' using errcode = '22023';"
        },
        {
          "line": 220,
          "text": "raise exception 'load_percent_base_exercise_id requires load_percent' using errcode = '22023';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/workout/functions/workout_mutation_commit_v1.sql",
      "name": "workout_mutation_commit_v1",
      "category": "write_read_dependency",
      "lines": 18,
      "sha256": "089ffcda129618f4b1b831e8b3155d42a67b90b1c2d4d792d998368ddefc8457",
      "schema_line": 34611,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "get_session_mutation_receipt_v2",
        "workout_mutation_receipt_record_v1"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/workout/functions/workout_set_score_preview_v1.sql",
      "name": "workout_set_score_preview_v1",
      "category": "write_read_dependency",
      "lines": 28,
      "sha256": "8144e510671f2d9718d0ac25f8e55860aaadbe732555224fd3a3d86f03dbf23d",
      "schema_line": 34699,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [
        "calculate_max_rep_observation_v2",
        "calculate_strength_observation_v2",
        "set_score_session_v2"
      ],
      "raises": [],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/workout/functions/write_session_children_v5.sql",
      "name": "write_session_children_v5",
      "category": "write_read_dependency",
      "lines": 349,
      "sha256": "df0c13f9244ba37a3fd28a4d8f57bcf50514c1f34fb7799edeeb32036f1fe7fb",
      "schema_line": 34742,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [
        "client_row_id_of_v1",
        "exercise_set",
        "exercise_set_part",
        "exercise_set_part_before_row_core_v1",
        "record_part_load_snapshot_v1",
        "resolve_session_children_v5",
        "session_exercise",
        "session_exercise_part",
        "sort_recording_fields_v1",
        "validated_entry_percent_base_v1",
        "validated_entry_synonym_id_v1"
      ],
      "raises": [
        {
          "line": 46,
          "text": "raise exception 'p_source must be barbelic, wodup or motra' using errcode = '22023';"
        },
        {
          "line": 168,
          "text": "raise exception 'exercise identity does not exist: %', v_exercise_uuid using errcode = '23503';"
        }
      ],
      "catches": [],
      "checks": []
    },
    {
      "path": "supabase/definitions/workout/tables/exercise_set_part.sql",
      "name": "exercise_set_part",
      "category": "write_read_dependency",
      "lines": 84,
      "sha256": "79f9e852065aea2c5ff8576f7c6babf3fd60b354edc79f4aaef54da0c5d9f2b9",
      "schema_line": 9756,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": [
        {
          "line": 32,
          "text": "CONSTRAINT \"exercise_set_part_position_check\" CHECK ((\"position\" > 0)),"
        },
        {
          "line": 33,
          "text": "CONSTRAINT \"exercise_set_part_set_result_check\" CHECK ((\"set_result\" = ANY (ARRAY['completed'::\"text\", 'rep_failure'::\"text\"]))),"
        },
        {
          "line": 34,
          "text": "CONSTRAINT \"exercise_set_part_set_type_check\" CHECK ((\"set_type\" = ANY (ARRAY['warmup'::\"text\", 'main'::\"text\", 'top'::\"text\", 'total'::\"text\"]))),"
        },
        {
          "line": 35,
          "text": "CONSTRAINT \"exercise_set_part_source_invariant_check\" CHECK ((\"source\" = ANY (ARRAY['barbelic'::\"text\", 'wodup'::\"text\", 'motra'::\"text\"])))"
        }
      ]
    },
    {
      "path": "supabase/definitions/workout/tables/session_write_inbox.sql",
      "name": "session_write_inbox",
      "category": "write_read_dependency",
      "lines": 47,
      "sha256": "f9cbe065f8ef3c90e3c86cd36be99bb1066c5e955b8c5afb68acb88197630e0e",
      "schema_line": 35791,
      "review_level": "inventory_and_failure_boundary_scan",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": [
        {
          "line": 21,
          "text": "CONSTRAINT \"session_write_inbox_status_check\" CHECK ((\"status\" = ANY (ARRAY['received'::\"text\", 'interpreted'::\"text\", 'held'::\"text\", 'conflict'::\"text\", 'blocked'::\"text\"])))"
        }
      ]
    },
    {
      "path": "supabase/definitions/workout/views/exercise_set_part_stats_v1.sql",
      "name": "exercise_set_part_stats_v1",
      "category": "write_read_dependency",
      "lines": 66,
      "sha256": "98fa5928f657fe4c62941e402d8b7f16e6ea1ed9496fbf3413da86cae1256eb1",
      "schema_line": 35399,
      "review_level": "manual_boundary_and_contract_review",
      "calls": [],
      "raises": [],
      "catches": [],
      "checks": []
    }
  ]
}
