huskies: merge 1087 story Pipeline+Status split — Step D: migrate CRDT storage to (Pipeline, Status) and remove the Stage enum
This commit is contained in:
@@ -92,9 +92,20 @@ pub(crate) fn tool_dump_crdt(args: &Value) -> Result<String, String> {
|
||||
.items
|
||||
.into_iter()
|
||||
.map(|item| {
|
||||
// Story 1087: emit `pipeline` and `status` alongside `stage` so
|
||||
// crdt-dump consumers can route by column/badge without re-deriving
|
||||
// the projection from the stage string.
|
||||
let (pipeline, status) = item
|
||||
.stage
|
||||
.as_deref()
|
||||
.and_then(crate::pipeline_state::Stage::from_dir)
|
||||
.map(|s| (s.pipeline().as_str(), s.status().as_str()))
|
||||
.unwrap_or(("", ""));
|
||||
json!({
|
||||
"story_id": item.story_id,
|
||||
"stage": item.stage,
|
||||
"pipeline": pipeline,
|
||||
"status": status,
|
||||
"name": item.name,
|
||||
"agent": item.agent,
|
||||
"retry_count": item.retry_count,
|
||||
|
||||
@@ -129,10 +129,14 @@ pub(crate) fn tool_show_epic(args: &Value, _ctx: &AppContext) -> Result<String,
|
||||
if matches!(item.stage, Stage::Done { .. }) {
|
||||
done += 1;
|
||||
}
|
||||
// Story 1087: expose pipeline + status alongside the legacy
|
||||
// stage name so epic-show callers can route by column/badge.
|
||||
member_items.push(json!({
|
||||
"story_id": sid,
|
||||
"name": item.name,
|
||||
"stage": stage_name,
|
||||
"pipeline": item.stage.pipeline().as_str(),
|
||||
"status": item.stage.status().as_str(),
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user