Skip to content

feat(cargo-gamma): optimize mutation campaigns - #187

Open
Martin Taillefer (geeknoid) wants to merge 2 commits into
mainfrom
gamma-performance
Open

Martin Taillefer (geeknoid) wants to merge 2 commits into
mainfrom
gamma-performance

Conversation

@geeknoid

@geeknoid Martin Taillefer (geeknoid) commented Sep 16, 2026

Copy link
Copy Markdown
Member

Summary

This change makes large cargo-gamma campaigns faster, more predictable, more diagnosable, and easier to resume without weakening verdict correctness.

Mutation discovery and identity

  • improve semantic type/default inference and mutation-site indexing while suppressing conservative no-ops and unsigned-invalid replacements
  • scope numeric, unsigned, and error-return inference correctly across nested functions, closures, and async blocks
  • strengthen stable mutant identities, source parsing, configuration evaluation, stated-value handling, and attribute-macro agreement

Build, baseline, and test execution

  • capture compiler-derived source-to-test-binary linkage and keep scratch builds synchronized across instrumentation rounds
  • collect all known baseline failures in one run and preserve plans, withdrawals, timings, binaries, and actionable failure artifacts
  • reconstruct Cargo-compatible package, manifest, build-script, binary-target, rustup, and search-path environments for direct and nextest launches
  • preserve canonical binary ordering, whole-binary confirmation, conservative reachability, and failure-shaped outcomes under uncertainty

Census, scheduling, and learning

  • add opt-in guard census and project its evidence into exact, selected-test, whole-binary, hinted, or uncovered work
  • schedule work at assignment time with package fairness, file-contention spreading, cold same-item scout exclusion, learning leverage, estimated cost, and stable ordering
  • replace repeated full-population scans with indexed per-package queues and a global package-head frontier; claims and completions rekey only the affected file
  • learn deterministic killer and reachability evidence during the sweep while retaining safe whole-binary fallbacks

Persistence and reruns

  • migrate durable hints to generation-aware YAML with legacy JSON migration, generation-checked promotion, byte-preserving no-op publication, and explicit destructive replacement
  • reuse settled verdicts incrementally without assigning ordinals or shard slots to completed mutants
  • add --only-survivors-from <gamma-report.json> to rerun exactly the stable IDs reported as genuine survivors, excluding timeout and out-of-memory outcomes

Estimates, diagnostics, and reporting

  • make upfront estimates honor confirmation policy
  • replace count-based live ETA with workload-shape calibration, bounded EWMA learning, in-flight residuals, worker-lane makespan simulation, and low/high ranges
  • expand reports and diagnostics with census economics, test selection, hint effectiveness, build withdrawals, package CPU/wall timelines, surviving mutants, and baseline-failure state
  • preserve native path rendering and explicit error propagation across platform, process, memory, and stall handling

Cache placement

  • keep the synchronized workspace, vendored runtime, stable ownership marker, and workspace lock in the platform cache so Cargo does not rediscover the original workspace configuration through an ancestor
  • place Cargo artifacts, census data, run records, progress logs, and other campaign state under <resolved-target>/cargo-gamma/cache/<workspace-id> so large caches follow Cargo target placement and shared targets remain collision-safe
  • retain explicit --cache-dir as an all-in-one override, keep published reports unchanged, clean both owned locations, and intentionally provide no migration or fallback for the former default layout

Integration and documentation

  • use rallocator for the cargo-gamma executable while leaving mutated target workspaces' allocator choices untouched
  • synchronize CLI, configuration, design, scheduling, mutator, implementation, TODO, and generated README documentation
  • add focused unit, integration, concurrency, scalability, regression, and end-to-end coverage across the cargo-gamma crate family

Validation

Previously completed during development:

  • just anvil-pr-fast
  • cargo test -p cargo-gamma-lib --features internals
  • cargo test -p cargo-gamma-lib --test docs --features internals
  • cargo test -p cargo-gamma --test binary
  • just anvil-clippy
  • just anvil-spellcheck
  • just anvil-readme

For the latest scheduler, survivor-rerun, ETA, return-context, nextest, and cache-layout follow-ups, local Rust tooling is intentionally deferred while a long-running cargo-gamma campaign is active. git diff --check passes, and the amended head is being validated by the PR's generated Anvil matrix, CodeQL, regeneration, and policy checks.

Copilot AI lite review requested due to automatic review settings September 16, 2026 21:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Hint promotion mishandles valid empty generations and can skip required YAML migration or replacement writes.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds opt-in mutation census optimization, compiler linkage capture, adaptive scheduling, generation-aware YAML hints, diagnostics, and supporting tests/documentation across the cargo-gamma family.

Changes:

  • Adds compiler-derived linkage and synchronized scratch-build support.
  • Introduces census-based test selection and assignment-time scheduling.
  • Migrates durable hints to YAML with merging, replacement, and concurrency safeguards.
