Skip to content

feat(mutants): canonical cargo-mutants template + docs + schema fields (#185)#229

Open
avrabe wants to merge 1 commit intomainfrom
feat/issue-185-cargo-mutants-template
Open

feat(mutants): canonical cargo-mutants template + docs + schema fields (#185)#229
avrabe wants to merge 1 commit intomainfrom
feat/issue-185-cargo-mutants-template

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented Apr 27, 2026

Closes #185

Summary

First in-scope cut at the cargo-mutants generalization story. Three deliverables, mapping 1:1 to the in-scope acceptance bullets confirmed in the 2026-04-26 triage comment on #185:

Acceptance bullet Where it landed
Extract rivet's cargo-mutants config into a reusable template (workflow YAML + mutants.toml) templates/cargo-mutants/{mutants.toml, mutants.yml, README.md}
docs/mutation-testing.md — when to run, ASIL/DAL score targets, marking unreachable mutants docs/mutation-testing.md
Schema records mutation_score on TEST-* artifacts schemas/score.yamlmutation-score-target on test-spec (suite floor) and mutation-score + mutants-tested / killed / missed / timeout / unviable counts on test-exec (measured run)

What's in the template

  • mutants.tomlminimum_test_timeout=60, additional_cargo_test_args=["--lib"], exclude_globs for target/, vendor/, proofs/, verus/, fuzz targets, plus a starter skip_calls list (tracing::trace, tracing::debug).
  • mutants.yml — nightly + manual-dispatch GitHub Actions workflow with a per-crate matrix, 90-min per-shard timeout, and mutants.out/ artifact upload.
  • README.md — quickstart for adopters, with the three operating modes (pre-commit off, pre-push smoke, CI nightly) called out explicitly.

Score-target ladder (in docs/mutation-testing.md)

Safety level Floor
QM / DAL E optional
ASIL A / DAL D ≥ 0.70
ASIL B / DAL C ≥ 0.80
ASIL C / DAL B ≥ 0.85
ASIL D / DAL A ≥ 0.90

Recorded on artifacts via mutation-score-target (target) and mutation-score (measured); the doc spells out the relation to mutants-tested / killed / missed / timeout / unviable.

Out of scope

These bullets from #185 cannot be addressed from a session scoped to pulseengine/rivet:

The issue should remain open until those are filed if Closes #185 is treated as too aggressive; happy to re-tag as Refs: instead.

Verification

  • cargo test --release -p rivet-core --lib — 857 passed, 0 failed.
  • cargo test --release -p rivet-core --test integration --test schema_agent_pipelines --test yaml_roundtrip — 14 passed, 0 failed.
  • cargo fmt --all -- --check — clean.
  • rivet validate — diagnostics identical to origin/main (6 pre-existing errors in the spar-external fixture; unchanged here).
  • Synthetic project loading schemas: [common, score] accepts both mutation-score-target: 0.9 on test-spec and the full mutation-score + counts block on test-exec.

Test plan

  • Schema parses (rivet-core embedded include_str!)
  • Lib + integration tests green
  • No new validate diagnostics
  • CI green
  • Maintainer signs off on the score-target ladder
  • Cross-repo adoption issues filed separately (see "Out of scope")

Generated by Claude Code — issue-triage agent run 2026-04-27.


Generated by Claude Code

First in-scope cut at the cargo-mutants generalization story (#185).

- templates/cargo-mutants/{mutants.toml, mutants.yml, README.md} —
  reusable config + nightly + manual-dispatch GitHub Actions workflow,
  extracted from rivet's pre-push smoke profile.
- docs/mutation-testing.md — pattern doc covering when to run, ASIL/DAL
  score targets (≥0.70 ASIL A → ≥0.90 ASIL D), mutants.toml skip
  patterns, per-function skip attributes, and how the new schema fields
  wire results back into rivet traceability.
- schemas/score.yaml — `mutation-score-target` (number) on test-spec to
  declare the suite floor, `mutation-score` plus mutants-tested /
  killed / missed / timeout / unviable counts on test-exec to record
  measured runs.

Verified: cargo test -p rivet-core --lib + integration suites green
(857 + 5 + 4 tests). rivet validate diagnostics unchanged from
origin/main (6 pre-existing errors in spar-external fixture, untouched
here). Synthetic project that loads schemas: [common, score] accepts
all new fields.

Out of scope per the autonomous-run scoping confirmed in the issue's
2026-04-26 triage comment:
- Cross-repo adoption issues for kiln/loom/gale/meld must be filed
  from a session with broader org access.
- Dashboard view across repos depends on #188.

Implements: REQ-010
Refs: #185
@github-actions
Copy link
Copy Markdown

📐 Rivet artifact delta

No artifact changes in this PR. Code-only changes (renderer, CLI wiring, tests) don't touch the artifact graph.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

Publish cargo-mutants CI template; adopt in kiln, loom, gale, meld

2 participants