huskies: merge 492_story_remove_filesystem_pipeline_state_and_store_story_content_in_database
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user