Skip to content

[Epic]: Post-facade adoption and surface hardening (follow-ups to #1072) #1076

Description

@mchmarny

Summary

Tracking epic for follow-up work introduced by #1072 (the top-level github.com/NVIDIA/aicr facade). Each child is independently reviewable and mergeable.

Status: ✅ closed — all four children merged.

Motivation

PR #1072 ships the aicr.Client facade defined by #1071 and lands the per-Builder DataProvider isolation that #986 was scoped to provide. The facade is functional, but to actually deliver the architectural payoff and honor its documented semver contract, several deferred items need to land.

Without these:

  • The codebase carries three independent wiring paths for DataProvider → Builder → Bundler → Validator (CLI, REST, facade).
  • The facade's "Public (stable)" contract identity-aliases types from packages marked Internal / "Public (evolving)" in docs/integrator/public-api.md, undermining the semver promise.
  • The cross-Client safety guard [Feature]: Stable embeddable Go library surface for in-process recipe resolution #1071 motivates only protects facade callers; direct pkg/recipe.Builder users (today: pkg/api/server.go) remain exposed.
  • Test-only helpers leaked onto pkg/recipe's public surface.

Final status

Closed: 2026-05-29

Children

# Issue Title PR(s) Status
1 #1079 refactor(recipe): move _ForTesting cache helpers off the public surface ✅ merged
2 #1077 feat(cli,api): migrate CLI and REST server to consume aicr.Client #1107 + #1108 ✅ merged
3 #1078 feat(aicr): wrap facade alias types as facade-owned structs #1111 ✅ merged
4 #1080 feat(recipe): push owner-token guard down to pkg/recipe.RecipeResult #1113 ✅ merged

Adjacent work landed alongside the epic

These weren't original children but ship in the same area and were folded into the rollout:

Acceptance — all met

  • ✅ All four children merged.
  • docs/integrator/public-api.md matches the actual exported surface (no Internal types identity-aliased into the stable facade tier — see "Facade type ownership" section).
  • pkg/api/server.go and pkg/cli/ no longer construct recipe.Builder / bundler.Bundler directly (migrated by feat(cli,api): consume aicr.Client facade (#1077) #1108).
  • make qualify clean throughout.

Follow-up work (tracked separately, post-epic)

These surfaced during the epic and were explicitly scoped out to keep PRs focused. Each has its own tracking issue:

Issue Title Notes
#1109 feat(recipe): add context.Context to DataProvider interface for cancellable I/O Surfaced by coderabbitai during #1107 review. Pre-existing gap, not facade-specific.
#1114 chore(recipe): remove back-compat shims introduced by #1107 The Stage 2 of #983. Now that #1108 migrated all in-tree callers, the global-path shims (SetDataProvider, DefaultRegistry, catalog.Load, LoadFromFile, config.ResolveCriteria) can be removed. Breaking change for external Go importers.
#1115 feat(client/v1): wrap remaining facade alias types (Recipe, AllowLists, Criteria, CriteriaRegistry) Completes the #1078 pattern for the recipe-tier aliases introduced by #1077. Requires resolving the existing dual Recipe / RecipeResult surface first — bigger design discussion.

Out of scope (separate work)

  • OCI recipe sources (placeholder in aicr.go returning ErrCodeUnavailable)
  • Pinned recipe references (RecipeRequest.PinnedName / PinnedVersion)

Related

Metadata

Metadata

Assignees

Type

Fields

No fields configured for Epic.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions