Skip to content

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.

fix(reporting): retain completed-agent results in Tier 3 reports (#223)

Narendran Raghavanb3a170692a7b
diff --git a/src/skillevaluator/reporting/html.py b/src/skillevaluator/reporting/html.py
index 838a26d6..0e97e4d5 100644
--- a/src/skillevaluator/reporting/html.py
+++ b/src/skillevaluator/reporting/html.py
@@ -1547,6 +1547,7 @@ class HTMLReporter(ReporterBase):
explicit_skill_name: str | None = None,
ci_context: dict[str, str] | None = None,
report_scope: str = "publication",
+ scan_root: str | None = None,
) -> None:
self.include_timestamp = include_timestamp
self.title = title or "SkillEvaluator Validation Report"
diff --git a/src/skillevaluator/reporting/templates/report.html.j2 b/src/skillevaluator/reporting/templates/report.html.j2
index fbfdac2a..ef20495b 100644
--- a/src/skillevaluator/reporting/templates/report.html.j2
+++ b/src/skillevaluator/reporting/templates/report.html.j2
@@ -1274,16 +1274,6 @@
<span aria-hidden="true">↓</span><span>Download JSON</span>
</button>{% endif %}
</div>
- <span class="header-status-badge {{ 'warn' if has_incomplete else ('pass' if all_passed else 'fail') }}">Process: {{ 'Incomplete' if has_incomplete else ('All Passed' if all_passed else 'Issues Found') }}</span>
- {% if report_scope == 'tier3' %}
- <span class="header-status-badge warn" data-publication-status="not-assessed">Publication: Not assessed (Tier 3 only)</span>
- {% else %}
- <span class="header-status-badge {{ 'pass' if publication_status == 'pass' else ('fail' if publication_status == 'fail' else 'warn') }}"
- data-publication-status="{{ publication_status }}"
- {% if publication_reasons %}title="{{ publication_reasons | join(' ') }}"{% endif %}>
- Publication: {{ publication_status | title }}
- </span>
- {% endif %}
</div>
</div>
</header>
@@ -1370,7 +1360,11 @@
</div>
{% endif %}
{% endif %}
+ {% if report_scope == 'tier3' %}
+ <p class="publication-line" data-publication-status="not-assessed"><span class="publication-label">Publication eligibility</span> <span class="status-badge warn">Not assessed (Tier 3 only)</span></p>
+ {% else %}
<p class="publication-line" data-publication-status="{{ publication_status }}"><span class="publication-label">Publication eligibility</span> <span class="status-badge {{ publication_class }}">{{ publication_words.get(publication_status, publication_status | title) }}</span>{% if publication_reasons %} <span class="publication-reasons">{{ publication_reasons | join(' ') }}</span>{% endif %}</p>
+ {% endif %}
</div>
</div>
{#-
@@ -1448,7 +1442,7 @@
</div>
{% endif %}
{% if has_tier3 %}
- {% set tier3_display_verdict = 'SKIPPED' if tier3_is_skipped else tier3_verdict | upper %}
+ {% set tier3_display_verdict = verdict_words['skipped'] if tier3_is_skipped else (advisory_fail_word if tier3_advisory_fail else verdict_words[tier3_verdict if tier3_verdict in ['pass', 'fail', 'neutral'] else 'incomplete']) %}
{% set t3_class = 'skipped' if tier3_is_skipped else ('warn' if completed_agent and completed_agent.needs_attention else ('pass' if tier3_verdict == 'pass' else ('fail' if tier3_verdict == 'fail' else 'warn'))) %}
<div class="tier-card {{ t3_class }}{% if initial_tab == 'tier3' %} active{% endif %}"
role="button"
@@ -2429,12 +2423,13 @@
Other execution failures need attention. This is not a whole-run or publication PASS.
{% else %}
<strong>Verdict at a glance:</strong>
- {{ tier3_verdict | upper }} with an overall score of
+ {{ advisory_fail_word if tier3_advisory_fail else (verdict_words.get(tier3_verdict) or tier3_verdict | title) }}{% if t3_effect %} · {{ t3_effect.message }}{% else %} with an overall score of
{{ "%.2f" | format(hero_score) if hero_score is not none else "N/A" }}.
{% if t3_best_name %}Best performing agent is <strong>{{ t3_best_name }}</strong>{% else %}No successfully scored agent is available{% endif %}
{% if tier3.get('overall_lift') is not none %} with {{ "%+.2f" | format(tier3.get('overall_lift')) }} skill lift{% endif %}.
{% endif %}
{% endif %}
+ {% endif %}
</div>
{% if t3_harbor_job_url or t3_harbor_analysis_url %}
<div class="t3-harbor-panel">
@@ -2451,7 +2446,7 @@
<div class="dashboard">
<div class="dashboard-card {{ 'success' if tier3_verdict == 'pass' else ('danger' if tier3_verdict == 'fail' else '') }}">
<h3 class="dashboard-card-title">{{ 'Quality Verdict' if report_scope == 'tier3' and completed_agent else 'Verdict' }}</h3>
- <p class="dashboard-card-value">{{ 'SKIPPED' if tier3_is_skipped else tier3_verdict | upper }}</p>
+ <p class="dashboard-card-value">{{ verdict_words['skipped'] if tier3_is_skipped else (advisory_fail_word if tier3_advisory_fail else (verdict_words.get(tier3_verdict) or tier3_verdict | title)) }}</p>
<p class="dashboard-card-subtitle">{{ 'Completed-agent quality; lift shown separately' if report_scope == 'tier3' and completed_agent else 'Evaluation outcome' }}</p>
</div>
<div class="dashboard-card">
diff --git a/src/skillevaluator/tier3/harbor/runner.py b/src/skillevaluator/tier3/harbor/runner.py
index 016df1d6..dae8df96 100644
--- a/src/skillevaluator/tier3/harbor/runner.py
+++ b/src/skillevaluator/tier3/harbor/runner.py
@@ -5563,8 +5563,8 @@ def _run_harbor_eval_impl(
report_path, report_warning = _render_current_report()
if report_path is not None:
results["report_path"] = str(report_path)
- if report_path.with_name("BENCHMARK.md").is_file():
- results["benchmark_path"] = str(report_path.with_name("BENCHMARK.md"))
+ if report_path.with_name("tier3-benchmark.md").is_file():
+ results["benchmark_path"] = str(report_path.with_name("tier3-benchmark.md"))
identity_after_report = _run_owned_publication_fields()
if identity_after_report != identity_before_report:
@@ -5577,13 +5577,13 @@ def _run_harbor_eval_impl(
report_path, report_warning = _render_current_report()
if report_path is not None:
results["report_path"] = str(report_path)
- if report_path.with_name("BENCHMARK.md").is_file():
- results["benchmark_path"] = str(report_path.with_name("BENCHMARK.md"))
+ if report_path.with_name("tier3-benchmark.md").is_file():
+ results["benchmark_path"] = str(report_path.with_name("tier3-benchmark.md"))
elif stale_report_path is not None:
try:
stale_report_path.resolve().relative_to(run_dir.resolve())
stale_report_path.unlink(missing_ok=True)
- stale_report_path.with_name("BENCHMARK.md").unlink(missing_ok=True)
+ stale_report_path.with_name("tier3-benchmark.md").unlink(missing_ok=True)
except (OSError, RuntimeError, ValueError):
pass
if is_gke_vertex_workload_identity_active(env_mode, agents):
diff --git a/tests/test_tier3_progress.py b/tests/test_tier3_progress.py
index 54e71fca..d77e1aaf 100644
--- a/tests/test_tier3_progress.py
+++ b/tests/test_tier3_progress.py
@@ -2092,6 +2092,78 @@ def test_runner_persists_compact_feedback_to_result_json(
assert "agent_eval" not in persisted
+def _collect_completed_report_input(*, output_dir: Path, **_kwargs: Any) -> dict[str, Any]:
+ from skillevaluator.tier3.harbor.metrics import DEFAULT_METRICS
+
+ for arm in ("with-skill", "without-skill"):
+ directory = output_dir / "codex" / arm
+ directory.mkdir(parents=True)
+ (directory / "summary.json").write_text(
+ json.dumps(
+ {
+ "scores": dict.fromkeys(DEFAULT_METRICS, 0.8),
+ "metrics": list(DEFAULT_METRICS),
+ "num_trials": 1,
+ "execution_status": "succeeded",
+ "execution_errors": [],
+ "expected_attempts": 1,
+ "scored_attempts": 1,
+ }
+ ),
+ encoding="utf-8",
+ )
+ return {"execution_status": "succeeded", "execution_errors": [], "metrics": list(DEFAULT_METRICS)}
+
+
+def test_runner_persists_scoped_benchmark_path(
+ monkeypatch: pytest.MonkeyPatch,
+ tmp_path: Path,
+) -> None:
+ from skillevaluator.evaluation.tier3_report import render_agent_eval_html_report
+
+ def render_without_judge(skill_path: Path, run_dir: Path, **kwargs: Any) -> Path:
+ return render_agent_eval_html_report(skill_path, run_dir, use_llm_judge=False, **kwargs)
+
+ runner, skill = _stub_runner(
+ monkeypatch, tmp_path, collect=_collect_completed_report_input, html_report=render_without_judge
+ )
+ result = runner.run_harbor_eval(skill, ["codex"], output_dir=tmp_path / "results")
+ benchmark = Path(result["run_dir"]) / "tier3-benchmark.md"
+ persisted = json.loads(Path(result["result_path"]).read_text(encoding="utf-8"))
+
+ assert benchmark.is_file()
+ assert result["benchmark_path"] == str(benchmark)
+ assert persisted["benchmark_path"] == str(benchmark)
+ assert not benchmark.with_name("BENCHMARK.md").exists()
+
+
+def test_runner_removes_scoped_benchmark_when_identity_rerender_fails(
+ monkeypatch: pytest.MonkeyPatch,
+ tmp_path: Path,
+) -> None:
+ from skillevaluator.evaluation.tier3_report import render_agent_eval_html_report
+
+ def render_then_change_source(skill_path: Path, run_dir: Path, **kwargs: Any) -> Path:
+ if (run_dir / "tier3-benchmark.md").exists():
+ raise OSError("injected rerender failure")
+ report = render_agent_eval_html_report(skill_path, run_dir, use_llm_judge=False, **kwargs)
+ (skill_path / "SKILL.md").write_text("# changed during reporting\n", encoding="utf-8")
+ return report
+
+ runner, skill = _stub_runner(
+ monkeypatch, tmp_path, collect=_collect_completed_report_input, html_report=render_then_change_source
+ )
+ (skill / "SKILL.md").write_text("# evaluated source\n", encoding="utf-8")
+ result = runner.run_harbor_eval(skill, ["codex"], output_dir=tmp_path / "results")
+ run_dir = Path(result["run_dir"])
+
+ assert result["publication_target_conflict"]
+ assert "report_path" not in result
+ assert "benchmark_path" not in result
+ assert not (run_dir / "report.html").exists()
+ assert not (run_dir / "tier3-benchmark.md").exists()
+
+
def test_runner_persists_run_owned_publication_identity_in_final_result(
monkeypatch: pytest.MonkeyPatch,
tmp_path: Path,