@@ -96,7 +96,6 @@ def _profile_row(
9696
9797def _profiling_run (
9898 id_ = None ,
99- job_execution_id = None ,
10099 table_groups_id = None ,
101100 status = "Complete" ,
102101 profiling_starttime = None ,
@@ -105,7 +104,6 @@ def _profiling_run(
105104):
106105 run = MagicMock ()
107106 run .id = id_ or uuid4 ()
108- run .job_execution_id = job_execution_id or uuid4 ()
109107 run .table_groups_id = table_groups_id or uuid4 ()
110108 run .status = status
111109 run .profiling_starttime = profiling_starttime or datetime (2026 , 5 , 10 , 12 , 0 )
@@ -283,7 +281,7 @@ def test_compare_profiling_runs_auto_baseline(
283281 mock_iss_type .select_where .return_value = []
284282
285283 with _patch_session ([_je (), _je ()]):
286- result = compare_profiling_runs (str (target_run .job_execution_id ))
284+ result = compare_profiling_runs (str (target_run .id ))
287285
288286 assert "Profiling Run Comparison" in result
289287 assert "Target" in result and "Baseline" in result
@@ -298,7 +296,7 @@ def test_compare_profiling_runs_rejects_non_completed_target(mock_resolve, db_se
298296
299297 with _patch_session ([_je (status = JobStatus .RUNNING )]):
300298 with pytest .raises (MCPUserError , match = "Target run is in `Running` state" ):
301- compare_profiling_runs (str (target_run .job_execution_id ))
299+ compare_profiling_runs (str (target_run .id ))
302300
303301
304302@patch ("testgen.mcp.tools.profile_history.resolve_profiling_run" )
@@ -308,7 +306,7 @@ def test_compare_profiling_runs_rejects_canceled_target(mock_resolve, db_session
308306
309307 with _patch_session ([_je (status = JobStatus .CANCELED )]):
310308 with pytest .raises (MCPUserError , match = "`Canceled`" ):
311- compare_profiling_runs (str (target_run .job_execution_id ))
309+ compare_profiling_runs (str (target_run .id ))
312310
313311
314312@patch ("testgen.mcp.tools.profile_history.resolve_profiling_run" )
@@ -320,8 +318,8 @@ def test_compare_profiling_runs_rejects_cross_table_group(mock_resolve, db_sessi
320318 with _patch_session ([_je ()]):
321319 with pytest .raises (MCPUserError , match = "same table group" ):
322320 compare_profiling_runs (
323- str (target_run .job_execution_id ),
324- str (baseline_run .job_execution_id ),
321+ str (target_run .id ),
322+ str (baseline_run .id ),
325323 )
326324
327325
@@ -338,7 +336,7 @@ def test_compare_profiling_runs_auto_baseline_first_run(mock_resolve, db_session
338336
339337 with _patch_session ([_je ()]):
340338 with pytest .raises (MCPUserError , match = "no earlier completed profiling run" ):
341- compare_profiling_runs (str (target_run .job_execution_id ))
339+ compare_profiling_runs (str (target_run .id ))
342340
343341
344342@patch ("testgen.mcp.tools.profile_history.HygieneIssue" )
@@ -361,7 +359,7 @@ def test_compare_profiling_runs_identical_runs_renders_no_changes(
361359 mock_iss_type .select_where .return_value = []
362360
363361 with _patch_session ([_je (), _je ()]):
364- result = compare_profiling_runs (str (target_run .job_execution_id ))
362+ result = compare_profiling_runs (str (target_run .id ))
365363
366364 assert "No changes between target and baseline" in result
367365
0 commit comments