feat(cli): add --timings flag and enrich error tracking fields
Add -t/--timings flag to the sync subcommand, allowing users to opt into a per-stage timing breakdown after the sync summary. Wire the flag through main.rs into print_sync() which passes it to the new should_print_timings() gate. Enrich the data structures that flow through the sync pipeline so downstream renderers have full error visibility: - ProjectSummary gains status_errors (issue-side status enrichment failures per project) - ProjectStatusEnrichment gains path (project path for sub-row display) - SyncResult gains documents_errored and embedding_failed so the summary can surface doc-gen and embed failures separately - Autocorrect table updated with --timings for fuzzy flag matching
This commit is contained in:
@@ -59,12 +59,14 @@ pub struct ProjectSummary {
|
||||
pub events_failed: usize,
|
||||
pub statuses_enriched: usize,
|
||||
pub statuses_seen: usize,
|
||||
pub status_errors: usize,
|
||||
pub mr_diffs_fetched: usize,
|
||||
pub mr_diffs_failed: usize,
|
||||
}
|
||||
|
||||
/// Per-project status enrichment result, collected during ingestion.
|
||||
pub struct ProjectStatusEnrichment {
|
||||
pub path: String,
|
||||
pub mode: String,
|
||||
pub reason: Option<String>,
|
||||
pub seen: usize,
|
||||
@@ -664,6 +666,7 @@ async fn run_ingest_inner(
|
||||
total
|
||||
.status_enrichment_projects
|
||||
.push(ProjectStatusEnrichment {
|
||||
path: path.clone(),
|
||||
mode: result.status_enrichment_mode.clone(),
|
||||
reason: result.status_unsupported_reason.clone(),
|
||||
seen: result.statuses_seen,
|
||||
@@ -682,6 +685,8 @@ async fn run_ingest_inner(
|
||||
events_failed: result.resource_events_failed,
|
||||
statuses_enriched: result.statuses_enriched,
|
||||
statuses_seen: result.statuses_seen,
|
||||
status_errors: result.partial_error_count
|
||||
+ usize::from(result.status_enrichment_error.is_some()),
|
||||
mr_diffs_fetched: 0,
|
||||
mr_diffs_failed: 0,
|
||||
});
|
||||
@@ -716,6 +721,7 @@ async fn run_ingest_inner(
|
||||
events_failed: result.resource_events_failed,
|
||||
statuses_enriched: 0,
|
||||
statuses_seen: 0,
|
||||
status_errors: 0,
|
||||
mr_diffs_fetched: result.mr_diffs_fetched,
|
||||
mr_diffs_failed: result.mr_diffs_failed,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user