From 6ac2fca38489ac21beeb0f1b61b4f3331d2af9d1 Mon Sep 17 00:00:00 2001 From: Niek Otten Date: Thu, 25 Jun 2026 14:58:00 +0200 Subject: [PATCH] test(acl): add Stryker config + mutation make target recording the 95% baseline (refs #47) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Configure Stryker.NET for the ACL in solution mode (Acl.slnx), so both Acl.Application and Acl.Infrastructure — the two projects under test — are mutated while Acl.Api (untested) is skipped. Record the repo-wide mutation baseline as the ratchet (CLAUDE.md §5): observed score 95%, enforced break threshold 90% (one-mutant headroom over the ~20-mutant surface). The ACL is the first service with branching logic, so it sets the baseline; later slices ratchet it up deliberately, never down. Add a `mutation` make target (`dotnet tool restore` + `dotnet stryker`) and wire it into the `make ci` aggregate, keeping `make ci` an exact mirror of the pipeline. Refs #47. Co-Authored-By: Claude Opus 4.8 (1M context) --- Makefile | 15 ++++++++++++--- services/acl/stryker-config.json | 11 +++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 services/acl/stryker-config.json diff --git a/Makefile b/Makefile index 403475b..50a6049 100644 --- a/Makefile +++ b/Makefile @@ -43,10 +43,10 @@ export DOCKER_HOST := unix://$(PODMAN_SOCK) endif endif -.PHONY: ci lint build unit smoke up down local local-down changelog openzaak-up openzaak-smoke openzaak-seed openzaak-down stack-up stack-smoke stack-down keycloak-up keycloak-smoke keycloak-down flowable-up flowable-smoke flowable-down help +.PHONY: ci lint build unit mutation smoke up down local local-down changelog openzaak-up openzaak-smoke openzaak-seed openzaak-down stack-up stack-smoke stack-down keycloak-up keycloak-smoke keycloak-down flowable-up flowable-smoke flowable-down help -## ci: run the full pipeline — lint, build, unit, smoke (mirrors Gitea Actions) -ci: lint build unit smoke +## ci: run the full pipeline — lint, build, unit, mutation, smoke (mirrors Gitea Actions) +ci: lint build unit mutation smoke ## lint: verify formatting (no changes) lint: @@ -60,6 +60,15 @@ build: unit: dotnet test $(SLN) -c Release +## mutation: run the Stryker.NET ratchet on the ACL (fails below the recorded baseline) +# Stryker is pinned as a local dotnet tool (.config/dotnet-tools.json); `tool restore` +# makes `make mutation` work from a fresh clone. Config + break threshold (the ratchet, +# CLAUDE.md §5) live in services/acl/stryker-config.json. The ACL is the first service +# with branching logic, so it sets the repo-wide baseline; later slices ratchet it up. +mutation: + dotnet tool restore + cd services/acl && dotnet stryker + ## smoke: seed config, bring the whole stack up, wait for health-checked services, tear down # SEED populates the external config volumes first (upstream images used verbatim; # only our acl/bff are built). `up -d --build` starts EVERYTHING. Readiness is diff --git a/services/acl/stryker-config.json b/services/acl/stryker-config.json new file mode 100644 index 0000000..4321e06 --- /dev/null +++ b/services/acl/stryker-config.json @@ -0,0 +1,11 @@ +{ + "stryker-config": { + "solution": "Acl.slnx", + "reporters": ["progress", "html"], + "thresholds": { + "high": 95, + "low": 90, + "break": 90 + } + } +}