File summaries
File Description
crates/cargo-gamma/tests/binary.rs Wrapper exit-status coverage
crates/cargo-gamma/docs/TODO.md Updated optimization roadmap
crates/cargo-gamma/docs/MUTATORS.md Iterator return documentation
crates/cargo-gamma/docs/IMPLEMENTATION.md Implementation contracts
crates/cargo-gamma/docs/gamma.toml Configuration examples
crates/cargo-gamma/docs/CONFIG.md Configuration and hints behavior
crates/cargo-gamma/docs/CMDLINE.md CLI and exit-status reference
crates/cargo-gamma-unsafe/src/support.rs Platform support branches
crates/cargo-gamma-unsafe/src/platform_error.rs Error-source coverage
crates/cargo-gamma-unsafe/src/native_faults.rs Fault handling
crates/cargo-gamma-unsafe/src/lib.rs Crate documentation cleanup
crates/cargo-gamma-unsafe/src/cgroup.rs Watch-state documentation
crates/cargo-gamma-rt/src/lib.rs Runtime census documentation
crates/cargo-gamma-rt/src/either.rs Iterator wrapper and tests
crates/cargo-gamma-process/src/testing.rs Test helper diagnostics
crates/cargo-gamma-lib/tests/session.rs Test dispatch and census mode
crates/cargo-gamma-lib/tests/regressions.rs Testing entry point
crates/cargo-gamma-lib/tests/gate.rs Testing entry point
crates/cargo-gamma-lib/src/testing.rs Isolated test cache support
crates/cargo-gamma-lib/src/suppress/scopes.rs Scope collection fixes
crates/cargo-gamma-lib/src/suppress/scan.rs Directive parsing tests
crates/cargo-gamma-lib/src/report/text.rs Score precision handling
crates/cargo-gamma-lib/src/report/summary.rs Summary diagnostics
crates/cargo-gamma-lib/src/report/progress.rs Progress-state coverage
crates/cargo-gamma-lib/src/paths.rs Path resolution and tests
crates/cargo-gamma-lib/src/notes.rs Diagnostic scope handling
crates/cargo-gamma-lib/src/model/mutant.rs Mutant initialization tests
crates/cargo-gamma-lib/src/model/interner.rs Interner coverage
crates/cargo-gamma-lib/src/merge/union.rs Merge aggregation behavior
crates/cargo-gamma-lib/src/lib.rs Wrapper API exposure
crates/cargo-gamma-lib/src/fix/edit.rs Edit rendering
crates/cargo-gamma-lib/src/exec/verdict/hubs.rs Synchronization annotations
crates/cargo-gamma-lib/src/exec/stall.rs Stall equality support
crates/cargo-gamma-lib/src/exec/session.rs Census and sweep metrics
crates/cargo-gamma-lib/src/exec/nextest.rs Nextest command handling
crates/cargo-gamma-lib/src/exec/mod.rs Execution API exports
crates/cargo-gamma-lib/src/exec/memory.rs Memory branch annotations
crates/cargo-gamma-lib/src/exec/manifest.rs Manifest handling coverage
crates/cargo-gamma-lib/src/exec/loader.rs Loader handling and tests
crates/cargo-gamma-lib/src/exec/copy.rs Copy behavior annotations
crates/cargo-gamma-lib/src/exec/config.rs Execution configuration
crates/cargo-gamma-lib/src/exec/build/messages.rs Dependency parsing exports
crates/cargo-gamma-lib/src/estimate.rs Estimate arithmetic coverage
crates/cargo-gamma-lib/src/error.rs Multiple artifact support
crates/cargo-gamma-lib/src/elements/publication.rs Atomic publication coverage
crates/cargo-gamma-lib/src/discover/workspace_snapshot.rs Snapshot annotations
crates/cargo-gamma-lib/src/discover/plan.rs Plan aggregation tests
crates/cargo-gamma-lib/src/discover/modules.rs Module discovery tests
crates/cargo-gamma-lib/src/discover/mod.rs Hint API exports
crates/cargo-gamma-lib/src/discover/killers.rs Killer-index coverage
crates/cargo-gamma-lib/src/discover/input.rs Bounded input handling
crates/cargo-gamma-lib/src/discover/glob.rs Platform glob handling
crates/cargo-gamma-lib/src/discover/compile_fail.rs Target normalization
crates/cargo-gamma-lib/src/diag/render.rs Census and sweep diagnostics
crates/cargo-gamma-lib/src/ci/sarif.rs SARIF size handling
crates/cargo-gamma-lib/src/ci/finding.rs Windows path coverage
crates/cargo-gamma-lib/src/cfg/probe.rs Rustc override handling
crates/cargo-gamma-lib/src/cfg/mod.rs Wrapper-chain exports
crates/cargo-gamma-lib/src/cfg/build.rs Wrapper-chain and config parsing
crates/cargo-gamma-lib/Cargo.toml YAML dependencies
crates/cargo-gamma-engine/src/text.rs SGR validation
crates/cargo-gamma-engine/src/schema.rs Position and instrumentation safety
crates/cargo-gamma-engine/src/parse/source_file.rs Parser boundary coverage
crates/cargo-gamma-engine/src/parse/nesting.rs Scanner progress safety
crates/cargo-gamma-engine/src/ops/registry/selection.rs Error-mutator selection
crates/cargo-gamma-engine/src/ops/registry/lookup.rs Selector lookup tests
crates/cargo-gamma-engine/src/ops/collect/tests.rs Combined instrumentation coverage
crates/cargo-gamma-engine/src/ops/collect/stated.rs Nested stated-value handling
crates/cargo-gamma-engine/src/ops/collect/definitions.rs Site normalization
crates/cargo-gamma-engine/src/ops/collect/defaults.rs Default-path analysis
crates/cargo-gamma-engine/src/ops/collect/collector/types.rs Type classification
crates/cargo-gamma-engine/src/ops/collect/collector/predicates.rs Predicate coverage
crates/cargo-gamma-engine/src/ops/collect/collector/phase_one.rs Recursive visitor coverage
crates/cargo-gamma-engine/src/ops/collect/collector/noop.rs No-op classification
crates/cargo-gamma-engine/src/model/interner.rs Trait interning coverage
crates/cargo-gamma-engine/src/model/identity.rs Stable identity hashing
crates/cargo-gamma-engine/src/cfg.rs Nested configuration expansion
crates/cargo-gamma-attrs/tests/diagnostics.rs Diagnostic test helper
crates/cargo-gamma-attrs/tests/consumer.rs Consumer assertion
crates/cargo-gamma-attrs/src/lib.rs Inert macro helpers
crates/cargo-gamma-attrs-impl/tests/agreement.rs Parser contract tests
Cargo.toml YAML parser dependencies
Cargo.lock Dependency lock updates
.spelling Dictionary additions
Review details
  • Files reviewed: 99/126 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread crates/cargo-gamma-lib/src/commands/hints.rs Outdated
