huskies: merge 491_story_watcher_fires_on_crdt_state_transitions_instead_of_filesystem_events

This commit is contained in:
dave
2026-04-08 01:14:55 +00:00
parent dbdcf334aa
commit 5c2769dd7d
6 changed files with 272 additions and 58 deletions
+2 -6
View File
@@ -215,16 +215,12 @@ fn load_stage_items(
) -> Result<Vec<UpcomingStory>, String> {
let root = ctx.state.get_project_root()?;
// TODO(491): Merge CRDT layer items once the watcher story lands.
// Scan the filesystem for pipeline items.
let dir = root.join(".huskies").join("work").join(stage_dir);
let mut seen: std::collections::HashSet<String> = std::collections::HashSet::new();
let seen: std::collections::HashSet<String> = std::collections::HashSet::new();
let mut stories = Vec::new();
// TODO(491): Add CRDT items once the watcher story lands.
// Then, add filesystem items not in the CRDT (backwards compat).
// Filesystem items (backwards compat fallback when CRDT is not initialised).
if dir.exists() {
for entry in fs::read_dir(&dir)
.map_err(|e| format!("Failed to read {stage_dir} directory: {e}"))?