Skip to content

fix: preserve reviewed model fallback - #2779

Merged
stranske merged 3 commits into
mainfrom
codex/fix-sync-followup-20260715
Jul 15, 2026
Merged

stranske merged 3 commits into
mainfrom
codex/fix-sync-followup-20260715

Conversation

@stranske

Copy link
Copy Markdown
Owner

Fixes review-backed regressions surfaced by the current consumer sync wave.\n\n- falls back to reviewed slots when configured entries are all unusable\n- resolves CI-triage models through the reviewed registry\n- clarifies missing GitHub Models configuration\n- applies the policy confidence level to Wilson intervals\n\nValidation: focused pytest suite (113 passed), template sync/completeness, and diff check.

@stranske stranske added automation Automation and workflow automation maintenance Maintenance tasks labels Jul 15, 2026
Copilot AI review requested due to automatic review settings July 15, 2026 14:29
@cursor

cursor Bot commented Jul 15, 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 15, 2026 14:29 — with GitHub Actions Inactive
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🚫 Excluded labels (none allowed) (7)
  • sync
  • workflow:source-sync
  • workflow:source-maintenance
  • consumer-sync
  • integration-sync
  • workflows-sync
  • template-sync

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: e7fa8212-ff3b-43f8-9828-9b2753d30a34

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-sync-followup-20260715

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

@stranske
stranske enabled auto-merge (squash) July 15, 2026 14:30
@agents-workflows-bot

Copy link
Copy Markdown
Contributor

Workflow source needed

PR #2779 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 15, 2026 14:30 — with GitHub Actions Inactive
@agents-workflows-bot

agents-workflows-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Automated Status Summary

Head SHA: 259f005
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.64%
Baseline 85.00%
Delta -9.36%
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
tools/ci_failure_triage.py 42.8% 130
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

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
tools/ci_failure_triage.py 42.8% 130
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

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses regressions in reviewed-model selection and fallback behavior surfaced during the current consumer sync wave, ensuring the system continues to use reviewed defaults when configured slots/models are unusable.

Changes:

  • Preserve reviewed default slot fallbacks when a slot config file exists but yields zero usable slots.
  • Route CI failure triage and GitHub Models provider selection through the reviewed model registry, and improve related diagnostics.
  • Apply configurable policy confidence levels to Wilson interval calculations in the model benchmark evaluator (with validation + tests).

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tools/llm_registry.py Falls back to reviewed default slots when slot entries resolve to no usable models.
tools/llm_provider.py Improves GitHub Models client diagnostics and updates failure behavior when no reviewed model is available.
tools/evaluate_model_benchmark.py Adds confidence-level-driven z-score computation and passes it into Wilson intervals.
tools/ci_failure_triage.py Uses reviewed registry selection for provider models instead of a default constant.
tests/tools/test_llm_registry_selection.py Updates/extends tests for slot-config fallback behavior.
tests/tools/test_evaluate_model_benchmark.py Adds confidence-level policy coverage and validation test.
templates/consumer-repo/tools/llm_registry.py Mirrors reviewed-slot fallback behavior for consumer templates.
templates/consumer-repo/tools/llm_provider.py Mirrors GitHub Models warning behavior for consumer templates.
templates/consumer-repo/tools/ci_failure_triage.py Mirrors reviewed-registry model resolution for consumer templates.

Comment thread tools/llm_provider.py Outdated
Comment on lines +371 to +373
client = self._get_client()
if not client:
raise RuntimeError("LangChain OpenAI not available")
raise RuntimeError("GitHub Models client unavailable or no reviewed model is configured")
Comment thread tools/llm_provider.py

model_name = _configured_langchain_model("github-models", fallback=DEFAULT_MODEL)
if not model_name:
logger.warning("No reviewed GitHub Models selection is configured")

model_name = _configured_langchain_model("github-models", fallback=DEFAULT_MODEL)
if not model_name:
logger.warning("No reviewed GitHub Models selection is configured")
Comment on lines +135 to +145
def test_all_unusable_slot_entries_fall_back_to_reviewed_defaults(
monkeypatch: pytest.MonkeyPatch, tmp_path: Path
) -> None:
registry_path = tmp_path / "registry.json"
slots_path = tmp_path / "slots.json"
_write_registry(registry_path)
_write_slots(slots_path, profile="misspelled-profile")
monkeypatch.setenv(registry.ENV_MODEL_REGISTRY_CONFIG, str(registry_path))
monkeypatch.setenv(registry.ENV_SLOT_CONFIG, str(slots_path))

assert registry.load_slot_config()[0].model == "model-balanced"
@stranske

stranske commented Jul 15, 2026

Copy link
Copy Markdown
Owner Author

Runner dispatch state for autofix on PR #2779. Do not edit.

@github-actions github-actions Bot added the autofix Opt-in automated formatting & lint remediation label Jul 15, 2026
@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Runner dispatch state for codex on PR #2779. Do not edit.

@stranske
stranske temporarily deployed to agent-standard July 15, 2026 14:45 — with GitHub Actions Inactive
@github-actions

Copy link
Copy Markdown
Contributor

Autofix updated these files:

  • tools/evaluate_model_benchmark.py
  • tools/llm_provider.py

@stranske
stranske merged commit a141a24 into main Jul 15, 2026
48 checks passed
@stranske
stranske deleted the codex/fix-sync-followup-20260715 branch July 15, 2026 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autofix:patch autofix Opt-in automated formatting & lint remediation automation Automation and workflow automation codex codex-automation maintenance Maintenance tasks sync

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants