fix: [no-ticket] harbor - floored rewards name their cause (candidate crash vs infra outage)#37
Merged
Merged
Conversation
…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>
…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>
…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)
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.
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_scorenow 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
UnsupportedParamsError x2for attempts dead of the same cause.target_errorsnaming the dominant cause and its sample count; existing floor/retry/recover tests unchanged.🤖 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=0rejected by an executor) from an infrastructure outage — two outcomes that demand opposite responses but previously produced identical-looking records.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 newn_dead_inframetric 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.py):_admin_eval_scorenow returns(score, cause); when a target floors after retries the dominant per-sample errors are included intarget_errors. Baseline evals correctly receive the same executor-model override for like-for-like transfer comparisons.modeloverride flows end-to-end from config → serve.json →evaluate_adminvia a shallow copy ofrun_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
Reviews (3): Last reviewed commit: "Merge pull request #38 from scaleapi/har..." | Re-trigger Greptile