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): preserve pass thresholds in incomplete runs (#580)
Christopher Kevin11048a4dbc1c
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 2a312d17..3168df43 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -289,6 +289,9 @@ All notable changes to SkillEvaluator are documented in this file.half was never checked. Every clause of an expectation must now name acheckable artifact of its own; one that does not keeps the gate, as a whollyprose expectation already did.+- Tier 3 recommendations preserve the configured pass threshold when an+ incomplete condition has no pass-rate summary, so scored attempts below that+ threshold still receive failure advice.- SARIF `artifactLocation.uri` values percent-encode a `%` in a file name as`%25`. A file such as `a%20b.md` no longer shares the URI of `a b.md`, and`100%.md` no longer produces an invalid URI.diff --git a/src/skillevaluator/tier3/case_summary.py b/src/skillevaluator/tier3/case_summary.pyindex 033be3d4..2814ddeb 100644--- a/src/skillevaluator/tier3/case_summary.py+++ b/src/skillevaluator/tier3/case_summary.py@@ -176,11 +176,26 @@ def _scored_trials(agent: Mapping[str, Any], key: str) -> dict[str, dict[str, Anif trials is None or not trials.is_dir():return {}pass_at_k = agent.get("pass_at_k") if isinstance(agent.get("pass_at_k"), Mapping) else {}+ run_dir = Path(str(output_dir)).parent+ saved = _load_json(run_dir / "result.json", root=run_dir)+ saved = saved if isinstance(saved, Mapping) else {}+ provenance = saved.get("provenance")+ provenance = provenance if isinstance(provenance, Mapping) else {}+ policies = [+ agent.get("attempt_policy"),+ saved.get("attempt_policy"),+ provenance.get("attempt_policy"),+ pass_at_k.get(key),+ *pass_at_k.values(),+ ]threshold = next((float(v["pass_threshold"])- for v in pass_at_k.values()- if isinstance(v, Mapping) and isinstance(v.get("pass_threshold"), int | float)+ for v in policies+ if isinstance(v, Mapping)+ and isinstance(v.get("pass_threshold"), int | float)+ and not isinstance(v["pass_threshold"], bool)+ and 0 <= v["pass_threshold"] <= 1),0.5,)@@ -1169,7 +1184,11 @@ def what_to_fix(result: Mapping[str, Any], *, run_dir: Path, skill_path: Path | None = None, use_llm: bool = True) -> list[dict[str, Any]]:"""Rank failed test cases across agents by attempts lost and attach one fix each."""- agents = {str(k): v for k, v in (result.get("agents") or {}).items() if isinstance(v, Mapping)}+ agents = {+ str(k): dict(v, attempt_policy=result.get("attempt_policy") or v.get("attempt_policy"))+ for k, v in (result.get("agents") or {}).items()+ if isinstance(v, Mapping)+ }dataset = _dataset_entries(run_dir)grouped: dict[tuple[str, str], list[dict[str, Any]]] = {}for case_id in _case_ids(agents):diff --git a/tests/test_tier3_case_summary.py b/tests/test_tier3_case_summary.pyindex b25eb79c..f5f24d56 100644--- a/tests/test_tier3_case_summary.py+++ b/tests/test_tier3_case_summary.py@@ -52,6 +52,43 @@ def _reward(activated: bool, reason: str) -> dict:}[email protected]("source", ["result", "saved", "provenance", "variant", "other_variant", "default"])+def test_incomplete_reconstruction_preserves_configured_threshold(tmp_path: Path, source: str) -> None:+ from skillevaluator.tier3.case_summary import _cases++ _trial(tmp_path, "a", "strict__one", {"overall": 0.95, "goal_accuracy": 1.0, "skill_invoked": True})+ agent = _agent({}, {})+ agent.update(output_dir=str(tmp_path / "a"), execution_status="failed")+ result = {"agents": {"a": agent}}+ policy = {"pass_threshold": 0.99}+ if source == "result":+ result["attempt_policy"] = policy+ elif source == "saved":+ (tmp_path / "result.json").write_text(json.dumps({"attempt_policy": policy}))+ elif source == "provenance":+ (tmp_path / "result.json").write_text(json.dumps({"provenance": {"attempt_policy": policy}}))+ elif source in {"variant", "other_variant"}:+ agent["pass_at_k"]["with_skill" if source == "variant" else "without_skill"]["pass_threshold"] = 0.99++ fixes = what_to_fix(result, run_dir=tmp_path, use_llm=False)++ assert bool(fixes) is (source != "default")+ if fixes:+ assert (fixes[0]["case"], fixes[0]["kind"], fixes[0]["attempts_lost"]) == ("strict", "skill", 1)+ if source != "result":+ assert _cases(agent, "with_skill")["strict"]["attempts"][0]["passed"] is (source == "default")+++def test_incomplete_reconstruction_without_saved_result_keeps_default(tmp_path: Path) -> None:+ _trial(tmp_path, "a", "ordinary__one", {"overall": 0.2, "goal_accuracy": 1.0, "skill_invoked": True})+ agent = dict(_agent({}, {}), output_dir=str(tmp_path / "a"), execution_status="failed")+ (tmp_path / "result.json").write_text("invalid JSON")++ [fix] = what_to_fix({"agents": {"a": agent}}, run_dir=tmp_path, use_llm=False)++ assert (fix["case"], fix["kind"]) == ("ordinary", "skill")++def test_grid_shows_one_row_per_case_with_attempt_marks_per_agent() -> None:result = {"execution_status": "succeeded",