Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Fixed

- **A run of only ungated groups no longer reads as "every gate met"**
(`activeagent`). An ungated group's row is met without being held to a
bar, so a report whose every result sat in ungated groups said "every
pass gate met" (`GateCheck`, `assert_meets_pass_gates`, the RSpec
matcher) and `evals run --wait` printed `Gates: every gate met`, even
when every answer had failed. The verdict is unchanged, since an ungated
group never fails the run, but the message now says that every group
covered is ungated and nothing was held to a bar.

## [1.9.8] - 2026-11-12

The dashboard holds a run to its catalog's pass bars: a product's and a
Expand Down
4 changes: 3 additions & 1 deletion docs/framework/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ FAIL

Here the whole run clears 80% and still fails, because the critical group
is held to 100%. A group with `gated: false` is reported and never fails
the run. `--json` adds the run's `gates` beside `pass_rate` and `verdict`.
the run; a run that reached only ungated groups prints `Gates: every group
reached is ungated (N); nothing was held to a bar.` in place of `every gate
met`, so add `--min-pass-rate` if such a run should still fail CI. `--json` adds the run's `gates` beside `pass_rate` and `verdict`.
A run without gates is gated on its status and pass rate alone, as before,
and without `--wait` or `--min-pass-rate` the command returns once the run
starts, before any gate exists.
Expand Down
4 changes: 3 additions & 1 deletion docs/framework/evaluations.md
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,9 @@ and `pass_rate` (a 0..1 fraction) beside the
true when the rate reaches the bar, and always for an ungated group.
`Report#passed?` is every gate met, and a report with no gate (a selection
that matched nothing, or every scenario dropped as `production_only`) does
not pass.
not pass. A report whose every result sits in an ungated group passes,
since such a group never fails the run, but nothing in it was held to a
bar, and `GateCheck#message` says so rather than "every pass gate met".
`Report#failures(group:)` lists the results that did not pass — failed and
errored, in run order — and `failures_markdown(group:)` writes them one per
line.
Expand Down
8 changes: 7 additions & 1 deletion lib/active_agent/cli/eval_commands.rb
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,13 @@ def run_gates(run)
def print_gates(gates, missed)
unmet = gates.reject { |gate| gate["met"] == true }
unless missed
@out.puts "Gates: every gate met (#{gates.size})."
# Ungated rows are met without being held to a bar, so a run that
# reached only those says so rather than "every gate met".
if gates.none? { |gate| gate["gated"] != false }
@out.puts "Gates: every group reached is ungated (#{gates.size}); nothing was held to a bar."
else
@out.puts "Gates: every gate met (#{gates.size})."
end
return
end

Expand Down
5 changes: 4 additions & 1 deletion lib/active_agent/evals/gate_check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ def unmet
end

# The text a failing assertion prints. The first line counts the gates
# not met, or is the one line "every pass gate met" when none is; then
# not met, or is the one line "every pass gate met" when none is (a
# report whose every row is an ungated group's says that instead: its
# rows are met because nothing held them to a bar); then
# each unmet gate as Gate#to_s; then, after a blank line, the failures
# to read: for each group with an unmet gate, in gates order, "<group>
# failures:" over Report#failures_markdown for that group. An unmet All
Expand All @@ -59,6 +61,7 @@ def message
return "no result reached a pass gate; the run evaluated nothing" if all.empty?

unmet = all.reject(&:met?)
return "every group the run covered is ungated; no answer was held to a bar" if all.none?(&:gated)
return "every pass gate met" if unmet.empty?

lines = [ "#{unmet.size} of #{all.size} pass gates not met", *unmet.map { |gate| "- #{gate}" } ]
Expand Down
15 changes: 15 additions & 0 deletions test/cli/cli_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,21 @@ def test_evals_run_trusts_the_dashboards_verdict_on_its_gates
assert_includes out, "Gates: no gate was reached."
end

# An ungated group never fails the run, so the verdict stands; the line
# under it no longer claims a gate was met when none held anything.
def test_evals_run_says_when_every_group_the_run_reached_is_ungated
stub_tool("evaluations_run", run_payload("pending"))
ungated = [ gate_row("experimental", "Experimental", 0, 2, 0.8, gated: false) ]
stub_tool("evaluation_runs_get", run_payload("complete", passed: 0, evaluated: 2, gates: ungated, gates_met: true))

code, out, = cli("evals", "run", "7", "--wait")

assert_equal CLI::EXIT_SUCCESS, code
assert_includes out, "Gates: every group reached is ungated (1); nothing was held to a bar."
refute_includes out, "every gate met"
assert_match(/PASS$/, out)
end

def test_evals_run_json_adds_the_gates_and_keeps_the_payload
stub_tool("evaluations_run", run_payload("pending"))
stub_tool("evaluation_runs_get", gated_run)
Expand Down
12 changes: 12 additions & 0 deletions test/evals/gate_check_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@ def test_a_report_with_no_results_is_not_met_and_says_it_evaluated_nothing
assert_equal "no result reached a pass gate; the run evaluated nothing", check.message
end

# An ungated group never fails the run, so a report of nothing else is
# met; its message says why instead of "every pass gate met".
def test_a_report_with_only_ungated_groups_is_met_and_says_nothing_was_held_to_a_bar
experiment = grouped("exp_1", "Draft a reply in the customer's tone.", "experimental", "Experimental")
report = Report.new(results: [ result(experiment, gpt, replay(answer: "Dear customer."), score: 0.1) ], models: [ gpt ], pass_thresholds: THRESHOLDS)
check = GateCheck.new(report)

assert check.met?
assert_empty check.unmet
assert_equal "every group the run covered is ungated; no answer was held to a bar", check.message
end

def test_the_message_counts_the_unmet_gates_then_lists_them_and_each_groups_failures
report = gated_report
check = GateCheck.new(report)
Expand Down
Loading