Skip to content

Extract ValidatorCatalog as standalone portable type #733

Description

@xdu31

Description

Extract the validator catalog structure as a standalone, portable Go type that can be used in multiple contexts: loaded from YAML files, embedded in recipes, or used by external consumers.

Context

The catalog currently lives in pkg/validator/catalog/catalog.go as ValidatorEntry. External consumers want to use AICR's catalog system programmatically. We need to formalize this as a portable type.

Requirements

  1. Define ValidatorCatalog type with list of ValidatorEntry
  2. Ensure ValidatorEntry has all necessary fields:
    • Name, Phase, Description, Image, Timeout
    • Args, Env, Resources
  3. No external dependencies (keep it portable)
  4. JSON/YAML serialization support
  5. Maintain compatibility with existing catalog loading from validators/catalog.yaml

Acceptance Criteria

  • ValidatorCatalog type exists with Validators []ValidatorEntry field
  • Type can be loaded from YAML files (existing catalog.yaml format)
  • Type can be embedded in external code via json:",inline"
  • Existing catalog loading (catalog.Load()) continues to work
  • Unit tests validate JSON/YAML marshaling
  • Documentation updated

Related

Metadata

Metadata

Assignees

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