Skip to content

Commit f12c793

Browse files
committed
fix: rebuild all comparison runs after decision so duplicates get cached result
1 parent 3bb2440 commit f12c793

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

align_app/app/runs_state_adapter.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,6 @@ def _remove_run_from_comparison(self, run_id: str):
8282
if run_id in self.state.runs:
8383
self.state.runs = {k: v for k, v in self.state.runs.items() if k != run_id}
8484

85-
def _update_run_in_comparison(self, run: Run):
86-
"""Update single run in state.runs if it's in comparison."""
87-
if run.id in self.state.runs_to_compare:
88-
run_dict = runs_presentation.run_to_state_dict(
89-
run, self.probe_registry, self.decider_registry
90-
)
91-
self.state.runs = {**self.state.runs, run.id: run_dict}
92-
9385
def _rebuild_comparison_runs(self):
9486
"""Rebuild state.runs from runs_to_compare (for imports/registry changes)."""
9587
new_runs = {}
@@ -640,9 +632,7 @@ async def _execute_run_decision(self, run_id: str):
640632
self._alerts.create_info_alert(title=f"Decision failed: {e}", timeout=5000)
641633

642634
with self.state:
643-
run = self.runs_registry.get_run(run_id)
644-
if run:
645-
self._update_run_in_comparison(run)
635+
self._rebuild_comparison_runs()
646636
self._update_table_rows()
647637
self._remove_pending_cache_key(cache_key)
648638

0 commit comments

Comments
 (0)