Skip to content

docs(recipe): refresh data/validator docs and godoc after #1118#1120

Merged
mchmarny merged 1 commit into
NVIDIA:mainfrom
yuanchen8911:chore/doc-cleanup-post-1118
May 30, 2026
Merged

docs(recipe): refresh data/validator docs and godoc after #1118#1120
mchmarny merged 1 commit into
NVIDIA:mainfrom
yuanchen8911:chore/doc-cleanup-post-1118

Conversation

@yuanchen8911

Copy link
Copy Markdown
Contributor

Summary

Refresh three docs that still referenced the package-global data-provider and criteria-registry APIs removed by #1118.

Motivation / Context

#1118 removed the back-compat shims (SetDataProvider, GetDataProvider, GetDataProviderGeneration, DefaultRegistry, ParseCriteria*Type, AllCriteria*Types, catalog.Load, …) but left documentation pointing at the deleted symbols. This was flagged during cross-review of #1118 as non-blocking follow-up; this PR clears it.

Fixes: N/A
Related: #1118, #983

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • Build/CI/tooling

Component(s) Affected

  • CLI (cmd/aicr, pkg/cli)
  • API server (cmd/aicrd, pkg/api, pkg/server)
  • Recipe engine / data (pkg/recipe) — godoc comments only
  • Bundlers (pkg/bundler, pkg/component/*)
  • Collectors / snapshotter (pkg/collector, pkg/snapshotter)
  • Validator (pkg/validator)
  • Core libraries (pkg/errors, pkg/k8s)
  • Docs/examples (docs/, examples/)
  • Other: ____________

Implementation Notes

  • docs/contributor/data.md — rewrote the CLI-init example from the removed initDataProvider/SetDataProvider pattern to the current per-command aicr.Client (recipeClientFromCmd); dropped the "Back-compat: package-global accessors" subsection; refreshed the Criteria Registry prose and API-surface table to the per-DataProvider API (GetCriteriaRegistryFor / NewCriteriaRegistry / (*CriteriaRegistry).Parse* / .All*Types, (*aicr.Client).LoadCatalog).
  • pkg/recipe/doc.go — removed the claim that SetDataProvider/GetDataProvider "remain functional for back-compat"; updated the ParseCriteriaFromRequest, ParseCriteriaFromBody, and LoadCriteriaFromFile examples to pass the new *CriteriaRegistry argument; corrected the nil-fallback note (now the package's default embedded provider).
  • docs/contributor/validator.mdcatalog.Loadcatalog.LoadWithDataProvider (both occurrences).

No code behavior changes — comments and Markdown only.

Testing

gofmt -l pkg/recipe/doc.go          # clean
go vet ./pkg/recipe/                 # clean
golangci-lint run -c .golangci.yaml ./pkg/recipe/...   # 0 issues

Doc/comment-only change: scoped checks run in place of full make qualify (no test/e2e surface can regress from comment and Markdown edits). Verified zero remaining references to the removed symbols across the three files, and that the removed data.md heading has no inbound anchor links. CI's lychee link-check covers docs/**; no links were added or repointed.

Risk Assessment

  • Low — Documentation and godoc comments only, easy to revert.
  • Medium
  • High

Rollout notes: N/A

Checklist

  • Tests pass locally (make test with -race) — N/A; no code changes (comment/doc only). go vet + golangci-lint clean on pkg/recipe.
  • Linter passes (make lint) — golangci-lint on pkg/recipe reports 0 issues.
  • I did not skip/disable tests to make CI green
  • I added/updated tests for new functionality — N/A (docs only)
  • I updated docs if user-facing behavior changed
  • Changes follow existing patterns in the codebase
  • Commits are cryptographically signed (git commit -S)

@github-actions

Copy link
Copy Markdown
Contributor

@coderabbitai

coderabbitai Bot commented May 30, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: dbbcc5d2-4759-4c10-9cb9-d2d5c4beea21

📥 Commits

Reviewing files that changed from the base of the PR and between 459f745 and 52a27ea.

📒 Files selected for processing (3)
  • docs/contributor/data.md
  • docs/contributor/validator.md
  • pkg/recipe/doc.go

📝 Walkthrough

Walkthrough

This PR updates documentation across three files to reflect architectural changes deprecating process-global recipe data providers in favor of per-command client-bound DataProvider instances. The primary documentation (docs/contributor/data.md) describes the shift from global provider accessors to provider-bound APIs, the conversion of criteria registry to a per-DataProvider cache populated from overlays, strict-mode configuration at registry construction time, and the addition of (*aicr.Client).LoadCatalog(ctx) for eager catalog seeding. Related updates in docs/contributor/validator.md and pkg/recipe/doc.go align validator integration and package documentation with the provider-bound model, including removal of guidance on legacy global accessors and introduction of explicit criteria registry parameters in examples.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • NVIDIA/aicr#1107: The main PR’s docs changes directly mirror the code-level refactor in the retrieved PR that de-globalizes criteria parsing/registry seeding to be per-DataProvider (including registry-aware APIs and catalog/validator provider binding).
  • NVIDIA/aicr#1015: The main PR’s documentation updates around binding DataProvider per builder/client and the (*RecipeResult).DataProvider()/provider-bound loading semantics directly reflect the implementation introduced in #1015 (per-Builder isolation via WithDataProvider, builder/provider threading, and provider-aware result helpers).

Suggested labels

size/S

Suggested reviewers

  • mchmarny
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the PR's primary objective: refreshing documentation that became stale after PR #1118 removed deprecated APIs.
Description check ✅ Passed The description clearly explains the motivation, scope, and changes: updating three docs that still referenced deleted package-global data-provider and criteria-registry APIs.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

PR NVIDIA#1118 removed the package-global data-provider and criteria-registry
shims, but three docs still referenced the deleted APIs:

- docs/contributor/data.md: rewrote the CLI-init example to the per-command
  aicr.Client pattern, dropped the "package-global accessors" subsection,
  and refreshed the Criteria Registry prose + API-surface table to the
  per-DataProvider API (GetCriteriaRegistryFor / NewCriteriaRegistry /
  (*CriteriaRegistry).Parse*/All*Types, (*aicr.Client).LoadCatalog).
- pkg/recipe/doc.go: removed the "SetDataProvider/GetDataProvider remain
  functional" claim and updated the ParseCriteriaFromRequest/Body and
  LoadCriteriaFromFile examples to pass the new registry argument.
- docs/contributor/validator.md: catalog.Load -> catalog.LoadWithDataProvider.
@yuanchen8911 yuanchen8911 force-pushed the chore/doc-cleanup-post-1118 branch from 459f745 to 52a27ea Compare May 30, 2026 03:44
@yuanchen8911 yuanchen8911 requested a review from mchmarny May 30, 2026 03:50
@mchmarny mchmarny merged commit 072849f into NVIDIA:main May 30, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants