Skip to content

Commit ff32310

Browse files
author
Martin Taillefer
committed
fix(cargo-gamma): stabilize builds and output handling
- Stabilize staged workspace builds. Keep a constant whole-workspace Cargo root set when the resolved selection covers every member, while limiting mutation blame and rollback to the current stage. This prevents dependency feature changes from repeatedly compiling new variants. - Make build-output capture robust. Raise each Cargo stream limit from 4 MiB to 256 MiB and each logical-line limit from 64 KiB to 1 MiB, while growing buffers on demand instead of reserving the ceiling up front. - Normalize Cargo progress rendering. Consume Cargo's leading ANSI erase-to-end-of-line sequence so redirected or non-ANSI displays do not print a literal `\e[K`. - Remove the containment startup warning. Hosts without delegated cgroups still use the existing best-effort process-group fallback, but cargo-gamma no longer emits the noisy warning. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6ca9796b-96b2-41c1-b138-4ecbb21aac02
1 parent 7a5daf3 commit ff32310

16 files changed

Lines changed: 272 additions & 98 deletions

File tree

Cargo.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ bytes = { version = "1.12.1", default-features = false }
3434
camino = { version = "1.2.5", default-features = false }
3535
# local dependencies
3636
cargo-aprz-lib = { path = "crates/cargo-aprz-lib", default-features = false, version = "1.1.2" }
37-
cargo-gamma-attrs-impl = { path = "crates/cargo-gamma-attrs-impl", default-features = false, version = "0.2.0" }
38-
cargo-gamma-engine = { path = "crates/cargo-gamma-engine", default-features = false, version = "0.2.0" }
39-
cargo-gamma-lib = { path = "crates/cargo-gamma-lib", default-features = false, version = "0.2.0" }
40-
cargo-gamma-process = { path = "crates/cargo-gamma-process", default-features = false, version = "0.2.0" }
41-
cargo-gamma-rt = { path = "crates/cargo-gamma-rt", default-features = false, version = "0.2.0" }
42-
cargo-gamma-unsafe = { path = "crates/cargo-gamma-unsafe", default-features = false, version = "0.2.0" }
37+
cargo-gamma-attrs-impl = { path = "crates/cargo-gamma-attrs-impl", default-features = false, version = "0.2.1" }
38+
cargo-gamma-engine = { path = "crates/cargo-gamma-engine", default-features = false, version = "0.2.1" }
39+
cargo-gamma-lib = { path = "crates/cargo-gamma-lib", default-features = false, version = "0.2.1" }
40+
cargo-gamma-process = { path = "crates/cargo-gamma-process", default-features = false, version = "0.2.1" }
41+
cargo-gamma-rt = { path = "crates/cargo-gamma-rt", default-features = false, version = "0.2.1" }
42+
cargo-gamma-unsafe = { path = "crates/cargo-gamma-unsafe", default-features = false, version = "0.2.1" }
4343
cargo-heather = { path = "crates/cargo-heather", default-features = false, version = "0.2.1" }
4444
# external dependencies
4545
cargo-platform = { version = "0.3.3", default-features = false }

crates/cargo-gamma-attrs-impl/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[package]
55
name = "cargo-gamma-attrs-impl"
66
description = "Implementation of the inert attribute macros exposed by cargo-gamma-attrs"
7-
version = "0.2.0"
7+
version = "0.2.1"
88
readme = "README.md"
99
keywords = ["cargo", "mutation-testing", "testing"]
1010
categories = ["development-tools::testing"]

crates/cargo-gamma-attrs/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[package]
55
name = "cargo-gamma-attrs"
66
description = "Inert attribute macros for suppressing cargo-gamma mutations"
7-
version = "0.2.0"
7+
version = "0.2.1"
88
readme = "README.md"
99
keywords = ["cargo", "mutation-testing", "testing"]
1010
categories = ["development-tools::testing"]

crates/cargo-gamma-engine/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[package]
55
name = "cargo-gamma-engine"
66
description = "Internal Rust source mutation engine for cargo-gamma"
7-
version = "0.2.0"
7+
version = "0.2.1"
88
readme = "README.md"
99
keywords = ["cargo", "mutation-testing", "testing"]
1010
categories = ["development-tools::testing"]

crates/cargo-gamma-lib/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[package]
55
name = "cargo-gamma-lib"
66
description = "Internal library for cargo-gamma"
7-
version = "0.2.0"
7+
version = "0.2.1"
88
readme = "README.md"
99
keywords = ["cargo", "mutation-testing", "testing"]
1010
categories = ["development-tools::testing"]

crates/cargo-gamma-lib/docs/design/README.md renamed to crates/cargo-gamma-lib/docs/DESIGN.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,24 @@ includes both failure to acquire the startup environment and a guard reached
6161
before the runtime constructor installed its selection; either fixed marker
6262
disqualifies the process as mutation-score evidence.
6363

64+
Interactive build progress reuses Cargo's progress text while cargo-gamma owns
65+
the terminal redraw. Cargo's leading erase control is consumed rather than
66+
rendered visibly, and its color styling remains intact.
67+
68+
Each Cargo output stream is retained up to 256 MiB for artifact and diagnostic
69+
processing, and each logical line is bounded at 1 MiB. The buffers grow with
70+
observed output rather than reserving those ceilings for every invocation.
71+
72+
When Cargo's resolved package selection covers the whole workspace, every stage
73+
checks mutation viability with that constant Cargo root set. Packages with no
74+
mutable files may be omitted from preflight, but do not narrow the staged
75+
checks. This keeps dependency feature unification identical across stages
76+
instead of compiling a new dependency variant for each downstream package
77+
selection. Diagnostic blame, isolation, and withdrawal remain limited to the
78+
current stage even though Cargo checks the wider graph. The final test-target
79+
build retains its reachability-based package selection; runs whose original
80+
Cargo selection is a package subset retain their narrowed graph throughout.
81+
6482
Diff paths are resolved to the workspace-relative Rust files discovered by the
6583
survey. Absolute or rooted paths inside the workspace are normalized to those
6684
candidates; one from another checkout is normalized only when its suffix

0 commit comments

Comments
 (0)