← Back to Pull requests

refactor(serving): add selectable deployment extension entry points #10754

Closed
unknown closed this pull request without merging on Nov 26, 2026 11:35 UTC
View on GitHub
unknown unknown commented on Nov 16, 2026 13:38 UTC
Author

Part 12 of https://redhat.atlassian.net/browse/RHAI-2007.

Problem

RHAII imports full serving extension manifests, bringing optional administration, runtime installation, and advanced integrations into production bundles even when their feature flags are disabled. Runtime imports of serving IDs from aggregate manifests also pull those declarations back into the dependency graph.

Solution

Add selectable deployment extension entry points for Model Serving and LLMD, excluding optional contributions before compilation. The LLMD deployment profile retains deployment creation, watching, deletion, gateway integration, tracking, and start/stop.

RHAII selects the LLMD entry point through its distribution manifest. Its Model Serving profile is also defined in distribution.yaml, with Docker, Tilt, and the production runtime audit reading that selection through one shared helper. Missing selections and unsupported profiles fail explicitly.

Preserve the existing modelServing/extensions federation key. Other dashboard builds default to the full manifest with unchanged extension metadata, ordering, feature gates, and lazy callbacks.

Preserve the full LLMD entry point’s named exports: LLMD_SERVING_ID, topologyConfigsExtensions, and TopologyConfigsExtensionsType, including the original string-literal ID type. Deployment entry points remain independent of the optional manifests.

Replace runtime imports of aggregate manifests for serving IDs with the existing shared area IDs. KServe registration and its current activation prerequisite remain for the later cutover. No application API-contract or RBAC changes are introduced.

The scoped extension-composition work is complete. The broader RHAII migration remains a work in progress: the KServe cutover, remaining runtime dependencies, strict boundary enforcement, and production xKS qualification are separate deliverables.

Evidence

Automated and build validation:

  • All 1,536 tests pass across the Model Serving, LLMD, and RHAII unit-suite runs. Coverage includes selected contributions, start/stop registration, public-export compatibility, preserved ordering and gates, profile selection, failure propagation, and Docker/Tilt/audit alignment.

  • LLMD and RHAII type checks pass. Changed-source lint passes without warnings; LLMD package lint retains one restricted-import warning in an unchanged mock.

  • Comparing the full manifests against the branch base confirms identical ordered metadata, gates, and lazy callback sources for all 23 Model Serving and 52 LLMD contributions.

  • The RHAII production host, selected Model Serving remote, and default full-profile remote build successfully.

  • Running pnpm run audit:runtime reports 150 forbidden module instances, all in the host, and 300 lazy chunks. The selected remote has zero violations. No LLMD advanced-manifest or settings runtime modules are emitted. The strict runtime boundary remains failing.
  • Live-cluster validation:

    Cypress exercises the RHAII and Model Serving development builds and Go BFF against a real OpenShift cluster, with Kubernetes mocks and Tilt fixtures disabled. The selected deployment profiles are used throughout.

    1. Open the deployment table for a disposable CPU-backed LLMInferenceService and verify Ready status and the Stop action.
    2. Confirm Stop, verify the annotation PATCH returns HTTP 200, and wait for the UI to show Stopped with the Start action.
    3. Select Start, verify the corresponding PATCH returns HTTP 200, and wait for the replacement workload to reach Ready.
    4. Compare direct cluster snapshots: the model resource retains its UID, the stop annotation changes as expected, and the workload and scheduler pods receive new UIDs after restart.

    The scenario passes without retries in 4 minutes 31.572 seconds. The disposable model is stopped after verification, leaving no test pods running.

    Lazy compilation and automatic reload are disabled for stable recording. Development warnings about duplicate plugin/WebSocket registration and missing React list keys are observed; their baseline origin is not established by this run. This evidence validates the deployment lifecycle using development builds on OpenShift; model creation, frontend SSO, production-image validation, and xKS qualification remain outside this verification.

    The videos below show the stop confirmation and resulting Stopped and Ready states. The short Start clip marks the omitted CPU startup wait.

    https://github.com/user-attachments/assets/bd5d44d4-809c-44cf-b661-ee2f3c9b7207

    https://github.com/user-attachments/assets/e5fe5806-fcbb-4b87-922c-1ab56ef7de70

    <!-- OPTIONAL — uncomment when needed: -->
    <!-- ## Justifications -->

    <!-- Instructions

    This description is the sole source of truth for review of this PR.
    Review and lander gates read only this description — not chat or comment threads.
    A linked Jira ticket may still be checked for product-ask alignment.

    Source of truth — this PR description

  • Restate what matters for this head here. If you depart from the ticket ask, say

  • so in this description and why.
  • If a thread changes the ask or a rebuttal, fold that change into this description

  • (do not leave the durable claim only in a comment).
  • Tracker (optional): uncomment the Fixes: line at the top; do not bury the ticket

  • only in Problem/Solution.

    Hygiene

  • Present-tense, current with the head. No TBD/placeholders.

  • PR title = user-visible change (unless a workflow requires a specific title format — that format wins).

  • Allow maintainer edits: on.
  • Problem (required)


  • Broken workflow or gap — not the code-level cause.

  • Enough to check against the diff and any linked ticket ACs.
  • Solution (required)


  • What changed and why. Skip file lists.

  • Note security/RBAC, API/contract, migrations, breaking changes when relevant.
  • Evidence (required)


  • What CI cannot show: commands, cluster or manual checks, suites outside required CI; steps, not only outcome.

  • When new tests aren't appropriate — the constraint, why automation is inappropriate

  • or impossible, and the alternative verification.
  • When required CI supplies all applicable proof, a brief statement that automated coverage is the evidence is sufficient.

  • Screenshots, GIFs, and/or video for UI or flow changes; logs when useful.

  • Redact tokens, passwords, and cluster credentials.

  • Cluster check with the PR image when permission/backend/hard-to-mock matters.

  • Long output: short summary up top; fold details:
  • <details>
    <summary>build log output</summary>

    ...

    </details>

    Justifications (optional)


  • Only if the approach fights repo guidance/norms and review would keep flagging it.

  • Which norm, why this PR is still correct, what proof. Update this description when

  • that rationale changes; comment threads alone are not enough.
    -->

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: paulovmr Review duration: 14277m
    All Vouch review confidence checks passed
    Residual risk 0.32 = Change Risk (0.80) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.80 · 650 lines diff across 8 files
    0.80
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    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.388
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.080
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #10754"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    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: 80.2% (HIGH) · Higher = larger blast radius
    80.2%
    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: 60.5% · Lower = rushed or shallow review
    60.5%
    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: 31.7% · Safe to merge
    31.7%