diff --git a/flare-cli/src/cli.rs b/flare-cli/src/cli.rs index b5abcb17c..8981d380f 100644 --- a/flare-cli/src/cli.rs +++ b/flare-cli/src/cli.rs @@ -2417,6 +2417,43 @@ mod tests { .is_err() ); } + + #[test] + fn debian_man_page_documents_every_visible_subcommand() { + use clap::CommandFactory; + use std::path::Path; + + let man_page_path = Path::new(env!("CARGO_MANIFEST_DIR")) + .join("../packaging/debian/flare.1"); + let man_page = std::fs::read_to_string(&man_page_path) + .unwrap_or_else(|e| panic!("failed to read {}: {e}", man_page_path.display())); + + let mut in_commands = false; + let mut documented = Vec::new(); + for line in man_page.lines() { + if line == ".SH COMMANDS" { + in_commands = true; + continue; + } + if in_commands && line.starts_with(".SH ") { + break; + } + if in_commands && let Some(command) = line.strip_prefix(".B ") { + documented.push(command.trim().to_string()); + } + } + + let visible: Vec = Cli::command() + .get_subcommands() + .filter(|sub| !sub.is_hide_set() && sub.get_name() != "help") + .map(|sub| sub.get_name().to_string()) + .collect(); + + assert_eq!( + documented, visible, + "packaging/debian/flare.1 .SH COMMANDS must match visible flare subcommands" + ); + } } #[cfg(all(test, unix))] diff --git a/flare-cli/src/orbit/agent.rs b/flare-cli/src/orbit/agent.rs index 0f10c6180..f7e85ceca 100644 --- a/flare-cli/src/orbit/agent.rs +++ b/flare-cli/src/orbit/agent.rs @@ -2607,7 +2607,7 @@ fn systemd_unit(listen: &str, core_cache: Option<&Path>) -> String { .map(|path| format!(" --core-cache {}", systemd_quote(&path.to_string_lossy()))) .unwrap_or_default(); format!( - "[Unit]\nDescription=Flare agent: runs this host's rank of a orbit's serving group\nAfter=network-online.target\n\n[Service]\nExecStart=%h/.local/lib/flare-agent/flare agent --listen {listen}{cache_flag}\nRestart=on-failure\nRestartSec=5\n\n[Install]\nWantedBy=default.target\n" + "[Unit]\nDescription=Flare agent: runs this host's rank of an orbit's serving group\nAfter=network-online.target\n\n[Service]\nExecStart=%h/.local/lib/flare-agent/flare agent --listen {listen}{cache_flag}\nRestart=on-failure\nRestartSec=5\n\n[Install]\nWantedBy=default.target\n" ) } @@ -4885,6 +4885,9 @@ pub mod tests { #[test] fn systemd_unit_quotes_core_cache_with_spaces_and_percent() { let plain = systemd_unit("0.0.0.0:29900", None); + assert!(plain.contains( + "Description=Flare agent: runs this host's rank of an orbit's serving group\n" + )); assert!(plain.contains("ExecStart=%h/.local/lib/flare-agent/flare agent --listen 0.0.0.0:29900\n")); assert!(!plain.contains("--core-cache")); diff --git a/flare-cli/src/orbit/controller.rs b/flare-cli/src/orbit/controller.rs index 3ccbce23b..27dddba3e 100644 --- a/flare-cli/src/orbit/controller.rs +++ b/flare-cli/src/orbit/controller.rs @@ -201,7 +201,7 @@ pub struct LaunchOptions { #[derive(Clone, Debug, PartialEq, Eq)] pub enum CoreReference { Local(PathBuf), - /// A core a orbit node holds at an absolute path. + /// A core an orbit node holds at an absolute path. Node { node: String, path: String, @@ -1160,7 +1160,7 @@ impl Controller { match parse_core_reference(reference, |name| self.orbit.node(name).is_some()) { CoreReference::Local(path) => { let primary = path.canonicalize().map_err(|e| { - format!("cannot access core {reference}: {e}; a node-held core is NODE:/ABSOLUTE/PATH with NODE a orbit node") + format!("cannot access core {reference}: {e}; a node-held core is NODE:/ABSOLUTE/PATH with NODE an orbit node") })?; run_args.serving.verify_weights = verify_weights; let (authorized, publisher) = verify(&primary, run_args, origin, false)?; diff --git a/flare-cli/src/orbit/mod.rs b/flare-cli/src/orbit/mod.rs index c4f231552..a55ec0732 100644 --- a/flare-cli/src/orbit/mod.rs +++ b/flare-cli/src/orbit/mod.rs @@ -33,7 +33,7 @@ pub type Failure = Box; /// The agent's default port on every host. pub const PORT: u16 = 29900; -/// The agent protocol every node and controller of a orbit must share. +/// The agent protocol every node and controller of an orbit must share. pub const PROTOCOL_VERSION: u32 = 7; /// Frame tags. A request receives OK with a body or ERROR with a message. diff --git a/packaging/debian/flare.1 b/packaging/debian/flare.1 index 1c92a76cb..64d15ad01 100644 --- a/packaging/debian/flare.1 +++ b/packaging/debian/flare.1 @@ -12,13 +12,35 @@ and tensor-parallel size are required for serving. .SH COMMANDS .TP .B run -Load and serve a prepared model package. +Serve a local core, or download and serve a prepared core from Hugging Face. +.TP +.B download +Download a prepared core from the hardware's Hugging Face revision. +.TP +.B inspect +Summarize a core's metadata, with optional memory, graph, and frontend details. +.TP +.B doctor +Check Linux host readiness for PCIe and DGX Spark tensor-parallel serving. .TP .B agent -Run or install a host agent. +Run this host's agent, which pairs with controllers and supervises serving ranks, +or install and manage the agent service. .TP .B orbit -Pair hosts and manage multi-host serving groups. +Control an orbit of agents from this machine, pairing hosts and managing +multi-host serving groups. +.TP +.B trust +Manage remembered publisher trust. +.TP +.B models +List, inspect, and manage locally prepared models. +.TP +.B parallax +Monitor live expert-movement and persistent-worker telemetry from a serving +instance. Alias: +.BR worker . .SH OPTIONS .TP .B \-\-help