Skip to content

document-cli is at 58% mutation score with 2622 mutants still alive, mostly unrendered TUI screens #1300

Description

@Mearman

document-cli's mutation score is 58.02% (6246 valid mutants, 3624 detected), measured by a cold full-scope Stryker run on the branch behind #1268. That PR took the package from its 33.33% baseline and raised the break threshold from 32 to 57, but it does not get to 100% and there is a lot left.

2622 mutants are still alive: 1454 with no coverage at all, 1168 survived under tests that do cover them. The no-coverage half is the bigger and easier chunk, because it is mostly whole TUI screen components that no test ever renders. Two of them have literally no test touching them:

  • src/tui/screens/file-picker.tsx, 105 mutants, all no-coverage
  • src/tui/screens/editors/odg/shape-or-vector-detail.tsx, 103 mutants, all no-coverage

The rest of the worst offenders, as alive/no-coverage/survived:

  • src/tui/screens/editors/pdf/item-detail.tsx 243/191/52
  • src/tui/screens/editors/ods/spreadsheet-grid.tsx 172/65/107
  • src/tui/screens/editors/docx/paragraph-detail.tsx 166/86/80
  • src/tui/screens/shared/paragraph-family.tsx 158/42/116
  • src/tui/screens/editors/odg/page-detail.tsx 154/136/18
  • src/tui/screens/editors/pdf/page-items.tsx 154/121/33
  • src/tui/app.tsx 118/92/26
  • src/commands/odb.ts 107/36/71
  • src/tui/screens/editors/pptx/slide-detail.tsx 106/75/31

57 files carry at least one no-coverage mutant, so this is breadth rather than a handful of awkward cases.

Worth knowing before picking this up: a cold local run of this package takes about 3.5 hours (207 minutes on an M-series laptop), because stryker.config.ts pins concurrency to 1 to stop the Ink tests contending with each other and flapping between survived and timeout. Scope local runs with --mutate to the files you are working on and let the CI workflow do full confirmation. The break threshold should be re-derived and raised every time a batch lands, using the rule on PackageStrykerOptions.breakThreshold in stryker.shared.ts, rather than being left at 57.

There are no // Stryker disable comments anywhere in this package and there should not be any: the established method in this repo is to restructure the code so an equivalent mutant does not exist, not to suppress it.

Activity

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

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions