Skip to content

Add release readiness checks and installation instructions#67

Merged
Princelad merged 4 commits intoPre-Usable-Release-(stabilization-+-onboarding)from
Packaging-and-install-readiness
Apr 1, 2026
Merged

Add release readiness checks and installation instructions#67
Princelad merged 4 commits intoPre-Usable-Release-(stabilization-+-onboarding)from
Packaging-and-install-readiness

Conversation

@Princelad
Copy link
Copy Markdown
Owner

Introduce release size and benchmark sanity checks in the CI process. Enhance documentation with installation instructions for Linux/macOS and shell completion script generation. Mark packaging and install tasks as completed.

Copilot AI review requested due to automatic review settings April 1, 2026 04:32
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds release-readiness CI checks and improves end-user install/docs by introducing a small CLI “preflight” layer (help/version/completions) and documenting installation + shell completion setup.

Changes:

  • Add --help, --version, and --print-completion <shell> handling before starting the TUI.
  • Introduce a release sanity script (release build, binary size threshold, and bench compile sanity) and a GitHub Actions workflow to run it.
  • Expand README with Linux/macOS install instructions and shell completion generation/install examples; mark related PROGRESS items complete.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/main.rs Adds CLI preflight handling (help/version/completion script output) before initializing the TUI.
scripts/release_sanity.sh New script to validate release build, enforce binary size threshold, and ensure benchmark targets compile.
README.md Adds install instructions (cargo install + binary download) and shell completion generation/install guidance.
PROGRESS.md Marks packaging/install readiness tasks as completed.
.github/workflows/release-readiness.yml New workflow running the release sanity script on pushes and PRs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/main.rs
Comment on lines +86 to 90
if handle_cli_preflight()? {
return Ok(());
}

color_eyre::install()?;
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

handle_cli_preflight() can return an error before color_eyre::install() is called (e.g., missing/unsupported shell), which means the error output/panic hooks won’t use the project’s configured color-eyre formatting. Consider moving color_eyre::install()?; before handle_cli_preflight() (or installing only when an error is about to be returned).

Suggested change
if handle_cli_preflight()? {
return Ok(());
}
color_eyre::install()?;
color_eyre::install()?;
if handle_cli_preflight()? {
return Ok(());
}

Copilot uses AI. Check for mistakes.
Comment thread src/main.rs
Comment on lines +97 to +100
fn handle_cli_preflight() -> color_eyre::Result<bool> {
let mut args = env::args().skip(1);
let Some(first) = args.next() else {
return Ok(false);
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

Using env::args() will panic if any CLI argument is not valid UTF-8. Since this code runs before the TUI starts, it introduces a new panic path for otherwise valid OS-level arguments. Prefer env::args_os() and handle conversion (e.g., lossy) when parsing these preflight flags.

Copilot uses AI. Check for mistakes.
Comment thread src/main.rs
}

fn print_help() {
println!(
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

print_help() uses println!() while the format string already ends with a trailing \n, which results in an extra blank line at the end of the help output. Consider removing the final newline from the string or using print!() instead.

Suggested change
println!(
print!(

Copilot uses AI. Check for mistakes.
Comment thread src/main.rs
Comment on lines +139 to +166
fn completion_script(shell: &str) -> Option<&'static str> {
match shell {
"bash" => Some(
r#"_forge_completions() {
local cur
cur="${COMP_WORDS[COMP_CWORD]}"
COMPREPLY=( $(compgen -W "--help --version --print-completion" -- "$cur") )
}
complete -F _forge_completions forge
"#,
),
"zsh" => Some(
r#"#compdef forge
_forge() {
_arguments \
'--help[Show help]' \
'--version[Show version]' \
'--print-completion[Print completion script]:shell:(bash zsh fish)'
}
_forge "$@"
"#,
),
"fish" => Some(
r#"complete -c forge -l help -d 'Show help'
complete -c forge -l version -d 'Show version'
complete -c forge -l print-completion -d 'Print completion script' -a 'bash zsh fish'
"#,
),
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

The generated completion scripts only complete the long options (--help, --version) even though the CLI also supports the short flags (-h, -V). Also, the bash completion currently doesn’t offer argument completion for --print-completion (bash/zsh/fish). Updating the scripts to cover the supported short flags and --print-completion’s shell argument would make the completion output consistent with the actual CLI behavior.

Copilot uses AI. Check for mistakes.
Comment thread README.md
@Princelad Princelad merged commit 30c781e into Pre-Usable-Release-(stabilization-+-onboarding) Apr 1, 2026
6 checks passed
@Princelad Princelad deleted the Packaging-and-install-readiness branch April 1, 2026 04:38
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.

2 participants