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
@@ -130,7 +130,8 @@ impl AgentPool {
// Read the preferred agent from the story's front matter before acquiring
// the lock. (See validation::read_front_matter_agent.)
let front_matter_agent: Option<String> = read_front_matter_agent(story_id, agent_name);
let front_matter_agent: Option<crate::config::AgentName> =
read_front_matter_agent(story_id, agent_name);
// Atomically resolve agent name, check availability, and register as
// Pending. When `agent_name` is `None` the first idle coder is
@@ -158,12 +159,12 @@ impl AgentPool {
// (bug 379). Mirrors the auto_assign selection logic.
if let Some(ref pref) = front_matter_agent {
let stage_matches = config
.find_agent(pref)
.find_agent(pref.as_str())
.map(|cfg| agent_config_stage(cfg) == PipelineStage::Coder)
.unwrap_or(false);
if stage_matches {
if auto_assign::is_agent_free(&agents, pref) {
pref.clone()
if auto_assign::is_agent_free(&agents, pref.as_str()) {
pref.to_string()
} else {
return Err(format!(
"Preferred agent '{pref}' from story front matter is busy; \