huskies: merge 962

This commit is contained in:
dave
2026-05-13 11:58:50 +00:00
parent 658e02c9b2
commit 184c214c34
19 changed files with 204 additions and 44 deletions
+2 -3
View File
@@ -141,9 +141,8 @@ pub(super) async fn tool_reject_qa(args: &Value, ctx: &AppContext) -> Result<Str
// Restart the coder agent with rejection context.
// Agent name comes from the CRDT WorkItem register (story 929).
let agent_name =
crate::crdt_state::read_item(story_id).and_then(|w| w.agent().map(str::to_string));
let agent_name = agent_name.as_deref().unwrap_or("coder-opus");
let agent_name = crate::crdt_state::read_item(story_id).and_then(|w| w.agent());
let agent_name = agent_name.map_or("coder-opus", |a| a.as_str());
let context = format!(
"\n\n---\n## QA Rejection\n\
+4 -1
View File
@@ -378,7 +378,10 @@ mod tests {
story_content,
crate::db::ItemMeta::named("My Test Story"),
);
crate::crdt_state::set_agent("9886_story_status_test", Some("coder-1"));
crate::crdt_state::set_agent(
"9886_story_status_test",
Some(crate::config::AgentName::Coder1),
);
let ctx = crate::http::context::AppContext::new_test(tmp.path().to_path_buf());
let result = tool_status(&json!({"story_id": "9886_story_status_test"}), &ctx)
@@ -21,7 +21,7 @@ pub(crate) fn tool_update_story(args: &Value, ctx: &AppContext) -> Result<String
crate::crdt_state::set_name(story_id, Some(name));
}
if let Some(agent) = args.get("agent").and_then(|v| v.as_str()) {
crate::crdt_state::set_agent(story_id, Some(agent));
crate::crdt_state::set_agent(story_id, agent.parse::<crate::config::AgentName>().ok());
}
if let Some(epic) = args.get("epic").and_then(|v| v.as_str()) {
crate::crdt_state::set_epic(story_id, crate::crdt_state::EpicId::from_crdt_str(epic));
@@ -42,8 +42,10 @@ pub(crate) fn tool_update_story(args: &Value, ctx: &AppContext) -> Result<String
crate::crdt_state::set_name(story_id, s);
}
"agent" => {
let s = value.as_str().filter(|s| !s.is_empty());
crate::crdt_state::set_agent(story_id, s);
let parsed = value
.as_str()
.and_then(|s| s.parse::<crate::config::AgentName>().ok());
crate::crdt_state::set_agent(story_id, parsed);
}
"qa" => {
let mode = value