huskies: merge 492_story_remove_filesystem_pipeline_state_and_store_story_content_in_database

This commit is contained in:
dave
2026-04-08 03:03:59 +00:00
parent f43d30bdae
commit 8fd49d563e
27 changed files with 1663 additions and 1295 deletions
+11
View File
@@ -24,6 +24,17 @@ impl AgentPool {
/// story is not in any active stage (`2_current/`, `3_qa/`, `4_merge/`).
pub(super) fn find_active_story_stage(project_root: &Path, story_id: &str) -> Option<&'static str> {
const STAGES: [&str; 3] = ["2_current", "3_qa", "4_merge"];
// Try CRDT first — primary source of truth.
if let Some(item) = crate::crdt_state::read_item(story_id) {
for stage in &STAGES {
if item.stage == *stage {
return Some(stage);
}
}
}
// Also check filesystem (backwards compat / tests).
for stage in &STAGES {
let path = project_root
.join(".huskies")