From b6dddfb6a3a5accb00114c1eaa1112d3ef3948b9 Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Wed, 8 Apr 2026 16:41:13 -0400 Subject: [PATCH] fix(cli): restore fabro-cli verification after merge Resolve new clippy failures introduced by the merge and update the root help snapshot to include the uninstall command so fabro-cli lint and test verification return to green. --- .../fabro-cli/src/commands/run/runner.rs | 13 +++++-------- .../src/commands/server/foreground.rs | 18 +++++++++--------- .../fabro-cli/src/commands/server/start.rs | 3 +-- lib/crates/fabro-cli/tests/it/cmd/fabro.rs | 1 + 4 files changed, 16 insertions(+), 19 deletions(-) diff --git a/lib/crates/fabro-cli/src/commands/run/runner.rs b/lib/crates/fabro-cli/src/commands/run/runner.rs index 31303c3d6..a7c64b0fd 100644 --- a/lib/crates/fabro-cli/src/commands/run/runner.rs +++ b/lib/crates/fabro-cli/src/commands/run/runner.rs @@ -119,14 +119,11 @@ async fn read_worker_control_stream( { let mut lines = BufReader::new(reader).lines(); loop { - match lines.next_line().await { - Ok(Some(line)) => { - apply_worker_control_line(&interviewer, &cancel_token, &line).await; - } - Ok(None) | Err(_) => { - interviewer.interrupt_all().await; - break; - } + if let Ok(Some(line)) = lines.next_line().await { + apply_worker_control_line(&interviewer, &cancel_token, &line).await; + } else { + interviewer.interrupt_all().await; + break; } } } diff --git a/lib/crates/fabro-cli/src/commands/server/foreground.rs b/lib/crates/fabro-cli/src/commands/server/foreground.rs index 45a703c80..5b76736cb 100644 --- a/lib/crates/fabro-cli/src/commands/server/foreground.rs +++ b/lib/crates/fabro-cli/src/commands/server/foreground.rs @@ -32,15 +32,15 @@ pub(crate) async fn execute( None }; - let log_path = storage_dir - .as_ref() - .map(|dir| Storage::new(dir).server_state().log_path()) - .unwrap_or_else(|| { - record_path - .parent() - .map(|parent| parent.join("server.log")) - .unwrap_or_else(|| PathBuf::from("server.log")) - }); + let log_path = storage_dir.as_ref().map_or_else( + || { + record_path.parent().map_or_else( + || PathBuf::from("server.log"), + |parent| parent.join("server.log"), + ) + }, + |dir| Storage::new(dir).server_state().log_path(), + ); let pid = std::process::id(); serve::serve_command(serve_args, styles, storage_dir, move |resolved_bind| { diff --git a/lib/crates/fabro-cli/src/commands/server/start.rs b/lib/crates/fabro-cli/src/commands/server/start.rs index c7a03f109..7c9658945 100644 --- a/lib/crates/fabro-cli/src/commands/server/start.rs +++ b/lib/crates/fabro-cli/src/commands/server/start.rs @@ -338,8 +338,7 @@ fn maybe_warn_host_port_fallback(requested: &BindRequest, resolved: &Bind) { }; if addr.ip() == *host && addr.port() != DEFAULT_TCP_PORT { eprintln!( - "Warning: TCP port {} is unavailable on {}; falling back to a random port.", - DEFAULT_TCP_PORT, host + "Warning: TCP port {DEFAULT_TCP_PORT} is unavailable on {host}; falling back to a random port." ); } } diff --git a/lib/crates/fabro-cli/tests/it/cmd/fabro.rs b/lib/crates/fabro-cli/tests/it/cmd/fabro.rs index d598591ae..c9be584b0 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/fabro.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/fabro.rs @@ -32,6 +32,7 @@ fn help() { server Server operations doctor Check environment and integration health install Set up the Fabro environment (LLMs, certs, GitHub) + uninstall Uninstall Fabro from this machine pr Pull request operations secret Manage server-owned secrets settings Inspect effective settings