(yaml_content: Any)
| 97 | |
| 98 | |
| 99 | def check_config(yaml_content: Any) -> str: |
| 100 | if not isinstance(yaml_content, dict): |
| 101 | return "YAML root must be a mapping" |
| 102 | |
| 103 | # Skip placeholder resolution during save - users may configure env vars at runtime |
| 104 | # Use yaml_content directly instead of prepare_design_mapping() |
| 105 | schema_errors = validate_design(yaml_content) |
| 106 | if schema_errors: |
| 107 | formatted = "\n".join(f"- {err}" for err in schema_errors) |
| 108 | return formatted |
| 109 | |
| 110 | logic_errors = check_workflow_structure(yaml_content) |
| 111 | if logic_errors: |
| 112 | formatted = "\n".join(f"- {err}" for err in logic_errors) |
| 113 | return formatted |
| 114 | |
| 115 | graph = yaml_content.get("graph") or {} |
| 116 | try: |
| 117 | _ensure_supported(graph) |
| 118 | except Exception as e: |
| 119 | return str(e) |
| 120 | |
| 121 | return "" |
no test coverage detected