Skip to content

fix: align consumer model registry contract - #2775

Merged
stranske merged 15 commits into
mainfrom
codex/sync-review-source-fix-20260714
Jul 14, 2026
Merged

fix: align consumer model registry contract#2775
stranske merged 15 commits into
mainfrom
codex/sync-review-source-fix-20260714

Conversation

@stranske

@stranske stranske commented Jul 14, 2026

Copy link
Copy Markdown
Owner

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 excerpt required 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

    • Empty prompt configuration values are now handled as absent, avoiding unintended blank segments.
    • Credential-like artifact references are rejected only when they begin with recognized credential prefixes.
    • Evidence references used for task status reporting are accepted correctly.
  • Documentation

    • Evidence contracts now require an excerpt alongside the verification method.
    • Model registry information now uses an updated schema with clearer pricing, lifecycle, sourcing, and selection details.
  • Chores

    • Conformance checks now run for relevant scripts, contract, and configuration changes.

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

cursor Bot commented Jul 14, 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 added codex codex-automation automation Automation and workflow automation maintenance Maintenance tasks sync labels Jul 14, 2026
@stranske
stranske enabled auto-merge (squash) July 14, 2026 20:30
@stranske
stranske temporarily deployed to agent-standard July 14, 2026 20:30 — with GitHub Actions Inactive
@stranske-keepalive

stranske-keepalive Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Workflow source detected

PR #2775 now has valid workflow source context (origin=sync_campaign).

No linked GitHub issue is required for this PR.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

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: 100361c3-7fd1-4ee2-a6b2-ad40b9ec29e6

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
📝 Walkthrough

Walkthrough

The 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.

Changes

Prompt composer handling

Layer / File(s) Summary
Empty segment coercion
.github/scripts/keepalive_prompt_composer.js, .github/scripts/__tests__/keepalive-prompt-composer.test.js, templates/consumer-repo/.github/scripts/keepalive_prompt_composer.js
Empty strings are treated as absent segment inputs, and empty capability bundles produce no applied bundles in the composer test.

Evidence contract validation

Layer / File(s) Summary
Evidence contract and validation
docs/contracts/schemas/evidence-object-v1.schema.json, tests/contracts/test_backplane_schemas.py, scripts/runner_lib/core.py, tests/scripts/test_runner_lib.py
Evidence objects now require excerpt, while credential-like artifact detection only matches configured prefixes at the start of references; tests cover both behaviors.

Model registry template

Layer / File(s) Summary
Registry schema and catalog
templates/consumer-repo/config/model_registry.json
The registry uses schema version 2 metadata, provider baselines, source provenance, curated model records, explicit selections, and catalog evidence.
Registry runtime models
tools/llm_registry.py, templates/consumer-repo/tools/llm_registry.py
Three frozen dataclasses in each registry implementation now use slots=True.
Conformance trigger wiring
templates/consumer-repo/.github/workflows/backplane-conformance.yml
Pull-request path filters now include scripts, contract documentation, and participant configuration paths.

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

Possibly related PRs

Suggested labels: agents:keepalive, github:actions

🚥 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
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly reflects the main goal of aligning the consumer model registry contract with the reviewed schema and related validations.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/sync-review-source-fix-20260714

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

@stranske-keepalive

stranske-keepalive Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Automated Status Summary

Head SHA: ace198c
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.66%
Baseline 85.00%
Delta -9.34%
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 43.8% 54
tools/ci_failure_triage.py 44.2% 123
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
scripts/sync_label_docs.py 42.9% 64
tools/discover_model_catalog.py 43.8% 54
tools/ci_failure_triage.py 44.2% 123
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

@stranske
stranske temporarily deployed to agent-standard July 14, 2026 20:31 — 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: 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".

Comment thread docs/contracts/schemas/evidence-object-v1.schema.json
Comment thread scripts/runner_lib/core.py Outdated

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 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 excerpt required 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.

Comment thread scripts/runner_lib/core.py Outdated
Comment thread tests/scripts/test_runner_lib.py

@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/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

📥 Commits

Reviewing files that changed from the base of the PR and between c8a93d2 and 0e7f6ab.

📒 Files selected for processing (11)
  • .github/scripts/__tests__/keepalive-prompt-composer.test.js
  • .github/scripts/keepalive_prompt_composer.js
  • docs/contracts/schemas/evidence-object-v1.schema.json
  • scripts/runner_lib/core.py
  • templates/consumer-repo/.github/scripts/keepalive_prompt_composer.js
  • templates/consumer-repo/.github/workflows/backplane-conformance.yml
  • templates/consumer-repo/config/model_registry.json
  • templates/consumer-repo/tools/llm_registry.py
  • tests/contracts/test_backplane_schemas.py
  • tests/scripts/test_runner_lib.py
  • tools/llm_registry.py

Comment thread templates/consumer-repo/config/model_registry.json
Comment thread tests/contracts/test_backplane_schemas.py
@stranske

stranske commented Jul 14, 2026

Copy link
Copy Markdown
Owner Author

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

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

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

@stranske
stranske temporarily deployed to agent-standard July 14, 2026 20:46 — with GitHub Actions Inactive
@github-actions github-actions Bot added the autofix Opt-in automated formatting & lint remediation label Jul 14, 2026
@stranske
stranske temporarily deployed to agent-standard July 14, 2026 20:46 — with GitHub Actions Inactive
@stranske
stranske temporarily deployed to agent-standard July 14, 2026 20:46 — with GitHub Actions Inactive
@github-actions

Copy link
Copy Markdown
Contributor

Autofix updated these files:

  • tests/scripts/test_runner_lib.py

@stranske

Copy link
Copy Markdown
Owner Author

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:
no tests ran in 0.16s (18 passed); passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autofix:escalated 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.

3 participants