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
+2 -2
View File
@@ -67,12 +67,12 @@ pub(super) fn handle_depends(ctx: &CommandContext) -> Option<String> {
// --- DB-first lookup ---
for id in crate::db::all_content_ids() {
let file_num = id.split('_').next().unwrap_or("");
if file_num == num_str && let Some(item) = crate::crdt_state::read_item(&id) {
if file_num == num_str && let Ok(Some(item)) = crate::pipeline_state::read_typed(&id) {
let path = ctx
.project_root
.join(".huskies")
.join("work")
.join(&item.stage)
.join(item.stage.dir_name())
.join(format!("{id}.md"));
found = Some((path, id));
break;
+4 -2
View File
@@ -129,8 +129,10 @@ fn unblock_by_story_id(story_id: &str) -> String {
updated = set_front_matter_field(&updated, "retry_count", "0");
crate::db::write_content(story_id, &updated);
let stage = crate::crdt_state::read_item(story_id)
.map(|i| i.stage)
let stage = crate::pipeline_state::read_typed(story_id)
.ok()
.flatten()
.map(|i| i.stage.dir_name().to_string())
.unwrap_or_else(|| "2_current".to_string());
crate::db::write_item_with_content(story_id, &stage, &updated);