Skip to content

aicr recipe list: add structural-health + coverage columns #1228

Description

@njhensley

Parent: #1224 (Epic: Recipe health tracking, ADR-009 V1)

Summary

Extend the aicr recipe list command delivered by #1207 / #1208 (merged) with the ADR-009 §4 health view — a structural status and a compact declared-coverage summary per recipe — delegating computation to pkg/health. #1208 already delivers the command, enumeration, criteria/curated/source columns, --format json|yaml|table, the --service/--accelerator/--intent/--os filters, and --data; A4 adds only the health-derived columns. pkg/cli stays logic-free.

Scope

  • Wire the existing recipe list command to call pkg/health.Compute() for the listed combos and add: table → a structural status column + compact coverage (R:2 D:4 P:1 C:10); json/yaml → the full declared_coverage (named checks per phase) plus the per-dimension status map. Preserve feat(recipe): add aicr recipe list subcommand for catalog enumeration #1208's curated/source fields and filter behavior.
  • Degrade gracefully: if pkg/health: constraints_wellformed signal (parse-only, hermetic) #1227 hasn't merged yet, constraints_wellformed surfaces as unknown; the status column still renders.
  • The command renders its own curated tabwriter grid (the generic pkg/serializer table writer flattens to two-column FIELD/VALUE and cannot render a multi-row grid).
  • Docs same PR: extend the aicr recipe list section in docs/user/cli-reference.md with the health columns.

Key files

pkg/cli/recipe_list.go (the merged list command), pkg/cli/recipe.go, pkg/health (Compute), pkg/cli/root.go (cmd.Root().Writer), docs/user/cli-reference.md.

Tests

Capture cmd.Root().Writer: the table carries the status + coverage columns atop #1208's criteria/curated/source columns; --format json carries the full declared_coverage + per-dimension status map; the status column degrades to unknown when #1227 is absent. The enumeration round-trip test (feed each CatalogEntry.Criteria from ListCatalog back through BuildFromCriteria) may live here or with the enumeration command.

Acceptance

aicr recipe list shows the structural status + coverage columns in all formats, delegating to pkg/health, without losing #1208's enumeration/curated/source output; documented in cli-reference.md.

Dependencies

Depends on the merged #1207/#1208 command and on #1226 (#1227 for full grading).

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions