Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
90574f4
feat(tier3): fail scored wrong answers
chrisknvidia Nov 7, 2026
fc19aba
feat(tier3): gate required checks in attempt verdicts
chrisknvidia Nov 7, 2026
6eed333
fix(tier3): show required-check summary in default CLI output
chrisknvidia Nov 7, 2026
ffdcecf
fix(reporting): show completed Tier 3 summary in validate CLI
chrisknvidia Nov 7, 2026
2608eed
fix(reporting): preserve Tier 3 case summary details
chrisknvidia Nov 7, 2026
d18b722
Merge origin/main into feat/christopherk/wrong-answer-fails-overall
chrisknvidia Nov 8, 2026
fc4e5b8
fix(reporting): update verdict wording
chrisknvidia Nov 8, 2026
b584a14
fix(tier3): preserve verdicts in reports
chrisknvidia Nov 8, 2026
5ff2ecc
fix(tier3): align CI with required-check verdicts
chrisknvidia Nov 8, 2026
e60a0e6
merge: incorporate latest main into Overall verdict
chrisknvidia Nov 9, 2026
f57df35
Fix Tier 3 verdict reporting findings
chrisknvidia Nov 10, 2026
28ea2f0
Fix Tier 3 failure reason preview assertion
chrisknvidia Nov 10, 2026
5b9a37b
test(tier3): preserve inconclusive verdict when skill never activates
chrisknvidia Nov 10, 2026
7963482
Merge remote-tracking branch 'origin/main' into feat/christopherk/wro…
chrisknvidia Nov 10, 2026
7c3e57a
Merge remote-tracking branch 'origin/main' into feat/christopherk/wro…
chrisknvidia Nov 10, 2026
92aa5db
Merge remote-tracking branch 'origin/main' into HEAD
chrisknvidia Nov 10, 2026
58ad894
merge: sync origin/main into #395
chrisknvidia Nov 10, 2026
b127d29
Merge main into wrong-answer verdict PR
chrisknvidia Nov 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ All notable changes to SkillEvaluator are documented in this file.

### Changed

- A scored Tier 3 attempt now fails when `goal_accuracy` or security is below
1.0, even if its Overall score meets the pass threshold. N/A or unscored
metrics preserve the existing verdict behavior; missed behavior-check steps
are warnings. A with-skill required-check failure fails the quality verdict,
while no-skill failures do not. Reports show required-check, goals-met,
and security-clean counts for both arms, plus failed-case reasons.

