huskies: merge 1046

This commit is contained in:
dave
2026-05-14 16:13:01 +00:00
parent 8f6ba69bf2
commit 9e06fff8a8
6 changed files with 342 additions and 134 deletions
@@ -90,10 +90,17 @@ pub(crate) fn tool_get_pipeline_status(ctx: &AppContext) -> Result<String, Strin
})
.collect();
let archived: Vec<Value> = state
.archived
.iter()
.map(|s| json!({ "story_id": s.story_id, "name": s.name, "stage": "archived" }))
.collect();
serde_json::to_string_pretty(&json!({
"active": active,
"backlog": backlog,
"backlog_count": backlog.len(),
"archived": archived,
"deterministic_merges_in_flight": running_merges,
}))
.map_err(|e| format!("Serialization error: {e}"))
+5 -1
View File
@@ -64,6 +64,8 @@ pub struct PipelineState {
pub done: Vec<UpcomingStory>,
/// Abandoned, superseded, and rejected items (story 984).
pub closed: Vec<UpcomingStory>,
/// Items swept from Done into the archived terminal state.
pub archived: Vec<UpcomingStory>,
/// Story IDs that currently have a deterministic merge in progress.
pub deterministic_merges_in_flight: Vec<String>,
}
@@ -104,6 +106,7 @@ pub fn load_pipeline_state(ctx: &AppContext) -> Result<PipelineState, String> {
merge: Vec::new(),
done: Vec::new(),
closed: Vec::new(),
archived: Vec::new(),
deterministic_merges_in_flight,
};
@@ -194,7 +197,7 @@ pub fn load_pipeline_state(ctx: &AppContext) -> Result<PipelineState, String> {
Stage::Abandoned { .. } | Stage::Superseded { .. } | Stage::Rejected { .. } => {
state.closed.push(story)
}
Stage::Archived { .. } => {} // Completed/MergeFailed/ReviewHeld stay hidden
Stage::Archived { .. } => state.archived.push(story),
}
}
@@ -205,6 +208,7 @@ pub fn load_pipeline_state(ctx: &AppContext) -> Result<PipelineState, String> {
state.merge.sort_by(|a, b| a.story_id.cmp(&b.story_id));
state.done.sort_by(|a, b| a.story_id.cmp(&b.story_id));
state.closed.sort_by(|a, b| a.story_id.cmp(&b.story_id));
state.archived.sort_by(|a, b| a.story_id.cmp(&b.story_id));
Ok(state)
}