Skip to content

fix(cli): remove exec --dry-run option#216

Merged
fohte merged 1 commit intomainfrom
fohte/remove-exec-dry-run
Mar 15, 2026
Merged

fix(cli): remove exec --dry-run option#216
fohte merged 1 commit intomainfrom
fohte/remove-exec-dry-run

Conversation

@fohte
Copy link
Copy Markdown
Owner

@fohte fohte commented Mar 15, 2026

Why

  • runok exec --dry-run is fully superseded by runok check

What

  • Remove runok exec --dry-run option and all related code

Open with Devin

`exec --dry-run` is fully superseded by `runok check`, which offers
JSON output, stdin input, Claude Code hook format, and multi-command
batch checking. Removing the redundant code path reduces maintenance
surface without losing any functionality.

Remove the `dry_run` field from `ExecArgs`, `RunOptions`, and the
`handle_dry_run` method from the `Endpoint` trait. Remove `DryRunError`,
`DryRunResult`, and `CommandExecutor::dry_run` from the executor layer.
Update docs and all related tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request streamlines the command-line interface by eliminating a redundant option. The --dry-run flag for runok exec provided functionality that is now entirely superseded by the dedicated runok check command. This change simplifies the user experience by removing an unnecessary alternative and reduces the codebase by deleting the corresponding implementation and documentation.

Highlights

  • CLI Option Removal: The --dry-run option has been removed from the runok exec command, as its functionality is now fully covered by the runok check command.
  • Code Cleanup: All associated code, including internal logic, data structures, and tests related to exec --dry-run, has been removed.
  • Documentation Updates: The documentation has been updated to reflect the removal of the --dry-run option from runok exec and to guide users towards runok check for similar functionality.
Changelog
  • docs/src/content/docs/cli/exec.md
    • Removed documentation for the --dry-run option and its usage examples.
  • docs/src/content/docs/troubleshooting/debugging.md
    • Removed a section detailing runok exec --dry-run for debugging, directing users to runok check instead.
  • src/adapter/exec_adapter.rs
    • Removed the handle_dry_run method and related test cases, simplifying the ExecAdapter implementation.
  • src/adapter/mod.rs
    • Removed the dry_run field from the RunOptions struct.
    • Removed the handle_dry_run trait method from the Endpoint trait.
    • Updated comments and removed dry_run related logic from run_with_options.
  • src/cli/mod.rs
    • Removed the dry_run field from the ExecArgs struct.
    • Updated CLI parsing tests to reflect the removal of the dry_run option.
  • src/cli/validate.rs
    • Removed the --dry-run flag definition from EXEC_FLAGS.
    • Updated validation tests to remove references to --dry-run.
  • src/exec/command_executor.rs
    • Removed the DryRunError enum, DryRunResult struct, and their implementations.
    • Removed the dry_run method from the CommandExecutor trait.
    • Removed related test cases for dry-run functionality.
  • src/main.rs
    • Removed the dry_run field from RunOptions initialization for exec and check commands.
    • Removed a test case for exec with dry_run.
  • tests/e2e/audit.rs
    • Removed a test case that checked audit logs were not created during a dry-run.
  • tests/e2e/error_handling.rs
    • Updated test cases to remove --dry-run from exec commands.
  • tests/e2e/exec.rs
    • Removed several end-to-end test cases specifically for exec with --dry-run.
  • tests/integration/audit_log_integration.rs
    • Removed the dry_run field from RunOptions.
    • Removed a test case related to dry-run not generating audit logs.
Activity
  • The pull request was opened by fohte.
  • The primary activity involves removing the exec --dry-run option and its associated code, as it is superseded by runok check.
  • No specific reviewer comments or further progress updates are available in the provided context.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request completely removes the --dry-run functionality from the runok exec command. This involves deleting the --dry-run CLI argument, its corresponding internal logic within the ExecAdapter and Endpoint trait, and associated data structures like DryRunError and DryRunResult. All related documentation, API definitions, and unit/integration tests for the dry-run feature have been removed across the codebase.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.09%. Comparing base (225ccda) to head (7e08779).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #216      +/-   ##
==========================================
+ Coverage   89.81%   90.09%   +0.28%     
==========================================
  Files          50       50              
  Lines       10325    10210     -115     
==========================================
- Hits         9273     9199      -74     
+ Misses       1052     1011      -41     
Flag Coverage Δ
Linux 90.00% <100.00%> (+0.28%) ⬆️
macOS 91.29% <100.00%> (+0.31%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fohte fohte merged commit 155c0d3 into main Mar 15, 2026
10 checks passed
@fohte fohte deleted the fohte/remove-exec-dry-run branch March 15, 2026 07:20
@fohte-bot fohte-bot Bot mentioned this pull request Mar 15, 2026
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