Comment thread crates/cargo-gamma-lib/src/discover/hints.rs Outdated
@codecov-commenter

Codecov Comments Bot (codecov-commenter) commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.25257% with 141 lines in your changes missing coverage. Please review.
✅ Project coverage is 98.2%. Comparing base (2dfdaab) to head (869ab4b).

Files with missing lines Patch % Lines
crates/cargo-gamma-lib/src/discover/hints.rs 97.5% 27 Missing ⚠️
crates/cargo-gamma-lib/src/exec/measure.rs 96.9% 22 Missing ⚠️
crates/cargo-gamma-lib/src/exec/build.rs 94.0% 18 Missing ⚠️
crates/cargo-gamma-lib/src/estimate.rs 96.0% 16 Missing ⚠️
crates/cargo-gamma-lib/src/exec/baseline.rs 98.4% 11 Missing ⚠️
crates/cargo-gamma-lib/src/commands/run.rs 97.2% 9 Missing ⚠️
crates/cargo-gamma-lib/src/exec/build/invoke.rs 97.6% 6 Missing ⚠️
crates/cargo-gamma-lib/src/cfg/build.rs 95.6% 5 Missing ⚠️
crates/cargo-gamma-lib/src/commands/dispatch.rs 89.1% 4 Missing ⚠️
crates/cargo-gamma-lib/src/exec/rustc_wrapper.rs 99.0% 4 Missing ⚠️
... and 13 more

❌ Your project status has failed because the head coverage (98.2%) 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    #187      +/-   ##
========================================
+ Coverage   97.6%   98.2%    +0.5%     
========================================
  Files        304     307       +3     
  Lines      69683   83775   +14092     
========================================
+ Hits       68017   82269   +14252     
+ Misses      1666    1506     -160     
Flag Coverage Δ
linux 98.1% <98.2%> (+0.5%) ⬆️
linux-arm 98.1% <98.2%> (+0.5%) ⬆️
scheduled ?
windows 98.4% <98.2%> (+0.6%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The cross-crate compiler-wrapper, census, scheduler, cache, and artifact-format changes require final human validation beyond the partial fast-tier checks.

Review details
  • Files reviewed: 96/127 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The VCS metadata ancestor walk can stop making progress at a filesystem root and hang workspace preparation.

Get a fresh assessment by requesting another Copilot review.

Review details
  • Files reviewed: 96/127 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread crates/cargo-gamma-lib/src/exec/copy.rs Outdated
Copilot AI review requested due to automatic review settings September 16, 2026 22:22
@geeknoid
Martin Taillefer (geeknoid) force-pushed the gamma-performance branch 3 times, most recently from 63888b4 to efea61d Compare September 16, 2026 22:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Strict hint promotion can accept malformed or unknown generalized data and silently discard it during rewriting.

Get a fresh assessment by requesting another Copilot review.

Review details
  • Files reviewed: 96/127 changed files
  • Comments generated: 2
  • Review effort level: Lite

Comment thread crates/cargo-gamma-lib/src/discover/hints.rs Outdated
Comment thread crates/cargo-gamma-lib/src/discover/record.rs Outdated
Copilot AI review requested due to automatic review settings September 16, 2026 22:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Three unresolved issues affect census diagnostics, durable reach-hint effectiveness, and strict YAML-generation preservation.

Get a fresh assessment by requesting another Copilot review.

Review details

Suppressed comments (1)

crates/cargo-gamma-lib/src/discover/hints.rs:425

  • from_grouped accepts generalized reach entries without validating that each test_set index exists. For example, a version-3 artifact can contain reach: [{testSet: 999}] with no corresponding testSets entry; strict promotion accepts it, and merge_generalized later drops the entry through reach_entries, silently losing knowledge instead of refusing a generation it cannot round-trip. Validate generalized cross-references while parsing/loading the artifact (automatic consumers can still fail open).
  • Files reviewed: 96/127 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread crates/cargo-gamma-lib/src/exec/measure.rs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

It spans compiler integration, scheduling, persistence, CLI behavior, platform code, and generated documentation, requiring final human review and full-tier CI.

Review details
  • Files reviewed: 85/130 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

It changes compiler integration, cache persistence, scheduling, runtime behavior, and platform-specific process handling across the crate family.

Review details
  • Files reviewed: 85/130 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new standard-time regression assertion contradicts the implementation, and scheduler completion can unlock same-item work without actual learning evidence.

Get a fresh assessment by requesting another Copilot review.

Review details
  • Files reviewed: 84/135 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread crates/cargo-gamma-engine/src/ops/collect/collector/types.rs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

It spans compiler wrapping, native resource control, scheduling, persistence, CLI contracts, and cross-platform execution behavior.

Review details
  • Files reviewed: 84/135 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Windows test launches inject LD_LIBRARY_PATH even though the platform loader uses PATH, causing the reconstructed environment to diverge from Cargo’s contract.

Review details
  • Files reviewed: 84/135 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Windows nextest launches receive LD_LIBRARY_PATH, although this repository uses PATH for Windows dynamic-library lookup.

Review details
  • Files reviewed: 84/135 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@psandana

Pato Sandaña (psandana) commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

🤖 Pato's Pull Request Agent: This PR checks in gamma-hints.yaml — an ~11.7 MB (325,295-line) generated durable-hints artifact — at the repo root, and there is no .gitignore entry for it. Prior review threads addressed its schema efficiency (interning identities / storing the site digest instead of normalized_text), but not whether this generated campaign artifact should be committed to the repository at all.

Concerns with committing it:

  • Permanent history bloat: even after interning it is ~11.7 MB, and every future regeneration commits a fresh multi-MB blob that lives in git history forever.
  • Staleness: the file is pinned to context.repo_sha: 98c91fc… and generated_on: 2026-09-16. As the tree drifts the checked-in hints go stale while still looking authoritative, and nothing in CI regenerates/diffs them.
  • Provenance: it looks like a local campaign output rather than a curated fixture (it is at the repo root, not under a tests/ fixtures path).

Suggestion: unless this is a deliberately curated seed, add it to .gitignore and let cargo gamma generate it on demand into the cache/base dir. If it is meant to ship as a seed, please move it under a fixtures/data path and document the regeneration + staleness policy (and consider gating its size in CI). Non-blocking, but worth resolving before merge given the size is effectively irreversible in history.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

It spans compiler instrumentation, runtime execution, scheduling, persistence, reporting, and platform-specific process control, warranting final human approval.

Review details
  • Files reviewed: 84/135 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The cross-cutting changes span mutation discovery, scheduling, execution, persistence, reporting, runtime integration, and platform behavior.

Review details
  • Files reviewed: 84/135 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@psandana

Copy link
Copy Markdown
Contributor

🤖 Pato's Pull Request Agent: gamma-hints.yaml at the repo root looks like an accidentally committed runtime artifact, not an intended source change. (Posting as a general comment because the file's diff is too large for an inline thread.)

It is cargo-gamma's own durable hints output — the header reads version: 3, tool: cargo-gamma 0.2.1, generated_on: '2026-09-16', repo_sha: 98c91fc… — and it enumerates killers/mutants across the entire ox-tools tree. It adds 325,295 lines (~11.7 MB), which is essentially all of this PR's ~349k additions, and is almost certainly a byproduct of the campaign the PR description says is "active."

Concerns:

  • A per-checkout, machine-generated file permanently bloats git history (the 11.7 MB can never be dropped) and goes stale against main immediately.
  • It is not in .gitignore, so future campaigns will keep re-staging it.

