Repository navigation
fix(tier3): keep custom_only grading policy on unscored conditions - #287
Conversation
When a Tier 3 condition produced no scoreable reward, for example because every attempt failed or its Harbor job never started, the collector fell back to the standard metric set and the skill-evaluator-dimension-mean-v1 score policy. It did so even in grading.mode custom_only runs, because the runner resolved the grading mode but never passed it to result collection. The failed condition's summary.json, the agent's recorded metrics and score policies, attempt_policy.json and the report's score definition then described standard grading, and downstream report and result commands treated a failed custom-only agent as a standard one. Scores themselves were already cleared for these conditions. Pass the normalized grading mode to collect_harbor_results and derive a fallback metric set, metric list and score policy from it. Use that fallback for the run-level defaults, conditions with no logical reward and missing-job summaries. Observed rewards still determine their own metric set, and default and default_plus_custom output is unchanged. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
rng1995
left a comment
There was a problem hiding this comment.
Reviewed the full diff plus collector.py/runner.py in context, and ran lint and the tests locally. No P1/P2/P3 findings.
Checked: the fallback only applies when an arm has no logical reward, so observed rewards still decide their own metric set; default, default_plus_custom, and direct callers that omit grading_mode keep the old values; run-level policy conflict detection only considers succeeded agents, so a failed custom_only agent now carrying custom-overall-v1 cannot create a false conflict; the only call site (runner) passes the normalized mode. CHANGELOG is under Unreleased/Fixed and the custom-graders doc note matches.
Local results: ruff check clean, changed files format-clean; test_harbor_unscored_grading_policy.py and test_tier3_config_key_parity.py pass (32 passed with the neighboring collector tests).
Reviewed with Claude Code.
dd9ca1f to
8d52b08
Compare
Conflicted files: CHANGELOG.md. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
chrisknvidia
left a comment
There was a problem hiding this comment.
I traced grading_mode from the runner into the collector and through every place that used the empty-reward default, then ran scratch collections for failed, never-started and mixed success/failure agents under default and custom_only. The fallback only applies to arms with no logical reward, observed rewards still win, and default output is unchanged. One non-blocking note about the summaries written for jobs that never started.
Conflicts resolved in CHANGELOG.md and src/skillevaluator/tier3/harbor/collector.py. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Conflicted files: CHANGELOG.md (kept main's new read-only /etc/passwd mount entry and placed this PR's custom_only entry after it under Unreleased > Fixed); src/skillevaluator/tier3/harbor/collector.py (kept both collect_harbor_results docstring notes, skip_with_skill then grading_mode; the auto-merged skip_with_skill paths use the PR's grading fallback). Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…maries The with-skill and without-skill summary.json written for a job that never started was overwritten by a second write that dropped metric_set and score_policy. Fold the fields into the surviving write, drop the first write, and assert both persisted summaries. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
When a Harbor job never started, the collector wrote the condition's summary.json twice. The second write, which had no metric_set (and, for with-skill, no score_policy), always replaced the first, so the requested custom_only labels reached only the returned result. Drop the overwritten first write and record the fallback metric_set and score_policy in the surviving one, keeping metrics as []. A skipped with-skill arm writes the same summary as before. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
No textual conflicts; src/skillevaluator/tier3/harbor/collector.py merged cleanly but was adjusted: the single surviving with-skill summary write records the requested metric set and score policy for a job that never started, while a --skip-with-skill arm keeps main's ungraded shape (metrics [] and no score policy), matching score_policy_with_skill = None. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Conflicted: CHANGELOG.md (Unreleased > Fixed) - kept main's new BENCHMARK.md score-transition entry (#269) unchanged and placed this PR's custom_only entry after it, separated by a blank line. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…om-only-metric-label Conflicts in CHANGELOG.md, src/skillevaluator/tier3/harbor/collector.py and tests/test_harbor_unscored_grading_policy.py; never-started summaries keep metrics [] to match the returned result, and the job_failure assertion is kept. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…om-only-metric-label No conflicts. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs(changelog): move entries released in 0.7.0-0.7.2 out of Unreleased 0.7.0 (#314) and 0.7.1 (#327) never cut their sections on main, and 0.7.2 (#335) added its section below the whole Unreleased block, so Unreleased still listed work that had already shipped. Place each Unreleased entry under the release that shipped the PR that added it: - 0.7.0: the published section from the 0.7.0 tag, verbatim. It already holds the six entries that main had filed under 0.6.0, so 0.6.0 again matches the v0.6.0 tag, including the original run_config.json entry. - 0.7.1: #264 #271 #274 #281 #284 #289 #293 #299 #316 #317 #318 #323 #324 #326 #327, plus the #320 wording of the Windows Git-root entry, since #320 changed that 0.7.0 fix in 0.7.1. - 0.7.2: #263 #265 #269 #270 #276 #279 #287 #290 #296 #309 #328 #330 merged with the existing #335 entries. Only post-v0.7.2 entries stay under Unreleased, with one heading per subsection. Entry text is unchanged, apart from the published tag wording in 0.7.0 and 0.6.0. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * chore(release): prepare v0.8.0 Set the package, fallback, lock, citation and developer-guide versions to 0.8.0 and move every entry merged since v0.7.2 under '## 0.8.0 - 2026-11-05', leaving Unreleased empty. The refusal-fallback documentation test now reads the release section that names CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK, requires it to be 0.8.0, and requires exactly one entry there to name the switch. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * chore(release): pin the verified 0.8.0 Tier 1 image and add its CI bundle Pin onboarding to the Tier 1 image published by the reviewed main revision 55d2d04 in "Build and publish Tier 1 image" run 42158955180: ghcr.io/nvidia/skillevaluator-tier1@sha256:9d5483243918937be4f2178f74cf7c622a531dee41e3176906994d52fa14950a (config sha256:d17d6f5105ec5f1bf0cbe4dff0d693aae4ecf01e9c1c6a6ddb7830518acace33). The workflow and publisher refs both move to 55d2d04. ci/bundles/0.8.0 mirrors the 0.7.2 bundle. The templates, README and release.json are the run's github-actions-onboarding artifact and match ci/render_templates.py output for these pins byte for byte. The scanner inventory and verification receipt come from the build's runtime-stage version step, the five-case smoke receipt, the onboarding job's anonymous pull, and the public manifest, whose config digest equals the smoke-tested image ID. The ZIP uses the 0.7.2 layout (sorted members, inner checksums, 1980 timestamps, 0644, deflate level 9) and rebuilds to identical bytes. Point the current-bundle links at 0.8.0 and list 0.7.2 as historical. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]> --------- Signed-off-by: Narendran Raghavan <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
Summary
When a Tier 3 condition produces no scoreable reward, the Harbor collector cannot infer a metric set from rewards and falls back to the standard metric set. It did this even in
grading.mode: custom_onlyruns, which never grade standard metrics. The collector did not know the run's grading mode at all: the runner resolved it but did not pass it tocollect_harbor_results.This PR:
grading_modeparameter tocollect_harbor_resultsand passes the runner's normalized grading mode to it;custom-only/()/custom-overall-v1forcustom_only, the standard set andskill-evaluator-dimension-mean-v1otherwise);metric_set,metrics,score_policyandattempt_policy, the per-condition defaults, conditions whose logical reward list is empty, and the summaries written for Harbor jobs that never started;In
defaultanddefault_plus_custommodes, and for direct callers that omitgrading_mode, the fallback equals the previous hardcoded values, so their output is unchanged.Why
In a
custom_onlyrun, an arm whose attempts all failed (for example, a lost sandbox connection) or whose Harbor job never started was published with:metric_set: skill-evaluator-default-v2and the six standard metrics in itssummary.jsonand in the agent'smetrics_with_skill/metrics_without_skill;score_policy: skill-evaluator-dimension-mean-v1on the agent and condition;attempt_policy.jsonand in the report header when no agent succeeded.Downstream, the report and
tier3result commands decide whether an agent is custom-only from these recorded policies, so the failed agent was treated as a standard agent. No score was wrong, because failed conditions already have their scores cleared, but the labels contradicted the requested grading mode. Acustom_onlyrun in which every attempt failed reported the standard dimension-mean formula.Kept from public
metric_set_for_rewards,average_metrics) and its score-policy recovery (_score_policy_for_rewards, ambiguity handling, mixed-policy conflict checks) are unchanged. The fallback only replaces the empty-reward default, and_score_policy_for_rewards([], ())already yieldscustom-overall-v1.aces_*aliases, are unchanged. The collector receives the canonical name.Tests
New
tests/test_harbor_unscored_grading_policy.py:default,default_plus_custom,custom_only). Each checks the run, agent,summary.json,attempt_policy.jsonand report-payload metric set and policy;defaultandcustom_only;tests/test_tier3_config_key_parity.py: the end-to-end config test now asserts that the normalized grading mode (default_plus_customfrom the legacyaces_plus_customspelling) reaches result collection.On unmodified
main, thecustom_onlycases fail withskill-evaluator-default-v2 != custom-only, and the routing assertion fails. Thedefaultcases pass onmaintoo, which confirms that default output is unchanged.Neighbouring suites pass: all
tests/test_harbor_*andtests/test_tier3_*,tests/tier3,tests/evaluation,tests/reporting,tests/test_commands.py,tests/test_judge_lift_integrity.py,tests/test_accuracy_arithmetic.pyandtests/test_issue55_collector_truth.py. Local failures not caused by this PR:Timing-sensitive tests failed under parallel load and pass in isolation:
test_bounded_harbor_process_timeout_preserves_redacted_diagnostic_tail(0.1 s timeout), the two FIFO tests intests/tier3/test_workflow.py(5 s subprocess timeout) and the two Bedrock assume-role preflight probe cases.The
test_generated_custom_only_script_*cases intests/tier3/test_judge_failure_artifacts.pyrun the generated custom-grader script with the machine'spython3, which is 3.9 here, and it usesint | floatinisinstance. They fail the same way on unmodifiedmain. This PR does not touch that script.The
*sidecar_retains_*tests intest_harbor_secure_docker_environment.pyneed local Docker Compose state.ruff checkandruff format --checkpass on all changed Python files. The OSS boundary check passes.🤖 Generated with Claude Code