Skip to content

Document mutation-testing workflow contract tests - #192

Draft
leynos wants to merge 1 commit into
mainfrom
docs/mutation-contract-tests
Draft

Document mutation-testing workflow contract tests#192
leynos wants to merge 1 commit into
mainfrom
docs/mutation-contract-tests

Conversation

@leynos

@leynos leynos commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds a new ## Mutation-testing workflow contract tests section to
    docs/developers-guide.md, placed after the
    existing "Workflow pins and Dependabot" section and before
    "Property-based testing".

  • Documents the thin caller
    .github/workflows/mutation-testing.yml,
    which delegates to leynos/shared-actions/.github/workflows/mutation-mutmut.yml
    (Permutation C: Python/mutmut), the paths and module-prefix-strip
    inputs it actually sets, and the [tool.mutmut] configuration in
    pyproject.toml.

  • Documents the contract test
    tests/workflow_contracts/test_mutation_testing.py:
    it is shape-only (a USES_RE regex asserting a full 40-hex commit SHA,
    not a hard-coded value, so Dependabot bumps freely), it self-skips via
    pytestmark = pytest.mark.skipif(...) when the workflow file is absent
    (mutmut's sandbox omits .github/), and it validates the uses: pin, the
    with: block, job/workflow permissions, concurrency, and triggers.

  • Documents the local run command, verified to pass:

    uv run pytest tests/workflow_contracts/test_mutation_testing.py -v

    (6 passed). There is no make test-workflow-contracts target in this
    repository's Makefile, so the direct pytest invocation is documented
    instead.

Roadmap / execplan note

Checked docs/roadmap.md and docs/execplans/; neither contains any
mutation-testing or contract-test tracking item, so no roadmap/execplan
tracking applies to this change.

Table of contents note

docs/developers-guide.md has no internal table of contents or section
index near the top (it opens with prose and then runs straight into
headings), so no cross-link was added there. docs/contents.md is a
whole-repository documentation index and already links to
developers-guide.md as a single entry; it does not enumerate the guide's
internal sections, so it was left unchanged.

Docs-lint result

Ran make markdownlint (the repository's Markdown lint + spelling gate,
which chains spelling then markdownlint-cli2). It initially caught two
en-GB-oxendict -ise/-ize violations introduced by the new section
(summarising -> summarizing, serialises -> serializes); both were
fixed and the gate now passes cleanly (0 errors). The Rust/Python test
suites were intentionally not run, per the docs-only scope of this change.

Files changed

Add a section to the developer guide explaining the mutation-testing
caller workflow and the contract test that pins its shape, so
contributors know what the test asserts and how to run it locally.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @leynos, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: d01e8dbb-721a-4cc9-9f5d-9e230ad678b8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/mutation-contract-tests

Comment @coderabbitai help to get the list of available commands.

codescene-access[bot]

This comment was marked as outdated.

@codescene-access codescene-access Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No quality gates enabled for this code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant