Skip to content

fix: [no-ticket] harbor - floored rewards name their cause (candidate crash vs infra outage)#37

Merged
varunursekar merged 7 commits into
harbor-9-opsfrom
harbor-10-crash-visibility
Jul 17, 2026
Merged

fix: [no-ticket] harbor - floored rewards name their cause (candidate crash vs infra outage)#37
varunursekar merged 7 commits into
harbor-9-opsfrom
harbor-10-crash-visibility

Conversation

@shehabyasser-scale

@shehabyasser-scale shehabyasser-scale commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #36. Motivated by a live wave-1 incident: in the E5 transfer matrix, three of five champions scored 0/72 on claude-opus-4-8 because their optimizers had hardcoded temperature=0 (a variance trick on their home model) and litellm rejects it for opus. Separately, a budget-exhausted key produced dead attempts that nearly got booked as a champion property. In both cases the harness behaved safely but the record could not distinguish the two floored cases, and they demand opposite actions (report the portability failure vs invalidate and re-run).

Changes

1. Collation names the crash (runner.py). The no-verifier-rewards error string now carries the dead attempts' exception types: No verifier rewards for task 't'. (attempts died: UnsupportedParamsError x6). The error string is the one field that flows everywhere (DB, per-sample files, verifier), so the cause survives to every consumer.

2. Floored targets carry their cause (verifier.py). _admin_eval_score now returns (score, failure_cause); when a target is floored after retries, target_errors[key] includes a frequency summary of the dominant per-sample errors (top 3). One identical cause across every sample is the signature of a deterministic candidate crash; a mixed bag points at infra. The cause extraction is fail-safe (any surprise result shape degrades to a fixed string) so diagnostics can never fail finalize.

Tests

  • Runner: error string carries UnsupportedParamsError x2 for attempts dead of the same cause.
  • Verifier: an all-errored target floors to 0.0 with target_errors naming the dominant cause and its sample count; existing floor/retry/recover tests unchanged.
  • 85 passed across the two affected suites.

🤖 Generated with Claude Code

Greptile Summary

This PR improves observability for floored evaluation scores so operators can distinguish a deterministic candidate crash (e.g., hardcoded temperature=0 rejected by an executor) from an infrastructure outage — two outcomes that demand opposite responses but previously produced identical-looking records.

  • Runner (runner.py): Dead attempts are now classified with [infra] / [infra:llm-key-budget] suffixes using a conservative allow-list; bracket neutralization prevents candidate-authored class names from spoofing the label. The no-rewards error string embeds a cause summary, a key-budget alarm fires at ERROR level, and a new n_dead_infra metric splits infra-dead zeros from candidate-caused ones. A bounded within-eval infra retry (infra_retry_rounds, off by default) re-measures only samples whose every attempt died of a transient infra cause.
  • Verifier (verifier.py): _admin_eval_score now returns (score, cause); when a target floors after retries the dominant per-sample errors are included in target_errors. Baseline evals correctly receive the same executor-model override for like-for-like transfer comparisons.
  • Transfer probe: A per-target model override flows end-to-end from config → serve.json → evaluate_admin via a shallow copy of run_constraints (shared instance not mutated).

Confidence Score: 5/5

Safe to merge; all new behaviour is opt-in, the fail-safe (diagnostics degrade rather than raise) is verified by test, and the zero-fill invariant is explicitly protected against infra-label abuse.

The infra retry is off by default and all adversarial-candidate attack vectors are closed and tested. The model_copy path in evaluate_admin is tested to be non-mutating. The _dominant_sample_errors method is wrapped in a blanket except so it can never surface through finalize. No existing test was weakened.

No files require special attention.

Important Files Changed

Filename Overview
vero/src/vero/harbor/runner.py Core of the PR: adds dead-attempt classification, key-budget alarm, n_dead_infra metric, bounded infra retry loop, and cause-enriched no-rewards error strings. Bracket neutralization prevents spoofed [infra] suffixes; retry is off-by-default; recovered samples get an audit marker; sibling-dir collation prevents stale attempt pooling.
vero/src/vero/harbor/verifier.py _admin_eval_score now returns (score, cause); _dominant_sample_errors groups per-sample errors after normalizing task names (re.sub) to prevent singleton buckets across a multi-task slice; baseline eval receives the same model override for like-for-like comparison.
vero/src/vero/evaluation/engine.py evaluate_admin gains a model parameter; run_constraints is copied via model_copy before injecting harbor_model_override so the shared instance is never mutated.
vero/src/vero/harbor/config.py Adds infra_retry_rounds (default 0) and infra_retry_delay_s (default 30 s) with post_init validation keeping the opt-in safety contract.
vero/tests/test_harbor_runner.py New TestInfraResilience class (11 tests) covers config validation, infra labeling, bracket neutralization, key-budget alarm, retry off-by-default, outaged-sample re-run, crash/spent-key not retried, mixed-cause no-retry, persistent outage keeps error, partially-scored sample not retried, and multi-round audit history.
vero/tests/test_harbor_verifier.py Adds three new tests: transfer model reaches champion+baseline evals, floored target records dominant crash cause, and cause clusters across task names. Existing tests updated to accept the new model= kwarg.

