Skip to content

fix(minimal): build in release mode again - #3684

Open
bryan-minimal wants to merge 1 commit into
mainfrom
fix/release-build-debug-only-commands
Open

bryan-minimal wants to merge 1 commit into
mainfrom
fix/release-build-debug-only-commands

Conversation

@bryan-minimal

@bryan-minimal bryan-minimal commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

What

main does not compile in release mode since #3644. A release build of the minimal crate stops at:

error[E0599]: no variant, associated function, or constant named `Spin` found for enum `cli::Command`
error[E0599]: no variant, associated function, or constant named `DebugAnswererCommand` found for enum `cli::Command`
error: could not compile `minimal` (lib) due to 2 previous errors

shows_native_boxes_notice in crates/minimal/src/cmd/mod.rs names Command::Spin and Command::DebugAnswererCommand in its pattern. Both variants are #[cfg(debug_assertions)], so a release build has no such names. Every other use of the two in that file carries the gate already.

The change

The two names move into a debug-only early return at the top of the function. A debug build behaves as before (neither command prints the notice); a release build compiles.

One test in crates/minimal/src/update_check/tests.rs named DebugAnswererCommand without the gate as well. That stopped a release build of the tests, and has since #2650. That one assertion has the gate now.

15 lines added, 6 removed. No behaviour change in either build mode.

How it was found, and checked

A release build of two unrelated branches failed on this error after they took today's main. Branches based on main from before #3644 build.

With this change: format, clippy, the workspace tests, doctests and the native e2e pass, and the release build of the workspace completes.

Why CI did not catch it

No required check compiles the minimal crate with debug assertions off: the CI lanes build the dev profile. The release workflow builds min with --release, so the next release or nightly build is the first thing that would hit it. A check of the release profile in CI would catch this class of mistake; that is not added here.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Fixed release-build compatibility for command notice handling.
    • Kept debug-only command exclusions and aligned the related test with debug build settings.

The function that decides whether a command prints the native-boxes
notice named the spinner run and the answerer aid in its pattern. Both
commands exist in debug builds only, so a release build of the crate
stopped at "no variant named Spin" and "no variant named
DebugAnswererCommand". The other uses of the two names carry the debug
gate already.

The two names move into a debug-only early return, which keeps the debug
behaviour as it was. One test named the answerer aid without the gate as
well, which stopped a release build of the tests; it has the gate now.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@bryan-minimal
bryan-minimal requested a review from a team as a code owner November 20, 2026 17:18
@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The notice-visibility helper now handles debug-only command variants inside a debug-assertions block. Its shared predicate excludes Proxy and CompleteSessionStr. The related test assertion for DebugAnswererCommand is also conditional on debug assertions.

Changes: Native boxes notice visibility

Layer / File(s) Summary
Separate debug-only exclusions and test assertion
crates/minimal/src/cmd/mod.rs, crates/minimal/src/update_check/tests.rs
The helper excludes Spin and DebugAnswererCommand in debug builds and keeps Proxy and CompleteSessionStr in its shared predicate. The test gates the DebugAnswererCommand assertion on debug assertions.

Estimated code review effort: 2 (Simple) | ~8 minutes

Possibly related PRs

  • gominimal/minimal#3682: This PR changes the same helper and debug-only variants to avoid naming those variants in release builds.

Suggested reviewers: norrietaylor, mitodrummer

Merge Risk: Minimal · up to 6dd5a

This fixes the release-mode build failure without changing debug behavior. No merge-blocking risk is apparent.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix(minimal): build in release mode again" follows the Conventional Commit form, names the affected crate, and states the main change: the minimal crate builds in release mode again. The ra…
Description check Passed The description follows the template's main parts. It has a What section and a Testing section with evidence of format, clippy, workspace tests, doctests, native e2e, and a release build. It also expl…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "fix(minimal): build in release mode again" follows the Conventional Commit form, names the affected crate, and states the main change: the minimal crate builds in release mode again. The raw summary and objectives confirm the change gates debug-only command variants (Spin, DebugAnswererCommand) so release builds compile.

Full details: Description check

Explanation

The description follows the template's main parts. It has a What section and a Testing section with evidence of format, clippy, workspace tests, doctests, native e2e, and a release build. It also explains the change and why CI missed the error. The Checklist items are not ticked, and the Summary section is not headed as in the template. The description does not link an issue with Refs or Closes. The description is mostly complete, so the check passes.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the notice with care,
Debug-only names stay in their lair.
Shared exclusions stand in the light,
Tests guard their claims just right.
Then off hops the rabbit, pleased and bright.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: bc96662c-c938-40d4-a766-3edcd3228630
Commits

Reviewing files that changed from the base of the PR and between 14b5723 and 6dd5ae6.

Files selected for processing: 2

  • crates/minimal/src/cmd/mod.rs
  • crates/minimal/src/update_check/tests.rs

Included review availability: This review used your included allowance. Your plan provides up to 5 included reviews per hour; 1 remain after this review.

@minimal-foundry

minimal-foundry Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Approved: no findings at 6dd5ae68568a.

Nothing to do.

Clobber: none seen.

@minimal-foundry minimal-foundry Bot 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.

minimal-review — approved

Verdict APPROVE — No findings.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Nov 20, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant