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:
@@ -1461,7 +1461,7 @@ mod tests {
|
||||
assert!(names.contains(&"git_log"));
|
||||
assert!(names.contains(&"status"));
|
||||
assert!(names.contains(&"loc_file"));
|
||||
assert_eq!(tools.len(), 57);
|
||||
assert_eq!(tools.len(), 58);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -376,8 +376,10 @@ pub(super) fn tool_update_story(args: &Value, ctx: &AppContext) -> Result<String
|
||||
update_story_in_file(&root, story_id, user_story, description, front_matter_opt)?;
|
||||
|
||||
// Bug 503: warn if any depends_on in the (now updated) story points at an archived story.
|
||||
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(|| "1_backlog".to_string());
|
||||
let archived_deps = check_archived_deps(&root, &stage, story_id);
|
||||
if !archived_deps.is_empty() {
|
||||
@@ -525,7 +527,7 @@ pub(super) async fn tool_delete_story(args: &Value, ctx: &AppContext) -> Result<
|
||||
|
||||
// 4. Delete from database content store and CRDT.
|
||||
let found_in_db = crate::db::read_content(story_id).is_some()
|
||||
|| crate::crdt_state::read_item(story_id).is_some();
|
||||
|| crate::pipeline_state::read_typed(story_id).ok().flatten().is_some();
|
||||
|
||||
crate::db::delete_item(story_id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user