Skip to content

generate-coverage: document and test slipcover 1.0.18 xdist per-worker coverage merging #283

Description

@coderabbitai

Background

PR #279 introduces pytest-xdist parallelism to the generate-coverage composite action. Per-worker coverage data is merged by slipcover's built-in xdist plugin, which requires slipcover>=1.0.18. The concurrency model of that merging is not currently documented or tested within this repository.

Work required

  1. Documentation — add a section to docs/generate-coverage-design.md (or a dedicated ADR) explaining how slipcover 1.0.18's xdist plugin merges per-worker .coverage files, including the lifecycle (worker startup, mid-run accumulation, teardown merge), the behaviour under partial worker failure, and the interaction with --omit.

  2. Integration tests — add at least one integration test that actually executes pytest-xdist (with -n 2 or -n auto) against a minimal Python project fixture and asserts that the merged coverage output is correct (i.e. coverage from all workers is present in the final report).

  3. Failure-mode coverage — clarify and, where feasible, test the behaviour when a worker process crashes mid-run: does slipcover emit a partial result, a zero-coverage result, or an error exit?

References

Raised by @leynos.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions