From 084cdf0cf38d2c47b5a546e59edc5f150b78bbf5 Mon Sep 17 00:00:00 2001 From: qnbs <155236708+qnbs@users.noreply.github.com> Date: Sat, 22 Aug 2026 12:03:03 +0200 Subject: [PATCH 1/2] test(mutation): bind services commands shard to direct tests --- stryker-scope.json | 5 +++++ tests/unit/tooling/strykerWorkflowPolicy.test.ts | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/stryker-scope.json b/stryker-scope.json index 3cad8c23b..7625f3dfa 100644 --- a/stryker-scope.json +++ b/stryker-scope.json @@ -8,6 +8,11 @@ "services/commands/fuzzyScore.ts", "services/commands/palettePreferences.ts", "services/commands/commandBuilder.ts" + ], + "testFiles": [ + "tests/unit/commands/fuzzyScore.test.ts", + "tests/unit/commands/palettePreferences.test.ts", + "tests/unit/services/commandBuilder.test.ts" ] }, { diff --git a/tests/unit/tooling/strykerWorkflowPolicy.test.ts b/tests/unit/tooling/strykerWorkflowPolicy.test.ts index f710c0b56..2dad4f48b 100644 --- a/tests/unit/tooling/strykerWorkflowPolicy.test.ts +++ b/tests/unit/tooling/strykerWorkflowPolicy.test.ts @@ -30,6 +30,11 @@ describe('Stryker workflow policy', () => { expect(mutationModules).toHaveLength(8); expect(new Set(mutationFiles).size).toBe(25); expect(mutationModules.every(({ riskTier }) => ['A', 'B'].includes(riskTier))).toBe(true); + expect(selectMutationModules('services-commands')[0]?.testFiles).toEqual([ + 'tests/unit/commands/fuzzyScore.test.ts', + 'tests/unit/commands/palettePreferences.test.ts', + 'tests/unit/services/commandBuilder.test.ts', + ]); expect(selectMutationModules('tier-a').every(({ riskTier }) => riskTier === 'A')).toBe(true); expect(selectMutationModules('services-commands')).toHaveLength(1); expect(selectMutationModules('copilot')[0]?.testFiles).toEqual([ From 95b57a2f138c4d1e6bd65ba953653349e354ded8 Mon Sep 17 00:00:00 2001 From: qnbs <155236708+qnbs@users.noreply.github.com> Date: Sat, 22 Aug 2026 12:13:28 +0200 Subject: [PATCH 2/2] chore(review): document services commands mutation mapping --- tests/unit/tooling/strykerWorkflowPolicy.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/unit/tooling/strykerWorkflowPolicy.test.ts b/tests/unit/tooling/strykerWorkflowPolicy.test.ts index 2dad4f48b..40ceeb407 100644 --- a/tests/unit/tooling/strykerWorkflowPolicy.test.ts +++ b/tests/unit/tooling/strykerWorkflowPolicy.test.ts @@ -30,6 +30,7 @@ describe('Stryker workflow policy', () => { expect(mutationModules).toHaveLength(8); expect(new Set(mutationFiles).size).toBe(25); expect(mutationModules.every(({ riskTier }) => ['A', 'B'].includes(riskTier))).toBe(true); + // QNBS-v3: [Validate the services-commands Stryker mapping / prevent test-scope drift / make the policy contract explicit] expect(selectMutationModules('services-commands')[0]?.testFiles).toEqual([ 'tests/unit/commands/fuzzyScore.test.ts', 'tests/unit/commands/palettePreferences.test.ts',