Repository navigation
fix(reporting): show judge-mixed lift exclusions on Tier 3 evaluator cards - #418
Merged
rng1995 merged 5 commits intoNov 12, 2026
Merged
Conversation
…cards A case whose arms were scored by different judge models (for example after a judge fallback in one arm) is left out of that judge metric's lift, while both arm scores keep it. An evaluator card could therefore show Baseline 0.20 and With skill 0.50 next to a -0.40 lift with nothing on the card explaining the gap. The report now works out which cases each judge metric's lift left out from the logical attempts the lift rebuild already compares, and falls back to the recorded per-metric count when the loaded rewards no longer identify them. The evaluator records the count in lift_excluded_cases, its card records comparison_basis (count, case IDs, with-skill attempt counts, reason), and matching evidence entries carry comparison_excluded. The HTML card adds a note under the lift pill and labels those cases in its per-trial evidence. Scores and lift are unchanged. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Publish the card's excluded_attempts and contributing_attempts only when the logical load the lift rebuild compares is complete, the lift basis describes the metric and every left-out case is identified; otherwise publish both as null. - List each comparison_basis case key once after cutting it to 256 characters. - Leave lift_excluded_cases out when the recorded count is above the largest integer JSON carries exactly, instead of publishing null. - Say "No lift: ... no comparable result remains" on a card without a lift, and claim that the arm scores include the cases only when both arm scores exist, in the note and in comparison_basis.reason. - Pin the never-activated, HTML sanitizer, 64-key cap and unresolved case guards with tests. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
State that comparison_basis.case_ids holds the lift's case keys (no attempt suffix, cut to 256 characters, listed once, at most 64), that both attempt counts are null unless the loaded rewards are complete and identify every left-out case, and that a never-activated agent gets none of these fields. Move the CHANGELOG entry ahead of the Tier 2 context deduplication entry so it no longer shares an insertion point with another pending Fixed entry. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
rng1995
marked this pull request as ready for review
November 9, 2026 19:50
rng1995
requested review from
chrisknvidia,
mosheabr and
rmalani-nv
as code owners
November 9, 2026 19:50
…ed-note Brings in the main changes since e5c100a. Three files conflicted, all where main's plain-language deductions (#399) added the evidence_unavailable_reason evidence field on the same lines that this branch adds comparison_excluded. Both fields are kept: - src/skillevaluator/evaluation/tier3_report.py: _metric_evidence keeps main's _METRIC_EVIDENCE_REF_METRICS import next to this branch's _entry_id import, and sets comparison_excluded for a judge-mixed case before main's evidence_unavailable_reason block. - src/skillevaluator/reporting/html.py: keeps this branch's _sanitize_tier3_comparison_basis helper ahead of main's new _sanitize_tier3_evaluator_card signature (keyword include_evidence_unavailable_default), and keeps the comparison_excluded check followed by main's evidence_unavailable_reason default. - src/skillevaluator/reporting/templates/report.html.j2: takes main's per-case dedup_map seed (with evidence_unavailable_reason and reason, at main's indentation) and adds this branch's comparison_excluded default; keeps both per-evidence update lines. CHANGELOG.md and docs/reports.mdx merged cleanly; this branch's Fixed entry stays under Unreleased next to the same neighbours. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
The merge put this branch's collector import ahead of main's eval_core import in _metric_evidence; ruff's import sorting wants eval_core first. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
rng1995
commented
Nov 12, 2026
rng1995
left a comment
Collaborator
Author
There was a problem hiding this comment.
Reviewed the full production diff, callers, report/runner contracts and affected regression coverage; no actionable findings. Existing CI on reviewed head 266da5d: 20 successful checks, 2 skipped; no failed or pending checks. Fresh merge-tree verification against current main ce52a09 succeeds without conflicts. No code changes or local test rerun were needed.
3 tasks done
rng1995
deleted the
naren/port-report-tier3-evaluator-judge-mixed-note
branch
November 12, 2026 18:29
This was referenced Nov 12, 2026
rng1995
added a commit
that referenced
this pull request
Nov 16, 2026
…eports and docs (#561) * fix(reporting): name the exception Harbor recorded under a failed Tier 3 job When a Harbor job's statistics miss a trial, the collector names the first trial or step exception Harbor recorded under it as `trial <label> recorded <Type>: <message>`, and that job failure is the arm's first error. The coverage notice only looked for an exception type at the start of an error or after `: `, so a step exception such as `RewardFileNotFoundError` left `failure` null, and a later typed error could be named instead of the first one. Also accept a type that follows ` recorded `. The type still has to be a CamelCase name ending in Error or Exception and be followed by `:` or the end of the error, so a typeless recorded message or a trial label shaped like a type names nothing. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(tier3): limit the empty expected_output rejection to the object shape The N/A section said `tier3 ./my-skill` and `tier3 init-harbor-task` reject an empty `expected_output`. Only a `{"skill_name", "evals"}` dataset is checked for it. A flat dataset (a JSON or YAML list, `{"cases": [...]}`, or any `evals.jsonl`) loads as legacy, so an empty or whitespace-only `expected_output` or `ground_truth` is accepted there and makes `accuracy` and `goal_accuracy` N/A. Say so, and pin the wording with a test that runs `init-harbor-task` on each shape. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(reporting): name only the shared outcome of a Not applicable dimension A Not applicable row in the HTML Tier 3 dimension table ended with "It has no score, so the agent's verdict stays NEUTRAL and cannot PASS.", and docs/reports.mdx said the same twice. Since #414 an agent with a scored dimension below 0.40 is FAIL even when another dimension has no score, so the row contradicted the report's own verdict. The reason before that sentence also had no closing period. The row and the docs now say only "It has no score, so the agent cannot PASS.", the wording docs/tier3-live-evaluation.mdx already uses, and the row adds the missing period after the reason. A test renders a failing run with a Not applicable dimension, and a docs test keeps verdict names out of the reports page's Not applicable sentences. The CHANGELOG entry also covers the coverage notice fix for an exception Harbor recorded. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(reporting): say how the HTML labels a failed run's verdict docs/reports.mdx said a failed run keeps `neutral`, "which the HTML labels Changes required". The HTML labels `neutral` as Neutral. A failed run reads Changes required because the HTML report turns its verdict into `fail`, also in the full Tier 3 payload it embeds; only the run's payload keeps `neutral`. Say that, and that a successful run's `neutral` verdict reads Neutral. The completed-agent docs test now checks both runs against the rendered HTML and the embedded payload. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(reporting): say when the loaded results cannot confirm a judge-mixed lift An evaluator card with no lift said its judge-mixed cases left "no comparable result". The lift is also withheld when the loaded rewards cannot confirm the comparison, for example when a logical trial's rows name two cases or `lift.json` records more mixed cases than the rewards identify. Matching-judge cases can still exist then. Keep "no comparable result remains" for a card whose comparison basis records `contributing_attempts` as 0, which needs a complete load. Any other card with no lift now says "the loaded results cannot confirm the comparison". Update docs/reports.mdx and the Unreleased CHANGELOG entry from #418 to match. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(changelog): quote only the end of a recorded Tier 3 job failure The Fixed entry for the coverage notice said the collector reports the job failure as `trial <label> recorded <Type>: <message>`. The job failure opens with `Harbor evaluation statistics account for N/M completed trials; `, so that clause is only how it ends. The entry now says so, and a test checks the live job failure and the entry. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(changelog): say plainly when a card with no lift cannot confirm it The Unreleased entry for the judge-mixed lift note said a card with no lift says the loaded results cannot confirm the comparison "when they do not show that no attempt was left to compare". It now says the card says no comparable result remains when the loaded results show that no attempt fed the lift, and otherwise that they cannot confirm the comparison. A test checks that wording in the entry and the matching docs/reports.mdx paragraph. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(changelog): rewrap the judge-mixed lift entry The previous wording change left one line of the Unreleased entry for the judge-mixed lift note over 90 characters. Rewrap the rest of the paragraph. The text is unchanged. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(reports): name the JSON report's Tier 3 payload as the one that keeps neutral The completed-agent section said "The payload keeps `neutral` for a failed run" in the same sentence that says the payload embedded in the HTML report records `fail`, so a reader could not tell which payload keeps `neutral`. Name the `tier3` object of a `validate --tier3` JSON report. The later lift sentence also said the payload records the failed run's verdict as `neutral`, which the HTML-embedded payload does not; it now says only that both payloads keep the lift in `summary.overall_lift`. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(changelog): record the two Tier 3 docs corrections under Documentation The branch corrects two docs sentences but recorded neither in the changelog. Add Unreleased Documentation entries: the live evaluation guide now limits the empty expected_output rejection to the {"skill_name", "evals"} dataset, and Reports & Results now says the HTML report and its embedded Tier 3 payload show a failed run's verdict as fail (Changes required) while the JSON report's tier3 object keeps neutral. Tests pin both entries' text and their place under Unreleased Documentation. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(tier3): pin the empty expected_output rule for the tier3 PATH dataset step The docs say both `skillevaluator tier3 ./my-skill` and `tier3 init-harbor-task` reject an empty `expected_output` only in a {"skill_name", "evals"} dataset. The test ran only `init-harbor-task`, so a stricter check added only to the `tier3 PATH` dataset step would not have failed it. The test now also runs that step on each dataset shape: it accepts the flat JSON list, `{"cases": [...]}` in .json and .yml, the YAML list and the JSONL file, rejects the object shape in .json and .yml, and leaves the evals folder unchanged. The object shape in YAML and `{"cases": [...]}` in .yml are new cases for both commands. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * test: let the two docs-correction CHANGELOG checks survive a release cut Two tests required their CHANGELOG entries to sit under Unreleased, so a release that moves Unreleased into a dated section would fail them. They now find each entry by its opening words in any section, still require the Documentation subsection, and fail only when the entry sits in 0.9.0 or an older released section. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(reports): say which Tier 3 reports label a failed run Changes required A default `validate --tier3` run keeps Tier 3 advisory, so its report labels a failed run's `fail` verdict Failed (advisory), and its command status follows the required tiers. Only the standalone Tier 3 report.html and the report of a `validate --block-on-agent-eval` run read Changes required. Reports & Results and the CHANGELOG entry now say so. The CHANGELOG entry also no longer implies that every failed run keeps `neutral` in the JSON `tier3` object: a `validate --block-on-agent-eval` run without a valid Tier 3 source fails before any agent runs and records `fail` there too. Tests run `validate --tier3` with and without --block-on-agent-eval, and without a valid Tier 3 source, and check the texts against its reports. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(reports): say when a failed Tier 3 run keeps neutral in the JSON report The `tier3` object of a `validate --tier3` JSON report keeps `neutral` when the run's collected results record the failure, for example when one of several agents fails. When the execution backend reports a failure after the agents scored, such as a Harbor job that exits with an error after its trials, the run is marked failed but the payload keeps those scores, its `summary.overall_score` and the verdict they give, such as `pass` or `fail`, in advisory and blocking runs alike. A blocking run without a valid Tier 3 source is no longer described as the only failed run that records `fail` there. The CHANGELOG entry and Reports & Results now say this, and a test runs `validate --tier3` on a scored run the backend marks failed to pin the JSON verdict, the agent status, the HTML labels and the documented text. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(reports): shorten the failed Tier 3 run entry and note budget-stopped runs The CHANGELOG entry for the failed-run label correction now gives the rule: the HTML reports show a failed run's verdict as `fail`, labelled Changes required in the standalone Tier 3 report.html and in a `validate --block-on-agent-eval` report, and Failed (advisory) in a default `validate --tier3` report, while the `tier3` object of the JSON report can still record `neutral` or the verdict the agents' scores give. Reports & Results keeps the per-case detail. A failed run whose budget left planned attempts not run records `incomplete` in the `tier3` object, and the HTML reports label its verdict Incomplete; the standalone report's command status reads Incomplete too. Reports & Results and the entry now say so. A new test runs that case, for a failed peer agent and for a backend error, through `validate --tier3` with and without `--block-on-agent-eval`. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(changelog): shorten the failed Tier 3 run entry to the rule The entry now states the rule and points to Reports & Results for the detail: the HTML reports show a failed run as fail, labelled Changes required or Failed (advisory) by gate, while the JSON tier3 object can still carry neutral or the verdict the scores give. The tests pin the shorter wording. Signed-off-by: Christopher Kevin <[email protected]> --------- Signed-off-by: Narendran Raghavan <[email protected]> Signed-off-by: Christopher Kevin <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Christopher Kevin <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When a case's arms were scored by different judge models, for example after a judge fallback in one arm, that judge metric's lift leaves the case out while both arm scores keep it. This is the documented design (
docs/reports.mdx), but the evaluator card never said so. It could show Baseline 0.20 and With skill 0.50 next to a -0.40 lift, with no explanation on the card. Only the dimension reasoning had a note._judge_mixed_caseson the same logical attempts the lift rebuild already compares. The loop that builds those attempts moves out of_judge_aware_liftinto_logical_condition_rewards, with no change in behavior. When the loaded rewards no longer identify a case, the recorded per-metric count fromlift.jsonstill applies.lift_excluded_cases(the count). A recorded count above 2^53 - 1, which JSON cannot carry exactly, is left out. Its card getscomparison_basis:excluded_cases: the count.case_ids: the lift's keys for the cases the loaded rewards identify. A key is the case ID without an-attemptNor_attemptNsuffix, cut to 256 characters. Each key is listed once, and the list stops at 64 keys.excluded_attemptsandcontributing_attempts: with-skill attempts that scored the metric on those cases, and with-skill attempts that fed the metric's lift (from the lift basis). Both arenullunless both arms' rewards loaded completely, every logical trial names one case, the lift basis describes the metric, and every left-out case is identified.reason. It says that the arm scores include the cases only when both arm scores exist.comparison_excluded: true.Lift leaves out 1 case scored by different judge models; the arm scores include it.No lift: 2 cases were scored by different judge models and no comparable result remains; the arm scores include them.the arm scores includeclause appears only when the card has a baseline score.Left out of lift: different judge models. The HTML sanitizer keeps both fields only in their expected types.lift.jsonare unchanged. Cards without judge-mixed cases are unchanged.docs/reports.mdx(judge-mixed lift section). CHANGELOG entry under Unreleased > Fixed.mainatd717f22cf, which includes feat(tier3): write deductions as plain-language reasons with evidence #399. feat(tier3): write deductions as plain-language reasons with evidence #399 added its own evidence field (evidence_unavailable_reason) on the same lines intier3_report.py,html.pyandreport.html.j2, and the merge keeps both fields.main, so this branch adds none.Why
A reader compares the two bars with the lift pill. When a judge fallback scored one arm of a case, the bars can be 0.30 apart while the lift is -0.40, and the card gives no hint that the lift compares a different set of cases. The JSON had only per-metric counts in
lift.json, so a consumer could not tell which cases or evidence entries were affected.Kept from public
_judge_aware_liftand the collector'spair_metric_scores. The new code only reads the cases they left out. No change tocollector.py.Cases scored by different judge models are excluded from lift.) and the report budget stages are unchanged. When the budget drops card evidence, the card keepscomparison_basisand its note. Only the per-trial labels go with the evidence.judge_mixed_casesfield and no report-loader change: the report reads the counts from the lift it already rebuilds.Tests
tests/test_judge_lift_integrity.py(27 new cases, 47 in the module):test_evaluator_card_names_the_cases_its_lift_left_out(one and all cases mixed): collected run. Arm scores stay 0.50/0.20, the lift stays -0.40 or unavailable, and the evaluator count, cardcomparison_basis, evidence flags and the top-level card copy are checked. The rendered HTML card has theLift leaves outorNo liftnote, one label per mixed case and balanced markup. No other card gets a note.test_comparison_basis_counts_repeated_attempts_apart_from_na_and_unpaired_cases: three attempts of a mixed case count as 2 excluded attempts (the N/A one has no score), and a case only the baseline scored is not counted.test_matching_judges_add_no_lift_note: with matching judges there is nolift_excluded_cases,comparison_basis, evidence flag, note or label.test_saved_run_without_the_mixed_case_rewards_shows_only_the_recorded_count: a legacylift.jsonwithout the mixed case's reward keeps the recorded lift and count. The card has no case IDs and null attempt counts, and the HTML shows the count without labels.test_trimmed_card_evidence_keeps_the_lift_note: when the report budget drops card evidence, the card keepscomparison_basis, and the HTML shows the note with no labels and balanced markup.test_never_activated_agent_gets_no_lift_note: a never-activated agent with a judge fallback has nolift_excluded_cases,comparison_basis, note or label.test_html_ignores_a_malformed_comparison_basis_and_flag(6 cases:True,"3",-1,2**70,1.0and a list): the HTML shows no note, andcomparison_excluded: "yes"adds no label.test_html_keeps_comparison_basis_fields_only_in_their_types: the HTML sanitizer turns malformed attempt counts intonull, a stringcase_idsinto[]and a non-stringreasoninto"", and drops a non-boolean evidence flag.test_comparison_basis_caps_case_ids_and_lists_each_cut_id_once: 72 mixed cases give 64 sorted keys of at most 256 characters, two keys that match once cut appear once, andexcluded_casesstays 72.test_comparison_basis_leaves_out_trials_without_a_resolved_case: a mixed pair of trials without a case ID is neither listed nor flagged.test_attempt_counts_stay_null_unless_the_load_identifies_every_left_out_case(2 cases): a with-skill trial whose rows name two cases, and alift.jsoncount of 2 when the loaded rewards identify 1. Both publish null attempt counts, and the card saysNo lift: ....test_lift_note_mentions_arm_scores_only_when_both_arms_have_one: with a failed baseline condition the note andreasonleave out the arm-scores clause.test_recorded_exclusion_count_is_published_only_when_json_carries_it_exactly(4 cases): 3 and 2^53 - 1 are published, while 2^53 and 10^30 are left out with nocomparison_basis.test_comparison_basis_publishes_both_attempt_counts_or_neither(4 cases).src/frommain(d717f22cf), 17 of the 27 new cases fail. The 10 that pass pin behaviormainalready has: no note with matching judges, no fields for a never-activated agent, no note for a malformedcomparison_basis, and no count above 2^53 - 1.is Trueevidence-flag check, the 64-key cap, the 256-character cut, the single listing of cut keys, the unresolved-case filter, the identified-case check, the complete-load check, the null-together rule, the sanitizer's checks on both attempt counts, the JSON-safe count bound, theNo liftwording, and the arm-scores clause in the note and inreason.maind717f22cf(pytest -n 4): the 63 that import the Tier 3 report builder or the HTML reporter,tests/ci/test_image_build.pyandtests/test_oss_packaging.py, which readreport.html.j2anddocs/reports.mdx, andtests/test_ci_workflows.py,tests/test_ci_change_classifier.py,tests/test_harbor_claude_refusal_fallback.pyandtests/test_harbor_metrics_truth.py: 4147 passed, 4 skipped.pytest -n 6 tests): 27393 passed, 35 skipped, 5 failed. The 5 also fail onmaind717f22cfon the same machine: two secure Docker sidecar tests and three CI bootstrap and feedback launcher tests that depend on the local Python setup.ruff checkandruff format --checkare clean on the changed Python files, andscripts/check_oss_boundary.pypasses.🤖 Generated with Claude Code