- Align terminal grade and lift colors across compact, full, and direct Tier 3
reports; displayed zero lift is neutral. Narrow terminals stack complete
condition score/bar groups. Full-report Details retain successful quality and
Expand Down
21 changes: 20 additions & 1 deletion docs/reports.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,26 @@ missing or partial step telemetry is a gap, not a zero.
pass@k is the reliability signal, reported separately from the dimension
scores. With `--n-attempts k`, each eval case runs k times per arm, and a case
counts as passed when at least one attempt clears the `--pass-threshold`
score using the same overall formula above. Comparing pass@k across arms (in
score using the same overall formula above. A scored `goal_accuracy` must also
meet its default 1.0 pass threshold; a below-threshold attempt fails with a
goal-not-met reason even when its Overall score passes. Scored security must
also be 1.0: a below-threshold result fails with a security-issue reason.
Missing or errored metrics preserve the previous behavior, and unsupported
native Codex wrapper evidence is treated as an evaluator limitation rather than
a security failure.
`behavior_check` is warning-only; a score below 1.0 lists the missed expected
steps without changing the attempt verdict. The existing Overall threshold is
applied after the required checks.

Each arm reports **Required checks passed**, **Goals met**, and
**Security clean** as counts over scored cases or attempts, with the
with-skill-minus-no-skill difference. Goals-met counts include scored
attempts whose `goal_accuracy` meets its threshold. A completed agent's quality
verdict fails when any with-skill case fails a required goal-accuracy or
security check; failures in the no-skill arm do not change that verdict. A
positive Skill Lift remains available for reference, but does not override
that quality failure.
Comparing pass@k across arms (in
`pass_at_k_lift.json`) tells you
whether the skill makes success more *repeatable*, not just whether the average
score moved. Each arm also records a case-level 95% Wilson score interval for
Expand Down
172 changes: 169 additions & 3 deletions src/skillevaluator/evaluation/tier3_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -882,13 +882,17 @@ def build_agent_eval_payload(
summary = {
"schema_version": _SCHEMA_VERSION,
"verdict": verdict,
"verdict_reason": _agent_quality_verdict_reason(agent_payloads.get(best_agent, {})),
Comment thread
chrisknvidia marked this conversation as resolved.
Resolved
"skill_activation": best.get("skill_activation", {}),
"skill_name": skill_name,
"mode": mode,
"best_agent": best_agent,
"agents_run": list(agent_payloads.keys()),
"overall_score": round(overall_score, 4) if overall_score is not None else None,
"overall_lift": round(overall_lift, 4) if overall_lift is not None else None,
"correct_answers": best.get("correct_answers"),
"required_checks": best.get("required_checks"),
"security_clean": best.get("security_clean"),
"environment": env_mode,
"runtime_seconds": _finite_float(runtime_seconds) or 0.0,
"evaluated_at": evaluated_at,
Expand Down Expand Up @@ -968,6 +972,7 @@ def build_agent_eval_payload(
"skill_name": skill_name,
"mode": mode,
"verdict": verdict,
"verdict_reason": summary["verdict_reason"],
"skill_activation": summary["skill_activation"],
"best_agent": best_agent,
"agents_run": list(agent_payloads.keys()),
Expand Down Expand Up @@ -1001,6 +1006,9 @@ def build_agent_eval_payload(
"cases": best.get("cases", []),
"trials": canonical_trials,
"pass_at_k": best.get("pass_at_k", {}),
"correct_answers": best.get("correct_answers"),
"required_checks": best.get("required_checks"),
"security_clean": best.get("security_clean"),
"insights": _insights_from_dimensions(best_dimensions),
"conclusions": list(deterministic_conclusions),
"recommendations": recommendations,
Expand Down Expand Up @@ -1471,6 +1479,10 @@ def _replace_with_minimal_payload(payload: dict[str, Any], report_budget: _Repor
"verdict",
"overall_score",
"overall_lift",
"correct_answers",
"required_checks",
"security_clean",
"verdict_reason",
"environment",
"runtime_seconds",
"score_policy",
Expand Down Expand Up @@ -1506,6 +1518,10 @@ def _replace_with_minimal_payload(payload: dict[str, Any], report_budget: _Repor
"environment": payload.get("environment"),
"overall_score": payload.get("overall_score"),
"overall_lift": payload.get("overall_lift"),
"correct_answers": summary.get("correct_answers"),
"required_checks": summary.get("required_checks"),
"security_clean": summary.get("security_clean"),
"verdict_reason": summary.get("verdict_reason"),
"composite_lift": payload.get("composite_lift"),
"execution_status": payload.get("execution_status"),
"execution_errors": compact_summary["execution_errors"],
Expand Down Expand Up @@ -2124,6 +2140,9 @@ def _build_agent(
"trials": trials,
"trials_baseline": baseline_trials,
"resources": resources,
"correct_answers": _correct_answer_comparison(info),
"required_checks": _required_check_comparison(info),
"security_clean": _security_clean_comparison(info),
"pass_at_k": {
"with_skill": info.get("pass_with_skill") or {},
"without_skill": info.get("pass_without_skill") or {},
Expand Down Expand Up @@ -2858,6 +2877,81 @@ def _cases(info: dict[str, Any]) -> list[dict[str, Any]]:
return cases


def _correct_answer_arm(value: object) -> dict[str, int | None]:
summary = value.get("correct_answers") if isinstance(value, dict) else None
summary = summary if isinstance(summary, dict) else {}

def count(name: str) -> int | None:
number = summary.get(name)
return number if isinstance(number, int) and not isinstance(number, bool) and number >= 0 else None

return {"correct": count("correct"), "scored": count("scored")}


def _correct_answer_comparison(info: dict[str, Any]) -> dict[str, Any]:
with_skill = _correct_answer_arm(info.get("pass_with_skill"))
without_skill = _correct_answer_arm(info.get("pass_without_skill"))
difference = None
if (
with_skill["correct"] is not None
and with_skill["scored"]
and without_skill["correct"] is not None
and without_skill["scored"]
):
difference = with_skill["correct"] - without_skill["correct"]
return {
"with_skill": with_skill,
"without_skill": without_skill,
"difference": difference,
}


def _count_arm(value: object, key: str, *, numerator: str) -> dict[str, int | None]:
summary = value.get(key) if isinstance(value, dict) else None
summary = summary if isinstance(summary, dict) else {}

def count(name: str) -> int | None:
number = summary.get(name)
return number if isinstance(number, int) and not isinstance(number, bool) and number >= 0 else None

return {numerator: count(numerator), "scored": count("scored")}


def _count_comparison(info: dict[str, Any], key: str, *, numerator: str) -> dict[str, Any]:
with_skill = _count_arm(info.get("pass_with_skill"), key, numerator=numerator)
without_skill = _count_arm(info.get("pass_without_skill"), key, numerator=numerator)
difference = None
if (
with_skill[numerator] is not None
and with_skill["scored"]
and without_skill[numerator] is not None
and without_skill["scored"]
):
difference = with_skill[numerator] - without_skill[numerator]
return {
"with_skill": with_skill,
"without_skill": without_skill,
"difference": difference,
}


def _required_check_comparison(info: dict[str, Any]) -> dict[str, Any]:
comparison = _count_comparison(info, "required_checks", numerator="passed")
for arm_name, source_name in (("with_skill", "pass_with_skill"), ("without_skill", "pass_without_skill")):
arm = info.get(source_name)
checks = arm.get("required_checks") if isinstance(arm, dict) else None
checks = checks if isinstance(checks, dict) else {}
comparison[arm_name].update(
wrong_answer=checks.get("wrong_answer", 0),
security=checks.get("security", 0),
)
return comparison


def _security_clean_comparison(info: dict[str, Any]) -> dict[str, Any]:
return _count_comparison(info, "security_clean", numerator="clean")


# ---------------------------------------------------------------------------
# Trials (Trials tab)
# ---------------------------------------------------------------------------
Expand All @@ -2875,6 +2969,7 @@ def _normalize_trials(rewards: list[dict[str, Any]], metrics: list[str]) -> list
# Import lazily: ``skillevaluator.tier3`` imports report construction through
# its command module, so importing Harbor metrics at module load time creates
# a collector-first circular import.
from skillevaluator.tier3.attempt_verdict import attempt_verdict, scored_goal_accuracy
from skillevaluator.tier3.harbor.metrics import (
DEFAULT_METRIC_SET,
LEGACY_METRIC_SET,
Expand Down Expand Up @@ -2913,11 +3008,36 @@ def _normalize_trials(rewards: list[dict[str, Any]], metrics: list[str]) -> list
)
if value is not None:
scores[metric] = value
goal_accuracy_values = [value for item in group if (value := scored_goal_accuracy(item)) is not None]
trial: dict[str, Any] = {
"trial_id": reward.get("trial_id"),
"entry_id": reward.get("entry_id"),
"scores": scores,
"overall": _complete_mean([overall_score(item) for item in group]) if group_is_consistent else None,
"goal_accuracy_for_verdict": _complete_mean(goal_accuracy_values),
}
verdict = attempt_verdict(trial["overall"], 0.5, reward=reward)
Comment thread
chrisknvidia marked this conversation as resolved.
Resolved
trial["attempt_verdict"] = {
"passed": verdict.passed,
"reason": verdict.reason,
"warnings": list(verdict.warnings),
}
behavior_detail = (
reward.get("details", {}).get("behavior_check") if isinstance(reward.get("details"), dict) else None
)
behavior_results = behavior_detail.get("results") if isinstance(behavior_detail, dict) else None
trial["required_check_data"] = {
Comment thread
chrisknvidia marked this conversation as resolved.
Resolved
"security_score": verdict.security_score if verdict.security_clean is not None else None,
"security_message": verdict.security_message,
"security_exempt": verdict.security_exempt,
"behavior_score": metric_value(reward, "behavior_check"),
"behavior_results": [
{"step": item.get("step"), "passed": item.get("passed")}
for item in behavior_results
if isinstance(item, dict) and isinstance(item.get("step"), int) and isinstance(item.get("passed"), bool)
]
if isinstance(behavior_results, list)
else [],
}
from skillevaluator.tier3.harbor.metrics import not_applicable_metrics

Expand Down Expand Up @@ -3619,11 +3739,31 @@ def _build_conclusions(
}
)

from skillevaluator.tier3.attempt_verdict import attempt_verdict

failing_trials: list[str] = []
for agent_name, agent in agents.items():
for trial in agent.get("trials") or []:
overall = _finite_float(trial.get("overall"))
if overall is None or overall < pass_threshold:
check_data = trial.get("required_check_data")
check_data = check_data if isinstance(check_data, dict) else {}
security_score = check_data.get("security_score")
security_message = check_data.get("security_message")
security_detail: dict[str, Any] = {
"findings": ([{"score_impact": True, "message": security_message}] if security_message else [])
}
if check_data.get("security_exempt") is True:
security_detail["supported"] = False
reward = {
"goal_accuracy": trial.get("goal_accuracy_for_verdict"),
"security": security_score,
"behavior_check": check_data.get("behavior_score"),
"details": {
"security": security_detail,
"behavior_check": {"results": check_data.get("behavior_results", [])},
},
}
if not attempt_verdict(overall, pass_threshold, reward=reward).passed:
failing_trials.append(f"{agent_name}/{trial.get('entry_id') or trial.get('trial_id')}")
if failing_trials:
conclusions.append(
Expand Down Expand Up @@ -3742,9 +3882,15 @@ def _verdict_from_lift(lift: float | None) -> str:


def _agent_quality_verdict(agent: dict[str, Any]) -> str:
"""Classify one supported agent by the canonical dimension gate."""
"""Classify one supported agent by required checks, then dimensions."""
if agent.get("execution_status") != "succeeded":
return VERDICT_NEUTRAL
from skillevaluator.tier3.attempt_verdict import required_check_failure_reason

required_checks = agent.get("required_checks")
required_check_arm = required_checks.get("with_skill") if isinstance(required_checks, dict) else None
if required_check_failure_reason(required_check_arm):
Comment thread
chrisknvidia marked this conversation as resolved.
Resolved
return VERDICT_FAIL
if _never_activated(agent):
return VERDICT_INCONCLUSIVE

Expand All @@ -3769,8 +3915,16 @@ def _agent_quality_verdict(agent: dict[str, Any]) -> str:
return VERDICT_PASS


def _agent_quality_verdict_reason(agent: dict[str, Any]) -> str | None:
from skillevaluator.tier3.attempt_verdict import required_check_failure_reason

required_checks = agent.get("required_checks")
arm = required_checks.get("with_skill") if isinstance(required_checks, dict) else None
return required_check_failure_reason(arm)


def _overall_verdict_from_agents(agents: dict[str, dict[str, Any]]) -> str:
"""PASS only when one supported agent passes every required dimension."""
"""PASS only when one supported agent passes its quality requirements."""
verdicts = [
_agent_quality_verdict(agent) for agent in agents.values() if agent.get("execution_status") == "succeeded"
]
Expand Down Expand Up @@ -4133,9 +4287,21 @@ def _dataset_summary(dataset: list[dict[str, Any]], trials: list[dict[str, Any]]

def _verdict_policy(attempt_policy: dict[str, Any]) -> dict[str, Any]:
"""Expose the distinct task-attempt, dimension, and overall-lift gates."""
from skillevaluator.tier3.attempt_verdict import (
DEFAULT_GOAL_ACCURACY_PASS_THRESHOLD,
DEFAULT_SECURITY_PASS_THRESHOLD,
RUN_FAILS_ON_ANY_FAILED_CASE,
)

attempt_threshold = attempt_policy.get("pass_threshold")
return {
"attempt_pass_threshold": _finite_float(attempt_threshold),
"goal_accuracy_pass_threshold": DEFAULT_GOAL_ACCURACY_PASS_THRESHOLD,
"security_pass_threshold": DEFAULT_SECURITY_PASS_THRESHOLD,
"attempt_pass_rule": "overall_threshold_and_goal_accuracy_and_security_threshold_when_scored",
"run_fail_policy": "any_with_skill_required_check_failure"
if RUN_FAILS_ON_ANY_FAILED_CASE
else "dimension_gate",
"dimension_pass_threshold": DIMENSION_VERDICT_PASS_THRESHOLD,
"dimension_neutral_threshold": DIMENSION_VERDICT_NEUTRAL_THRESHOLD,
"lift_pass_threshold": TIER3_LIFT_PASS_THRESHOLD,
Expand Down
Loading
Loading