graphs: activities named Start, End or tau collide with reserved node IDs #7

Open
opened 2026-10-06 13:45:30 +00:00 by ffrauenberger · 1 comment
Owner

Severity: critical (logs with activities called Start or End cannot be mined)

Where

  • app/graphs/visualization/base_graph.py:345-363
  • app/converters/dfg_converter.py:45-62
  • app/converters/petri_net_converter.py
  • app/graphs/visualization/bpmn_graph.py:114-128, :268-321
  • app/mining_algorithms/inductive_mining.py:176-179, :246-250

Problem

Graph node IDs are the activity names themselves, and the code reserves several IDs in the same namespace:

Reserved ID Where
Start, End every graph (add_start_node / add_end_node)
tau process-tree leaf meaning "silent" (Inductive/IMf, BPMN/Petri converters)
p_start, p_end, pi_<act>…, po_<act>…, tau_<n> Petri net places and transitions
exclusive_gate_start_<n>, parallel_gate_*, silent_activity_<n> BPMN graph

Many real logs have explicit activities called Start and End.

Steps to reproduce

  1. Open the application
  2. Import a log that contains activities named Start and End (or tau)
  3. Mine a model with any algorithm

Expected behavior

The activities Start, End and tau are shown as normal activities, separate from the artificial start/end nodes and silent steps.

Actual behavior

  • Start / End: add_event("Start") or add_start_node() raises DuplicateNodeException. The controller shows "Do not change the parameters while mining" and no graph is produced.
  • tau: the activity is treated as a silent step and disappears from the model.
  • Petri net place IDs join subset members with -, so {"a-b"} and {"a","b"} get the same ID and are merged.

Related: #51 (root cause).

Fix

Separate internal IDs from display labels: use generated IDs (n0, n1, …) or a reserved, escaped prefix (__start__), and keep the activity name only in the label and node data. See #51.


from issues/BUG-007-reserved-node-ids-collide-with-activity-names.md (code analysis of commit 6bcc646, 2026-10-03)

**Severity:** critical (logs with activities called Start or End cannot be mined) ## Where - `app/graphs/visualization/base_graph.py:345-363` - `app/converters/dfg_converter.py:45-62` - `app/converters/petri_net_converter.py` - `app/graphs/visualization/bpmn_graph.py:114-128`, `:268-321` - `app/mining_algorithms/inductive_mining.py:176-179`, `:246-250` ## Problem Graph node IDs are the activity names themselves, and the code reserves several IDs in the same namespace: | Reserved ID | Where | |---|---| | `Start`, `End` | every graph (`add_start_node` / `add_end_node`) | | `tau` | process-tree leaf meaning "silent" (Inductive/IMf, BPMN/Petri converters) | | `p_start`, `p_end`, `pi_<act>…`, `po_<act>…`, `tau_<n>` | Petri net places and transitions | | `exclusive_gate_start_<n>`, `parallel_gate_*`, `silent_activity_<n>` | BPMN graph | Many real logs have explicit activities called `Start` and `End`. ### Steps to reproduce 1. Open the application 2. Import a log that contains activities named `Start` and `End` (or `tau`) 3. Mine a model with any algorithm ### Expected behavior The activities `Start`, `End` and `tau` are shown as normal activities, separate from the artificial start/end nodes and silent steps. ### Actual behavior - `Start` / `End`: `add_event("Start")` or `add_start_node()` raises `DuplicateNodeException`. The controller shows *"Do not change the parameters while mining"* and no graph is produced. - `tau`: the activity is treated as a silent step and disappears from the model. - Petri net place IDs join subset members with `-`, so `{"a-b"}` and `{"a","b"}` get the same ID and are merged. Related: #51 (root cause). ## Fix Separate internal IDs from display labels: use generated IDs (`n0`, `n1`, …) or a reserved, escaped prefix (`__start__`), and keep the activity name only in the label and node data. See #51. --- from `issues/BUG-007-reserved-node-ids-collide-with-activity-names.md` (code analysis of commit 6bcc646, 2026-10-03)
Author
Owner

Reviewed by Codex (GPT-6) against origin/main 6bcc646eb464.

Review: partially correct.

Start/End collisions and the inductive tau sentinel collision are supported. Two details need correction. First, tau is treated as silent by the Inductive/IMf process-tree paths, not by every miner. Second, joining {a-b} and {a,b} does not by itself merge their genetic places: IDs include the activity and subset index, e.g. pi_<act>_<idx>_<members> and po_<act>_<idx>_<members> (lines 379/428). Different subsets of one activity have different indexes. The broader shared-ID namespace risk remains, but this exact example does not establish it. A replacement prefix must also be made disjoint from accepted activity IDs; simply choosing another user-enterable string moves the collision.

Code references: app/converters/petri_net_converter.py:379, app/converters/petri_net_converter.py:428, app/converters/petri_net_converter.py:91.

Reviewed by **Codex (GPT-6)** against origin/main [`6bcc646eb464`](https://code.swisdata.eu/ffrauenberger/ProcessIntel/commit/6bcc646eb464e0dd897228b5e49867f65d7255c4). **Review: partially correct.** Start/End collisions and the inductive `tau` sentinel collision are supported. Two details need correction. First, `tau` is treated as silent by the Inductive/IMf process-tree paths, not by every miner. Second, joining `{a-b}` and `{a,b}` does not by itself merge their genetic places: IDs include the activity and subset **index**, e.g. `pi_<act>_<idx>_<members>` and `po_<act>_<idx>_<members>` (lines 379/428). Different subsets of one activity have different indexes. The broader shared-ID namespace risk remains, but this exact example does not establish it. A replacement prefix must also be made disjoint from accepted activity IDs; simply choosing another user-enterable string moves the collision. Code references: [app/converters/petri_net_converter.py:379](https://code.swisdata.eu/ffrauenberger/ProcessIntel/src/commit/6bcc646eb464e0dd897228b5e49867f65d7255c4/app/converters/petri_net_converter.py#L379), [app/converters/petri_net_converter.py:428](https://code.swisdata.eu/ffrauenberger/ProcessIntel/src/commit/6bcc646eb464e0dd897228b5e49867f65d7255c4/app/converters/petri_net_converter.py#L428), [app/converters/petri_net_converter.py:91](https://code.swisdata.eu/ffrauenberger/ProcessIntel/src/commit/6bcc646eb464e0dd897228b5e49867f65d7255c4/app/converters/petri_net_converter.py#L91).
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ffrauenberger/ProcessIntel#7
No description provided.