Flip arc doctor default to live mode with --dry-run opt-out

Live service probes now run by default instead of requiring --live.
Added --dry-run flag to skip probes when needed. Install command now
runs doctor with live probes to validate setup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bryan Helmkamp 2026-03-10 14:17:59 -04:00
parent e06eb6fdd4
commit cbe6282263
4 changed files with 9 additions and 14 deletions

View file

@ -1196,12 +1196,7 @@ pub async fn run_doctor(verbose: bool, live: bool) -> i32 {
checks,
};
let footer = if !live {
Some("Run with --live to probe service connectivity.")
} else {
None
};
print!("{}", report.render(&styles, verbose, footer));
print!("{}", report.render(&styles, verbose, None));
if report.has_errors() {
1

View file

@ -451,7 +451,7 @@ pub async fn run_install() -> Result<()> {
if run_doctor {
eprintln!();
doctor::run_doctor(true, false).await;
doctor::run_doctor(true, true).await;
}
eprintln!();

View file

@ -82,9 +82,9 @@ enum Command {
#[arg(short, long)]
verbose: bool,
/// Probe live services (LLM, sandbox, API, web, Brave Search)
#[arg(short, long)]
live: bool,
/// Skip live service probes (LLM, sandbox, API, web, Brave Search)
#[arg(long)]
dry_run: bool,
},
/// Initialize a new arc project
Init,
@ -381,10 +381,10 @@ async fn main_inner() -> Result<()> {
Box::leak(Box::new(arc_util::terminal::Styles::detect_stderr()));
arc_api::serve::serve_command(args, styles).await?;
}
Command::Doctor { verbose, live } => {
Command::Doctor { verbose, dry_run } => {
let cli_config = cli_config::load_cli_config(None)?;
let verbose = verbose || cli_config.verbose;
let exit_code = doctor::run_doctor(verbose, live).await;
let exit_code = doctor::run_doctor(verbose, !dry_run).await;
std::process::exit(exit_code);
}
Command::Init => {

View file

@ -679,9 +679,9 @@ fn doctor_no_color_when_no_color_set() {
}
#[test]
fn doctor_live_flag_accepted() {
fn doctor_dry_run_flag_accepted() {
arc()
.args(["--no-dotenv", "doctor", "--live"])
.args(["--no-dotenv", "doctor", "--dry-run"])
.env_clear()
.assert()
.stdout(predicate::str::contains("Arc Doctor"));