Suggested fix:

  • Remove gamma-hints.yaml from this PR.
  • Add gamma-hints.yaml (and gamma-hints.json) to .gitignore.
  • If a hints artifact is genuinely meant to be tracked as a test fixture, commit a small curated sample under a crate's tests//fixtures directory rather than the full campaign dump at the repo root.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The broad scheduler, persistence, runtime, and environment changes require final human review despite extensive added coverage.

Review details
  • Files reviewed: 84/135 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@psandana

Copy link
Copy Markdown
Contributor

🤖 Pato's Pull Request Agent: Fast Checks CI is failing on anvil-fmt due to formatting drift in this PR's own new code (PR Job / Check Group: Fast Checks (linux) and (linux-arm)). This is a blocking regression introduced here, not the known pre-existing master drift — every diff is in newly changed cargo-gamma-lib lines.

Files flagged by anvil-fmt (run just anvil-fmt locally — not cargo fmt, which skips imports_granularity/group_imports on stable — then commit):

  • crates/cargo-gamma-lib/src/commands/hints.rs:36 — collapse the plan_for_build_with_target(...) call to one line
  • crates/cargo-gamma-lib/src/commands/run.rs:781 — collapse the exec::claim_cache(...) call
  • crates/cargo-gamma-lib/src/discover/mod.rs:44 — reorder the pub(crate) use survey::{...} re-export
  • crates/cargo-gamma-lib/src/exec/workspace.rs:942, 972, 2470, 4035, 4063 — collapse the absolute(target).join(...) chains and the Workspace::prepare(...) calls

just anvil-fmt is the authoritative formatter here; cargo fmt/cargo +nightly fmt will not reproduce or fix this because msrustup honors rust-toolchain.toml.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Rustc capture currently records lossy non-UTF-8 extern paths as exact dependencies, undermining conservative test-binary linkage.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)

Comment thread crates/cargo-gamma-lib/src/exec/rustc_wrapper.rs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The split cache layout validates the target-resident campaign path instead of the scratch copy path, allowing recursive self-copy when the platform cache is inside the workspace.

Review effort: Lite
Findings: None

Resolved since last review (1)

Comment thread crates/cargo-gamma-lib/src/exec/workspace.rs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The cross-cutting execution, cache, persistence, and platform changes require final human validation, and crate-level safety documentation was removed.

Review effort: Lite
Findings: 1 Low severity

Open (1)

Comment thread crates/cargo-gamma-unsafe/src/lib.rs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The change spans campaign scheduling, cache ownership, compiler linkage, persistence, reporting, and cross-platform process behavior across many crates.

Review effort: Lite
Findings: 1 Low severity

Open (1)

Comment thread crates/cargo-gamma-lib/src/exec/workspace.rs Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The cross-cutting changes affect campaign correctness, persistence, process execution, scheduling, caching, and reporting across many crates and require final human validation.

Review effort: Lite
Findings: None

Resolved since last review (1)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

A new Windows symlink test assumes host symlink privileges without capability-aware handling, which can make ordinary test runs fail.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity

Open (1)

Comment thread crates/cargo-gamma-lib/src/paths.rs Outdated
@psandana

Copy link
Copy Markdown
Contributor

🤖 Pato's Pull Request Agent: Fast Checks and Anvil fmt [pr-fast] are failing on the current head (7220a279).

Good news: the earlier anvil-clippy blocker I flagged (production_gamma_base "never used") is resolved on this head — the fn is now #[cfg(test)] and exercised by tests.

However this newest amended head still fails PR Job / Check Group: Fast Checks (linux, windows, and both arm) and the Anvil / fmt [pr-fast] jobs. This lines up with the PR note that "local Rust tooling is intentionally deferred while a long-running cargo-gamma campaign is active" — the follow-up commits were pushed without a formatting/lint pass. Please run just anvil-fmt (not cargo fmt) and just anvil-clippy locally and push the result so Fast Checks go green before merge.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Baseline diagnostics still call categorical failures such as timeouts “test failures,” producing inaccurate user-facing error messages.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
Resolved since last review (1)

Comment thread crates/cargo-gamma-lib/src/exec/baseline.rs Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Windows nested processes receive the sysroot path through LD_LIBRARY_PATH, although the Windows loader uses PATH.

Review effort: Lite
Findings: None

Resolved since last review (1)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The broad cross-cutting changes to execution, persistence, caching, scheduling, and platform process handling require final human validation.

Review effort: Lite
Findings: None

Comment thread crates/cargo-gamma-lib/src/exec/workspace.rs Outdated
@psandana

Copy link
Copy Markdown
Contributor

🤖 Pato's Pull Request Agent: Fast Checks CI is now failing on _anvil-readme on the current head (b4cf5e5)PR Job / Check Group: Fast Checks (linux) and (linux-arm) both end with error: recipe _anvil-readme failed with exit code 1.

Good news: the anvil-fmt drift I flagged on the earlier head is resolved. The remaining blocker is different — a generated README is out of sync with this PR's source docs. just anvil-readme regenerates crate README(s) from the crate-level (//!) docs and fails when the committed README doesn't match; several docs/CLI surfaces changed here (config keys, --only-survivors-from, census/whole-binary wording, migration notes), so the regenerated output has drifted from what's checked in.

