huskies: merge 869

This commit is contained in:
dave
2026-04-29 14:51:00 +00:00
parent b9bb1ff804
commit f3e4d5d072
8 changed files with 148 additions and 8 deletions
@@ -30,6 +30,14 @@ pub(crate) fn tool_update_story(args: &Value, ctx: &AppContext) -> Result<String
front_matter.insert(k.clone(), v.clone());
}
}
// Intercept `qa` field — route through the typed CRDT register instead of YAML.
if let Some(qa_val) = front_matter.remove("qa") {
let mode = qa_val
.as_str()
.and_then(crate::io::story_metadata::QaMode::from_str);
crate::crdt_state::set_qa_mode(story_id, mode);
}
let front_matter_opt = if front_matter.is_empty() {
None
} else {
@@ -37,7 +45,11 @@ pub(crate) fn tool_update_story(args: &Value, ctx: &AppContext) -> Result<String
};
let root = ctx.state.get_project_root()?;
update_story_in_file(&root, story_id, user_story, description, front_matter_opt)?;
// Only call update_story_in_file when there is something left to write.
if user_story.is_some() || description.is_some() || front_matter_opt.is_some() {
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::pipeline_state::read_typed(story_id)