From 4d26983df3d7cf8968cdd6ddd7cc4d04a60d5c18 Mon Sep 17 00:00:00 2001 From: lucarlig Date: Fri, 1 May 2026 12:51:30 +0100 Subject: [PATCH 1/3] Fix mutation diff source mismatch Signed-off-by: lucarlig --- .github/workflows/ci-rust-python-package.yaml | 3 +-- tests/test_plugin_catalog.py | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-rust-python-package.yaml b/.github/workflows/ci-rust-python-package.yaml index a4f9090..7d57720 100644 --- a/.github/workflows/ci-rust-python-package.yaml +++ b/.github/workflows/ci-rust-python-package.yaml @@ -232,8 +232,7 @@ jobs: - name: Create mutation diff env: BASE_SHA: ${{ github.event.pull_request.base.sha }} - HEAD_SHA: ${{ github.event.pull_request.head.sha }} - run: git diff "${BASE_SHA}..${HEAD_SHA}" -- '*.rs' > cargo-mutants.diff + run: git diff "${BASE_SHA}" -- '*.rs' > cargo-mutants.diff - name: Run cargo-mutants with nextest env: diff --git a/tests/test_plugin_catalog.py b/tests/test_plugin_catalog.py index 8070af5..9b1a56d 100644 --- a/tests/test_plugin_catalog.py +++ b/tests/test_plugin_catalog.py @@ -2652,9 +2652,9 @@ def test_ci_workflow_includes_parity_jobs_for_rust_plugin_checks(self) -> None: self.assertIn("cargo install cargo-mutants --version 27.0.0 --locked", mutants_install_run) self.assertIn("cargo mutants --version", mutants_install_run) self.assertIn("fetch-depth: 0", mutants_section) - self.assertEqual('git diff "${BASE_SHA}..${HEAD_SHA}" -- \'*.rs\' > cargo-mutants.diff\n', mutants_diff_run) + self.assertEqual('git diff "${BASE_SHA}" -- \'*.rs\' > cargo-mutants.diff\n', mutants_diff_run) self.assertIn("BASE_SHA: ${{ github.event.pull_request.base.sha }}", mutants_section) - self.assertIn("HEAD_SHA: ${{ github.event.pull_request.head.sha }}", mutants_section) + self.assertNotIn("HEAD_SHA:", mutants_section) self.assertIn("mutation_job: ${{ fromJson(needs.validate-and-detect.outputs.mutation_jobs) }}", mutants_section) self.assertIn("CARGO_PACKAGE: ${{ matrix.mutation_job.cargo_package }}", mutants_section) self.assertIn("IN_DIFF: ${{ matrix.mutation_job.in_diff }}", mutants_section) From c7d0fccdbb4366b0137e72989ade4d7a2a6e040c Mon Sep 17 00:00:00 2001 From: lucarlig Date: Fri, 1 May 2026 13:38:47 +0100 Subject: [PATCH 2/3] Smoke mutation diff workflow Signed-off-by: lucarlig --- .../python-package/secrets_detection/src/object_model.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/rust/python-package/secrets_detection/src/object_model.rs b/plugins/rust/python-package/secrets_detection/src/object_model.rs index ac336d8..2d3b2a3 100644 --- a/plugins/rust/python-package/secrets_detection/src/object_model.rs +++ b/plugins/rust/python-package/secrets_detection/src/object_model.rs @@ -14,7 +14,7 @@ pub fn inspect_object_state<'py>( py: Python<'py>, container: &Bound<'py, PyAny>, ) -> PyResult> { - inspect_object_state_inner(py, container, true) + inspect_object_state_inner(py, container, include_model_dump_by_default()) } pub(crate) fn inspect_object_state_without_model_dump<'py>( @@ -24,6 +24,10 @@ pub(crate) fn inspect_object_state_without_model_dump<'py>( inspect_object_state_inner(py, container, false) } +fn include_model_dump_by_default() -> bool { + true +} + fn inspect_object_state_inner<'py>( py: Python<'py>, container: &Bound<'py, PyAny>, From 642be29184146682cb6c631322a0424f32c63be9 Mon Sep 17 00:00:00 2001 From: lucarlig Date: Fri, 1 May 2026 13:40:18 +0100 Subject: [PATCH 3/3] Trigger smoke workflow Signed-off-by: lucarlig