:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(data-warehouse): remove the semantic enrichment feature flag (#100717)
posthog[bot]77d05955d956
diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsxindex 4c0f73fd86e8..6814458e7509 100644--- a/frontend/src/lib/constants.tsx+++ b/frontend/src/lib/constants.tsx@@ -297,7 +297,6 @@ export const FEATURE_FLAGS = {DATA_WAREHOUSE_CUSTOM_SOURCE_AI_BUILDER: 'dwh-custom-source-ai-builder', // owner: #team-warehouse-sourcesDATA_WAREHOUSE_CUSTOM_SOURCE_OAUTH2: 'dwh-custom-source-oauth2', // owner: #team-warehouse-sourcesDATA_WAREHOUSE_SCENE: 'data-warehouse-scene', // owner: #team-data-modeling- DATA_WAREHOUSE_SEMANTIC_ENRICHMENT: 'data-warehouse-semantic-enrichment', // owner: #team-warehouse-sourcesDEFAULT_EVALUATION_ENVIRONMENTS: 'default-evaluation-environments', // owner: @dmarticus #team-feature-flagsDESTINATIONS_INCIDENT_REPLAY: 'destinations-incident-replay', // owner: #team-workflowsDISCUSSIONS_SLACK_SYNC: 'discussions-slack-sync', // owner: #team-platform-featuresdiff --git a/posthog/llm/semantic_enrichment.py b/posthog/llm/semantic_enrichment.pyindex ae0eee125c77..6c9cb2441cd7 100644--- a/posthog/llm/semantic_enrichment.py+++ b/posthog/llm/semantic_enrichment.py@@ -3,8 +3,8 @@Warehouse table enrichment and data-modeling view enrichment both draft one-sentence descriptions ofdata assets so PostHog AI picks the right tables/columns and joins. The surface-specific orchestration(what to enrich, how to build the prompt, where to persist) lives with each product; the pieces shared-by both — prompt-injection hardening, the JSON completion + parsing, the feature-flag/consent gates,-telemetry, the team's business context, and the guarded annotation upsert — live here.+by both — prompt-injection hardening, the JSON completion + parsing, telemetry, the team's business+context, and the guarded annotation upsert — live here.This module deliberately has zero warehouse- or data-modeling-model dependencies: `upsert_column_annotation`takes the annotation model class and its owner fields as arguments so one code path serves both@@ -105,26 +105,6 @@ def extract_json_object(content: str) -> dict[str, Any] | None:return None-def enrichment_enabled(team: Team, flag_key: str) -> bool:- try:- return bool(- posthoganalytics.feature_enabled(- flag_key,- str(team.uuid),- groups={"organization": str(team.organization_id), "project": str(team.id)},- group_properties={- "organization": {"id": str(team.organization_id)},- "project": {"id": str(team.id)},- },- only_evaluate_locally=False,- send_feature_flag_events=False,- )- )- except Exception as e:- capture_exception(e)- return False--def capture_enrichment_event(team: Team, event: str, properties: dict[str, Any]) -> None:"""Best-effort product-analytics capture, attributed to the team's org/project groups.diff --git a/products/data_warehouse/frontend/scenes/SchemaScene/ConfigurationTab.tsx b/products/data_warehouse/frontend/scenes/SchemaScene/ConfigurationTab.tsxindex 50e348449ed4..d62452e1c72b 100644--- a/products/data_warehouse/frontend/scenes/SchemaScene/ConfigurationTab.tsx+++ b/products/data_warehouse/frontend/scenes/SchemaScene/ConfigurationTab.tsx@@ -18,9 +18,7 @@ import {import api from 'lib/api'import { TZLabel } from 'lib/components/TZLabel'-import { FEATURE_FLAGS } from 'lib/constants'import { dayjs } from 'lib/dayjs'-import { featureFlagLogic } from 'lib/logic/featureFlagLogic'import { newInternalTab } from 'lib/utils/newInternalTab'import { teamLogic } from 'scenes/teamLogic'import { urls } from 'scenes/urls'@@ -100,7 +98,6 @@ export function ConfigurationTab({const { isProjectTime, refreshingSchemas, resyncingSchema, supportsRowFilters } = useValues(logic)const { setIsProjectTime, updateSchema, reloadSchema, resyncSchema, cancelSchema, deleteTable, refreshSchemas } =useActions(logic)- const { featureFlags } = useValues(featureFlagLogic)switch (section) {case 'details':@@ -145,12 +142,7 @@ export function ConfigurationTab({/>)case 'descriptions':- // Deep-link guard: the section nav already hides this when the flag is off.- return featureFlags[FEATURE_FLAGS.DATA_WAREHOUSE_SEMANTIC_ENRICHMENT] ? (- <DescriptionsSection schema={schema} />- ) : (- <></>- )+ return <DescriptionsSection schema={schema} />case 'danger-zone':return (<DangerZoneSectiondiff --git a/products/data_warehouse/frontend/scenes/SchemaScene/SchemaScene.tsx b/products/data_warehouse/frontend/scenes/SchemaScene/SchemaScene.tsxindex 62f49087a6cd..aa15214f4595 100644--- a/products/data_warehouse/frontend/scenes/SchemaScene/SchemaScene.tsx+++ b/products/data_warehouse/frontend/scenes/SchemaScene/SchemaScene.tsx@@ -68,7 +68,6 @@ function SchemaSceneContent({ sourceId, schemaId }: SchemaSceneProps): JSX.Elemeconst cleanedSourceId = cleanSourceId(sourceId)const showSyncs = shouldShowManagedSourceSyncsTab(source)const showMetrics = shouldShowManagedSourceMetricsTab(source, !!featureFlags[FEATURE_FLAGS.DWH_SOURCE_METRICS])- const showDescriptions = !!featureFlags[FEATURE_FLAGS.DATA_WAREHOUSE_SEMANTIC_ENRICHMENT]// The warehouse table only exists once the schema has synced, and checks hang off that table.const showDataQuality = !!featureFlags[FEATURE_FLAGS.DATA_QUALITY_CHECKS] && !!schema?.table?.idconst showColumnsSection = supportsColumnSelection@@ -76,10 +75,7 @@ function SchemaSceneContent({ sourceId, schemaId }: SchemaSceneProps): JSX.Eleme// the sync ignores, because a run only snapshots destinations when the flag is on.const showDestinations = !!featureFlags[FEATURE_FLAGS.WAREHOUSE_MULTI_DESTINATION]const visibleSections = SCHEMA_CONFIGURATION_SECTIONS.filter(- (key) =>- (key !== 'columns' || showColumnsSection) &&- (key !== 'descriptions' || showDescriptions) &&- (key !== 'destinations' || showDestinations)+ (key) => (key !== 'columns' || showColumnsSection) && (key !== 'destinations' || showDestinations))useEffect(() => {@@ -110,12 +106,6 @@ function SchemaSceneContent({ sourceId, schemaId }: SchemaSceneProps): JSX.Eleme}}, [showColumnsSection, currentSection, setCurrentSection])- useEffect(() => {- if (!showDescriptions && currentSection === 'descriptions') {- setCurrentSection('details')- }- }, [showDescriptions, currentSection, setCurrentSection])-if (schemaDataLoading && !schema) {return (<SceneContent>diff --git a/products/warehouse_sources/backend/temporal/data_imports/external_data_job.py b/products/warehouse_sources/backend/temporal/data_imports/external_data_job.pyindex 4bb635a4cc4d..5390e83a1126 100644--- a/products/warehouse_sources/backend/temporal/data_imports/external_data_job.py+++ b/products/warehouse_sources/backend/temporal/data_imports/external_data_job.py@@ -1047,7 +1047,7 @@ class ExternalDataJobWorkflow(PostHogWorkflow):)# Generate semantic descriptions for the synced table. Gated up front on actual need- # (feature flag + AI consent AND unannotated columns / missing table description, resolved in+ # (AI consent AND unannotated columns / missing table description, resolved in# create_external_data_job_model_activity) so a steady-state sync — which re-fires every few# minutes — doesn't spawn a child that immediately no-ops; the activity re-checks as a safety# net and is idempotent. Keyed per schema so only one runs per schema at a time: a concurrentdiff --git a/products/warehouse_sources/backend/temporal/data_imports/post_import_job.py b/products/warehouse_sources/backend/temporal/data_imports/post_import_job.pyindex 8afee8f6e6cd..32dce8bb7bce 100644--- a/products/warehouse_sources/backend/temporal/data_imports/post_import_job.py+++ b/products/warehouse_sources/backend/temporal/data_imports/post_import_job.py@@ -61,7 +61,6 @@ from products.warehouse_sources.backend.temporal.data_imports.workflow_activitiefrom products.warehouse_sources.backend.temporal.data_imports.workflow_activities.enrich_table_semantics import (EnrichTableSemanticsInputs,EnrichTableSemanticsWorkflow,- enrichment_enabled,)LOGGER = get_logger(__name__)@@ -151,12 +150,7 @@ def _enrichment_gate(gate: PostImportGateContext) -> bool:# Same gates create_external_data_job_model_activity applies for V2, but evaluated# post-register: columns this sync added are already visible, so enrichment picks# them up now instead of on the next sync. Both children re-check and are idempotent.- return bool(- gate.ai_data_processing_approved- and gate.team is not None- and enrichment_enabled(gate.team)- and _enrichment_pending(gate.team_id, gate.schema.table, gate.schema)- )+ return gate.ai_data_processing_approved and _enrichment_pending(gate.team_id, gate.schema.table, gate.schema)def _statistics_gate(gate: PostImportGateContext) -> bool:diff --git a/products/warehouse_sources/backend/temporal/data_imports/tests/e2e/test_external_data_job.py b/products/warehouse_sources/backend/temporal/data_imports/tests/e2e/test_external_data_job.pyindex ebea652c3758..ffebbfccc2db 100644--- a/products/warehouse_sources/backend/temporal/data_imports/tests/e2e/test_external_data_job.py+++ b/products/warehouse_sources/backend/temporal/data_imports/tests/e2e/test_external_data_job.py@@ -268,18 +268,15 @@ def test_create_external_job_activity_emit_signals_respects_ai_consent(@pytest.mark.parametrize(- "flag_enabled,ai_consent,expected",+ "ai_consent,expected",[- (True, True, True), # flag on + AI consent → enrichment runs- (True, False, False), # AI opt-out blocks it even with the flag on- (True, None, False), # unset consent is not consent- (False, True, False), # flag off blocks it even with consent+ (True, True), # AI consent → enrichment runs+ (False, False), # AI opt-out blocks it+ (None, False), # unset consent is not consent],)@pytest.mark.django_db(transaction=True)-def test_create_external_job_activity_enrichment_enabled_gates_on_flag_and_consent(- activity_environment, team, flag_enabled, ai_consent, expected-):+def test_create_external_job_activity_enrichment_gates_on_consent(activity_environment, team, ai_consent, expected):organization = team.organizationorganization.is_ai_data_processing_approved = ai_consentorganization.save()@@ -295,12 +292,8 @@ def test_create_external_job_activity_enrichment_enabled_gates_on_flag_and_conseinputs = CreateExternalDataJobModelActivityInputs(team_id=team.id, source_id=new_source.pk, schema_id=schema.id, billable=True)- with mock.patch(- "products.warehouse_sources.backend.temporal.data_imports.workflow_activities.enrich_table_semantics.enrichment_enabled",- return_value=flag_enabled,- ):- result = activity_environment.run(create_external_data_job_model_activity, inputs)- assert result.enrichment_enabled is expected+ result = activity_environment.run(create_external_data_job_model_activity, inputs)+ assert result.enrichment_needed is expected@pytest.mark.django_db(transaction=True)diff --git a/products/warehouse_sources/backend/temporal/data_imports/workflow_activities/create_job_model.py b/products/warehouse_sources/backend/temporal/data_imports/workflow_activities/create_job_model.pyindex 4575d4972d66..972b8ec62c7c 100644--- a/products/warehouse_sources/backend/temporal/data_imports/workflow_activities/create_job_model.py+++ b/products/warehouse_sources/backend/temporal/data_imports/workflow_activities/create_job_model.py@@ -267,7 +267,8 @@ class CreateExternalDataJobModelActivityOutputs:# ISO timestamp of when the previous sync completed, used to detect new recordslast_synced_at: str | None = Noneemit_signals_enabled: bool = False- # True when semantic enrichment is permitted (feature flag on AND AI data processing approved).+ # True when semantic enrichment is permitted (AI data processing approved). Kept on the payload for+ # in-flight workflows; the workflow branches on enrichment_needed.enrichment_enabled: bool = False# True when column-statistics profiling is permitted (feature flag on). No AI-data-processing consent# term: it reads only the Delta log and writes to our own DB — nothing leaves our infra.@@ -355,15 +356,6 @@ def create_external_data_job_model_activity(inputs.team_id, source.source_type, schema.name, ai_data_processing_approved)- # Semantic enrichment runs only when its flag is on AND AI data processing is approved — let the- # workflow skip the child entirely rather than spawn one that immediately no-ops.- # Lazy import: enrich_table_semantics is a workflow module; keep it off this activity's import path.- from products.warehouse_sources.backend.temporal.data_imports.workflow_activities.enrich_table_semantics import ( # noqa: PLC0415- enrichment_enabled,- )-- enrichment_should_run = bool(ai_data_processing_approved and team is not None and enrichment_enabled(team))-# Column-statistics profiling is gated on its feature flag only (no consent term) — let the# workflow skip the child rather than spawn a no-op. Lazy import keeps deltalake off this path.from products.warehouse_sources.backend.temporal.data_imports.workflow_activities.compute_table_statistics import ( # noqa: PLC0415@@ -375,7 +367,7 @@ def create_external_data_job_model_activity(# Narrow "permitted" down to "permitted AND has work to do" so steady-state syncs don't spawn# no-op metadata workflows. The activities re-check this themselves as a safety net.table = schema.table- enrichment_needed = enrichment_should_run and _enrichment_pending(inputs.team_id, table, schema)+ enrichment_needed = ai_data_processing_approved and _enrichment_pending(inputs.team_id, table, schema)statistics_needed = statistics_should_run and _statistics_stale(inputs.team_id, table)# Whether this schema feeds any enabled person-target Customer analytics source (owned by@@ -396,7 +388,7 @@ def create_external_data_job_model_activity(schema_name=schema.name,last_synced_at=schema.last_synced_at.isoformat() if schema.last_synced_at else None,emit_signals_enabled=emit_signals_enabled,- enrichment_enabled=enrichment_should_run,+ enrichment_enabled=ai_data_processing_approved,statistics_enabled=statistics_should_run,enrichment_needed=enrichment_needed,statistics_needed=statistics_needed,diff --git a/products/warehouse_sources/backend/temporal/data_imports/workflow_activities/enrich_table_semantics.py b/products/warehouse_sources/backend/temporal/data_imports/workflow_activities/enrich_table_semantics.pyindex 04dc5bd799f6..0c9d855618d2 100644--- a/products/warehouse_sources/backend/temporal/data_imports/workflow_activities/enrich_table_semantics.py+++ b/products/warehouse_sources/backend/temporal/data_imports/workflow_activities/enrich_table_semantics.py@@ -37,7 +37,6 @@ from posthog.llm.semantic_enrichment import (build_enrichment_client,capture_enrichment_event,collapse_untrusted,- enrichment_enabled as _shared_enrichment_enabled,extract_json_object,generate_json_completion,get_team_business_context,@@ -62,7 +61,6 @@ from products.warehouse_sources.backend.temporal.data_imports.sources.common.can# global structlog config still merges workflow_id/run_id/attempt/task_queue onto every line.logger = get_write_only_logger(__name__)-ENRICHMENT_FEATURE_FLAG = "data-warehouse-semantic-enrichment"# The bounding constants and the enrichment model now live in the shared core; re-exported here so# importers (and the existing test suite) keep resolving them off this module.ENRICHMENT_MODEL = DEFAULT_ENRICHMENT_MODEL@@ -88,10 +86,6 @@ class EnrichTableSemanticsInputs:return {"team_id": self.team_id, "schema_id": str(self.schema_id)}-def enrichment_enabled(team: Team) -> bool:- return _shared_enrichment_enabled(team, ENRICHMENT_FEATURE_FLAG)--def build_enrichment_prompt(*,source_name: str,@@ -311,12 +305,8 @@ def enrich_table_semantics_sync(team_id: int, schema_id: uuid.UUID) -> dict[str,def emit_completed(status: str, **props: Any) -> None:capture_enrichment_event(team, EVENT_COMPLETED, {"status": status, **event_props, **props})- if not enrichment_enabled(team):- log.info("warehouse_enrichment.skipped", reason="flag_disabled")- emit_completed("skipped", reason="flag_disabled")- return {"status": "skipped", "reason": "flag_disabled"}# Respect the org's AI data-processing opt-out: this path ships table/column metadata and core- # memory to the LLM gateway, so the feature flag alone is not enough of a gate.+ # memory to the LLM gateway.if team.organization.is_ai_data_processing_approved is not True:log.info("warehouse_enrichment.skipped", reason="ai_data_processing_not_approved")emit_completed("skipped", reason="ai_data_processing_not_approved")diff --git a/products/warehouse_sources/backend/temporal/data_imports/workflow_activities/tests/test_enrich_table_semantics.py b/products/warehouse_sources/backend/temporal/data_imports/workflow_activities/tests/test_enrich_table_semantics.pyindex 77a930822b44..d2854c0423cc 100644--- a/products/warehouse_sources/backend/temporal/data_imports/workflow_activities/tests/test_enrich_table_semantics.py+++ b/products/warehouse_sources/backend/temporal/data_imports/workflow_activities/tests/test_enrich_table_semantics.py@@ -475,24 +475,12 @@ class TestCanonicalDescriptionsResolver:class TestEnrichTableSemanticsSync:- def test_skipped_when_flag_disabled(self):- team = _team()- schema, table = _make_schema(team, columns=[{"name": "amount", "data_type": "Int64", "is_nullable": False}])- with patch.object(enrich, "enrichment_enabled", return_value=False):- result = enrich_table_semantics_sync(team.pk, schema.id)- assert result["status"] == "skipped"- assert result["reason"] == "flag_disabled"- assert _annotations(team, table) == {}-def test_skipped_when_ai_data_processing_not_approved(self):team = _team()team.organization.is_ai_data_processing_approved = Falseteam.organization.save()schema, table = _make_schema(team, columns=[{"name": "amount", "data_type": "Int64", "is_nullable": False}])- with (- patch.object(enrich, "enrichment_enabled", return_value=True),- patch.object(enrich, "_generate_descriptions") as mock_llm,- ):+ with patch.object(enrich, "_generate_descriptions") as mock_llm:result = enrich_table_semantics_sync(team.pk, schema.id)mock_llm.assert_not_called()assert result["status"] == "skipped"@@ -502,10 +490,7 @@ class TestEnrichTableSemanticsSync:def test_skipped_when_table_has_no_columns(self):team = _team()schema, table = _make_schema(team, columns=[])- with (- patch.object(enrich, "enrichment_enabled", return_value=True),- patch.object(enrich, "_generate_descriptions") as mock_llm,- ):+ with patch.object(enrich, "_generate_descriptions") as mock_llm:result = enrich_table_semantics_sync(team.pk, schema.id)mock_llm.assert_not_called()assert result == {"status": "skipped", "reason": "no_columns"}@@ -519,7 +504,6 @@ class TestEnrichTableSemanticsSync:)canonical = {"Charge": {"description": "A charge", "columns": {"amount": "charge amount in cents"}}}with (- patch.object(enrich, "enrichment_enabled", return_value=True),patch.object(enrich, "get_canonical_descriptions_for_source", return_value=canonical),patch.object(enrich, "_generate_descriptions") as mock_llm,):@@ -549,7 +533,6 @@ class TestEnrichTableSemanticsSync:canonical = {"Charge": {"columns": {"created": "Unix creation time.", "customer": "Customer ID."}}}generated = {"columns": {"payment_method_id": "Payment method used."}}with (- patch.object(enrich, "enrichment_enabled", return_value=True),patch.object(enrich, "get_canonical_descriptions_for_source", return_value=canonical),patch.object(enrich, "_get_business_context", return_value=""),patch.object(enrich, "_generate_descriptions", return_value=(generated, _USAGE)) as mock_llm,@@ -579,7 +562,6 @@ class TestEnrichTableSemanticsSync:canonical = {"Charge": {"columns": {"amount": "charge amount in cents"}}}generated = {"table_description": "Stripe charges", "columns": {"status": "Charge lifecycle status"}}with (- patch.object(enrich, "enrichment_enabled", return_value=True),patch.object(enrich, "get_canonical_descriptions_for_source", return_value=canonical),patch.object(enrich, "_get_business_context", return_value=""),patch.object(enrich, "_generate_descriptions", return_value=(generated, _USAGE)) as mock_llm,@@ -612,7 +594,6 @@ class TestEnrichTableSemanticsSync:)generated = {"table_description": "Subscriptions", "columns": {"id": "Subscription ID", "revenue": "MRR"}}with (- patch.object(enrich, "enrichment_enabled", return_value=True),patch.object(enrich, "get_canonical_descriptions_for_source", return_value={}),patch.object(enrich, "_get_business_context", return_value=""),patch.object(enrich, "_generate_descriptions", return_value=(generated, _USAGE)) as mock_llm,@@ -635,7 +616,6 @@ class TestEnrichTableSemanticsSync:"Charge": {"description": "A charge transaction", "columns": {"amount": "amount in cents"}},}with (- patch.object(enrich, "enrichment_enabled", return_value=True),patch.object(enrich, "get_canonical_descriptions_for_source", return_value=canonical),patch.object(enrich, "_generate_descriptions") as mock_llm,):@@ -656,7 +636,6 @@ class TestEnrichTableSemanticsSync:)generated = {"table_description": "LLM table description", "columns": {"status": "Charge status"}}with (- patch.object(enrich, "enrichment_enabled", return_value=True),patch.object(enrich, "get_canonical_descriptions_for_source", return_value={}),patch.object(enrich, "_get_business_context", return_value=""),patch.object(enrich, "_generate_descriptions", return_value=(generated, _USAGE)),@@ -683,7 +662,6 @@ class TestEnrichTableSemanticsSync:is_user_edited=True,)with (- patch.object(enrich, "enrichment_enabled", return_value=True),patch.object(enrich, "get_canonical_descriptions_for_source", return_value={}),patch.object(enrich, "_generate_descriptions") as mock_llm,):@@ -707,7 +685,6 @@ class TestEnrichTableSemanticsSync:)generated = {"table_description": "Stripe charges", "columns": {}}with (- patch.object(enrich, "enrichment_enabled", return_value=True),patch.object(enrich, "get_canonical_descriptions_for_source", return_value={}),patch.object(enrich, "_get_business_context", return_value=""),patch.object(enrich, "_generate_descriptions", return_value=(generated, _USAGE)) as mock_llm,@@ -743,7 +720,6 @@ class TestEnrichTableSemanticsSync:generated = {"columns": {"currency": "ISO currency code"}}with (- patch.object(enrich, "enrichment_enabled", return_value=True),patch.object(enrich, "get_canonical_descriptions_for_source", return_value={}),patch.object(enrich, "_get_business_context", return_value=""),patch.object(enrich, "_generate_descriptions", return_value=(generated, _USAGE)) as mock_llm,@@ -763,7 +739,6 @@ class TestEnrichTableSemanticsSync:team = _team()schema, table = _make_schema(team, columns=[{"name": "amount", "data_type": "Int64", "is_nullable": False}])with (- patch.object(enrich, "enrichment_enabled", return_value=True),patch.object(enrich, "get_canonical_descriptions_for_source", return_value={}),patch.object(enrich, "_get_business_context", return_value=""),patch.object(enrich, "_generate_descriptions", side_effect=RuntimeError("boom")),@@ -786,7 +761,6 @@ class TestEnrichTableSemanticsSync:canonical = {"Charge": {"columns": {"amount": "charge amount in cents"}}}generated = {"table_description": "Stripe charges", "columns": {"status": "Charge status"}}with (- patch.object(enrich, "enrichment_enabled", return_value=True),patch.object(enrich, "get_canonical_descriptions_for_source", return_value=canonical),patch.object(enrich, "_get_business_context", return_value=""),patch.object(enrich, "_generate_descriptions", return_value=(generated, _USAGE)),@@ -814,7 +788,6 @@ class TestEnrichTableSemanticsSync:team = _team()schema, _table = _make_schema(team, columns=[{"name": "amount", "data_type": "Int64", "is_nullable": False}])with (- patch.object(enrich, "enrichment_enabled", return_value=True),patch.object(enrich, "get_canonical_descriptions_for_source", return_value={}),patch.object(enrich, "_get_business_context", return_value=""),patch.object(enrich, "_generate_descriptions", side_effect=RuntimeError("boom")),