Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

ci: nvx-rs mutants' summarize miscounts the shards when one artifact downloads

Open
#924 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
github-actions, rust, shell, yaml
Domain
ci-cd, devops

Research direction

Start with .github/workflows/nvx-rs-mutants.yml, especially the shard upload and summarize steps around lines 175–254, and review the linked actions/download-artifact behavior described in the issue. Check how shard indices and outcomes.json are handled when one artifact is downloaded or a shard uploads nothing. Done when summarize fails if either of two shards uploads nothing and succeeds with shards: 1, merging that shard’s outcomes.

Written by the indexing model from the issue text.

Description

Related: #726, for which 431cae05 added the workflow. Needs: nothing.

Goal. The summarize job of nvx-rs mutants passes only when every shard reported its outcomes, and then merges them all, whatever the number of shards.

Today (dev d1946233):

  • summarize counts directories. It downloads the shards' artifacts with actions/download-artifact@v8, with pattern: nvx-rs-mutants-shard-*-<run ID> and path: shards (#L195-L199). It then takes each directory shards/*/ for a shard, merges their caught.txt, missed.txt, timeout.txt and unviable.txt (#L211-L225), and fails unless it counted SHARDS of them (#L251-L254).
  • A lone artifact lands in shards/ itself. download-artifact gives each artifact a directory of its own only when several match, and extracts a lone one into path (download-artifact.ts#L185-L195, at the commit that @v8 resolved to). A shard's artifact, cargo-mutants' mutants.out, holds two directories, diff/ and log/.
  • So, with one artifact, summarize counts 2 shards, however many reported. It finds no outcome list in diff/ or log/, and uploads empty lists as nvx-rs-mutants-<run ID>. With 2 shards, as every push that changes the workflow runs (#L85-L88), the count check passes. With shards: 1, it always fails; none of the 18 dispatches so far used one shard.
  • A shard that fails early uploads nothing. Its upload needs outcomes.json (#L175-L184), and summarize runs whatever the shards' results (#L186-L189).
  • The summarize job dates from 431cae05. b2572d40 and 10035afd last changed the workflow, in its descriptions only.

Evidence: run 40441338923, a push of 4a8b5341.

  • Attempt 1: shard 1 failed in "Install Rust and cargo-mutants" (failed to download from https://index.crates.io/config.json, a connection timeout), and uploaded nothing. summarize logged Found 1 artifact(s) and Starting download of artifact to: /home/runner/work/nvx/nvx/shards, passed, and uploaded 484 bytes of empty lists. Shard 0's artifact lists 14 caught mutants and 1 unviable one.
  • Attempt 2 reran shard 1, and summarize merged both shards: 24 caught, 0 missed, 6 unviable.

Scope (one PR), for example:

  • Give each shard a directory that doesn't depend on the number of artifacts: for example, upload each shard's outcomes under a directory named for its index, and download them with merge-multiple: true, so that every shard lands in shards/<index>/.
  • Check each expected shard by its index, and count the shards by their outcomes.json, not by directories.
  • Fail summarize when a shard job didn't succeed (needs.mutants.result), besides counting.

Done when: summarize fails when one of two shards uploads nothing, and passes a dispatch with shards: 1, with that shard's outcomes merged.

Dominant language
Rust
Stars
758
Forks
48
Avg merge
18h 37m
Merged PRs (30d)
398

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/nvx

All issues in microsoft/nvx

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.