Skip to content

fix: preserve model registry checker package import - #2809

Merged
stranske merged 5 commits into
mainfrom
fix-sync-llm-checker
Jul 23, 2026
Merged

fix: preserve model registry checker package import#2809
stranske merged 5 commits into
mainfrom
fix-sync-llm-checker

Conversation

@stranske

@stranske stranske commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Fixes the synced checker\u0027s direct-execution import path without defining DEFAULT_SELECTION_PROFILE twice for mypy.\n\nValidation: python -m pytest tests/test_check_model_registry_freshness.py -q; python -m mypy tools/check_model_registry_freshness.py.

Summary by CodeRabbit

  • Chores
    • Improved reliability when running the model registry freshness check directly by ensuring repository tooling is discoverable before loading required components.
    • Streamlined the check’s imports to rely on the tooling-local registry entry, removing the prior fallback behavior.
    • Updated recorded run metadata for the fleet worker attempt (timestamp and pull request reference).

@cursor

cursor Bot commented Jul 23, 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 23, 2026 06:32 — with GitHub Actions Inactive
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

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: 2642e152-b903-4853-a2e5-71863fc84235

📥 Commits

Reviewing files that changed from the base of the PR and between 3ca16ac and edf5cc8.

📒 Files selected for processing (1)
  • tools/check_model_registry_freshness.py

📝 Walkthrough

Walkthrough

The model registry freshness checker now resolves the repository root before importing DEFAULT_SELECTION_PROFILE, and the worker attempt payload records a newer timestamp and pull request number.

Changes

Model registry and worker metadata

Layer / File(s) Summary
Direct execution import setup
tools/check_model_registry_freshness.py
Computes _REPO_ROOT before imports, adds it to sys.path, and uses the packaged tools.llm_registry import consistently.
Worker attempt metadata refresh
langsmith-fleet-worker-attempt.json
Updates emitted_at and changes pr_number from 2806 to 2809 without altering surrounding fields.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

Suggested labels: autofix:patch

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 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: preserving the package import path for the model registry checker.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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-llm-checker

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

@stranske-keepalive

Copy link
Copy Markdown
Contributor

Workflow source needed

PR #2809 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.

@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: 1

🤖 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 `@tools/check_model_registry_freshness.py`:
- Around line 18-25: Add a subprocess-level regression test for directly
executing tools/check_model_registry_freshness.py through its supported CLI,
verifying it completes successfully and can import DEFAULT_SELECTION_PROFILE
from tools.llm_registry. Keep the test focused on the standalone execution path
so future import changes cannot reintroduce the failure.
🪄 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: 35fb682b-5606-4dba-9ce7-c2bd5ef76a40

📥 Commits

Reviewing files that changed from the base of the PR and between 90948f1 and be479cc.

📒 Files selected for processing (1)
  • tools/check_model_registry_freshness.py

Comment thread tools/check_model_registry_freshness.py Outdated
Comment on lines +18 to +25
_REPO_ROOT = Path(__file__).resolve().parent.parent

# Direct execution puts tools/, rather than the repository root, on sys.path.
# Always import through the package so type checking sees one symbol definition.
if str(_REPO_ROOT) not in sys.path:
sys.path.insert(0, str(_REPO_ROOT))

from tools.llm_registry import DEFAULT_SELECTION_PROFILE

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Add a direct-execution regression test.

This change alters the script’s import behavior, but no test exercises running tools/check_model_registry_freshness.py as a standalone script. Add a subprocess-level test using the supported CLI so a future import refactor cannot reintroduce the direct-execution failure.

As per path instructions: “Prioritize correctness, error handling, and test coverage. Flag new or changed behavior with no accompanying test.”

🤖 Prompt for 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.

In `@tools/check_model_registry_freshness.py` around lines 18 - 25, Add a
subprocess-level regression test for directly executing
tools/check_model_registry_freshness.py through its supported CLI, verifying it
completes successfully and can import DEFAULT_SELECTION_PROFILE from
tools.llm_registry. Keep the test focused on the standalone execution path so
future import changes cannot reintroduce the failure.

Source: Path instructions

@agents-workflows-bot

agents-workflows-bot Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Automated Status Summary

Head SHA: bdabd23
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.72%
Baseline 85.00%
Delta -9.28%
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 commented Jul 23, 2026

Copy link
Copy Markdown
Owner Author

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

@stranske
stranske temporarily deployed to agent-standard July 23, 2026 08:36 — with GitHub Actions Inactive
@stranske
stranske merged commit 50e71db into main Jul 23, 2026
48 checks passed
@stranske
stranske deleted the fix-sync-llm-checker branch July 23, 2026 10:28
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.

1 participant