The PR description lists just anvil-readme under validation "previously completed", but it fails on this head — it needs to be re-run and the regenerated README committed. This is a blocking regression introduced by this PR, not the known pre-existing master drift. Please run just anvil-readme locally and commit the result.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Explicit cache paths that alias the default scratch bypass ownership validation and can be concurrently shared by different workspaces.

Review effort: Lite
Findings: None

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The changes span scheduling, cache placement, persistence, process environments, CLI contracts, and diagnostics, requiring final human validation despite extensive tests.

Review effort: Lite
Findings: None

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The changes span mutation discovery, scheduling, persistence, cache layout, CLI contracts, runtime wrappers, and diagnostics across many crates.

Review effort: Lite
Findings: None

- Improve mutation discovery with semantic type/default inference, stable identities, conservative no-op suppression, and correctly scoped nested return contexts.

- Capture compiler-derived source and test-binary linkage, synchronize scratch builds, and reconstruct Cargo-compatible runtime environments for direct and nextest execution.

- Collect complete baseline failures, preserve conservative reachability and verdict semantics, and retain actionable state when builds or baselines fail.

- Add optional guard census, assignment-time package-fair scheduling, deterministic file/item learning, and canonical whole-binary fallbacks.

- Replace full-population scheduler scans with indexed per-package queues and a global package-head frontier that rekeys only affected files.

- Persist generation-aware YAML hints with legacy migration, race-safe promotion and replacement, incremental verdict reuse, and survivor-only reruns through --only-survivors-from.

- Make upfront and live duration estimates confirmation-aware, workload-weighted, lane-aware, and adaptive to observed outcomes and in-flight work.

- Expand diagnostics and reports with census economics, selection and hint effectiveness, build withdrawals, package timelines, surviving mutants, and failure artifacts.

- Harden process supervision, platform/runtime environment handling, memory and stall accounting, path rendering, and error propagation.

- Split default cache storage so synchronized source and runtime stay external while Cargo artifacts and campaign state live under the resolved target directory.

- Use rallocator for the cargo-gamma executable and synchronize CLI, configuration, design, scheduling, mutator, implementation, and generated user documentation with focused regression coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 67e931d7-6180-48b5-ba9d-b41c6bd76e27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The changes span cache placement, mutation scheduling, persistence formats, runtime wrapping, diagnostics, and public CLI contracts across multiple crates.

Review effort: Lite
Findings: None

@github-actions

Copy link
Copy Markdown

⚠️ SemVer check advisory

Inconclusive comparisons

cargo semver-checks could not complete the following comparisons. These failures are informational because an unbuildable baseline is not evidence of a breaking API change.

cargo-aprz-lib (exit 101)

     Cloning 2dfdaab10f6f66c92aeacb7d6527ace3b4f15b2c
    Building cargo-aprz-lib v1.1.2 (current)
