Skip to content

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

Merged
avrabe merged 1 commit into
mainfrom
feat/issue-185-cargo-mutants-template
Apr 29, 2026
Merged

feat(mutants): canonical cargo-mutants template + docs + schema fields (#185)#229
avrabe merged 1 commit into
mainfrom
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!

@avrabe avrabe merged commit 05c9400 into main Apr 29, 2026
25 of 40 checks passed
@avrabe avrabe deleted the feat/issue-185-cargo-mutants-template branch April 29, 2026 04:40
avrabe added a commit that referenced this pull request Apr 30, 2026
…246)

Workspace, vscode-rivet, and npm root package versions bumped to 0.7.0.
Platform packages stay on the release-npm.yml override path.

What's in 0.7.0:

- feat(schema): rivet schema migrate Phase 2 (#242) — full git-rebase
  conflict-resolution UX. Conflict markers in YAML, --continue,
  --skip, --edit. New MigrationConflict invariant in rivet docs check.
- feat(docs-check): subcommand-coverage gate (#241) — walks the live
  clap CLI tree and asserts each path has an embedded docs topic.
  Default warn-only; --strict makes it enforcing.
- feat(validate): prose-mention-without-typed-link warning (#234,
  closes #207).
- feat(schemas): vv-coverage repo-status type (#232, partial #188).
- feat(mutants): canonical cargo-mutants template (#229, closes #185).
- docs(pre-commit): canonical 21-hook template (#222, closes #186).
- fix(ci): Release workflow now idempotent on existing tag (#244).

Known issue: v0.5.0 / v0.5.1 / v0.6.0 release pages have no binary
assets attached because the workflow's Create Release step failed
on each (race with manual gh release create). The fix in #244 lands
in this release; v0.7.0 onward is unaffected. Older releases need
a manual gh release upload to backfill.

Verified: cargo check, cargo clippy --workspace -- -D warnings,
cargo test -p rivet-cli, rivet docs check (clean), rivet docs check
--coverage reports 48/81 paths covered (warn-only).

Trace: skip
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