Reviews (3): Last reviewed commit: "Merge pull request #38 from scaleapi/har..." | Re-trigger Greptile

…e crash vs infra outage)

Measured live in the transfer matrix: three champions scored 0/72 on an
off-model executor because their optimizers hardcoded temperature=0,
which that provider rejects. The harness handled it safely (rewards
floored, finalize shipped) but the durable record could not say WHY, and
"why" decides opposite actions: a deterministic candidate crash is a
real, reportable portability failure; an infra outage means invalidate
and re-run. Two changes:

- Collation's no-verifier-rewards error string now names the dead
  attempts' exception types ("attempts died: UnsupportedParamsError
  x6"). The error string is the one field that flows to the DB, the
  per-sample files, and the verifier.

- _admin_eval_score returns (score, failure_cause); a floored target's
  target_errors entry carries the dominant per-sample causes (frequency
  summary, top 3). Diagnostics are fail-safe: any surprise result shape
  degrades to a fixed string, never fails finalize.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Comment thread vero/src/vero/harbor/verifier.py
shehabyasser-scale and others added 3 commits July 9, 2026 15:25
…ask crashes cluster

Greptile follow-up on #37: _dominant_sample_errors keyed on the raw error
string, which embeds the task name, so identical exceptions across a
multi-task slice landed in 1x singletons instead of one dominant cause.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… finalize

Home-model evals cannot see model-specific couplings the optimizer bakes
in. Measured live in the wave-1 transfer matrix: three of five champions
independently hardcoded temperature=0 (a variance trick on their home
model, gpt-4.1-mini) and scored 0/72 on claude-opus-4-8, which rejects
it, while looking healthy on every eval the optimization loop ever ran.
The portability failure was invisible until a separate, manual,
after-the-fact probe.

VerificationTarget gains `model`: a target with an executor override
scores the selected commit under a model it was NOT optimized on, in the
same finalize battery as its home-model reward. The baseline is scored
under the same override so the comparison stays like-for-like. Plumbing:
build.yaml TargetSpec -> compiler -> serve.json _TargetCfg ->
VerificationTarget -> engine.evaluate_admin(model=...) -> task_params
["harbor_model_override"] -> HarborRunner -m flag. The override rides
task_params, so Mode A ignores it and the runner needs no new state; the
shared run_constraints are copied, never mutated.

Test fakes of evaluate_admin widened to accept the new kwarg (a strict
signature turned the new call into a retried TypeError, flooring
rewards, which is itself a nice demonstration of the floor's fail-safe).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…utage retry, key-budget alarm

Three infra failure modes measured live in the E5 matrix runs, fixed at
the measurement layer:

- Dead attempts are classified infra vs candidate (conservative
  exception-type allowlist + the litellm key-budget message signature).
  Labels flow into dead_exception_types, error strings, and a new
  n_dead_infra metric. Classification never moves a score: every dead
  attempt still zero-fills, or faking infra would excuse failures.
  Exception type names are candidate-authored, so brackets are
  neutralized before labeling (a class named 'XError[infra]' cannot
  walk in pre-suffixed).

- An OPT-IN, bounded, backoff-spaced within-eval retry re-measures
  samples whose every attempt died of a transient infra cause (the
  65-second DNS blip that killed 44/72 attempts of one eval). Off by
  default: against an adversarial optimizer the qualifying predicate is
  a re-roll lever, since a stochastic candidate that raises allowlisted
  exceptions on failing attempts converts all-bad rounds into fresh
  draws. Retry rounds run in fresh sibling jobs dirs (nesting would
  pool dead attempts into later resumed means) and recovered samples
  carry an infra_retry audit marker naming the discarded attempts.

- An ERROR-level alarm names key-budget exhaustion (a spent key fails
  every later call identically; two matrix cells of budget-exceeded
  zeros were nearly booked as a portability finding), with hedged
  wording since the signature reads candidate-process exceptions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
shehabyasser-scale and others added 3 commits July 9, 2026 17:18
…d audit history

- HarborConfig rejects infra_retry_delay_s <= 0 when retries are enabled
  (a zero delay silently nullified the backoff) and negative
  infra_retry_rounds.
- The infra_retry audit marker now lists EVERY discarded round in order
  (discarded_rounds), not just the one immediately before recovery;
  recovered_round names when the sample finally measured.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
feat: [no-ticket] harbor - infra resilience (dead-attempt classification, opt-in outage retry, key-budget alarm)
feat: [no-ticket] harbor - transfer targets (per-target executor-model override at finalize)
@varunursekar
varunursekar merged commit a6548b3 into harbor-9-ops Jul 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants