Skip to content

feat(model-eval): per-provider preflight tolerance (one bad candidate no longer aborts the pilot) — part of #2819 - #2824

Merged
stranske merged 1 commit into
mainfrom
preflight-per-candidate-tolerance
Jul 24, 2026
Merged

feat(model-eval): per-provider preflight tolerance (one bad candidate no longer aborts the pilot) — part of #2819#2824
stranske merged 1 commit into
mainfrom
preflight-per-candidate-tolerance

Conversation

@stranske

Copy link
Copy Markdown
Owner

What

Makes the maint-78 verifier pilot resilient: a single unusable candidate/provider no longer aborts the whole run.

Today main() returns 1 if any candidate produces no schema-valid rows in preflight. Run 30112277194 (2026-07-24) aborted because github-models/codex-mini-latest 404'd and the newer Anthropic models 400'd on temperature — even though the OpenAI candidates were fine.

How

  • New partition_usable_candidates(candidates, unusable) drops unusable candidates per provider, keeping a provider only when its incumbent AND ≥1 candidate are usable (you can't benchmark without a baseline or without something to compare). Dropped providers/models are logged to stderr.
  • Fails only when no provider has a usable incumbent+candidate pair. Applied at preflight and post-run.

Why

Implements the per-candidate preflight-tolerance part of #2819. Combined with #2822 (Anthropic temperature) and a github-404 fix, a pilot can now compare whatever providers work instead of all-or-nothing.

Verification

ruff==0.15.20 / black==26.5.1 -l100 / mypy==2.1.0 (CI-pinned) clean; pytest tests/tools/test_run_model_eval_pilot.py → 15 passed, incl. 4 new: github-incumbent-404 → drop github + keep openai/anthropic; provider with no usable candidate dropped; fatal when nothing survives; no-op when all usable.

🤖 Generated with Claude Code

…te can't abort the pilot

The maint-78 pilot aborts if ANY candidate produces no schema-valid rows in
preflight. In run 30112277194 that meant github/codex-mini-latest (404) and the
Anthropic temperature-400s killed the whole run even though OpenAI was fine.

Add partition_usable_candidates(): drop unusable candidates per provider (keeping a
provider only when its incumbent AND >=1 candidate are usable), and fail only when
no provider has a usable incumbent+candidate pair. Dropped providers/models are
reported to stderr. This lets the pilot still compare the providers that work.

Implements the per-candidate preflight-tolerance part of #2819.

ruff/black/mypy (CI-pinned) clean; 15 tests pass incl. 4 new (github-incumbent
drop, no-usable-candidate drop, fatal-when-none, no-op-when-all-usable).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@stranske stranske added enhancement New feature or request priority: medium labels Jul 24, 2026
@stranske
stranske enabled auto-merge (squash) July 24, 2026 21:56
@cursor

cursor Bot commented Jul 24, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@stranske
stranske temporarily deployed to agent-standard July 24, 2026 21:56 — with GitHub Actions Inactive
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 36 minutes

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 04290ff5-7bb1-4b55-a1cc-564e07b9dc3a

📥 Commits

Reviewing files that changed from the base of the PR and between 7aa07e3 and 7487bbd.

📒 Files selected for processing (2)
  • tests/tools/test_run_model_eval_pilot.py
  • tools/run_model_eval_pilot.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch preflight-per-candidate-tolerance

Comment @coderabbitai help to get the list of available commands.

@stranske-keepalive

Copy link
Copy Markdown
Contributor

Workflow source needed

PR #2824 needs either a linked GitHub issue or one valid non-issue Workflow Source before PR metadata automation can manage it safely.

Please do one of:

  • Add <!-- meta:issue:123 --> or a normal Closes #123 / Related to #123 line.
  • Check one Workflow Source option in the PR body.
  • Add a hidden marker such as <!-- workflow-source:local_request -->, <!-- workflow-source:manual_remote -->, <!-- workflow-source:review_followup -->, <!-- workflow-source:sync_campaign -->, or <!-- workflow-source:dependabot -->.
  • Add a workflow source label such as workflow:source-direct-pr, workflow:source-local-request, workflow:source-review-followup, workflow:source-sync, or workflow:no-automation.

Once a valid source is present, this warning will not be reposted.

@stranske
stranske temporarily deployed to agent-standard July 24, 2026 21:56 — with GitHub Actions Inactive
@stranske-keepalive

stranske-keepalive Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Automated Status Summary

Head SHA: 39ab37a
Latest Runs: ⏳ pending — Gate
Required contexts: Gate / gate, Health 45 Agents Guard / guard
Required: core tests (3.12): ⏳ pending, core tests (3.13): ⏳ pending, docker smoke: ⏳ pending, gate: ⏳ pending

Workflow / Job Result Logs
(no jobs reported) ⏳ pending

Coverage Overview

  • Coverage history entries: 1

Coverage Trend

Metric Value
Current 75.73%
Baseline 85.00%
Delta -9.27%
Minimum 70.00%
Status ✅ Pass

Top Coverage Hotspots (lowest coverage)

File Coverage Missing
scripts/issue_dedup_smoke.py 0.0% 4
scripts/runner_lib/__main__.py 0.0% 3
scripts/validate_template_sync.py 0.0% 81
scripts/langchain/topic_splitter.py 19.1% 57
tools/codex_log_analyzer.py 19.6% 140
scripts/repo_review_round2_runner.py 25.1% 344
scripts/prune_agent_stubs.py 39.7% 26
scripts/repo_review_round1_runner.py 40.7% 133
tools/ensure_workflow_timeout_variables.py 42.1% 74
scripts/sync_label_docs.py 42.9% 64
tools/discover_model_catalog.py 44.8% 55
scripts/repo_review_backlog_scan.py 45.3% 116
scripts/repo_review_body_writer.py 46.5% 86
tools/codex_session_analyzer.py 47.9% 59
scripts/create_verifier_labels.py 48.3% 58

Low Coverage Files (<50.0%)

File Coverage Missing
scripts/issue_dedup_smoke.py 0.0% 4
scripts/runner_lib/__main__.py 0.0% 3
scripts/validate_template_sync.py 0.0% 81
scripts/langchain/topic_splitter.py 19.1% 57
tools/codex_log_analyzer.py 19.6% 140
scripts/repo_review_round2_runner.py 25.1% 344
scripts/prune_agent_stubs.py 39.7% 26
scripts/repo_review_round1_runner.py 40.7% 133
tools/ensure_workflow_timeout_variables.py 42.1% 74
scripts/sync_label_docs.py 42.9% 64
tools/discover_model_catalog.py 44.8% 55
scripts/repo_review_backlog_scan.py 45.3% 116
scripts/repo_review_body_writer.py 46.5% 86
tools/codex_session_analyzer.py 47.9% 59
scripts/create_verifier_labels.py 48.3% 58

Updated automatically; will refresh on subsequent CI/Docker completions.


Keepalive checklist

Scope

No scope information available

Tasks

  • No tasks defined

Acceptance criteria

  • No acceptance criteria defined

@stranske
stranske temporarily deployed to agent-standard July 24, 2026 21:57 — with GitHub Actions Inactive

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7487bbd7ca

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 327 to +328
if unusable:
print(
"pilot preflight error: candidates produced no schema-valid rows: "
+ ", ".join(unusable),
file=sys.stderr,
)
return 1
candidates, dropped, fatal = partition_usable_candidates(candidates, unusable)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Always apply the provider-pair partition

When every model passes preflight, this guard skips partition_usable_candidates() entirely, so providers without a candidate are still sent through the full pilot. In the checked-in config/model_eval_candidates.json, github-models has only the codex-mini-latest incumbent; once that model is available, the workflow will spend 30 evaluations on an unpaired baseline and include it in an artifact that the new invariant says should contain only incumbent-plus-candidate providers. Apply the partition even when unusable is empty, while retaining the conditional only for failure reporting.

Useful? React with 👍 / 👎.

@stranske
stranske merged commit 9e04b91 into main Jul 24, 2026
82 of 92 checks passed
@stranske
stranske deleted the preflight-per-candidate-tolerance branch July 24, 2026 22:00
stranske added a commit that referenced this pull request Jul 24, 2026
… id → 404) (#2825)

* fix(llm): namespace github-models model ids for the GA endpoint

The GitHub Models GA endpoint (models.github.ai/inference) requires
publisher-namespaced ids (e.g. openai/gpt-5). A bare id returns "404 page not
found" — which is why github-models/codex-mini-latest failed the maint-78 pilot
(run 30112277194). Add _github_model_id(): default a bare id to the openai/
publisher; already-namespaced ids pass through unchanged.

Scope/honesty: this fixes the bare-id-on-GA-endpoint 404 CLASS. If a specific id
(e.g. codex-mini-latest) is not in the GitHub Models catalog at all, namespacing
won't help and the durable fix is an owner-reviewed change of the github-models
selection to a catalogued id (openai/gpt-5 is already catalogued). Per-candidate
preflight tolerance (#2824) already prevents this from aborting a whole pilot.

Updated two tests that asserted verbatim pass-through (a pre-GA assumption) to the
namespaced expectation. ruff/black/mypy (CI-pinned) clean; 63 tests pass incl. 4 new.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore(autofix): formatting/lint

* chore(codex-autofix): apply updates (PR #2825)

* fix(ci): restage black-formatted test + update github-model assertion for GA namespacing

Two follow-ups to the #2825 merge:
- tests/tools/test_langchain_client.py: commit the black-formatted version (the
  post-merge black ran in the worktree but the staged pre-format version was
  committed, so CI black flagged 'would reformat').
- tests/scripts/test_task_decomposer.py: the github client model kwarg is now
  publisher-namespaced (openai/...), so assert against _github_model_id(...) of
  the configured model rather than the bare id.

ruff/black (CI-pinned) clean on the whole tree; affected test files pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant