fix(TASK-028): pin global-template exclusion, tighten timeout boundary test, reword stale hint
This commit is contained in:
4 files changed
+14
-2
No files matched your search
@@ -1341,6 +1341,7 @@ variables:
|
||||
assert_eq!(config.max_concurrent_agents, 4);
|
||||
assert_eq!(config.max_agent_depth, 3);
|
||||
assert_eq!(config.max_auto_continues, 10);
|
||||
assert_eq!(config.escalation_timeout, 0);
|
||||
assert!(config.mcp_servers.is_empty());
|
||||
assert!(config.global_tools.is_empty());
|
||||
assert!(config.conversation_starters.is_empty());
|
||||
|
||||
@@ -1383,6 +1383,12 @@ clients:
|
||||
assert_eq!(cfg.clients.len(), 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn config_template_does_not_carry_the_per_agent_escalation_timeout_key() {
|
||||
// `escalation_timeout` is a per-agent setting; the global template must never grow it.
|
||||
assert!(!CONFIG_TEMPLATE.contains("escalation_timeout"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn config_enabled_macros_empty_string_is_some_empty() {
|
||||
let cfg: Config = serde_yaml::from_str("enabled_macros: \"\"").unwrap();
|
||||
|
||||
@@ -1711,7 +1711,7 @@ fn handle_reply_escalation(ctx: &mut RequestContext, args: &Value) -> Result<Val
|
||||
}
|
||||
None => Ok(json!({
|
||||
"status": "error",
|
||||
"message": format!("No pending escalation found with id '{escalation_id}'. It may have already been replied to or timed out."),
|
||||
"message": format!("No pending escalation found with id '{escalation_id}'. It may have already been replied to, or the child is no longer waiting (aborted, or its configured `escalation_timeout` expired)."),
|
||||
})),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -389,8 +389,12 @@ mod tests {
|
||||
async fn nonzero_timeout_still_expires_with_the_existing_message() {
|
||||
let (tx, rx) = oneshot::channel::<String>();
|
||||
let wait = tokio::spawn(await_escalation_reply(rx, 5));
|
||||
tokio::task::yield_now().await;
|
||||
|
||||
tokio::time::advance(Duration::from_secs(6)).await;
|
||||
tokio::time::advance(Duration::from_secs(4)).await;
|
||||
assert!(!wait.is_finished());
|
||||
|
||||
tokio::time::advance(Duration::from_secs(2)).await;
|
||||
let v = wait.await.unwrap().unwrap();
|
||||
assert_eq!(
|
||||
v["error"],
|
||||
@@ -421,6 +425,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn stale_timeout_wording_is_gone_from_shipped_text() {
|
||||
// Split so this file does not match its own needles.
|
||||
let needles = [
|
||||
concat!("(5-minute", " timeout)"),
|
||||
concat!("escalation_timeout:", " 300"),
|
||||
|
||||
Reference in new issue
Block a user