Skip to content

Kill the surviving mutants in graph-projection #65

Open

Description

@Mearman

Large parts of the fragment, chain-folding and inverse (state machine, flowchart) logic are uncovered or survive, including the inverses' rejection branches. These are the most-affected files in @exadev/process-graph-projection on main's mutation run (https://github.com/ExaDev/process-graph/actions/runs/38170535483), with a few of the lines a surviving or uncovered mutant changes; the shard log and the uploaded HTML report have the full list.

packages/core/graph/projection/src/fragments.ts (75 survived, 84 without coverage):

  • packages/core/graph/projection/src/fragments.ts:123:21 MethodExpression mutant, survived, on const branching = model.elements.filter(
  • packages/core/graph/projection/src/fragments.ts:125:7 ConditionalExpression mutant, survived, on onPath.has(element.id) &&
  • packages/core/graph/projection/src/fragments.ts:126:8 ConditionalExpression mutant, survived, on (element.kind === "decision" ||
  • packages/core/graph/projection/src/fragments.ts:127:39 ConditionalExpression mutant, survived, on (element.kind === "pseudo" && element.role === "fork")),

packages/core/graph/projection/src/chains.ts (103 survived, 37 without coverage):

  • packages/core/graph/projection/src/chains.ts:132:9 ConditionalExpression mutant, survived, on if (set.size >= enough) {
  • packages/core/graph/projection/src/chains.ts:152:7 MethodExpression mutant, survived, on (outgoing.get(id) ?? [])
  • packages/core/graph/projection/src/chains.ts:154:17 ArrowFunction mutant, survived, on .filter((target) => foldable.has(target)),
  • packages/core/graph/projection/src/chains.ts:173:31 ConditionalExpression mutant, survived, on if (from !== undefined && to === undefined && accepted(transition.target)) {

packages/core/graph/projection/src/inverse-state-machine.ts (41 survived, 36 without coverage):

  • packages/core/graph/projection/src/inverse-state-machine.ts:51:40 BlockStatement mutant, survived, on for (const state of original.states) {
  • packages/core/graph/projection/src/inverse-state-machine.ts:52:9 ConditionalExpression mutant, survived, on if (!kept.has(state.id)) {
  • packages/core/graph/projection/src/inverse-state-machine.ts:63:11 ConditionalExpression mutant, survived, on if (elements.has(state.id)) {
  • packages/core/graph/projection/src/inverse-state-machine.ts:77:11 ConditionalExpression mutant, survived, on if (state.role !== "state") {

Kill them by asserting the behaviour, not by loosening or removing any existing assertion. Raise the package's breakThreshold from the new baseline once they are killed. Found while setting the break thresholds in #60.

Activity

  1. added theissue type on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions