Multi-tier framework for evaluating AI agent skills and plugins with quality gates, security scanning, harness compatibility checks, semantic overlap detection, synthetic evaluation dataset generation, and live agent evaluation that measures how skills affect agent behavior. Ships reusable CI templates that bring every check to any repository.
Python agent-evaluationagent-pluginsagent-securityagent-skillsagentic-aibenchmarkci-templatesclaude-codecodexevaluateevaluationharnesspluginplugin-evaluationsecurity-scannerskill-evalskill-evaluationskill-evaluatorskill-gap-analysisskills
fix(tier3): complete fully budget-denied runs without execution errors (#658)
Christopher Kevin9fafcb94b590
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex fdffb21d..c6be01cd 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -308,6 +308,8 @@ All notable changes to SkillEvaluator are documented in this file.### Fixed+- Fully budget-denied runs exit successfully and finish progress without an+ execution error, while retaining skipped arms and an incomplete quality verdict.- `--backend nemo-gym` no longer writes a second `[verifier.env]` table into anative task's `task.toml` when its header has a trailing comment, extra spacesor no final newline. The duplicate table made the file fail to parse.diff --git a/src/skillevaluator/evaluation/service.py b/src/skillevaluator/evaluation/service.pyindex e39229b6..f2240b31 100644--- a/src/skillevaluator/evaluation/service.py+++ b/src/skillevaluator/evaluation/service.py@@ -65,7 +65,9 @@ class EvaluationService:return str(raw_errors)status = result.get("execution_status")- if status != "succeeded":+ from skillevaluator.tier3.harbor.run_budget import budget_fully_denied++ if status != "succeeded" and not (status == "skipped" and budget_fully_denied(result.get("budget"))):label = str(status or "unknown")return f"Tier 3 evaluation execution status is {label}"return Nonediff --git a/src/skillevaluator/evaluation/tier3_report.py b/src/skillevaluator/evaluation/tier3_report.pyindex 1742e121..db5fe1a1 100644--- a/src/skillevaluator/evaluation/tier3_report.py+++ b/src/skillevaluator/evaluation/tier3_report.py@@ -649,6 +649,8 @@ def _validation_result_from_payload(payload: dict[str, Any] | None) -> Validatioif isinstance(run_id, str):result.metadata["run_id"] = run_idbest = payload.get("best_agent") or "n/a"+ from skillevaluator.tier3.harbor.run_budget import budget_fully_denied+if payload.get("execution_status") == "succeeded" and _finite_float(payload.get("overall_score")) is not None:if payload.get("mode") == "baseline_only":result.add_success(@@ -663,6 +665,12 @@ def _validation_result_from_payload(payload: dict[str, Any] | None) -> Validatiof"best agent {best}",)result.passed = True+ elif (+ payload.get("execution_status") == "skipped"+ and not payload.get("execution_errors")+ and budget_fully_denied(payload.get("budget"))+ ):+ result.mark_scan_incomplete("Tier 3 run budget")else:errors = payload.get("execution_errors") or ["Tier 3 evaluation did not produce a complete scored run"]for error in errors:diff --git a/src/skillevaluator/tier3/harbor/run_budget.py b/src/skillevaluator/tier3/harbor/run_budget.pyindex d7e10923..7c30235c 100644--- a/src/skillevaluator/tier3/harbor/run_budget.py+++ b/src/skillevaluator/tier3/harbor/run_budget.py@@ -451,6 +451,23 @@ def _budget_number(value: Any, *, cost: bool = False, missing: str = "not measurreturn f"{number:,}"+def budget_fully_denied(metadata: object) -> bool:+ """Return whether every planned attempt was explicitly denied before execution."""+ if not isinstance(metadata, dict):+ return False+ planned = metadata.get("planned_attempts")+ denied = metadata.get("not_run")+ return (+ isinstance(planned, int)+ and planned > 0+ and metadata.get("started_attempts") == 0+ and metadata.get("attempts_not_run") == planned+ and isinstance(denied, list)+ and len(denied) == planned+ and all(isinstance(row, dict) and row.get("reason") == "budget_exhausted" for row in denied)+ )++def budget_incomplete_reason(metadata: object) -> str | None:if not isinstance(metadata, dict) or not isinstance(metadata.get("not_run"), list) or not metadata["not_run"]:return Nonediff --git a/src/skillevaluator/tier3/harbor/runner.py b/src/skillevaluator/tier3/harbor/runner.pyindex 78f65afc..f19a91e4 100644--- a/src/skillevaluator/tier3/harbor/runner.py+++ b/src/skillevaluator/tier3/harbor/runner.py@@ -5360,7 +5360,11 @@ class _RunProgressLifecycle:else:errors = [str(raw_errors)] if raw_errors else []warnings = result.get("warnings") if isinstance(result.get("warnings"), list) else []- failed = bool(errors) or result.get("execution_status") not in {None, "succeeded"}+ from skillevaluator.tier3.harbor.run_budget import budget_fully_denied++ status = result.get("execution_status")+ budget_denied = status == "skipped" and budget_fully_denied(result.get("budget"))+ failed = bool(errors) or (status not in {None, "succeeded"} and not budget_denied)state = "failed" if failed else "degraded" if warnings else "complete"detail = errors[0] if errors else str(warnings[0]) if warnings else "Tier 3 evaluation finished"for stage in tuple(self._active_stages):diff --git a/tests/tier3/test_budget_denied_exit.py b/tests/tier3/test_budget_denied_exit.pynew file mode 100644index 00000000..ff31d907--- /dev/null+++ b/tests/tier3/test_budget_denied_exit.py@@ -0,0 +1,87 @@+# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.+# SPDX-License-Identifier: Apache-2.0++from pathlib import Path++import pytest+from click.testing import CliRunner++from skillevaluator.cli import cli+from skillevaluator.evaluation import EvaluationService+from skillevaluator.evaluation.tier3_report import _validation_result_from_payload, build_agent_eval_payload+from skillevaluator.tier3.harbor import runner+from skillevaluator.tier3.harbor.progress import NullProgressReporter+from skillevaluator.tier3.harbor.run_budget import BudgetController+++def denied_result():+ budget = BudgetController(max_attempts_total=0, planned=4)+ for arm in ("with", "without"):+ for attempt in (1, 2):+ assert not budget.admit(agent="opencode", arm=arm, case_id="case", attempt=attempt)+ return {"execution_status": "skipped", "execution_errors": [], "budget": budget.metadata()}+++def test_budget_denied_run_is_not_an_execution_failure(denied_result):+ assert EvaluationService.failure_reason(denied_result) is None+++def test_budget_denied_run_finishes_progress_without_failure(denied_result):+ class Reporter(NullProgressReporter):+ def emit(self, event):+ events.append(event)++ events = []+ lifecycle = runner._RunProgressLifecycle(Reporter())+ lifecycle.finish_result(denied_result)+ assert events[-1].stage == "run-finished"+ assert events[-1].state == "complete"+++def test_budget_denied_cli_exits_successfully(monkeypatch, denied_result):+ monkeypatch.setattr(EvaluationService, "evaluate", lambda *_args, **_kwargs: denied_result)+ skill = Path(__file__).parents[1] / "fixtures" / "skills" / "simple"+ result = CliRunner().invoke(cli, ["tier3", "evaluate", str(skill), "--progress", "off"])+ assert result.exit_code == 0, result.output+ assert "RUN QUALITY VERDICT: INCOMPLETE" in result.output+ assert "execution status is skipped" not in result.output+++def test_budget_denied_report_is_incomplete_without_execution_error(denied_result):+ condition = {+ "execution_status": "skipped",+ "skip_reason": "budget_exhausted",+ "expected_attempts": 0,+ "scored_attempts": 0,+ }+ payload = build_agent_eval_payload(+ "skill",+ {"opencode": {**denied_result, "conditions": {"with_skill": condition, "without_skill": condition}}},+ run_config={"budget": denied_result["budget"]},+ use_llm_judge=False,+ )+ validation = _validation_result_from_payload(payload)+ assert not validation.errors+ assert payload["verdict"] == "incomplete"+ assert payload["overall_score"] is None+ assert payload["overall_lift"] is None++[email protected]("change", ["error", "failed", "started", "reason", "partial", "empty", "missing"])+def test_other_incomplete_runs_still_fail_closed(denied_result, change):+ if change == "error":+ denied_result["execution_errors"] = ["real execution failure"]+ elif change == "failed":+ denied_result["execution_status"] = "failed"+ elif change == "started":+ denied_result["budget"]["started_attempts"] = 1+ elif change == "reason":+ denied_result["budget"]["not_run"][0]["reason"] = "execution_failed"+ elif change == "partial":+ denied_result["budget"]["planned_attempts"] = 5+ elif change == "empty":+ denied_result["budget"]["not_run"] = []+ else:+ denied_result.pop("budget")+ assert EvaluationService.failure_reason(denied_result) is not None