From 599539d3259af298bc561049b6c50e0263ee13c5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 26 Feb 2026 16:05:43 +0000 Subject: [PATCH 1/3] Expand paths_to_mutate to cover all files in src/flameconnect Co-authored-by: deviantintegral <255023+deviantintegral@users.noreply.github.com> --- setup.cfg | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/setup.cfg b/setup.cfg index 21df9b8..41514ac 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,3 @@ [mutmut] -paths_to_mutate = - src/flameconnect/protocol.py - src/flameconnect/client.py - src/flameconnect/auth.py - src/flameconnect/b2c_login.py +paths_to_mutate = src/flameconnect also_copy = src From bddf47d94c8a569f442838ec5e754c5cff7ecd53 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 26 Feb 2026 16:30:06 +0000 Subject: [PATCH 2/3] fix: remove blanket builtins.__import__ patch from test_tui_import_error The test patched builtins.__import__ with a blanket ImportError, blocking ALL imports. This broke mutmut's stats phase which needs working imports for coverage tracking. Setting sys.modules["flameconnect.tui"] = None alone is sufficient to trigger ImportError on `from flameconnect.tui import run_tui`. Co-authored-by: deviantintegral <255023+deviantintegral@users.noreply.github.com> --- tests/test_cli_commands.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test_cli_commands.py b/tests/test_cli_commands.py index dba5ff5..24b41ed 100644 --- a/tests/test_cli_commands.py +++ b/tests/test_cli_commands.py @@ -1443,7 +1443,6 @@ async def test_tui_import_error(self, capsys): with ( patch.dict("sys.modules", {"flameconnect.tui": None}), - patch("builtins.__import__", side_effect=ImportError("no tui")), pytest.raises(SystemExit), ): await cmd_tui() From 56138a2151722043eba2279743858cb93c6cf598 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 26 Feb 2026 17:58:49 +0000 Subject: [PATCH 3/3] perf: speed up mutmut with do_not_mutate, max_stack_depth, and --max-children 4 - Exclude __init__.py, const.py, exceptions.py via do_not_mutate (re-exports, constants, and trivial class declarations don't benefit from mutation testing) - Add max_stack_depth=8 to limit test-to-mutant call stack tracing depth - Increase --max-children from 2 to 4 (GitHub Actions ubuntu-24.04 has 4 vCPUs) Co-authored-by: deviantintegral <255023+deviantintegral@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- setup.cfg | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 394e524..c6540e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,4 +26,4 @@ jobs: - name: Test run: uv run pytest --cov=flameconnect --cov-report=term-missing --tb=short - name: Mutation test - run: uv run mutmut run --max-children 2 + run: uv run mutmut run --max-children 4 diff --git a/setup.cfg b/setup.cfg index 41514ac..45d47ce 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,8 @@ [mutmut] paths_to_mutate = src/flameconnect also_copy = src +do_not_mutate = + */__init__.py + src/flameconnect/const.py + src/flameconnect/exceptions.py +max_stack_depth = 8