huskies: merge 520_story_typed_pipeline_state_machine_in_rust_foundation_replaces_stringly_typed_crdt_views_with_strict_enums_subsumes_436

This commit is contained in:
dave
2026-04-09 21:24:11 +00:00
parent 1d9287389a
commit 84717b04bd
18 changed files with 1569 additions and 122 deletions
+27 -29
View File
@@ -202,21 +202,20 @@ pub fn list_bug_files(root: &Path) -> Result<Vec<(String, String)>, String> {
let mut bugs = Vec::new();
let mut seen = std::collections::HashSet::new();
// First: CRDT items in backlog that are bugs.
if let Some(items) = crate::crdt_state::read_all_items() {
for item in items {
if item.stage != "1_backlog" || !is_bug_item(&item.story_id) {
continue;
}
let name = item.name.clone()
.or_else(|| {
crate::db::read_content(&item.story_id)
.and_then(|c| extract_bug_name_from_content(&c))
})
.unwrap_or_else(|| item.story_id.clone());
seen.insert(item.story_id.clone());
bugs.push((item.story_id, name));
// First: typed projection items in backlog that are bugs.
for item in crate::pipeline_state::read_all_typed() {
if !matches!(item.stage, crate::pipeline_state::Stage::Backlog) || !is_bug_item(&item.story_id.0) {
continue;
}
let sid = item.story_id.0;
let name = if item.name.is_empty() { None } else { Some(item.name) }
.or_else(|| {
crate::db::read_content(&sid)
.and_then(|c| extract_bug_name_from_content(&c))
})
.unwrap_or_else(|| sid.clone());
seen.insert(sid.clone());
bugs.push((sid, name));
}
// Then: filesystem fallback.
@@ -267,22 +266,21 @@ pub fn list_refactor_files(root: &Path) -> Result<Vec<(String, String)>, String>
let mut refactors = Vec::new();
let mut seen = std::collections::HashSet::new();
// First: CRDT items.
if let Some(items) = crate::crdt_state::read_all_items() {
for item in items {
if item.stage != "1_backlog" || !is_refactor_item(&item.story_id) {
continue;
}
let name = item.name.clone()
.or_else(|| {
crate::db::read_content(&item.story_id)
.and_then(|c| parse_front_matter(&c).ok())
.and_then(|m| m.name)
})
.unwrap_or_else(|| item.story_id.clone());
seen.insert(item.story_id.clone());
refactors.push((item.story_id, name));
// First: typed projection items.
for item in crate::pipeline_state::read_all_typed() {
if !matches!(item.stage, crate::pipeline_state::Stage::Backlog) || !is_refactor_item(&item.story_id.0) {
continue;
}
let sid = item.story_id.0;
let name = if item.name.is_empty() { None } else { Some(item.name) }
.or_else(|| {
crate::db::read_content(&sid)
.and_then(|c| parse_front_matter(&c).ok())
.and_then(|m| m.name)
})
.unwrap_or_else(|| sid.clone());
seen.insert(sid.clone());
refactors.push((sid, name));
}
// Then: filesystem fallback.