forked from SWISDATA/processintel
ui.base_algorithm: graph errors are reported as "do not change the parameters" and leave a stale graph #8
Labels
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ffrauenberger/ProcessIntel#8
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: medium (the real error is hidden, and the graph no longer matches the parameters)
Where
app/ui/base_algorithm_ui/base_algorithm_controller.py:239-260app/ui/genetic_miner_ui/genetic_miner_controller.py:182-189Problem
Every
GraphExceptionraised during mining is shown with the same warning:GraphExceptionis the base class ofDuplicateNodeException,DuplicateEdgeException,NodeDoesNotExistExceptionand others. These come from deterministic model or converter bugs (e.g. #6, #7), not from slider changes during mining. A slider change during mining can cause errors too (concurrent reruns, see #54), but for these exceptions the stated cause is usually not the real one.In addition, each miner's
generate_graphstores the new thresholds on the model before building the graph. If building fails, the model reports the new parameters but still holds the old graph. On the next rerunhave_parameters_changed()returnsFalse, so the app does not retry and keeps showing a graph that does not match the sliders.Steps to reproduce
Start(triggers #7)Expected behavior
The actual error is shown (and logged with its type). After a failure, the displayed graph is either cleared or the app retries on the next rerun.
Actual behavior
The misleading warning "Do not change the parameters while mining" is shown. The old graph stays on screen and silently disagrees with the selected parameters until the user moves a slider again.
Fix
self.graph = None/ set a "dirty" flag on failure so the next rerun retries.from
issues/BUG-008-graph-exception-handling-hides-errors-and-leaves-stale-graph.md(code analysis of commit6bcc646, 2026-10-03)Reviewed by Codex (GPT-6) against origin/main
6bcc646eb464.Review: partially correct.
The warning and inconsistent parameter/graph state are real. Please qualify “still holds the old graph”: the fuzzy converter assigns
miner.graph = graphbefore adding nodes and edges (dfg_converter.py:120–135), so failures there can leave a partially built replacement graph rather than the old one. Also, both cited GraphException handlers already calllogger.exception(ex), preserving the exception and traceback in logs; the missing information is primarily in the user-facing warning. Treat the fix as publishing a complete graph atomically, or clearing/marking the model dirty on failure.Code references: app/ui/base_algorithm_ui/base_algorithm_controller.py:253, app/converters/dfg_converter.py:120.