huskies: merge 962

This commit is contained in:
dave
2026-05-13 12:05:01 +00:00
parent 658e02c9b2
commit 184c214c34
19 changed files with 204 additions and 44 deletions
+5 -4
View File
@@ -56,14 +56,15 @@ pub(super) fn validate_agent_stage(
/// `start_agent` honour an explicit `agent: coder-opus` written by the
/// `assign` command (bug 379). Returns `None` when an explicit agent_name
/// was already supplied or when the story has no front-matter preference.
pub(super) fn read_front_matter_agent(story_id: &str, agent_name: Option<&str>) -> Option<String> {
pub(super) fn read_front_matter_agent(
story_id: &str,
agent_name: Option<&str>,
) -> Option<crate::config::AgentName> {
if agent_name.is_some() {
return None;
}
// Story 929: the agent pin lives in the CRDT typed register; the
// legacy YAML fallback is gone — post-891 every story has its CRDT
// entry and any story without one has no pinned agent.
crate::crdt_state::read_item(story_id)
.and_then(|w| w.agent().map(str::to_string))
.filter(|s| !s.is_empty())
crate::crdt_state::read_item(story_id).and_then(|w| w.agent())
}