Skip to content

fix: restore legacy registry sync compatibility - #2807

Merged
stranske merged 2 commits into
mainfrom
fix/sync-registry-review-debt
Jul 23, 2026
Merged

fix: restore legacy registry sync compatibility#2807
stranske merged 2 commits into
mainfrom
fix/sync-registry-review-debt

Conversation

@stranske

@stranske stranske commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • keep empty registry-path environment values on the safe bundled registry default while explicit empty slot paths still fail closed
  • restore advisory handling for unprofiled legacy pins so synced consumers fall back to their reviewed selection
  • avoid duplicate profile-pin findings, ignore non-string evidence identifiers, and clarify the capability-id contract

Validation

  • python -m pytest tests/test_check_model_registry_freshness.py tests/tools/test_llm_registry_selection.py tests/tools/test_llm_provider.py -q
  • python scripts/validate_template_sync.py
  • python tools/check_model_registry_freshness.py --today 2026-07-22

Summary by CodeRabbit

  • Bug Fixes
    • Empty model registry configuration values now correctly fall back to the default registry.
    • Invalid, non-string evidence IDs are ignored during selection processing.
    • If no valid evidence IDs are present, registry freshness checks now report missing evidence consistently.
    • Legacy model pin issues are now reported as advisory findings instead of blocking validation, and override/unknown/blocked handling is more consistent.
  • Documentation
    • Clarified the required format for capability effect evidence identifiers: capability:<lowercase-kebab-id>.

Copilot AI review requested due to automatic review settings July 22, 2026 22:30
@cursor

cursor Bot commented Jul 22, 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.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 34cd9f0b-2db3-4cf3-bd40-9be31f54eae2

📥 Commits

Reviewing files that changed from the base of the PR and between 06e8f79 and a654a4e.

📒 Files selected for processing (3)
  • templates/consumer-repo/docs/contracts/agent-runner-output.md
  • tests/test_check_model_registry_freshness.py
  • tools/check_model_registry_freshness.py

📝 Walkthrough

Walkthrough

The changes make empty model-registry configuration values use bundled defaults, restrict selection evidence IDs to valid strings, adjust legacy pin freshness findings, and document the required capability evidence identifier format.

Changes

Model registry updates

Layer / File(s) Summary
Registry defaults and evidence parsing
tools/llm_registry.py, templates/consumer-repo/tools/llm_registry.py, tests/tools/test_llm_registry_selection.py
Empty registry paths fall back to defaults, while non-string or blank evidence IDs are ignored and the updated behavior is tested.
Legacy pin validation
tools/check_model_registry_freshness.py, tests/test_check_model_registry_freshness.py
Legacy unknown and blocked pins are treated as advisory, with streamlined selection-override checks and updated evidence validation expectations.
Capability evidence identifier contract
docs/contracts/agent-runner-output.md, templates/consumer-repo/docs/contracts/agent-runner-output.md
The capability-id field now requires the capability:<lowercase-kebab-id> format.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested labels: sync, maintenance

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: restoring legacy registry sync compatibility.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/sync-registry-review-debt

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

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

Restores compatibility for legacy/consumer registry sync behavior by adjusting how empty registry env overrides are interpreted, relaxing freshness-gate enforcement for unprofiled legacy pins, and tightening evidence-id parsing while clarifying the runner output contract.

Changes:

  • Treat empty/whitespace LANGCHAIN_MODEL_REGISTRY_CONFIG as “use bundled default registry” while keeping empty slot config fail-closed.
  • Make unprofiled (legacy) explicit pins advisory again (while still requiring a default selection to exist).
  • Normalize evidence_ids by ignoring non-string entries; clarify capability-id format in the contract doc.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tools/llm_registry.py Adds empty_uses_default handling for registry path; ignores non-string evidence_ids.
