Skip to main content

bijux_cli/features/diagnostics/
parity_status.rs

1#![forbid(unsafe_code)]
2//! Parity/status artifact availability query model and resolver.
3
4use std::path::Path;
5
6/// Structured parity/status artifact availability queried from workspace state.
7#[derive(Debug, Clone, PartialEq, Eq)]
8pub struct ParityStatusQuery {
9    /// Whether parity matrix artifact exists.
10    pub command_parity_matrix_exists: bool,
11    /// Whether runtime status artifact exists.
12    pub status_report_exists: bool,
13    /// Whether command migration matrix artifact exists.
14    pub command_migration_matrix_exists: bool,
15}
16
17/// Query parity/status artifact availability from the workspace root.
18#[must_use]
19pub fn parity_status_query(workspace_root: &Path) -> ParityStatusQuery {
20    ParityStatusQuery {
21        command_parity_matrix_exists: workspace_root
22            .join("artifacts/parity/command_parity_matrix.json")
23            .exists(),
24        status_report_exists: workspace_root.join("artifacts/status/status.json").exists(),
25        command_migration_matrix_exists: workspace_root
26            .join("artifacts/status/command_migration_matrix.json")
27            .exists(),
28    }
29}