Skip to content

chore: retire the DEEPSEEK_YOLO env alias (#5443) - #5841

Merged
Hmbown merged 1 commit into
mainfrom
chore/retire-deepseek-yolo
Sep 2, 2026
Merged

chore: retire the DEEPSEEK_YOLO env alias (#5443)#5841
Hmbown merged 1 commit into
mainfrom
chore/retire-deepseek-yolo

Conversation

@Hmbown

@Hmbown Hmbown commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Closes #5443. Single commit off current tip. Gates: fmt clean, dead-code budget PASS at 425. Full matrix via CI.


Note

Low Risk
Behavior change is limited to no longer writing a legacy env var; existing scripts that set DEEPSEEK_YOLO still work on read paths.

Overview
Stops emitting DEEPSEEK_YOLO when --yolo is used; the CLI now sets only CODEWHALE_YOLO. Reading DEEPSEEK_YOLO as a fallback alias is unchanged through 0.9.x, with CODEWHALE_YOLO winning when both are set; removal is planned for 0.10 (#5443).

Adds regression tests in the CLI, config, and TUI layers for “write canonical only” and alias precedence. Config/TUI code gains inline docs; invalid-value warnings mention only CODEWHALE_YOLO. REBRAND docs (EN/ID) document the deprecation.

Reviewed by Cursor Bugbot for commit 949a00e. Bugbot is set up for automated code reviews on this repo. Configure here.

Copilot AI lite review requested due to automatic review settings September 2, 2026 20:08
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@cursor

cursor Bot commented Sep 2, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_9d89ac5a-c02f-4d0f-97ef-4a3785660072)

@claude

claude Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Claude finished @Hmbown's task in 1m 30s —— View job


Review: retire the DEEPSEEK_YOLO write path

  • Gather context (diff, changed files, CLAUDE.md/AGENTS.md rules)
  • Review correctness
  • Review provider/model/route safety implications
  • Review reuse/simplification
  • Review test coverage
  • Review security
  • Post final review

Summary: Small, well-scoped change. --yolo now only sets CODEWHALE_YOLO (crates/cli/src/lib.rs:5172); the DEEPSEEK_YOLO write is dropped while the read fallback stays in both crates/config/src/lib.rs:7055 and crates/tui/src/config.rs:9287 through 0.9.x, matching the deprecation timeline documented in docs/REBRAND.md/docs/id/REBRAND.md and issue #5443. This is a good example of the "narrow the slice, never the adoption" guidance in AGENTS.md — it retires exactly the write path this issue targets rather than trying to rip out the whole alias in one PR.

Correctness: No bugs found.

  • The new yolo_flag_writes_only_the_codewhale_env_var test (crates/cli/src/lib.rs:5521) correctly isolates env state with the existing env_lock()/ScopedEnvVar helpers rather than inventing new scaffolding.
  • The two new tests in crates/config/src/tests.rs:2022 and crates/tui/src/config/tests.rs:1433 both exercise the three relevant cases (canonical-only, alias-only, both-set-canonical-wins) and reuse the existing EnvGuard/lock_test_env helpers — good symmetry between the two config-resolution sites.
  • The "false" case is verified correctly: crates/tui/src/config.rs's value == "1" || value.eq_ignore_ascii_case("true") yields Some(false) for CODEWHALE_YOLO=false, matching the test's "canonical wins" assertion.

Provider/model/route safety: Not applicable — this touches only the --yolo posture flag, no provider/model selection or prefix inference is involved.

Reuse/simplification: The DEEPSEEK_YOLO read-fallback logic remains duplicated between crates/config/src/lib.rs and crates/tui/src/config.rs (pre-existing, not introduced here). Given the PR's explicit narrow scope (write-path retirement only, per #5443), leaving that alone here is consistent with the repo's one-way-migration guidance rather than a gap in this PR.

Tests: Coverage is appropriate and mirrors the production branches; no gaps for the behavior actually changed.

Security: No concerns — no secret handling or exec policy touched.

Note: I was not able to run cargo test/cargo fmt in this sandbox (network/build commands require approval I don't have here), so I relied on manual reading of the diff and existing helper definitions. The PR description states fmt is clean and the dead-code budget gate passes at 425, with the full matrix run via CI — that CI run is the authoritative gate per AGENTS.md's "a gate is its artifact" rule.

No blocking issues found.

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 read-path deprecation warning mechanism described in #5443 isn’t implemented for DEEPSEEK_YOLO, and the new env-mutation tests don’t restore env vars on panic, risking cross-test contamination.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR retires the write path for the legacy DEEPSEEK_YOLO environment variable, ensuring --yolo only emits the canonical CODEWHALE_YOLO while keeping DEEPSEEK_YOLO readable as a fallback alias through 0.9.x. It also updates rebrand documentation and adds regression coverage for alias precedence.

Changes:

  • Stop exporting DEEPSEEK_YOLO from the CLI when --yolo is used; export only CODEWHALE_YOLO.
  • Document DEEPSEEK_YOLO as deprecated (EN/ID) and clarify precedence (CODEWHALE_YOLO wins when both are set).
  • Add tests in config/TUI/CLI layers to validate canonical-only writes and alias precedence.
File summaries
File Description
docs/REBRAND.md Documents DEEPSEEK_YOLO deprecation and canonical CODEWHALE_YOLO usage (EN).
docs/id/REBRAND.md Same deprecation/precedence documentation in Indonesian.
crates/tui/src/lib.rs Updates inline launcher documentation to reference CODEWHALE_YOLO forwarding.
crates/tui/src/config/tests.rs Adds TUI config test for yolo env alias precedence.
crates/tui/src/config.rs Adds inline docs clarifying DEEPSEEK_YOLO as a deprecated alias read path.
crates/config/src/tests.rs Adds config-layer test for yolo env alias precedence.
crates/config/src/lib.rs Clarifies alias semantics in comments and narrows invalid-value warning wording.
crates/cli/src/lib.rs Stops writing DEEPSEEK_YOLO; adds CLI regression test ensuring only canonical env is written.
Review details
  • Files reviewed: 8/8 changed files
  • Comments generated: 4
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread crates/config/src/lib.rs
Comment on lines +7051 to 7056
// `DEEPSEEK_YOLO` is a read-only deprecated alias of
// `CODEWHALE_YOLO` so existing scripts keep working; when both are
// set `CODEWHALE_YOLO` wins. The alias is removed in 0.10 per
// issue #5443 — do not write it anywhere.
yolo: std::env::var("CODEWHALE_YOLO")
.or_else(|_| std::env::var("DEEPSEEK_YOLO"))
Comment on lines +2026 to +2029
let codewhale_prev = env::var_os("CODEWHALE_YOLO");
let deepseek_prev = env::var_os("DEEPSEEK_YOLO");
let config = ConfigToml::default();

Comment thread crates/tui/src/config.rs
Comment on lines +9284 to 9289
// `DEEPSEEK_YOLO` is a read-only deprecated alias of `CODEWHALE_YOLO`
// (removable in 0.10 per issue #5443); `CODEWHALE_YOLO` wins when both
// are set.
if let Ok(value) = std::env::var("CODEWHALE_YOLO").or_else(|_| std::env::var("DEEPSEEK_YOLO")) {
config.yolo = Some(value == "1" || value.eq_ignore_ascii_case("true"));
}
Comment on lines +1436 to +1439
let codewhale_prev = env::var_os("CODEWHALE_YOLO");
let deepseek_prev = env::var_os("DEEPSEEK_YOLO");
let mut config = Config::default();

@codewhale-agent codewhale-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Codewhale review

PR stops emitting DEEPSEEK_YOLO when --yolo is used while preserving read fallback. Adds tests for canonical write and alias precedence. One TUI test scenario is not isolated and could pass even if the alias stopped working.

Findings

  • [WARNING] TUI yolo alias test reuses mutated Config, second scenario not isolated (crates/tui/src/config/tests.rs:1452)
    The test creates one config and mutates it with the first apply_env_overrides, leaving config.yolo = Some(true). The second scenario removes CODEWHALE_YOLO and sets DEEPSEEK_YOLO, but if the alias were not read, apply_env_overrides would not overwrite the existing config.yolo, so the assertion would still pass. This makes the test unable to catch regressions where DEEPSEEK_YOLO is no longer honored. Reset config to Config::default() before the second scenario (or use a fresh Config).

Suggestions

  • crates/tui/src/config/tests.rs:1452 — Reset config before testing the deprecated alias so the assertion does not pass because of state left by the previous case.

        // Reset config so this scenario doesn't inherit yolo=true from the previous case.
        config = Config::default();
    
        // Only the deprecated alias is set: it must keep working through 0.9.x.
    

Assessment

PR is well scoped and the core change is correct. The tests largely cover the intended behavior, but the TUI alias-precedence test needs a config reset between scenarios to avoid a false positive.


Advisory review by Codewhale (codewhale review --pr 5841 --post, head 949a00e58ce6b9ed43c87a2d5d70c36737cc22a4). Line-specific findings are also posted as inline review comments; mechanical fixes arrive as committable suggestions you can apply from the Files tab. CODEOWNERS approval still governs merge.

"CODEWHALE_YOLO=true must enable the yolo posture"
);

// Only the deprecated alias is set: it must keep working through 0.9.x.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[WARNING] TUI yolo alias test reuses mutated Config, second scenario not isolated

The test creates one config and mutates it with the first apply_env_overrides, leaving config.yolo = Some(true). The second scenario removes CODEWHALE_YOLO and sets DEEPSEEK_YOLO, but if the alias were not read, apply_env_overrides would not overwrite the existing config.yolo, so the assertion would still pass. This makes the test unable to catch regressions where DEEPSEEK_YOLO is no longer honored. Reset config to Config::default() before the second scenario (or use a fresh Config).

"CODEWHALE_YOLO=true must enable the yolo posture"
);

// Only the deprecated alias is set: it must keep working through 0.9.x.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Reset config before testing the deprecated alias so the assertion does not pass because of state left by the previous case.

Suggested change
// Only the deprecated alias is set: it must keep working through 0.9.x.
// Reset config so this scenario doesn't inherit yolo=true from the previous case.
config = Config::default();
// Only the deprecated alias is set: it must keep working through 0.9.x.

@Hmbown
Hmbown merged commit c7c3065 into main Sep 2, 2026
36 checks passed
@Hmbown
Hmbown deleted the chore/retire-deepseek-yolo branch September 2, 2026 21:28
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.

Epic: retire the deepseek-tui-era identifiers — tiered migration (internals now, env aliases deprecated to 0.10, storage keys via explicit migration)

2 participants