use super::commands::*;
use super::dispatch_status::*;
use super::dispatch_status_ext::*;
#[allow(clippy::too_many_arguments)]
pub(super) fn dispatch_status_cmd_tail(args: StatusArgs) -> Result<(), String> {
let StatusArgs {
state_dir,
machine,
json,
file,
summary,
watch,
stale,
health,
drift_details,
timeline,
changes_since,
summary_by,
prometheus,
expired,
count,
format: status_format,
anomalies,
diff_from,
resources_by_type,
machines_only,
stale_resources,
health_threshold,
json_lines,
since,
export,
compact,
alerts,
diff_lock,
compliance,
histogram,
dependency_health,
top_failures,
convergence_rate,
drift_summary,
resource_age,
sla_report,
compliance_report,
mttr,
trend,
prediction,
capacity,
cost_estimate,
staleness_report,
health_score,
executive_summary,
audit_trail,
resource_graph,
drift_velocity,
fleet_overview,
machine_health,
config_drift,
convergence_time,
resource_timeline,
error_summary,
security_posture,
resource_cost,
drift_forecast,
pipeline_status,
resource_dependencies,
diagnostic,
uptime,
recommendations,
machine_summary,
change_frequency,
lock_age,
failed_since,
hash_verify,
resource_size,
drift_details_all,
last_apply_duration,
config_hash,
convergence_history,
resource_inputs,
drift_trend,
failed_resources,
resource_types_summary,
machine_apply_count,
fleet_apply_history,
resource_hash_changes,
machine_uptime_estimate,
fleet_resource_type_breakdown,
resource_convergence_time,
machine_resource_churn_rate,
fleet_resource_staleness,
machine_convergence_trend,
machine_capacity_utilization,
fleet_configuration_entropy,
machine_resource_freshness,
machine_error_budget,
fleet_compliance_score,
machine_mean_time_to_recovery,
machine_resource_dependency_health,
fleet_resource_type_health,
machine_resource_convergence_rate,
machine_resource_apply_latency_p95,
fleet_resource_security_posture_score,
fleet_apply_success_rate_trend,
machine_resource_drift_flapping,
fleet_resource_type_drift_heatmap,
machine_ssh_connection_health,
lock_file_staleness_report,
fleet_transport_method_summary,
fleet_state_churn_analysis,
config_maturity_score,
fleet_capacity_utilization,
fleet_drift_velocity_trend,
machine_convergence_window,
fleet_resource_age_histogram,
fleet_security_posture_summary,
machine_resource_freshness_index,
fleet_resource_type_coverage,
fleet_apply_cadence,
machine_resource_error_classification,
fleet_resource_convergence_summary,
fleet_resource_staleness_report,
machine_resource_type_distribution,
fleet_machine_health_score,
fleet_resource_dependency_lag_report,
machine_resource_convergence_rate_trend,
fleet_resource_apply_lag,
fleet_resource_error_rate_trend,
machine_resource_drift_recovery_time,
fleet_resource_config_complexity_score,
fleet_resource_maturity_index,
machine_resource_convergence_stability_index,
fleet_resource_drift_pattern_analysis,
fleet_resource_apply_success_trend,
machine_resource_drift_age_distribution_report,
fleet_resource_convergence_gap_analysis,
fleet_resource_type_drift_correlation,
machine_resource_apply_cadence_report,
fleet_resource_drift_recovery_trend,
fleet_resource_quality_score,
machine_resource_drift_pattern_classification,
fleet_resource_convergence_window_analysis,
connectivity,
..
} = args;
let m = machine.as_deref();
if connectivity {
if let Some(ref f) = file {
return super::status_connectivity::cmd_status_connectivity(f, json);
}
return Err("--connectivity requires -f <config file>".to_string());
}
if let Some(r) = try_status_phases_94_96(
&state_dir,
m,
json,
machine_resource_apply_latency_p95,
fleet_resource_security_posture_score,
fleet_apply_success_rate_trend,
machine_resource_drift_flapping,
fleet_resource_type_drift_heatmap,
machine_ssh_connection_health,
lock_file_staleness_report,
fleet_transport_method_summary,
) {
return r;
}
if let Some(r) = try_status_phases_97_99(
&state_dir,
m,
json,
fleet_state_churn_analysis,
config_maturity_score,
fleet_capacity_utilization,
fleet_drift_velocity_trend,
machine_convergence_window,
fleet_resource_age_histogram,
fleet_security_posture_summary,
machine_resource_freshness_index,
fleet_resource_type_coverage,
) {
return r;
}
if let Some(r) = try_status_phases_100_103(
&state_dir,
m,
json,
fleet_apply_cadence,
machine_resource_error_classification,
fleet_resource_convergence_summary,
fleet_resource_staleness_report,
machine_resource_type_distribution,
fleet_machine_health_score,
fleet_resource_dependency_lag_report,
machine_resource_convergence_rate_trend,
fleet_resource_apply_lag,
fleet_resource_error_rate_trend,
machine_resource_drift_recovery_time,
fleet_resource_config_complexity_score,
)
.or_else(|| {
try_status_phases_104_107(
&state_dir,
m,
json,
fleet_resource_maturity_index,
machine_resource_convergence_stability_index,
fleet_resource_drift_pattern_analysis,
fleet_resource_apply_success_trend,
machine_resource_drift_age_distribution_report,
fleet_resource_convergence_gap_analysis,
fleet_resource_type_drift_correlation,
machine_resource_apply_cadence_report,
fleet_resource_drift_recovery_trend,
fleet_resource_quality_score,
machine_resource_drift_pattern_classification,
fleet_resource_convergence_window_analysis,
)
}) {
return r;
}
if let Some(r) = try_status_phase75(
&state_dir,
m,
json,
machine_resource_churn_rate,
fleet_resource_staleness,
machine_convergence_trend,
machine_capacity_utilization,
fleet_configuration_entropy,
machine_resource_freshness,
machine_error_budget,
fleet_compliance_score,
machine_mean_time_to_recovery,
machine_resource_dependency_health,
fleet_resource_type_health,
machine_resource_convergence_rate,
) {
return r;
}
dispatch_status_early(
&state_dir,
m,
json,
file.as_deref(),
summary,
watch,
machine_apply_count,
fleet_apply_history,
resource_hash_changes,
machine_uptime_estimate,
fleet_resource_type_breakdown,
resource_convergence_time,
resource_types_summary,
failed_resources,
drift_trend,
resource_inputs,
convergence_history,
config_hash,
last_apply_duration,
drift_details_all,
resource_size,
hash_verify,
lock_age,
change_frequency,
machine_summary,
recommendations,
uptime,
diagnostic,
resource_dependencies,
pipeline_status,
drift_forecast,
resource_cost,
security_posture,
error_summary,
resource_timeline,
convergence_time,
config_drift,
machine_health,
fleet_overview,
drift_velocity,
resource_graph,
audit_trail,
executive_summary,
health_score,
&staleness_report,
cost_estimate,
capacity,
prediction,
trend,
mttr,
&compliance_report,
sla_report,
resource_age,
drift_summary,
convergence_rate,
top_failures,
dependency_health,
histogram,
&compliance,
&diff_lock,
alerts,
compact,
&export,
json_lines,
&since,
stale_resources,
health_threshold,
machines_only,
resources_by_type,
anomalies,
&diff_from,
count,
&status_format,
prometheus,
&expired,
&changes_since,
&summary_by,
timeline,
drift_details,
health,
stale,
&failed_since,
)
}