feat: cargo-gamma fixes - #113
Conversation
Refresh workspace dependencies and pinned development tools, including the migration from cel-interpreter to cel, and adapt affected APIs. Unify README generation and checking, clarify internal cargo-gamma crate documentation, retain release line-table debugging, and serialize PowerShell-heavy impact tests on constrained runners. Keep ra_ap_syntax at 0.0.331 because 0.0.349 includes a parser fixture that crashes CodeQL 2.26.4. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 52e352a5-2ebd-47c9-9a63-0bc23be56154
There was a problem hiding this comment.
Pull request overview
This PR (“Gamma”) is a broad update centered on the cargo-gamma toolchain: it adds/configures new mutation-exclusion capabilities, tightens output/diagnostic safety, improves process containment/memory-support error modeling, and refreshes supporting tooling (README generation recipes and pinned tool versions) across the workspace.
Changes:
- Extend Gamma configuration/behavior (e.g., trait-impl mutant exclusions; retire
--html-externalwhile warning and always embedding the viewer; add SARIF golden-contract testing). - Rework process containment + platform capability reporting with structured error types and more robust tests (including spawned-process tests where needed).
- Update Anvil/Just infrastructure for README generation and bump pinned tool versions (cargo-deny/doc2readme/llvm-cov/mutants/nextest/just/sccache), plus related doc regeneration.
Reviewed changes
Copilot reviewed 169 out of 176 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| scripts/check-external-types.rs | Bump ohno script dependency. |
| justfiles/basic.just | Route readme recipes through _anvil-readme. |
| justfiles/anvil/versions.just | Update pinned Anvil tool versions. |
| justfiles/anvil/checks/readme-check.just | Add _anvil-readme generate/check driver with target selection. |
| justfiles/anvil/checks/bolero.just | Switch bolero execution to --profile release. |
| gamma.toml | Expand excluded files + add trait-impl mutant exclusions. |
| deny.toml | Clear advisory ignore list. |
| crates/cargo-heather/README.md | Regenerated README dependency info. |
| crates/cargo-gamma/tests/binary.rs | Add end-to-end installed-binary contract tests. |
| crates/cargo-gamma/src/real_host.rs | Replace env test with subprocess-based env validation. |
| crates/cargo-gamma/src/main.rs | Document trait-impl exclusions + --html-external retirement. |
| crates/cargo-gamma/README.md | Regenerated docs reflecting new config/features. |
| crates/cargo-gamma/docs/TODO.md | Remove completed/backlog content. |
| crates/cargo-gamma/docs/MUTATORS.md | Clarify stated-value constraints + error semantics. |
| crates/cargo-gamma/docs/gamma.toml | Document trait-impl exclusions + retire html-external. |
| crates/cargo-gamma/docs/CONFIG.md | Document [[exclude-mutants]] trait-impl rules + retire html-external. |
| crates/cargo-gamma/docs/CMDLINE.md | Remove --html-external from documented CLI surface. |
| crates/cargo-gamma-unsafe/src/support.rs | Return structured platform error type from support(). |
| crates/cargo-gamma-unsafe/src/situation.rs | New Situation enum for platform failure classification. |
| crates/cargo-gamma-unsafe/src/platform_error.rs | New PlatformError with situation/source/backtrace. |
| crates/cargo-gamma-unsafe/src/native_faults.rs | Add Windows native-call fault injection for tests. |
| crates/cargo-gamma-unsafe/src/lib.rs | Export new error types + add identity module + loom models. |
| crates/cargo-gamma-unsafe/src/identity.rs | Add Unix effective-user query helper. |
| crates/cargo-gamma-unsafe/src/group.rs | Add reaped_elsewhere() helper + tests. |
| crates/cargo-gamma-unsafe/docs/DESIGN.md | Document new error model + testing approach + stability notes. |
| crates/cargo-gamma-unsafe/Cargo.toml | Opt out of README generation via ox-gen-readme metadata. |
| crates/cargo-gamma-rt/src/lib.rs | Hide rustdoc + expand env-capture failure-mode docs + reexports. |
| crates/cargo-gamma-rt/README.md | Regenerated README reflecting updated crate docs/links. |
| crates/cargo-gamma-rt/docs/DESIGN.md | Update runtime design with env-capture failure semantics. |
| crates/cargo-gamma-rt/Cargo.toml | Opt out of README generation via ox-gen-readme metadata. |
| crates/cargo-gamma-process/src/testing.rs | Refactor helper launching + add “escape process group” path + bump helper name. |
| crates/cargo-gamma-process/src/lib.rs | Expose structured platform error types; document containment semantics. |
| crates/cargo-gamma-process/README.md | Regenerated README reflecting containment/prepare semantics. |
| crates/cargo-gamma-process/docs/DESIGN.md | Update design: containment unconditional, typed “prepared” commands, capability test policy. |
| crates/cargo-gamma-process/Cargo.toml | Opt out of README generation via ox-gen-readme metadata. |
| crates/cargo-gamma-lib/tests/session.rs | Ensure raw nextest output stays console-only (not durable report). |
| crates/cargo-gamma-lib/tests/sarif_contract.rs | Add SARIF full-document golden contract test. |
| crates/cargo-gamma-lib/tests/regressions.rs | Update fixtures for new trait_impl field. |
| crates/cargo-gamma-lib/tests/fixtures/sarif.golden.json | Add committed SARIF golden fixture. |
| crates/cargo-gamma-lib/tests/cli.rs | Add CLI test for trait-impl exclusion behavior. |
| crates/cargo-gamma-lib/src/testing.rs | Adjust memory-support reason formatting + fixtures for trait_impl. |
| crates/cargo-gamma-lib/src/suppress/tests.rs | Add tests for duplicate/positional timeout-multiplier parsing. |
| crates/cargo-gamma-lib/src/suppress/scopes.rs | Use SourceFile accessors instead of fields. |
| crates/cargo-gamma-lib/src/suppress/scan.rs | Use SourceFile accessors + avoid comment-body allocations. |
| crates/cargo-gamma-lib/src/suppress/mod.rs | Inline doc reexports for suppress API. |
| crates/cargo-gamma-lib/src/suppress/directive.rs | Refuse duplicate timeout multipliers; use SourceFile accessors. |
| crates/cargo-gamma-lib/src/schema.rs | Adapt to Ordinal wrapper in engine schema. |
| crates/cargo-gamma-lib/src/report/summary.rs | Encode control characters in printed notes/lines; document summarize errors. |
| crates/cargo-gamma-lib/src/report/mod.rs | Reexport text encoders; add inline doc reexports. |
| crates/cargo-gamma-lib/src/parse.rs | Reexport nesting constants explicitly (no glob). |
| crates/cargo-gamma-lib/src/ops/registry.rs | Replace glob reexport with named exports + docs. |
| crates/cargo-gamma-lib/src/ops.rs | Inline doc reexports for ops API. |
| crates/cargo-gamma-lib/src/model/outcome.rs | Add explicit scoring test for timeout/OOM outcomes. |
| crates/cargo-gamma-lib/src/model/mutant.rs | Add discovery-only trait_impl metadata. |
| crates/cargo-gamma-lib/src/model/mod.rs | Inline doc reexports; add SiteIndex reexport. |
| crates/cargo-gamma-lib/src/model/interner.rs | Intern trait_impl strings when present. |
| crates/cargo-gamma-lib/src/model/identity.rs | Reexport SiteIndex from engine model. |
| crates/cargo-gamma-lib/src/merge/mod.rs | Inline doc reexports for merge API. |
| crates/cargo-gamma-lib/src/merge/incoming.rs | Ensure incoming files collected to expected map type. |
| crates/cargo-gamma-lib/src/lib.rs | Make internals facade feature-driven with explicit module exports + inline docs. |
| crates/cargo-gamma-lib/src/fixtures.rs | Use BTreeMap for deterministic file ordering; update fixtures for trait_impl. |
| crates/cargo-gamma-lib/src/fix/mod.rs | Inline doc reexports for fix API. |
| crates/cargo-gamma-lib/src/exec/verdict/hubs.rs | Reduce Loom state explosion by modeling finishers per job. |
| crates/cargo-gamma-lib/src/exec/test_binary.rs | Adjust docs about timeout scoring semantics; update fixtures for trait_impl. |
| crates/cargo-gamma-lib/src/exec/progress.rs | Factor shared activity parsing; add diagnostic “heard” path. |
| crates/cargo-gamma-lib/src/exec/mod.rs | Inline doc reexports; expose additional exec surface. |
| crates/cargo-gamma-lib/src/exec/memory.rs | Stabilize reason-to-string usage in tests. |
| crates/cargo-gamma-lib/src/exec/measure.rs | Add containment warning early; add lock-plumbing variants; normalize memory-support errors to string. |
| crates/cargo-gamma-lib/src/exec/harness_filters.rs | Pre-size selecting args; clarify behavior. |
| crates/cargo-gamma-lib/src/exec/build/tests.rs | Update supervise APIs; improve rollback-limit assertions; use Position::new; update fixtures for trait_impl. |
| crates/cargo-gamma-lib/src/exec/build/invoke.rs | Make supervise consume Command; adopt new prepared-spawn API. |
| crates/cargo-gamma-lib/src/exec/build/blame.rs | Use Position accessors/constructors; clarify span validity. |
| crates/cargo-gamma-lib/src/error.rs | Capture and preserve backtraces across engine/coordinator boundary. |
| crates/cargo-gamma-lib/src/elements/mod.rs | Inline doc reexports for elements API. |
| crates/cargo-gamma-lib/src/discover/record.rs | Add named Entries iterator + IntoIterator for &RunRecord. |
| crates/cargo-gamma-lib/src/discover/mod.rs | Inline doc reexports; export record iterator type. |
| crates/cargo-gamma-lib/src/discover/killers.rs | Use SourceFile AST accessor. |
| crates/cargo-gamma-lib/src/discover/hints.rs | Iterate over run record via iter(). |
| crates/cargo-gamma-lib/src/discover/diff.rs | Take reader by value; add tests for owned vs borrowed readers. |
| crates/cargo-gamma-lib/src/diag/mod.rs | Inline doc reexports for diagnostics API. |
| crates/cargo-gamma-lib/src/commands/run.rs | Retire --html-external (warn + always embed); plumb cache locks into exec run. |
| crates/cargo-gamma-lib/src/commands/mod.rs | Expand/inline doc reexports of CLI arg structs and dispatch items. |
| crates/cargo-gamma-lib/src/commands/merge.rs | Always embed HTML viewer when emitting merge report; deterministic map use in tests. |
| crates/cargo-gamma-lib/src/commands/list.rs | Stream JSON output; encode control characters in listings/paths. |
| crates/cargo-gamma-lib/src/commands/console_events.rs | Relay (not “insist”) cargo build output to preserve color semantics. |
| crates/cargo-gamma-lib/src/commands/cli.rs | Add clap styles + author; add structured exclusions field; hide retired option; strengthen CLI validity test. |
| crates/cargo-gamma-lib/src/commands/clean.rs | Report each cleaned cache directory; handle “nothing to clean” explicitly. |
| crates/cargo-gamma-lib/src/ci/mod.rs | Inline doc reexports for CI API. |
| crates/cargo-gamma-lib/src/ci/annotations.rs | Encode terminal controls before workflow-command escaping; add hostile-path test. |
| crates/cargo-gamma-lib/src/cfg/mod.rs | Inline doc reexports for cfg API. |
| crates/cargo-gamma-lib/src/advise/mod.rs | Inline doc reexports for advise API. |
| crates/cargo-gamma-lib/docs/DESIGN.md | Note rustdoc/README stability posture. |
| crates/cargo-gamma-lib/Cargo.toml | Opt out of README gen; add bolero-engine; gate SARIF contract test under internals. |
| crates/cargo-gamma-engine/src/parse/source_file.rs | Encapsulate SourceFile fields; add accessors; encode control chars in parse errors. |
| crates/cargo-gamma-engine/src/parse/mod.rs | Inline doc reexports for parse API. |
| crates/cargo-gamma-engine/src/parse/comment.rs | Store comment body as byte range into source text (avoid allocations). |
| crates/cargo-gamma-engine/src/ops/registry/mod.rs | Inline doc reexports for registry API. |
| crates/cargo-gamma-engine/src/ops/registry/lookup.rs | Document resolve error behavior. |
| crates/cargo-gamma-engine/src/ops/collect/traversal.rs | Fuse stated-value audit with cfg-gated traversal prepass. |
| crates/cargo-gamma-engine/src/ops/collect/shape.rs | Clarify shape docs re: guard placement. |
| crates/cargo-gamma-engine/src/ops/collect/mod.rs | Inline doc reexports for collect API. |
| crates/cargo-gamma-engine/src/ops/collect/definitions.rs | Introduce SiteIndex; carry trait_impl into definitions. |
| crates/cargo-gamma-engine/src/ops/collect/defaults.rs | Add shared attribute helpers for cfg gating; adapt to syn API; improve test fixtures. |
| crates/cargo-gamma-engine/src/ops/collect/collector/values.rs | Update syn type fixtures for new fields. |
| crates/cargo-gamma-engine/src/ops/collect/collector/types.rs | Update syn type fixtures for new fields. |
| crates/cargo-gamma-engine/src/ops/collect/collector/predicates.rs | Remove unused type_name helper. |
| crates/cargo-gamma-engine/src/ops/collect/collector/noop.rs | Add fast prefilter for Box::leak equivalence detection + test. |
| crates/cargo-gamma-engine/src/ops/collect/candidate.rs | Add trait_impl metadata to candidates. |
| crates/cargo-gamma-engine/src/model/mutant_definition.rs | Add trait_impl to model definition. |
| crates/cargo-gamma-engine/src/model/mod.rs | Inline doc reexports; add SiteIndex. |
| crates/cargo-gamma-engine/src/model/interner.rs | Intern trait_impl strings when present. |
| crates/cargo-gamma-engine/src/lib.rs | Add text module; export error Parts. |
| crates/cargo-gamma-engine/src/error.rs | Capture backtraces; replace tuple into_parts with struct Parts; add isolated backtrace test. |
| crates/cargo-gamma-engine/src/cfg.rs | Add skip_gate to share cfg_attr expansion; add equivalence test. |
| crates/cargo-gamma-engine/docs/DESIGN.md | Document cfg-gated prepasses + stated-value rules + stability notes. |
| crates/cargo-gamma-engine/Cargo.toml | Opt out of README gen; add bolero-engine dev-dep. |
| crates/cargo-gamma-attrs/tests/consumer.rs | Add consumer integration tests to ensure macros preserve callable items. |
| crates/cargo-gamma-attrs/src/lib.rs | Expand docs + compile-fail examples for value/multiplier constraints. |
| crates/cargo-gamma-attrs-impl/src/lib.rs | Hide rustdoc; export exceeds_nesting_limit. |
| crates/cargo-gamma-attrs-impl/README.md | Regenerated README dependency info. |
| crates/cargo-gamma-attrs-impl/docs/DESIGN.md | Document stated-value and multiplier rules + stability posture. |
| crates/cargo-gamma-attrs-impl/Cargo.toml | Opt out of README gen. |
| crates/cargo-coverage-gate/README.md | Regenerated README dependency info. |
| crates/cargo-aprz-lib/src/facts/crates/tables/mod.rs | Replace box-drawing chars with ASCII diagram for spellcheck/portability. |
| crates/cargo-aprz-lib/src/expr/expression.rs | Switch CEL import path to cel::Program. |
| crates/cargo-aprz-lib/src/expr/evaluator.rs | Switch CEL imports + adjust clippy expectation text. |
| crates/cargo-aprz-lib/Cargo.toml | Replace cel-interpreter dependency with cel. |
| crates/cargo-anvil/tests/impact.rs | Serialize PowerShell-heavy tests under serial_test. |
| crates/cargo-anvil/templates/justfiles/anvil/versions.just | Sync template pinned tool versions with workspace. |
| crates/cargo-anvil/templates/justfiles/anvil/checks/readme-check.just | Sync template README-check logic with workspace. |
| crates/cargo-anvil/templates/justfiles/anvil/checks/bolero.just | Sync template bolero profile flag with workspace. |
| crates/cargo-anvil/src/anvil/artifacts/justfile.rs | Update snapshot expectations for new readme/bolero recipe bodies. |
| crates/cargo-anvil/README.md | Regenerated README dependency info. |
| crates/cargo-anvil/docs/design/checks.md | Update readme-check description to match new selection logic. |
| crates/cargo-anvil/Cargo.toml | Simplify sha2 dependency declaration. |
| constants.env | Bump pinned tool versions (cargo-* tools, just, sccache). |
| .spelling | Add new allowed words (tooling/OS terms). |
| .config/nextest.toml | Rename/expand serialized test group for PowerShell-heavy suites. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
a7df1ca to
28587fc
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 168 out of 176 changed files in this pull request and generated no new comments.
Suppressed comments (1)
crates/cargo-gamma-lib/src/testing.rs:930
ci_fixture::mutanthard-codesoriginal: "a > b"/replacement: "a >= b"regardless of themutatorargument. This makes the SARIF contract fixture internally inconsistent (e.g.,ruleId = "arith.add_to_sub"paired with a relational description), which weakens the value of the golden and can mislead future debugging. Consider deriving(original, replacement)frommutator(at least for the distinct mutators used by contract tests), or passing them in explicitly so the fixture stays semantically coherent.
28587fc to
6483d49
Compare
|
6483d49 to
21d3e25
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 166 out of 176 changed files in this pull request and generated 2 comments.
Suppressed comments (1)
crates/cargo-gamma-lib/src/commands/clean.rs:29
- Each removed cache directory path is printed directly. Paths can contain control characters, which could manipulate terminal/CI output. Encode each directory string before formatting it.
21d3e25 to
d3c6523
Compare
d3c6523 to
ed0e27e
Compare
Codecov Report❌ Patch coverage is ❌ Your project status has failed because the head coverage (97.6%) is below the target coverage (100.0%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #113 +/- ##
=======================================
- Coverage 97.7% 97.6% -0.1%
=======================================
Files 286 288 +2
Lines 62174 64248 +2074
=======================================
+ Hits 60751 62749 +1998
- Misses 1423 1499 +76
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ed0e27e to
7f032d4
Compare
Strengthen mutation discovery, process containment, runtime census handling, cache safety, reporting, and cross-platform error propagation. Align attributes and CLI behavior, expand contract coverage, and refresh generated documentation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 52e352a5-2ebd-47c9-9a63-0bc23be56154
7f032d4 to
44c8def
Compare
No description provided.