from app.agents.evaluation_agent import evaluate_project from app.agents.user_agent import run_user_agent from app.agents.validation_agent import validate_project def test_evaluation_agent_returns_checks(): result = evaluate_project() assert result["agent"] == "evaluation_suggestion_agent" assert result["passed"] is True assert result["checks"] assert result["summary"]["passed_checks"] == result["summary"]["total_checks"] checks = {item["name"]: item["passed"] for item in result["checks"]} assert checks["real_workspace_acceptance"] is True assert checks["real_train_acceptance"] is True assert checks["single_epoch_curve_support"] is True assert checks["separated_pages_ui"] is True assert checks["trained_model_inference_ui"] is True assert checks["dataset_preparation_doc"] is True assert checks["user_agent_api"] is True assert checks["user_agent_ui"] is True def test_validation_agent_lightweight(monkeypatch): monkeypatch.setenv("SEG_VALIDATE_LIVE", "0") result = validate_project(run_build=False, run_deep=False) assert result["agent"] == "validation_agent" assert result["passed"] is True assert any(item["name"] == "catalog_has_yolo_heatmap" for item in result["checks"]) def test_user_agent_runs_synthetic_open_data_flow(): result = run_user_agent() assert result["agent"] == "user_agent" assert result["passed"] is True checks = {item["name"]: item["passed"] for item in result["checks"]} assert checks["synthetic_open_dataset_created"] is True assert checks["image_mask_pairs_ready"] is True assert checks["yolo_labels_ready"] is True assert checks["dataset_yaml_generated"] is True assert checks["job_runner_used"] is True assert checks["result_artifacts_visible"] is True assert checks["training_curve_visible"] is True