← Back to Pull requests

fix(openapi): wrap Model Catalog responses in data envelope #3351

Merged
antowaddle merged 1 files (42 lines) on Oct 15, 2026 15:48 UTC
View on GitHub
antowaddle antowaddle commented on Oct 15, 2026 13:34 UTC
Author

Problem

The Model Catalog BFF handlers return payloads inside a required data envelope, but the hand-maintained OpenAPI response components currently point directly to the raw catalog schemas. This causes schema/implementation drift and makes consumer contract tests fail when they validate against the published spec.

Change

Wrap the following Model Catalog response schemas in the same required data envelope emitted by the BFF:

  • CatalogModelListResponse

  • CatalogSourceListResponse

  • CatalogLabelListResponse

  • CatalogModelResponse

  • CatalogModelArtifactListResponse

  • FilterOptionsResponse
  • Impact Audit

  • This changes only clients/ui/api/openapi/mod-arch.yaml.

  • That file is hand-maintained and is documentation for the UI BFF surface.

  • OpenAPI code generation in this repository uses api/openapi/catalog.yaml and api/openapi/catalog-v1.yaml, not clients/ui/api/openapi/mod-arch.yaml.

  • The affected schema names do not appear in generated Go or Python clients in this repository.

  • architecture-context maps the ODH Dashboard as the internal consumer of the Model Registry BFF surface.

  • The UI frontend already unwraps response.data, so runtime behavior is unchanged.

  • External consumers generated from the old UI spec would need regeneration, but they were already incompatible with the actual BFF responses.
  • Validation

  • Parsed the updated OpenAPI YAML successfully.

  • Validated the spec with OpenAPI Generator 7.17.0.

  • Ran the ODH Dashboard Model Registry BFF consumer suite against this schema and the upstream BFF: 8/8 tests passed.

  • This directly resolves the schema/implementation drift reported by the ODH Dashboard upstream-main contract gate.
  • References

  • ODH Dashboard PR using this schema: https://github.com/opendatahub-io/odh-dashboard/pull/10256

  • Post-merge baseline simulation: https://github.com/opendatahub-io/odh-dashboard/pull/10262
  • Diff: 42 lines (+36 / -6) across 1 files Reviewer: Philip-Carneiro Review duration: 134m
    All Vouch review confidence checks passed
    Residual risk 0.05 = Change Risk (0.25) × (1 − Review Confidence (0.79)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.25 · 42 lines diff across 1 files
    0.25
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.68 · 3 substantive comment(s)
    0.68
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    78%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.225
    Real PR Conversation Timeline
    7 items
    Philip-Carneiro Philip-Carneiro approved these changes on Oct 15, 2026 14:07 UTC
    Approved Reviewer

    /lgtm

    antowaddle antowaddle commented on Oct 15, 2026 14:37 UTC
    Author

    /cc @manaswinidas

    Gkrumbach07 Gkrumbach07 approved these changes on Oct 15, 2026 15:21 UTC
    Approved Reviewer

    Approved these changes.

    google-oss-prow[bot] google-oss-prow[bot] commented on Oct 15, 2026 15:21 UTC
    Bot

    @Gkrumbach07: changing LGTM is restricted to collaborators

    <details>

    In response to this:

    Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

    </details>

    lucferbux lucferbux approved these changes on Oct 15, 2026 15:46 UTC
    Approved Reviewer

    /lgtm
    /approve

    google-oss-prow[bot] google-oss-prow[bot] commented on Oct 15, 2026 15:46 UTC
    Bot

    [APPROVALNOTIFIER] This PR is APPROVED

    This pull-request has been approved by: <a href="https://github.com/kubeflow/hub/pull/3351#pullrequestreview-5535890293" title="Approved">lucferbux</a>

    The full list of commands accepted by this bot can be found here.

    The pull request process is described here

    <details >
    Needs approval from an approver in each of these files:

  • ~~clients/ui/OWNERS~~ [lucferbux]
  • Approvers can indicate their approval by writing /approve in a comment
    Approvers can cancel approval by writing /approve cancel in a comment
    </details>
    <!-- META={"approvers":[]} -->

    Assignees
    antowaddle antowaddle
    Labels
    risk: low confidence: 78.9% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 25.5% (LOW) · Higher = larger blast radius
    25.5%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 78.9% · Lower = rushed or shallow review
    78.9%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 5.4% · Safe to merge
    5.4%
    Repository