tools/check_model_registry_freshness.py Treats unprofiled legacy pins as advisory (after verifying a default selection exists).
tests/tools/test_llm_registry_selection.py Updates expectations for empty registry env behavior; adds evidence-id non-string test.
tests/test_check_model_registry_freshness.py Updates legacy-pin tests to reflect advisory handling.
templates/consumer-repo/tools/llm_registry.py Mirrors tools/llm_registry.py changes into consumer template.
docs/contracts/agent-runner-output.md Clarifies capability-id must be capability:<lowercase-kebab-id>.

Comment thread docs/contracts/agent-runner-output.md
Comment thread tools/check_model_registry_freshness.py Outdated
@stranske
stranske temporarily deployed to agent-standard July 22, 2026 22:33 — 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: 06e8f79778

ℹ️ 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 thread docs/contracts/agent-runner-output.md
@stranske-keepalive

stranske-keepalive Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Automated Status Summary

Head SHA: 90948f1
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: 0

Failure triage

Detected failure types: pytest.

  • error_type: pytest
    root_cause: Pytest reported failing tests.
    suggested_fix: Inspect failing tests in the reported files and fix the regression or update expectations.
    playbook_url: docs/INTEGRATION_GUIDE.md#scenario-1-tests-failing

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 22, 2026 22:34 — with GitHub Actions Inactive

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@templates/consumer-repo/tools/llm_registry.py`:
- Around line 186-188: The canonical evidence-ID filtering in
templates/consumer-repo/tools/llm_registry.py:186-188 must remain unchanged; add
coverage for the freshness-validation path. Keep the mirrored filtering aligned
in tools/llm_registry.py:186-188, and update
tools/check_model_registry_freshness.py to normalize evidence IDs by retaining
only non-empty strings after trimming, using the same contract as both loaders.

In `@tests/test_check_model_registry_freshness.py`:
- Around line 169-186: Strengthen both test_unknown_legacy_pin_is_advisory and
test_blocked_legacy_pin_is_advisory to verify advisory legacy pins produce no
selection_override finding. Add selection_override to the excluded finding
kinds, or assert that the fixture produces no findings while preserving the
existing assertions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 48bafe58-18f0-40e1-b1c8-39ba83e46cfc

📥 Commits

Reviewing files that changed from the base of the PR and between d492af9 and 06e8f79.

📒 Files selected for processing (6)
  • docs/contracts/agent-runner-output.md
  • templates/consumer-repo/tools/llm_registry.py
  • tests/test_check_model_registry_freshness.py
  • tests/tools/test_llm_registry_selection.py
  • tools/check_model_registry_freshness.py
  • tools/llm_registry.py

Comment thread templates/consumer-repo/tools/llm_registry.py
Comment thread tests/test_check_model_registry_freshness.py Outdated
@stranske
stranske temporarily deployed to agent-standard July 22, 2026 23:25 — with GitHub Actions Inactive
@stranske

Copy link
Copy Markdown
Owner Author

Addressed the active review findings in a654a4e: synchronized the consumer capability-ID contract, normalized freshness-gate evidence IDs to the runtime string-only contract, and strengthened advisory legacy-pin coverage. Validation: uv run pytest tests/test_check_model_registry_freshness.py tests/tools/test_llm_registry_selection.py (54 passed), uv run ruff check tools/check_model_registry_freshness.py tests/test_check_model_registry_freshness.py, and uv run --with pyyaml python scripts/validate_template_completeness.py.

@stranske
stranske merged commit 90948f1 into main Jul 23, 2026
56 checks passed
@stranske
stranske deleted the fix/sync-registry-review-debt branch July 23, 2026 00:24
@stranske stranske added the verify:compare Compare multiple LLM evaluations label Jul 25, 2026
@stranske
stranske temporarily deployed to agent-standard July 25, 2026 18:38 — with GitHub Actions Inactive
@stranske
stranske temporarily deployed to agent-high-privilege July 25, 2026 18:39 — with GitHub Actions Inactive
@stranske
stranske temporarily deployed to agent-standard July 25, 2026 18:39 — with GitHub Actions Inactive
@stranske stranske removed the verify:compare Compare multiple LLM evaluations label Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants