Skip to content

ci(core): nightly mutation testing for the wallet module - #356

Merged
zaxovaiko merged 4 commits into
devfrom
chore/mutation-testing
Oct 27, 2026
Merged

zaxovaiko merged 4 commits into
devfrom
chore/mutation-testing

Conversation

@zaxovaiko

@zaxovaiko zaxovaiko commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Adds StrykerJS to packages/core, scoped to src/wallet, run against the unit and integration tiers together (vitest.mutation.config.ts): pnpm --filter @openora/core test:mutation.
  • New Mutation workflow runs it nightly on dev (and on demand). Incremental: the cached result means only mutants in changed code or tests are re-tested. Uploads the HTML report as an artifact. A report, not a gate.
  • real-infra.ts keys the Redis partition on STRYKER_MUTATOR_WORKER too, and OPENORA_TEST_POOL_SIZE caps vitest workers, so parallel Stryker runners don't share a Redis db. Both default to today's behaviour outside Stryker.

Numbers (local, 12 cores)

  • 5309 mutants in wallet. Integration tier: 96 min full run, 358 killed, 44 survived, 562 not covered. 89% of covered mutants killed.
  • Unit tier alone: 74% of covered, most wallet code not reached. Both tiers now run in one config, so a mutant only a unit test catches still counts as killed.
  • Incremental re-run with no change: about 1 min.
  • wallet.service.ts is mostly uncovered by either tier. Surviving examples: the webhook signature length check, the deposit-disabled branch, the daily withdrawal cap window and the rate-limit windows.

Notes

  • ProfileService.recordTimezone int test can fail on a same-millisecond timestamp compare. If it flakes in the dry run the nightly run aborts; a separate fix.
  • A per-PR run on changed lines only looks affordable (about 5-7 min per 100 testable mutants) but isn't measured yet.

@zaxovaiko
zaxovaiko added this pull request to stack #358 October 26, 2026 20:39
Comment thread packages/core/vitest.mutation.config.ts Resolved
@zaxovaiko
zaxovaiko added this pull request to the merge queue Oct 27, 2026
Merged via the queue into dev with commit 77bc59e Oct 27, 2026
7 checks passed
@zaxovaiko
zaxovaiko deleted the chore/mutation-testing branch October 27, 2026 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants