fix: align consumer model registry contract - #2775
Conversation
|
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. |
Workflow source detectedPR #2775 now has valid workflow source context (origin=sync_campaign). No linked GitHub issue is required for this PR. |
|
Important Review skippedAuto reviews are limited based on label configuration. 🚫 Excluded labels (none allowed) (7)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe changes refine empty-string prompt handling, tighten evidence-object and artifact-reference validation, replace the consumer model registry format, enable slots on registry dataclasses, and expand workflow path triggers. ChangesPrompt composer handling
Evidence contract validation
Model registry template
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Automated Status SummaryHead SHA: ace198c
Coverage Overview
Coverage Trend
Top Coverage Hotspots (lowest coverage)
Low Coverage Files (<50.0%)
Updated automatically; will refresh on subsequent CI/Docker completions. Keepalive checklistScopeNo scope information available Tasks
Acceptance criteria
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0e7f6ab5fc
ℹ️ 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".
There was a problem hiding this comment.
Pull request overview
This PR aligns the consumer-facing model registry and related contracts/validators with the current reviewed schema and runtime expectations, and tightens conformance triggers and prompt-composer input handling.
Changes:
- Updates model-registry and selection schema data in the consumer template, and makes the Python registry dataclasses slot-based.
- Adjusts capability evidence artifact-ref validation behavior and updates tests accordingly.
- Makes
excerptrequired in the evidence-object v1 schema (nullable but must be present) and expands backplane conformance trigger paths; treats empty-string capability bundles as absent in the prompt composer.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
tools/llm_registry.py |
Switches registry-related dataclasses to slots=True for tighter/leaner objects. |
templates/consumer-repo/tools/llm_registry.py |
Mirrors the slots=True dataclass change in the consumer template copy. |
scripts/runner_lib/core.py |
Changes credential-like detection for evidence_artifact_ref to use a prefix-based check. |
tests/scripts/test_runner_lib.py |
Updates evidence validation tests; adds an assertion for allowing task-skipped refs. |
docs/contracts/schemas/evidence-object-v1.schema.json |
Requires excerpt in the evidence object schema (nullable but present). |
tests/contracts/test_backplane_schemas.py |
Extends schema contract test coverage to assert excerpt is required. |
templates/consumer-repo/config/model_registry.json |
Updates the consumer template model registry content to the current schema/structure. |
templates/consumer-repo/.github/workflows/backplane-conformance.yml |
Expands path triggers to re-run conformance when scripts/contracts/participants config change. |
.github/scripts/keepalive_prompt_composer.js |
Treats empty-string segment inputs (incl. capability bundle override) as absent ([]). |
templates/consumer-repo/.github/scripts/keepalive_prompt_composer.js |
Mirrors the empty-string handling change in the consumer template copy. |
.github/scripts/__tests__/keepalive-prompt-composer.test.js |
Adds coverage for empty-string capability bundle override behavior. |
There was a problem hiding this comment.
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/config/model_registry.json`:
- Around line 2-6: Add the missing model_selection_policy.json file under the
consumer template’s config directory so the selection_policy reference in
model_registry.json resolves to a template-local file; preserve the existing
reference unless an established equivalent policy file is already present.
In `@tests/contracts/test_backplane_schemas.py`:
- Around line 70-75: Extend
test_evidence_object_requires_method_and_excerpt_present to validate actual
evidence-object instances through the validator path used by
scripts/validate_run_contract.py. Add a case showing an object without excerpt
is rejected and a case showing an object with excerpt set to null is accepted,
while retaining the existing schema-shape 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: 069fe4d1-5196-4885-9fcb-d8350510143d
📒 Files selected for processing (11)
.github/scripts/__tests__/keepalive-prompt-composer.test.js.github/scripts/keepalive_prompt_composer.jsdocs/contracts/schemas/evidence-object-v1.schema.jsonscripts/runner_lib/core.pytemplates/consumer-repo/.github/scripts/keepalive_prompt_composer.jstemplates/consumer-repo/.github/workflows/backplane-conformance.ymltemplates/consumer-repo/config/model_registry.jsontemplates/consumer-repo/tools/llm_registry.pytests/contracts/test_backplane_schemas.pytests/scripts/test_runner_lib.pytools/llm_registry.py
|
Runner dispatch state for autofix on PR #2775. Do not edit. |
|
Runner dispatch state for codex on PR #2775. Do not edit. |
|
Autofix updated these files:
|
|
Fixed the completed Gate regression in b242820: the closest-schema-error fixture now satisfies the newly-required evidence excerpt, preserving its single invalid-method assertion. Validation: |
Fixes shared review debt from the latest Maint 68 sync wave: aligns the consumer model registry with the reviewed selection schema, corrects evidence-prefix matching, handles empty capability bundle inputs, restores contract trigger coverage, and makes
excerptrequired as documented.Validation: focused pytest (122 passed), Node prompt-composer tests, template sync/completeness checks, and
scripts/check_consumer_sync_drift.py.Summary by CodeRabbit
Bug Fixes
Documentation
Chores