forked from SWISDATA/processintel
logs.splits: inductive sequence and loop splits misbehave on traces that do not fit the cut #29
Labels
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ffrauenberger/ProcessIntel#29
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: low (plausible: found by reading the code, not reproduced)
Where
app/logs/splits.py:91-96,:139,:150-168app/graphs/cuts.py:79-92Problem
Found by code review; not reproduced yet.
sequence_splitwalks the partitions withnext(partition_iter). If an event belongs to an earlier partition than the current one, the iterator runs out and raisesStopIteration, which is not caught, so mining crashes.sequence_cutorders partitions with a selection sort over a reachability check on one representative node per partition. That check is not guaranteed to be transitive for greedily merged partitions, so a wrong order is possible.loop_splitusesfind_correct_partition, which returns index-1for unknown events. The event is then silently written into the last partition's sub-log (split_logs[-1]).Steps to reproduce
Not reproduced yet. A candidate is a log where the sequence cut merges partitions greedily so that the representative-node reachability check gives a wrong order. Property-based tests with random logs should find a concrete example.
Expected behavior
Events that do not fit the cut are skipped or handled, and mining completes.
Actual behavior (expected from the code)
StopIterationcrash insequence_split; events silently placed in the wrong sub-log inloop_split.Fix
Make the splits tolerant (skip or log foreign events, as
sequence_split_imfdoes with dynamic programming) and add property-based tests that feed random logs through cut and split.from
issues/BUG-029-sequence-and-loop-split-fail-on-inconsistent-partitions.md(code analysis of commit6bcc646, 2026-10-03)Reviewed by Codex (GPT-6) against origin/main
6bcc646eb464.Review: unproven production trigger.
Direct helper misuse reproduces both outcomes:
sequence_split({('b','a'):1}, [{'a'},{'b'}])raisesStopIteration;loop_split({('a','unknown'):1}, [{'a'},{'b'}])putsunknownin the last sub-log. That does not establish a mining failure with partitions generated from the same log.The alleged non-transitive representative ordering is unproven.
sequence_cutmerges mutually reachable and incomparable node pairs before ordering; those constraints must be considered. Exhaustively checking all 4,096 directed four-node graphs found zero cuts with a backward cross-partition edge. This bounded check is not a proof for all graphs, but the production trigger should remain inconclusive rather than presented as an expected crash. Prefer validating partition coverage/order and reporting inconsistency; silently skipping foreign events in ordinary Inductive Mining would silently discard log data and is not an established fix.Code references: app/logs/splits.py:91, app/graphs/cuts.py:49, app/mining_algorithms/inductive_mining.py:190.