feat: add ecc2 coordination status command

This commit is contained in:
Affaan Mustafa
2026-04-08 13:13:46 -07:00
parent 0ff58108e4
commit cd94878374
2 changed files with 242 additions and 0 deletions

View File

@@ -102,6 +102,8 @@ enum Commands {
#[arg(long, default_value_t = 10)]
lead_limit: usize,
},
/// Show global coordination, backlog, and daemon policy status
CoordinationStatus,
/// Rebalance unread handoffs across lead teams with backed-up delegates
RebalanceAll {
/// Agent type for routed delegates
@@ -458,6 +460,10 @@ async fn main() -> Result<()> {
);
}
}
Some(Commands::CoordinationStatus) => {
let status = session::manager::get_coordination_status(&db, &cfg)?;
println!("{status}");
}
Some(Commands::RebalanceAll {
agent,
worktree: use_worktree,
@@ -953,6 +959,17 @@ mod tests {
}
}
#[test]
fn cli_parses_coordination_status_command() {
let cli = Cli::try_parse_from(["ecc", "coordination-status"])
.expect("coordination-status should parse");
match cli.command {
Some(Commands::CoordinationStatus) => {}
_ => panic!("expected coordination-status subcommand"),
}
}
#[test]
fn cli_parses_rebalance_team_command() {
let cli = Cli::try_parse_from([