Skip to content

fix: close model registry review gaps - #2780

Merged
stranske merged 1 commit into
mainfrom
codex/sync-registry-review-followups
Jul 15, 2026
Merged

fix: close model registry review gaps#2780
stranske merged 1 commit into
mainfrom
codex/sync-registry-review-followups

Conversation

@stranske

Copy link
Copy Markdown
Owner

Addresses active sync-wave review debt in the shared source of truth.\n\n- reject evidence-free reviewed selections\n- honor runtime slot environment overrides in configured model lookup\n- flag model pins without a profile against the default reviewed profile\n\nValidated: Python 3.12 focused registry/freshness tests; template sync/completeness; diff check.

Copilot AI review requested due to automatic review settings July 15, 2026 18:31
@stranske stranske added automation Automation and workflow automation maintenance Maintenance tasks sync codex codex-automation labels Jul 15, 2026
@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 18:31 — 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.

🚫 Review skipped — only excluded labels are configured. (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: 8b3b379b-b760-498c-aad4-bf5f49892c9f

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/sync-registry-review-followups

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

@stranske
stranske enabled auto-merge (squash) July 15, 2026 18:31
@stranske
stranske temporarily deployed to agent-standard July 15, 2026 18:31 — 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: bfa41d5
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.63%
Baseline 85.00%
Delta -9.37%
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 tightens the model-registry “reviewed selection” contract and aligns helper behavior with runtime slot resolution to close gaps identified during sync-wave review.

Changes:

  • Fail closed when a reviewed model selection lacks evidence_ids.
  • Make configured_model_for_provider() honor the same runtime slot/env override resolution path as callers.
  • Update the registry freshness gate to compare explicit model pins without a profile against the default reviewed profile, with test coverage added.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tools/llm_registry.py Enforces evidence-gated selections and reuses runtime slot resolution in configured_model_for_provider().
tools/check_model_registry_freshness.py Adjusts slot-pin evaluation to compare no-profile pins against the default reviewed profile.
tests/tools/test_llm_registry_selection.py Adds regression coverage for evidence-less selections and runtime env slot override behavior.
tests/test_check_model_registry_freshness.py Adds regression coverage for no-profile explicit pins being flagged vs the default selection.
templates/consumer-repo/tools/llm_registry.py Mirrors the llm_registry changes into the consumer template to prevent drift.

Comment thread tools/llm_registry.py
Comment on lines +275 to +279
for slot in resolve_slots():
if slot.provider == normalized_provider and not is_model_blocked(
slot.provider, slot.model, registry=entries
):
return slot.model
Comment on lines +275 to +279
for slot in resolve_slots():
if slot.provider == normalized_provider and not is_model_blocked(
slot.provider, slot.model, registry=entries
):
return slot.model
Comment on lines +321 to +325
# A slot without an explicit profile still resolves through the
# default reviewed profile at runtime. Compare it against that
# decision so an old model pin cannot silently bypass review.
effective_profile = profile or "verifier-balanced"
selected = selection_by_key.get((effective_profile, provider))

@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: 933228334f

ℹ️ 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 thread tools/llm_registry.py
Comment on lines +275 to +279
for slot in resolve_slots():
if slot.provider == normalized_provider and not is_model_blocked(
slot.provider, slot.model, registry=entries
):
return slot.model

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 Skip empty resolved slots before returning

When LANGCHAIN_MODEL is set while the registry/slot config is unavailable, resolve_slots() creates placeholder slots for the other providers with model == ""; this new loop treats those placeholders as valid because is_model_blocked(..., "") is false and returns the empty string before reaching the fallback argument. In that emergency-bootstrap scenario, calls such as configured_model_for_provider("anthropic", fallback="claude-fallback") now disable the provider instead of using the supplied fallback, so this should require a non-empty slot.model before returning.

Useful? React with 👍 / 👎.

@stranske
stranske merged commit b1c7bcc into main Jul 15, 2026
144 of 160 checks passed
@stranske
stranske deleted the codex/sync-registry-review-followups branch July 15, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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