huskies: merge 942

This commit is contained in:
dave
2026-05-13 05:16:11 +00:00
parent 7ca5339450
commit 0a825b9f27
11 changed files with 416 additions and 258 deletions
+16 -1
View File
@@ -53,7 +53,7 @@ pub(crate) fn tool_create_refactor(args: &Value, ctx: &AppContext) -> Result<Str
&root,
name,
description,
Some(&acceptance_criteria),
&acceptance_criteria,
depends_on.as_deref(),
)?;
@@ -78,6 +78,21 @@ mod tests {
use crate::http::test_helpers::test_ctx;
use serde_json::json;
#[test]
fn tool_create_refactor_rejects_whitespace_only_name() {
let tmp = tempfile::tempdir().unwrap();
let ctx = test_ctx(tmp.path());
let err = tool_create_refactor(
&json!({"name": " ", "acceptance_criteria": ["Code is clean"]}),
&ctx,
)
.unwrap_err();
assert!(
err.contains("empty") || err.contains("whitespace"),
"error should mention empty/whitespace, got: {err}"
);
}
#[test]
fn tool_create_refactor_rejects_missing_acceptance_criteria() {
let tmp = tempfile::tempdir().unwrap();