fix(TASK-028): pin example-doc wording; make not-found escalation hint match queue semantics
This commit is contained in:
2 files changed
+22
-3
No files matched your search
@@ -1711,7 +1711,7 @@ fn handle_reply_escalation(ctx: &mut RequestContext, args: &Value) -> Result<Val
|
|||||||
}
|
}
|
||||||
None => Ok(json!({
|
None => Ok(json!({
|
||||||
"status": "error",
|
"status": "error",
|
||||||
"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)."),
|
"message": format!("No pending escalation found with id '{escalation_id}'. It may have already been replied to."),
|
||||||
})),
|
})),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3093,6 +3093,10 @@ mod tests {
|
|||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
assert_eq!(result["status"], "error");
|
assert_eq!(result["status"], "error");
|
||||||
|
assert_eq!(
|
||||||
|
result["message"],
|
||||||
|
"No pending escalation found with id 'missing'. It may have already been replied to."
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
@@ -432,10 +432,25 @@ mod tests {
|
|||||||
concat!("default:", " 5 minutes"),
|
concat!("default:", " 5 minutes"),
|
||||||
];
|
];
|
||||||
let root = std::path::Path::new(env!("CARGO_MANIFEST_DIR"));
|
let root = std::path::Path::new(env!("CARGO_MANIFEST_DIR"));
|
||||||
let mut files = vec![root.join("config.agent.example.yaml")];
|
let example = root.join("config.agent.example.yaml");
|
||||||
|
let example_text = std::fs::read_to_string(&example).unwrap();
|
||||||
|
for needle in ["escalation_timeout: 0", "0 = wait indefinitely"] {
|
||||||
|
assert!(
|
||||||
|
example_text.contains(needle),
|
||||||
|
"{} lost the shipped wording {needle:?}",
|
||||||
|
example.display()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
let mut files = vec![example];
|
||||||
collect_files(&root.join("src"), &mut files);
|
collect_files(&root.join("src"), &mut files);
|
||||||
collect_files(&root.join("assets"), &mut files);
|
collect_files(&root.join("assets"), &mut files);
|
||||||
assert!(files.len() > 3, "walked only {} files", files.len());
|
let this_file = root.join(file!());
|
||||||
|
assert!(
|
||||||
|
files.contains(&this_file),
|
||||||
|
"walk did not reach {}",
|
||||||
|
this_file.display()
|
||||||
|
);
|
||||||
|
|
||||||
let mut hits = Vec::new();
|
let mut hits = Vec::new();
|
||||||
for path in &files {
|
for path in &files {
|
||||||
|
|||||||
Reference in new issue
Block a user