Context
PR #33 (security + correctness fixes) merged with the mutation (diff) CI gate red at 46.84% (break threshold 60%). This was not caused by the PR's changes — its fixes are all tested (red-green TDD).
The cause is scripts/mutate-diff.sh: it mutates entire changed files, not just changed lines (stryker run --mutate "$MUTATE" where $MUTATE is whole file paths). Small edits to large files therefore pull all of their pre-existing untested branches into scope.
From the PR #33 run: 414 killed, 250 survived, 221 no-coverage, 511 TS-checker errors → 46.84% overall on the touched-file set. The debt is concentrated in the large query/sync files.
Task
Raise mutation coverage to ≥60% on the heavily-mutated touched files, prioritizing:
Survivors are mostly ConditionalExpression, EqualityOperator, ArithmeticOperator, and StringLiteral mutants. Focus on the behavioral conditionals/arithmetic (real bugs if flipped); many StringLiteral mutants in SQL fragments are low-value and can be excluded via Stryker directives if they dominate.
Optional: reconsider the gate shape
Consider whether mutate-diff.sh should mutate only changed line ranges (via Stryker's --since / diff integration) instead of whole changed files, so the PR gate reflects the diff's own quality rather than legacy whole-file debt.
Context
PR #33 (security + correctness fixes) merged with the
mutation (diff)CI gate red at 46.84% (break threshold 60%). This was not caused by the PR's changes — its fixes are all tested (red-green TDD).The cause is
scripts/mutate-diff.sh: it mutates entire changed files, not just changed lines (stryker run --mutate "$MUTATE"where$MUTATEis whole file paths). Small edits to large files therefore pull all of their pre-existing untested branches into scope.From the PR #33 run: 414 killed, 250 survived, 221 no-coverage, 511 TS-checker errors → 46.84% overall on the touched-file set. The debt is concentrated in the large query/sync files.
Task
Raise mutation coverage to ≥60% on the heavily-mutated touched files, prioritizing:
src/lib/plaid/sync.ts(685 lines — sync apply logic, transfer pairing)src/queries/reports.ts(621 lines — SQL report builders)src/actions/*andsrc/queries/*touched by Security hotfix + financial-correctness fixes #33Survivors are mostly
ConditionalExpression,EqualityOperator,ArithmeticOperator, andStringLiteralmutants. Focus on the behavioral conditionals/arithmetic (real bugs if flipped); manyStringLiteralmutants in SQL fragments are low-value and can be excluded via Stryker directives if they dominate.Optional: reconsider the gate shape
Consider whether
mutate-diff.shshould mutate only changed line ranges (via Stryker's--since/ diff integration) instead of whole changed files, so the PR gate reflects the diff's own quality rather than legacy whole-file debt.