Skip to content

ai-integrations: add AIResource OCI target validation #3695

Description

@johnmcollier

Summary

Add RHDH OCI target validation for AIResource entities in the ai-integrations workspace.

This issue covers validation of spec.location.target when spec.location.type is oci, including actionable error behavior for malformed OCI targets. It should stay focused on the validation rule itself and not expand into OCI processor registration, spec.scope, entity-page work, or broader discovery work.

Tasks

  • Add validation for spec.location.target when spec.location.type is oci
  • Require OCI targets to use the oci:// scheme prefix
  • Return actionable validation errors for malformed OCI targets
  • Ensure git-backed entities are not subject to the OCI prefix rule
  • Add focused tests for valid OCI targets, invalid OCI targets, and git-backed entities

Acceptance Criteria

  • AIResource entities with spec.location.type: oci require spec.location.target to begin with oci://
  • Malformed OCI targets are rejected with an actionable validation error that identifies the field and expected format
  • Git-backed entities are not affected by the OCI prefix rule
  • Tests cover valid OCI targets, invalid OCI targets, and git-backed entities

Specifications

All paths below are relative to workspaces/ai-integrations/.

  • openspec/changes/ai-resource-catalog-entity-kind/design.md
  • openspec/changes/ai-resource-catalog-entity-kind/tasks.md (Section 1: Upstream Investigation & Schema Foundation)
  • openspec/changes/ai-resource-catalog-entity-kind/specs/ai-resource-entity-schema/spec.md

Out of Scope

  • OCI processor implementation and registration
  • spec.scope schema extension work
  • Generalized multi-field validation/error-formatting work beyond the OCI target rule itself
  • AIResource entity page rendering
  • Discovery, filtering, and search support
  • Example catalog-info.yaml files and broader documentation follow-up

Context

This issue covers the OCI target validation portion of the RHDH AIResource extension model.

Keep the implementation focused on the oci:// validation rule and its direct tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions