Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,12 @@ enum Command {
},
/// List every agent in the catalog with presence and retirement state. `--json [--enrich]` is
/// the stable machine-readable roster.
///
/// EXPERIMENTAL: Cross-host presence is best-effort. Ordinary catalog replication may be
/// delayed, stale, or asymmetric. A remote `unknown` means no fresh observation, not proof that
/// an agent or host is unhealthy. Cross-host presence never gates local work or triggers
/// restart, teardown, reconciliation, or a global-fleet health conclusion. Host-local runtime
/// and service evidence remains authoritative for lifecycle decisions.
Agents {
/// The catalog folder (like `st2 ls`/`up`). Falls back to `--root`/`$CATALOG`.
#[arg(conflicts_with = "catalog_path")]
Expand Down
25 changes: 25 additions & 0 deletions tests/status_agents.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,31 @@ fn retired_agent_kdl(identity: &str, host: &str) -> String {
)
}

#[test]
fn agents_help_marks_cross_host_presence_experimental_and_non_authoritative() {
let output = Command::new(env!("CARGO_BIN_EXE_st2"))
.args(["agents", "--help"])
.output()
.unwrap();
assert!(
output.status.success(),
"{}",
String::from_utf8_lossy(&output.stderr)
);
let help = String::from_utf8(output.stdout).unwrap();
for required in [
"EXPERIMENTAL: Cross-host presence is best-effort",
"delayed, stale, or asymmetric",
"A remote `unknown` means no fresh observation",
"not proof that an agent or host is unhealthy",
"never gates local work or triggers restart, teardown, reconciliation",
"or a global-fleet health conclusion",
"Host-local runtime and service evidence remains authoritative",
] {
assert!(help.contains(required), "missing {required:?} in:\n{help}");
}
}

/// The roster enumerates every catalog agent by bus id (sorted), projects each one's presence, and —
/// with enrich data — its inbox count and last-activity.
#[test]
Expand Down
Loading