test: improve vault password file errors by propagating up
This commit is contained in:
+7
-7
@@ -129,13 +129,13 @@ async fn run(
|
||||
}
|
||||
};
|
||||
|
||||
if policy.skills_enabled
|
||||
&& node
|
||||
.tools
|
||||
.as_deref()
|
||||
.map(|t| !t.is_empty())
|
||||
.unwrap_or(false)
|
||||
{
|
||||
let node_has_enabled_skills = node
|
||||
.enabled_skills
|
||||
.as_deref()
|
||||
.map(|s| !s.is_empty())
|
||||
.unwrap_or(false);
|
||||
|
||||
if policy.skills_enabled && node_has_enabled_skills {
|
||||
let mut tools = role.enabled_tools().map(|v| v.to_vec()).unwrap_or_default();
|
||||
for decl in skill_function_declarations() {
|
||||
if !tools.contains(&decl.name) {
|
||||
|
||||
@@ -228,6 +228,12 @@ impl GraphValidator {
|
||||
));
|
||||
continue;
|
||||
}
|
||||
if let Err(e) = paths::validate_skill_name(name) {
|
||||
result.error(ValidationError::new(format!(
|
||||
"graph 'enabled_skills' contains an invalid skill name: '{name}': {e}"
|
||||
)));
|
||||
continue;
|
||||
}
|
||||
if let Some(reason) = check_visibility(name) {
|
||||
result.error(ValidationError::new(format!(
|
||||
"graph 'enabled_skills': {reason}"
|
||||
@@ -252,6 +258,12 @@ impl GraphValidator {
|
||||
));
|
||||
continue;
|
||||
}
|
||||
if let Err(e) = paths::validate_skill_name(name) {
|
||||
result.error(ValidationError::new(format!(
|
||||
"llm node 'enabled_skills' contains an invalid skill name: '{name}': {e}"
|
||||
)));
|
||||
continue;
|
||||
}
|
||||
if let Some(reason) = check_visibility(name) {
|
||||
result.error(ValidationError::with_node(
|
||||
node_id,
|
||||
|
||||
Reference in New Issue
Block a user