Skip to content

fix: honor deprecated experimental flags instead of ignoring them - #532

Open
not-matthias wants to merge 1 commit into
mainfrom
fix/deprecated-experimental-flags
Open

fix: honor deprecated experimental flags instead of ignoring them#532
not-matthias wants to merge 1 commit into
mainfrom
fix/deprecated-experimental-flags

Conversation

@not-matthias

@not-matthias not-matthias commented Sep 8, 2026

Copy link
Copy Markdown
Member

--experimental-cycle-estimation and --experimental-exclude-allocations were parsed but deliberately dropped. Since --exclude-allocations defaults to false, anyone still passing the old flag silently lost allocation exclusion.

Both now feed their graduated counterparts, and the warning states the truth instead of "has no effect":

⚠ --experimental-exclude-allocations is deprecated and will be removed in a future release: use --exclude-allocations instead.

Closes COD-3511

@greptile-apps

greptile-apps Bot commented Sep 8, 2026

Copy link
Copy Markdown

Greptile Summary

This PR makes the deprecated cycle-estimation and allocation-exclusion options feed their stable counterparts for both run and exec, and updates their migration warnings.

  • Adds shared resolution methods for the stable and deprecated values.
  • Uses the resolved values when constructing orchestrator configurations.
  • Adds parsing coverage for the deprecated CLI spellings.
  • The current merge strategy loses explicit stable-option precedence when legacy environment variables remain set.

Confidence Score: 4/5

The PR is not yet safe to merge because stale deprecated environment settings can override explicit stable CLI disables, and the changed warning must also comply with the repository logging requirement.

The independent stable and deprecated fields are combined with OR, so an explicit --cycle-estimation=false or --exclude-allocations=false cannot win over a true legacy environment value; the revised warning also retains a prohibited direct stderr write.

Files Needing Attention: src/cli/shared.rs, src/cli/experimental.rs

Important Files Changed

Filename Overview
src/cli/shared.rs Adds alias resolution and tests, but logical OR allows deprecated environment settings to override explicit stable false values.
src/cli/experimental.rs Updates deprecated-option documentation and warning text, while retaining direct stderr output contrary to the Rust logging rule.
src/cli/run/mod.rs Correctly routes resolved cycle-estimation and allocation-exclusion values into the run orchestrator configuration.
src/cli/exec/mod.rs Correctly routes resolved cycle-estimation and allocation-exclusion values into the exec orchestrator configuration.

Fix all with Greploop Fix All in Claude Code Fix All in Codex

Prompt To Fix All With AI
### Issue 1
src/cli/shared.rs:174-175
**Legacy settings override CLI**

If a deprecated environment variable remains enabled while the user explicitly disables the stable option—for example, `CODSPEED_EXPERIMENTAL_EXCLUDE_ALLOCATIONS=true` with `--exclude-allocations=false`—the logical OR keeps the feature enabled. The same applies to cycle estimation, so a lower-priority legacy setting can override the user's explicit command-line choice.

### Issue 2
src/cli/experimental.rs:92-97
**Warning bypasses tracing**

The revised deprecation warning writes directly to stderr with `eprintln!`. This violates the repository directive to use tracing macros such as `warn!` instead of `println!` or `eprintln!` in Rust, so the repository requirement must be satisfied before merging.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "fix: honor deprecated experimental flags..." | Re-trigger Greptile

Comment thread src/cli/shared.rs
Comment thread src/cli/experimental.rs Outdated
Comment on lines 92 to 97
eprintln!(
" {} {} has no effect: {} is now controlled by {}.",
" {} {} is deprecated and will be removed in a future release: use {} instead.",
style(Icon::Warning.to_string()).yellow(),
style(*flag).bold(),
feature,
style(*new_flag).bold(),
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Warning bypasses tracing

The revised deprecation warning writes directly to stderr with eprintln!. This violates the repository directive to use tracing macros such as warn! instead of println! or eprintln! in Rust, so the repository requirement must be satisfied before merging.

Rule Used: Never use println!/eprintln! in Rust; use trac... (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/cli/experimental.rs
Line: 92-97

Comment:
**Warning bypasses tracing**

The revised deprecation warning writes directly to stderr with `eprintln!`. This violates the repository directive to use tracing macros such as `warn!` instead of `println!` or `eprintln!` in Rust, so the repository requirement must be satisfied before merging.

**Rule Used:** Never use `println!`/`eprintln!` in Rust; use trac... ([source](https://app.greptile.com/codspeed/-/custom-context?memory=f04f734b-e556-482b-98b9-64c7ce663663))

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Claude Code Fix in Codex

@codspeed-hq

codspeed-hq Bot commented Sep 8, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

✅ 17 untouched benchmarks


Comparing fix/deprecated-experimental-flags (e11c9df) with main (37eba9e)

Open in CodSpeed

`--experimental-cycle-estimation` and `--experimental-exclude-allocations`
were parsed but deliberately dropped, so anyone still passing
`--experimental-exclude-allocations` silently lost allocation exclusion.

Both now feed their graduated counterparts and warn that they are
deprecated and will be removed in a future release.
@not-matthias
not-matthias force-pushed the fix/deprecated-experimental-flags branch from 1cf5a8b to e11c9df Compare September 8, 2026 14:16
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.

1 participant