error: running cargo-doc on crate 'cargo-aprz-lib' failed with output:
-----
   Compiling proc-macro2 v1.0.107
   Compiling unicode-ident v1.0.26
   Compiling quote v1.0.47
   Compiling libc v0.2.189
    Checking memchr v2.8.3
    Checking cfg-if v1.0.5
    Checking smallvec v1.16.1
    Checking bytes v1.12.1
    Checking regex-syntax v0.8.11
    Checking once_cell v1.21.4
   Compiling syn v3.0.6
   Compiling thiserror v2.0.20
    Checking stable_deref_trait v1.2.1
   Compiling crc32fast v1.5.2
   Compiling crossbeam-utils v0.8.23
    Checking regex-automata v0.4.18
    Checking scopeguard v1.2.0
    Checking zlib-rs v0.6.8
   Compiling parking_lot_core v0.9.12
   Compiling getrandom v0.4.3
    Checking gix-trace v0.1.21
    Checking fastrand v2.5.0
    Checking bitflags v2.13.2
    Checking lock_api v0.4.14
    Checking tinyvec v1.13.3
    Checking bstr v1.13.1
   Compiling serde_core v1.0.229
    Checking parking_lot v0.12.5
    Checking unicode-normalization v0.1.25
    Checking itoa v1.0.18
    Checking gix-validate v0.11.4
    Checking gix-utils v0.3.6
    Checking crossbeam-channel v0.5.17
    Checking same-file v1.0.6
    Checking walkdir v2.5.0
   Compiling find-msvc-tools v0.1.13
    Checking byteorder v1.5.0
    Checking equivalent v1.0.2
    Checking allocator-api2 v0.2.21
    Checking foldhash v0.2.0
   Compiling shlex v2.0.1
    Checking prodash v31.0.0
   Compiling jobserver v0.1.35
   Compiling cc v1.4.7
    Checking gix-error v0.2.5
   Compiling version_check v0.9.5
   Compiling pkg-config v0.3.34
   Compiling generic-array v0.14.7
    Checking hashbrown v0.17.1
    Checking typenum v1.20.1
   Compiling thiserror-impl v2.0.20
   Compiling heapless v0.8.0
    Checking hash32 v0.3.1
    Checking faster-hex v0.10.0
    Checking cpufeatures v0.2.17
   Compiling serde v1.0.229
   Compiling serde_derive v1.0.229
    Checking jiff-core v0.1.1
    Checking crypto-common v0.1.7
    Checking block-buffer v0.10.4
    Checking digest v0.10.7
    Checking sha1 v0.10.7
    Checking pin-project-lite v0.2.17
    Checking gix-path v0.12.6
    Checking sha1-checked v0.10.0
    Checking gix-features v0.48.1
   Compiling synstructure v0.14.0
   Compiling rustix v1.1.5
    Checking jiff v0.2.37
    Checking gix-hash v0.25.1
    Checking linux-raw-sys v0.12.1
   Compiling zerofrom-derive v0.1.8
    Checking zerofrom v0.1.8
   Compiling yoke-derive v0.8.3
    Checking gix-date v0.15.6
   Compiling autocfg v1.5.1
    Checking gix-actor v0.41.2
    Checking gix-hashtable v0.15.2
    Checking futures-core v0.3.34
   Compiling zerovec-derive v0.11.6
    Checking gix-object v0.61.0
    Checking yoke v0.8.3
    Checking errno v0.3.14
   Compiling tokio-macros v2.7.2
    Checking signal-hook-registry v1.4.8
   Compiling displaydoc v0.2.7
    Checking socket2 v0.6.5
    Checking memmap2 v0.9.11
    Checking mio v1.2.3
   Compiling cmake v0.1.58
   Compiling rustversion v1.0.23
    Checking tokio v1.53.1
   Compiling dunce v1.0.5
   Compiling fs_extra v1.3.0
    Checking zerovec v0.11.8
    Checking futures-sink v0.3.34
   Compiling aws-lc-sys v0.45.0
    Checking tinystr v0.8.4
    Checking tempfile v3.27.0
    Checking gix-fs v0.21.2
    Checking gix-chunk v0.7.3
   Compiling vcpkg v0.2.15
    Checking percent-encoding v2.3.2
    Checking litemap v0.8.3
    Checking writeable v0.6.4
    Checking icu_locale_core v2.3.0
   Compiling libz-sys v1.1.29
    Checking gix-tempfile v23.0.2
    Checking potential_utf v0.1.6
    Checking zerotrie v0.2.5
    Checking gix-quote v0.7.2
    Checking tracing-core v0.1.36
    Checking zeroize v1.9.0
    Checking utf8_iter v1.0.4
   Compiling icu_normalizer_data v2.3.0
    Checking simd-adler32 v0.3.10
   Compiling aws-lc-rs v1.18.1
    Checking nonempty v0.12.0
   Compiling icu_properties_data v2.3.0
    Checking slab v0.4.12
    Checking tracing v0.1.44
    Checking icu_collections v2.3.0
    Checking icu_provider v2.3.1
    Checking http v1.5.0
    Checking fnv v1.0.7
    Checking adler2 v2.0.1
    Checking miniz_oxide v0.9.1
    Checking gix-commitgraph v0.37.1
    Checking rustls-pki-types v1.15.1
    Checking gix-glob v0.26.1
    Checking indexmap v2.14.2
    Checking log v0.4.34
    Checking futures-io v0.3.34
    Checking futures-task v0.3.34
    Checking tokio-util v0.7.19
    Checking futures-util v0.3.34
    Checking gix-revwalk v0.32.0
    Checking icu_properties v2.3.0
    Checking http-body v1.1.0
    Checking icu_normalizer v2.3.0
    Checking flate2 v1.1.10
    Checking gix-lock v23.0.1
   Compiling num-traits v0.2.19
   Compiling syn v2.0.119
   Compiling httparse v1.10.1
   Compiling rustls v0.23.45
    Checking untrusted v0.9.0
   Compiling zmij v1.0.23
    Checking idna_adapter v1.2.2
   Compiling encoding_rs v0.8.41
    Checking futures-channel v0.3.34
    Checking tower-layer v0.3.3
    Checking subtle v2.6.1
    Checking static_assertions v1.1.0
    Checking try-lock v0.2.5
    Checking tower-service v0.3.3
    Checking atomic-waker v1.1.2
    Checking unicode-bom v2.0.3
    Checking h2 v0.4.19
    Checking want v0.3.1
    Checking idna v1.1.0
    Checking form_urlencoded v1.2.2
    Checking gix-config-value v0.18.1
    Checking core_detect v1.0.0
    Checking simdutf8 v0.1.5
   Compiling serde_json v1.0.151
    Checking compression-core v0.4.33
   Compiling multiversion_no_op v1.0.0
    Checking shell-words v1.1.1
    Checking hyper v1.11.1
    Checking gix-command v0.9.2
    Checking compression-codecs v0.4.43
    Checking url v2.5.8
    Checking kstring v2.0.5
    Checking sync_wrapper v1.0.2
    Checking gix-sec v0.14.2
    Checking ipnet v2.12.2
    Checking openssl-probe v0.2.1
    Checking base64 v0.22.1
    Checking rustls-native-certs v0.8.4
    Checking tower v0.5.3
    Checking gix-attributes v0.33.2
    Checking hyper-util v0.1.20
    Checking async-compression v0.4.48
    Checking http-body-util v0.1.5
   Compiling heck v0.5.0
   Compiling crossbeam-epoch v0.9.21
    Checking tower-http v0.6.11
    Checking gix-ref v0.64.0
    Checking gix-url v0.36.2
    Checking gix-packetline v0.21.5
    Checking filetime v0.2.29
   Compiling crossbeam-deque v0.8.8
    Checking mime v0.3.17
    Checking base64 v0.23.1
    Checking either v1.18.0
    Checking gix-prompt v0.15.1
    Checking gix-revision v0.46.0
    Checking gix-traverse v0.58.0
   Compiling zstd-sys v2.1.0+zstd.1.5.7
    Checking gix-bitmap v0.3.3
    Checking hashbrown v0.16.1
    Checking fast_time v0.1.32
    Checking arrayvec v0.7.8
   Compiling camino v1.2.6
   Compiling rayon-core v1.13.0
    Checking uluru v3.1.0
    Checking nm_impl v0.1.50
    Checking gix-index v0.52.0
    Checking gix-refspec v0.42.0
    Checking clru v0.6.3
    Checking gix-credentials v0.38.2
    Checking gix-ignore v0.21.1
   Compiling memoffset v0.9.1
    Checking semver v1.0.28
   Compiling cfg_aliases v0.2.2
   Compiling thiserror v1.0.69
    Checking utf8parse v0.2.2
    Checking winnow v1.0.4
    Checking anstyle-parse v1.0.0
   Compiling nix v0.30.1
    Checking toml_parser v1.1.3+spec-1.1.0
    Checking gix-worktree v0.53.0
    Checking gix-pack v0.71.0
    Checking nm v0.1.50
    Checking gix-config v0.57.0
    Checking gix-filter v0.31.0
    Checking gix-pathspec v0.18.1
   Compiling maybe-async v0.2.11
   Compiling thiserror-impl v1.0.69
    Checking gix-shallow v0.12.1
    Checking gix-negotiate v0.32.0
    Checking arc-swap v1.9.2
   Compiling fs-err v3.3.1
    Checking serde_spanned v1.1.1
    Checking toml_datetime v1.1.1+spec-1.1.0
    Checking smol_str v0.3.6
    Checking io-close v0.3.7
    Checking anstyle-query v1.1.5
   Compiling portable-atomic v1.15.0
   Compiling typeid v1.0.3
    Checking unicode-properties v0.1.4
    Checking colorchoice v1.0.5
    Checking anstyle v1.0.14
    Checking toml_writer v1.1.2+spec-1.1.0
   Compiling zstd-safe v8.0.0
    Checking bit-vec v0.8.0
    Checking is_terminal_polyfill v1.70.2
    Checking bumpalo v3.20.3
    Checking bit-set v0.8.0
    Checking anstream v1.0.0
    Checking zopfli v0.8.3
    Checking toml v1.1.6+spec-1.1.0
    Checking ra-ap-rustc_lexer v0.160.0
error[E0080]: evaluation panicked: unicode-properties and unicode-ident must use the same Unicode version, `unicode_properties::UNICODE_VERSION` and `unicode_ident::UNICODE_VERSION` are different.
  --> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ra-ap-rustc_lexer-0.160.0/src/lib.rs:47:9
   |
47 | /         panic!(
48 | |             "unicode-properties and unicode-ident must use the same Unicode version, \
49 | |             `unicode_properties::UNICODE_VERSION` and `unicode_ident::UNICODE_VERSION` are \
50 | |             different."
51 | |         );
   | |_________^ evaluation of `_` failed here

For more information about this error, try `rustc --explain E0080`.
error: could not compile `ra-ap-rustc_lexer` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...

-----

error: failed to build rustdoc for crate cargo-aprz-lib v1.1.2
note: this is usually due to a compilation error in the crate,
      and is unlikely to be a bug in cargo-semver-checks
note: the following command can be used to reproduce the error:
      cargo new --lib example &&
          cd example &&
          echo '[workspace]' >> Cargo.toml &&
          cargo add --path /home/runner/work/ox-tools/ox-tools/crates/cargo-aprz-lib --features internals &&
          cargo check &&
          cargo doc

error: aborting due to failure to build rustdoc for crate cargo-aprz-lib v1.1.2

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.

7 participants