Skip to content

fix(docs/api): fix, clean up docs and add doc update audit rule#625

Merged
yuanchen8911 merged 1 commit into
NVIDIA:mainfrom
yuanchen8911:fix-docs-review-findings
Apr 21, 2026
Merged

fix(docs/api): fix, clean up docs and add doc update audit rule#625
yuanchen8911 merged 1 commit into
NVIDIA:mainfrom
yuanchen8911:fix-docs-review-findings

Conversation

@yuanchen8911

@yuanchen8911 yuanchen8911 commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR does three things:

  1. Cleans up and fixes docs found in a full review pass over docs/ — typos, stale CI tool versions, MDX-incompatible HTML entities, a broken shell example that failed at runtime, two fictional error-message examples the binary never produced, and three ungrammatical sentences in the Skyhook page.
  2. Closes drifts between the Go source types and the documented/advertised values for three enums:
    • Acceleratorb200 and rtx-pro-6000 were defined in pkg/recipe/criteria.go and real overlays but missing from api/aicr/v1/server.yaml and most docs.
    • Servicekind and lke were defined in CriteriaServiceType but missing from the OpenAPI enum and every documented service listing; legacy self-managed (parsed as an alias for any) was advertised as a distinct enum value.
    • Deployerargocd-helm was in the OpenAPI deployer enum but not documented in the user-facing parameter or flag tables.
  3. Adds an "enum update audit" rule for coding agents (Claude Code via .claude/CLAUDE.md, Codex via AGENTS.md — auto-synced) so this class of drift is less likely to recur. The bullet prescribes starting from the authoritative Go type rather than grepping for an already-documented sibling value, and it names the full audit surface: OpenAPI contract, user/contributor docs, the site-docs mirror, package godoc and urfave/cli Description strings, and .github/ISSUE_TEMPLATE/*.yml dropdowns.

A single follow-up issue (#629) is filed for two Codex-flagged drifts that are structurally different and deserve their own PRs: the platform enum + missing RecipeCriteria property, and error-code naming (INTERNAL_ERROR / NO_MATCHING_RULE advertised in docs but not defined in pkg/errors/errors.go).

Motivation / Context

Started as a full pass over every page under docs/ on origin/main looking for review-level issues. Mid-review, Claude Code / CodeRabbit / Codex cross-review rounds kept surfacing the same shape of problem: accelerator, service, and deployer enum values defined in Go types but absent from the docs/API contract. Each drift followed the same pattern the new agent rule is designed to prevent.

Fixes: N/A (review-driven cleanup + three enum-drift fixes + preventative rule)
Related: #628 (Skyhook → Nodewright rename follow-up), #629 (platform + error-code enum drift follow-up)

Type of Change

  • Bug fix (non-breaking change that fixes an issue) — enum values missing from API contract and docs
  • Documentation update

Component(s) Affected

  • API server (cmd/aicrd, pkg/api, pkg/server) — OpenAPI contract (api/aicr/v1/server.yaml) enum values; package godoc comments in pkg/api/doc.go, pkg/server/doc.go
  • CLI (cmd/aicr, pkg/cli) — aicr recipe --help Description text in pkg/cli/recipe.go
  • Recipe engine / data (pkg/recipe) — field comments on Service and Accelerator struct fields, package godoc in pkg/recipe/doc.go
  • Docs/examples (docs/, site/docs/, agent instruction files .claude/CLAUDE.md + AGENTS.md)

Implementation Notes

Enum drifts closed

Accelerator — Go type pkg/recipe/criteria.go:87,95-106,114 defines CriteriaAcceleratorType with values {a100, b200, gb200, h100, l40, rtx-pro-6000}. b200 was supported since PR #455, rtx-pro-6000 has four real overlays under recipes/overlays/rtx-pro-6000-*.yaml. Both missing from the OpenAPI enum and most docs.

Service — Go type pkg/recipe/criteria.go:39-48 defines CriteriaServiceType with values {eks, gke, aks, oke, kind, lke}. kind and lke missing from OpenAPI enum and every documented service listing. Legacy self-managed (parsed as an alias for any at pkg/recipe/criteria.go:53-54, not a distinct enum value) was advertised as a valid standalone option in a few places; removed for consistency.

Deployerapi/aicr/v1/server.yaml:845 defines enum: [helm, argocd, argocd-helm]. argocd-helm missing from the user-facing flag and query-parameter tables despite being documented in detail later in the CLI reference.

All three are now updated wherever the enum is surfaced:

  • api/aicr/v1/server.yaml — 5 accelerator enum blocks + 3 service enum blocks
  • docs/README.md (glossary), docs/user/cli-reference.md, docs/user/api-reference.md
  • docs/contributor/api-server.md, docs/contributor/cli.md, docs/contributor/data.md, docs/contributor/validations.md
  • site/docs/getting-started/index.md (glossary mirror)
  • pkg/recipe/doc.go (package godoc including Criteria struct example + Criteria Types sections for Service, Accelerator, Intent, OS, Platform), pkg/recipe/criteria.go (Service and Accelerator field comments), pkg/api/doc.go, pkg/server/doc.go
  • pkg/cli/recipe.goaicr recipe --help Description string
  • .github/ISSUE_TEMPLATE/bug_report.yml — GPU-type hint + Platform/service hint

Other docs corrections

  • MDX-incompatible HTML entities (&lt;) → literal < in docs/integrator/data-flow.md (lines 855, 856, 861, 863, 870), docs/contributor/api-server.md:794, docs/contributor/cli.md:1075,1077.
  • Stale tool versions in docs/contributor/index.md:1114: Go setup (1.25), ..., golangci-lint (v2.6.2)Go setup (1.26), ..., golangci-lint (v2.10.1) to match .settings.yaml (Go 1.26.2, golangci-lint v2.10.1).
  • Broken shell example in docs/contributor/cli.md:1697,1700: GPU_TYPES=("h100" "gb200" "a100" "l40" "l4") and K8S_SERVICES=("eks" "gke" "aks" "self-managed") — neither l4 nor self-managed is in the respective enums, so copy-pasting the script failed or silently matched the wrong recipes. Normalized to the canonical enum sets.
  • Fictional invalid-accelerator error examples at docs/contributor/api-server.md:416 and docs/contributor/cli.md:1052 — previously advertised error text that the binary never produced. Replaced with literal output captured by running the binary today (aicr recipe --accelerator invalid-gpu and GET /v1/recipe?accelerator=invalid-gpu against HEAD), including the full wrapper chain that reflects the structured-error layering.
  • Ungrammatical prose in docs/integrator/components/skyhook.md — three sentences rewritten at lines 3, 68, and 74.

Agent audit rule (Claude Code + Codex)

Adds one bullet to the "Documentation updates" rule in .claude/CLAUDE.md (canonical for Claude Code) and AGENTS.md (auto-synced mirror used by Codex, enforced by tools/check-agents-sync). Two things it prescribes that the generic per-kind bullets don't:

  1. Start from the authoritative Go type, not from an already-documented sibling value. Grepping docs/ for gb200 when adding b200 catches forward additions, but rtx-pro-6000 had no documented sibling anywhere, so the sibling-grep heuristic missed it. Enumerate the Go type's current values and verify each appears wherever it should.
  2. Include a broader audit surface than docs/. The bullet now names: the OpenAPI contract at api/aicr/v1/server.yaml; user/contributor doc pages; the site-docs mirror under site/docs/; Go-visible surfaces in the package that defines the type (package godoc, field/type comments, urfave/cli Description/Usage strings); and .github/ISSUE_TEMPLATE/*.yml dropdowns.

Findings deferred (tracked separately)

Testing

Docs + OpenAPI + Go godoc comments + one CLI --help string. All Go changes are comments or user-facing string literals — no executable code paths affected.

./tools/check-agents-sync                                        # OK
yamllint -c .yamllint.yaml api/aicr/v1/server.yaml               # clean
yamllint -c .yamllint.yaml .github/ISSUE_TEMPLATE/bug_report.yml # clean
make check-docs-sidebar                                          # OK

# Go test (on touched packages)
go test -race ./pkg/recipe/... ./pkg/cli/... ./pkg/api/... ./pkg/server/...  # all pass
golangci-lint run ./pkg/recipe/... ./pkg/cli/... ./pkg/api/... ./pkg/server/...  # 0 issues

# Error-example verification (captured actual binary output used in the docs)
./aicr recipe --accelerator invalid-gpu
# → [cli] command failed: error=[INTERNAL] error building recipe: [INVALID_REQUEST] error parsing criteria: [INVALID_REQUEST] failed to apply criteria option: [INVALID_REQUEST] failed to parse accelerator type: [INVALID_REQUEST] invalid accelerator type: invalid-gpu exitCode=8
PORT=18080 ./aicrd &
curl "http://127.0.0.1:18080/v1/recipe?accelerator=invalid-gpu"
# → {"code":"INVALID_REQUEST","message":"Invalid recipe criteria","details":{"error":"[INVALID_REQUEST] invalid accelerator parameter: [INVALID_REQUEST] invalid accelerator type: invalid-gpu"},...}

Skipped: make test / make scan / make e2e on the full suite — no executable code paths touched; targeted package tests covered the affected code.

The CI lychee link-check workflow (.github/workflows/fern-docs-ci.yaml) will run on this PR.

Risk Assessment

  • Low — OpenAPI enum expansions are forward-compatible (existing clients keep working); doc/godoc updates are content-only; the one runtime-visible change (aicr recipe --help text) adds accelerator values to a hint string, which has no behavioral effect. Easy to revert.

Rollout notes: N/A — no behavior change, no migration required.

Checklist

  • Tests pass locally (make test with -race) — targeted on touched packages; all pass
  • Linter passes (make lint) — yamllint, golangci-lint, check-agents-sync, check-docs-sidebar all clean
  • I did not skip/disable tests to make CI green
  • I added/updated tests for new functionality — N/A (no executable code paths added)
  • I updated docs if user-facing behavior changed — the PR is the doc update
  • Changes follow existing patterns in the codebase
  • Commits are cryptographically signed (git commit -S)

@coderabbitai

coderabbitai Bot commented Apr 20, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This pull request updates documentation and the OpenAPI spec to add b200 and rtx-pro-6000 to accelerator/GPU enumerations across multiple docs, CLI examples, the API reference, and api/aicr/v1/server.yaml. It also adjusts a RecipeRequest.GPU validation example, replaces HTML-escaped < sequences with literal < in several docs, updates CI tooling versions (Go 1.25 → 1.26, golangci-lint v2.6.2 → v2.10.1), rephrases Skyhook integration wording, and adds guidance for documenting enum/constant additions in .claude/CLAUDE.md and AGENTS.md. No exported/public code entities were changed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is partially related to the changeset. It mentions 'fix' and 'docs/api' with a generic reference to 'clean up docs and add doc update audit rule', but does not clearly highlight the primary changes: adding missing accelerators (b200, rtx-pro-6000) to docs and OpenAPI spec, fixing HTML entities (<), and updating tool versions. Consider a more specific title such as 'fix(docs/api): add missing accelerators b200/rtx-pro-6000 and clean up documentation' to better reflect the main changes in the PR.
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description is directly related to the changeset, detailing documentation fixes, enum value synchronization across docs and API contract, and preventative agent rules.

✏️ 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/contributor/api-server.md`:
- Around line 312-313: The accelerator enum documentation (entries `accelerator`
and `gpu` referencing `AcceleratorType`) is missing implemented type
`rtx-pro-6000`; update every changed enumeration list and any example
validation/error strings to include `rtx-pro-6000` (in the same format as
`b200`), and ensure all occurrences mentioned in the comment (around the shown
diff plus the other doc locations referenced) reflect the full, current
AcceleratorType set so docs and examples match the parser/type list.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5ee99496-bd2e-4bcb-b673-f4c52e0866fb

📥 Commits

Reviewing files that changed from the base of the PR and between 17d42f9 and 7a02a19.

📒 Files selected for processing (10)
  • docs/README.md
  • docs/contributor/api-server.md
  • docs/contributor/cli.md
  • docs/contributor/data.md
  • docs/contributor/index.md
  • docs/contributor/validations.md
  • docs/integrator/components/skyhook.md
  • docs/integrator/data-flow.md
  • docs/user/api-reference.md
  • docs/user/cli-reference.md

Comment thread docs/contributor/api-server.md Outdated
Comment thread docs/integrator/components/skyhook.md
lockwobr
lockwobr previously approved these changes Apr 20, 2026

@lockwobr lockwobr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one nit, otherwise lgtm

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
docs/contributor/api-server.md (1)

312-313: ⚠️ Potential issue | 🟠 Major

Accelerator values are still inconsistent with implemented types across docs and examples.

These updated sections still omit rtx-pro-6000 (and the validator snippet is also missing any). Please align all four locations to the same implemented set.

Suggested patch
-| `accelerator` | AcceleratorType | Enum: h100, gb200, b200, a100, l40, any | `accelerator=h100` |
+| `accelerator` | AcceleratorType | Enum: h100, gb200, b200, a100, l40, rtx-pro-6000, any | `accelerator=h100` |

-- `accelerator` - GPU/accelerator type (h100, gb200, b200, a100, l40)
+- `accelerator` - GPU/accelerator type (h100, gb200, b200, a100, l40, rtx-pro-6000)

-  "message": "invalid gpu type: must be one of h100, gb200, b200, a100, l40, any",
+  "message": "invalid gpu type: must be one of h100, gb200, b200, a100, l40, rtx-pro-6000, any",

-    GPU      string `validate:"required,oneof=h100 gb200 b200 a100 l40"`
+    GPU      string `validate:"required,oneof=h100 gb200 b200 a100 l40 rtx-pro-6000 any"`

As per coding guidelines **/*.md: “Ensure accuracy, use neutral tone, clearly structure content, consider audience awareness, and document operational clarity.”

Also applies to: 334-335, 416-417, 2165-2166

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/contributor/api-server.md` around lines 312 - 313, Update the documented
AcceleratorType values used in the `accelerator` and `gpu` table rows and the
corresponding validator examples to match the actual implemented set: include
`rtx-pro-6000` in the enum/list and ensure `any` is present where the validator
accepts it; apply the same corrected list consistently to the other three
occurrences referenced (the other `accelerator`/`gpu` table entries and the
validator snippet) so all four locations use the identical, implemented set of
values.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/user/cli-reference.md`:
- Line 317: Update the accelerator enum list in the CLI docs table row that
shows the `--accelerator` / `--gpu` option to include the missing value
`rtx-pro-6000` so the documented accepted set matches the criteria parsing
implementation; locate the table cell with the `--accelerator` / `--gpu` entry
and append `, rtx-pro-6000` (or reorder alphabetically with the other values
h100, gb200, b200, a100, l40) to keep the docs and code in sync.

---

Duplicate comments:
In `@docs/contributor/api-server.md`:
- Around line 312-313: Update the documented AcceleratorType values used in the
`accelerator` and `gpu` table rows and the corresponding validator examples to
match the actual implemented set: include `rtx-pro-6000` in the enum/list and
ensure `any` is present where the validator accepts it; apply the same corrected
list consistently to the other three occurrences referenced (the other
`accelerator`/`gpu` table entries and the validator snippet) so all four
locations use the identical, implemented set of values.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: be8a9555-1553-4668-80de-337fa9e58894

📥 Commits

Reviewing files that changed from the base of the PR and between 7a02a19 and c331f47.

📒 Files selected for processing (10)
  • docs/README.md
  • docs/contributor/api-server.md
  • docs/contributor/cli.md
  • docs/contributor/data.md
  • docs/contributor/index.md
  • docs/contributor/validations.md
  • docs/integrator/components/skyhook.md
  • docs/integrator/data-flow.md
  • docs/user/api-reference.md
  • docs/user/cli-reference.md

Comment thread docs/user/cli-reference.md Outdated
@coderabbitai

coderabbitai Bot commented Apr 20, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

@yuanchen8911: The four addressed fixes look clean — the HTML-entity sweep and the GPU_TYPES array correction (dropping l4, adding b200) are the right calls.

Both deferrals are well-reasoned:

  • rtx-pro-6000: Agree completely. Patching the docs while api/aicr/v1/server.yaml still omits it would just move the inconsistency. A single PR that updates the OpenAPI enum blocks and the downstream docs simultaneously is the correct fix.
  • "Skyhook-customizations" rename: The blast radius (component directory, registry entry, recipe references, bundler handling) is clearly out of scope for a docs-review PR. A dedicated rename PR with proper cross-cutting changes is the right vehicle.

Neither should come into this PR.

Would you like me to open GitHub issues for both follow-up items so they don't get lost? I can file them now and link back to this PR for context.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
docs/contributor/api-server.md (1)

312-312: ⚠️ Potential issue | 🟠 Major

Align all accelerator enums/examples with the implemented accepted set.

These updated lists are still inconsistent with implementation: rtx-pro-6000 is missing, and Line 334 also omits any. Please update all four locations so query-parameter docs, error examples, and validator snippets match the same canonical set.

As per coding guidelines **/*.md: “Ensure accuracy, use neutral tone, clearly structure content, consider audience awareness, and document operational clarity.”

Also applies to: 334-335, 416-417, 2165-2165

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/contributor/api-server.md` at line 312, The accelerator enum/examples in
the docs are inconsistent with the implemented AcceleratorType; update all
occurrences that document the `accelerator` query parameter, error examples, and
validator snippets so they use the same canonical set (including adding
`rtx-pro-6000` and ensuring `any` appears where omitted). Locate the
`accelerator` field/AcceleratorType mentions in the four affected sections
(around the table entry with `accelerator | AcceleratorType`, the error example
block, and the validator snippet) and replace the listed values so every place
lists the full canonical enum set: h100, gb200, b200, a100, l40, rtx-pro-6000,
any. Ensure wording and examples remain neutral and consistent with surrounding
docs.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@docs/contributor/api-server.md`:
- Line 312: The accelerator enum/examples in the docs are inconsistent with the
implemented AcceleratorType; update all occurrences that document the
`accelerator` query parameter, error examples, and validator snippets so they
use the same canonical set (including adding `rtx-pro-6000` and ensuring `any`
appears where omitted). Locate the `accelerator` field/AcceleratorType mentions
in the four affected sections (around the table entry with `accelerator |
AcceleratorType`, the error example block, and the validator snippet) and
replace the listed values so every place lists the full canonical enum set:
h100, gb200, b200, a100, l40, rtx-pro-6000, any. Ensure wording and examples
remain neutral and consistent with surrounding docs.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4b22981e-16c3-4b54-995f-db0605b828fe

📥 Commits

Reviewing files that changed from the base of the PR and between c331f47 and 62fdf4e.

📒 Files selected for processing (10)
  • docs/README.md
  • docs/contributor/api-server.md
  • docs/contributor/cli.md
  • docs/contributor/data.md
  • docs/contributor/index.md
  • docs/contributor/validations.md
  • docs/integrator/components/skyhook.md
  • docs/integrator/data-flow.md
  • docs/user/api-reference.md
  • docs/user/cli-reference.md

@yuanchen8911 yuanchen8911 force-pushed the fix-docs-review-findings branch from 62fdf4e to 89035d0 Compare April 20, 2026 23:53
yuanchen8911 added a commit to yuanchen8911/aicr that referenced this pull request Apr 20, 2026
Enum values (accelerator, service, OS, intent, platform, error code) are
enumerated across many files, so "update the doc for this kind of change"
doesn't translate to a single file. Extend the Documentation updates
lookup table with a dedicated entry for this case.

Two things it prescribes that the generic per-kind bullets don't:

1. Start from the authoritative Go type, not from a known-good sibling
   value. Grepping `docs/` for a sibling (e.g., `gb200` when adding
   `b200`) works for forward additions but misses pre-existing drift —
   rtx-pro-6000 was supported in code and overlays for months without
   appearing in any enum documentation, and a sibling-grep wouldn't
   have surfaced it. Enumerate every current value of the Go type and
   verify each.

2. Include the OpenAPI contract at api/aicr/v1/server.yaml. It's the
   API contract file, not part of docs/, but it mirrors the same enum
   and drifts the same way — PR NVIDIA#625 found it missing both b200 and
   rtx-pro-6000 from every enum block.

Motivated by PR NVIDIA#625, which first missed B200 in nine places and later
missed rtx-pro-6000 in the same places despite adding the rule — the
sibling-grep heuristic was the gap.
@yuanchen8911 yuanchen8911 changed the title fix(docs): address findings from full docs review fix(docs/api): add missing accelerators (b200, rtx-pro-6000) and docs-review fixes Apr 20, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/contributor/api-server.md`:
- Line 334: The accelerator enum examples are inconsistent: the documented valid
value "any" appears in one place but is missing from other enumerations of the
accelerator field; update every occurrence where accelerator values are listed
(the sections that enumerate accelerator values for the accelerator field) to
include "any" alongside the other values (h100, gb200, b200, a100, l40,
rtx-pro-6000) so all examples and the accelerator documentation are consistent
and aligned with the earlier statement that "any" is valid.

In `@docs/contributor/data.md`:
- Line 140: The documented example values for the accelerator field include a
deferred value that no longer matches the API enum; update the table entry for
`accelerator` in docs/contributor/data.md to remove `rtx-pro-6000` and list only
the current API-supported enum values (`h100`, `gb200`, `b200`, `a100`, `l40`)
so the docs remain an accurate source-of-truth for contributors.

In `@docs/contributor/validations.md`:
- Line 97: The docs entry for the "accelerator" condition incorrectly lists an
unsupported value; remove "rtx-pro-6000" from the `accelerator` enum list so the
documented values match the codebase's accepted enums (e.g., h100, gb200, b200,
a100, l40) and do not introduce features not implemented; update the single-line
list under the `accelerator` heading accordingly and verify it matches the
project's actual enum definition for accelerators.

In `@docs/README.md`:
- Line 11: Update the accelerator allowlist in the README table by removing the
deferred value `rtx-pro-6000` from the backticked list inside the **Criteria**
cell (the string "`h100/gb200/b200/a100/l40/rtx-pro-6000`"); keep remaining
values and punctuation/formatting unchanged so the documented accelerators match
the current OpenAPI enum.

In `@docs/user/api-reference.md`:
- Line 120: The docs incorrectly list the unsupported GPU type `rtx-pro-6000` in
the API valid-values for the `accelerator` field; remove `rtx-pro-6000` from the
comma-separated valid-value lists where `accelerator` is documented (the table
row containing `accelerator` and the other occurrence at the second location) so
the list becomes `h100`, `gb200`, `b200`, `a100`, `l40`, `any` to match the
current spec.

In `@docs/user/cli-reference.md`:
- Line 317: The CLI reference row for the `--accelerator`/`--gpu` flag currently
lists a deferred value `rtx-pro-6000`; remove `rtx-pro-6000` from the string of
supported values so the table only shows currently implemented options (e.g.,
keep h100, gb200, b200, a100, l40) in the `--accelerator` / `--gpu` table entry
to avoid documenting unimplemented features.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: b781f696-c767-40d3-aae3-f8f3fdfc571d

📥 Commits

Reviewing files that changed from the base of the PR and between 62fdf4e and 89035d0.

📒 Files selected for processing (11)
  • api/aicr/v1/server.yaml
  • docs/README.md
  • docs/contributor/api-server.md
  • docs/contributor/cli.md
  • docs/contributor/data.md
  • docs/contributor/index.md
  • docs/contributor/validations.md
  • docs/integrator/components/skyhook.md
  • docs/integrator/data-flow.md
  • docs/user/api-reference.md
  • docs/user/cli-reference.md

Comment thread docs/contributor/api-server.md
Comment thread docs/contributor/data.md
Comment thread docs/contributor/validations.md
Comment thread docs/README.md Outdated
Comment thread docs/user/api-reference.md
Comment thread docs/user/cli-reference.md
@yuanchen8911 yuanchen8911 force-pushed the fix-docs-review-findings branch from 89035d0 to 25f79fd Compare April 20, 2026 23:57
@yuanchen8911 yuanchen8911 changed the title fix(docs/api): add missing accelerators (b200, rtx-pro-6000) and docs-review fixes fix(docs/api): add missing accelerators, docs-review fixes, and enum-update rule Apr 20, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (6)
docs/contributor/validations.md (1)

97-97: ⚠️ Potential issue | 🟠 Major

Do not list deferred accelerator values in validation condition docs.

Line 97 should remain aligned to currently supported enums; rtx-pro-6000 should be added only when the corresponding spec/implementation update ships.

As per coding guidelines **/*.md: “Ensure accuracy… Documentation must not invent features, guarantees, timelines, or roadmap commitments.”

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/contributor/validations.md` at line 97, The docs entry listing allowed
values for the "accelerator" validation incorrectly includes a deferred value;
remove "rtx-pro-6000" from the `accelerator` enum list in
docs/contributor/validations.md so the documented values match the currently
supported enums (keep only h100, gb200, b200, a100, l40), and do not add any
mention of the deferred accelerator until the corresponding spec/implementation
change is merged.
docs/contributor/data.md (1)

140-140: ⚠️ Potential issue | 🟠 Major

Keep accelerator example values spec-accurate (exclude deferred rtx-pro-6000).

Line 140 should list only currently accepted accelerator enums to avoid contributor-facing source-of-truth drift.

As per coding guidelines **/*.md: “Ensure accuracy… Documentation must not invent features, guarantees, timelines, or roadmap commitments.”

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/contributor/data.md` at line 140, The `accelerator` example values list
includes a deferred value; update the documentation entry for the `accelerator`
field to list only the currently accepted enum values (e.g., remove
`rtx-pro-6000`) so the example matches the spec; locate the `accelerator` row in
docs/contributor/data.md and edit the pipe-separated example values accordingly.
docs/user/cli-reference.md (1)

317-317: ⚠️ Potential issue | 🟠 Major

Remove deferred rtx-pro-6000 from Query Mode accelerator docs.

Line 317 should document only currently implemented accelerator values to prevent CLI-doc drift.

As per coding guidelines **/*.md: “Ensure accuracy… Documentation must not invent features, guarantees, timelines, or roadmap commitments.”

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/user/cli-reference.md` at line 317, Update the Query Mode accelerator
docs to remove the not-yet-implemented "rtx-pro-6000" entry from the
`--accelerator` / `--gpu` allowed values list so it only documents currently
supported accelerator types (h100, gb200, b200, a100, l40); edit the table row
that contains `--accelerator` / `--gpu` to delete "rtx-pro-6000" and ensure the
remaining values are comma-separated and accurate.
docs/README.md (1)

11-11: ⚠️ Potential issue | 🟠 Major

Remove deferred rtx-pro-6000 from the documented accelerator list.

Line 11 currently documents a value that was deferred, which reintroduces docs/spec drift. Keep this list to currently accepted values only (including b200, excluding rtx-pro-6000 until the combined spec+docs PR lands).

As per coding guidelines **/*.md: “Ensure accuracy… Documentation must not invent features, guarantees, timelines, or roadmap commitments.”

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/README.md` at line 11, The documented accelerator list includes a
deferred value `rtx-pro-6000`; update the README's accelerator enumeration (the
text containing `accelerator` and values like `b200`) to remove `rtx-pro-6000`
so only currently accepted accelerators remain (e.g., `b200`, `h100`, `gb200`,
`a100`, `l40`) and ensure the list formatting/backticks stay consistent with the
surrounding sentence.
docs/user/api-reference.md (1)

120-120: ⚠️ Potential issue | 🟠 Major

Revert deferred rtx-pro-6000 from API valid-value documentation.

Line 120 and Line 817 should only list currently accepted accelerator values. Keeping rtx-pro-6000 here documents behavior that is intentionally deferred.

As per coding guidelines **/*.md: “Ensure accuracy… Documentation must not invent features, guarantees, timelines, or roadmap commitments.”

Also applies to: 817-817

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/user/api-reference.md` at line 120, The docs list a deferred accelerator
value (`rtx-pro-6000`) in the `accelerator` API valid-values table; remove the
`rtx-pro-6000` token wherever it appears in the `accelerator` row(s) in
docs/user/api-reference.md (both occurrences) so the table only lists currently
accepted values (e.g., keep `h100`, `gb200`, `b200`, `a100`, `l40`,
`rtx-pro-6000` removed, `any`), and ensure punctuation/backticks and spacing are
adjusted so the table row remains syntactically valid Markdown after removal.
docs/contributor/api-server.md (1)

334-335: ⚠️ Potential issue | 🟡 Minor

Keep any consistent in accelerator enumerations.

any is documented as valid in the parameter table, but it is still missing in the GET bullets and validator snippet. This leaves conflicting guidance on the same page.

As per coding guidelines **/*.md: “Ensure accuracy, use neutral tone, clearly structure content, consider audience awareness, and document operational clarity.”

Also applies to: 2165-2166

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/contributor/api-server.md` around lines 334 - 335, The documentation
lists `accelerator` and its alias `gpu` but omits the `any` option in the GET
bullets and validator snippet, creating inconsistent guidance; update the GET
parameter bullets and the validator example that reference `accelerator`/`gpu`
to include `any` as an allowed value and ensure the same `any` mention is added
wherever `accelerator`/`gpu` enumerations appear (including the other duplicated
occurrence), so all examples and validation snippets consistently document `any`
as valid.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@docs/contributor/api-server.md`:
- Around line 334-335: The documentation lists `accelerator` and its alias `gpu`
but omits the `any` option in the GET bullets and validator snippet, creating
inconsistent guidance; update the GET parameter bullets and the validator
example that reference `accelerator`/`gpu` to include `any` as an allowed value
and ensure the same `any` mention is added wherever `accelerator`/`gpu`
enumerations appear (including the other duplicated occurrence), so all examples
and validation snippets consistently document `any` as valid.

In `@docs/contributor/data.md`:
- Line 140: The `accelerator` example values list includes a deferred value;
update the documentation entry for the `accelerator` field to list only the
currently accepted enum values (e.g., remove `rtx-pro-6000`) so the example
matches the spec; locate the `accelerator` row in docs/contributor/data.md and
edit the pipe-separated example values accordingly.

In `@docs/contributor/validations.md`:
- Line 97: The docs entry listing allowed values for the "accelerator"
validation incorrectly includes a deferred value; remove "rtx-pro-6000" from the
`accelerator` enum list in docs/contributor/validations.md so the documented
values match the currently supported enums (keep only h100, gb200, b200, a100,
l40), and do not add any mention of the deferred accelerator until the
corresponding spec/implementation change is merged.

In `@docs/README.md`:
- Line 11: The documented accelerator list includes a deferred value
`rtx-pro-6000`; update the README's accelerator enumeration (the text containing
`accelerator` and values like `b200`) to remove `rtx-pro-6000` so only currently
accepted accelerators remain (e.g., `b200`, `h100`, `gb200`, `a100`, `l40`) and
ensure the list formatting/backticks stay consistent with the surrounding
sentence.

In `@docs/user/api-reference.md`:
- Line 120: The docs list a deferred accelerator value (`rtx-pro-6000`) in the
`accelerator` API valid-values table; remove the `rtx-pro-6000` token wherever
it appears in the `accelerator` row(s) in docs/user/api-reference.md (both
occurrences) so the table only lists currently accepted values (e.g., keep
`h100`, `gb200`, `b200`, `a100`, `l40`, `rtx-pro-6000` removed, `any`), and
ensure punctuation/backticks and spacing are adjusted so the table row remains
syntactically valid Markdown after removal.

In `@docs/user/cli-reference.md`:
- Line 317: Update the Query Mode accelerator docs to remove the
not-yet-implemented "rtx-pro-6000" entry from the `--accelerator` / `--gpu`
allowed values list so it only documents currently supported accelerator types
(h100, gb200, b200, a100, l40); edit the table row that contains `--accelerator`
/ `--gpu` to delete "rtx-pro-6000" and ensure the remaining values are
comma-separated and accurate.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5902442f-387e-4ab9-9ca7-00b6d6c0b630

📥 Commits

Reviewing files that changed from the base of the PR and between 89035d0 and 25f79fd.

📒 Files selected for processing (13)
  • .claude/CLAUDE.md
  • AGENTS.md
  • api/aicr/v1/server.yaml
  • docs/README.md
  • docs/contributor/api-server.md
  • docs/contributor/cli.md
  • docs/contributor/data.md
  • docs/contributor/index.md
  • docs/contributor/validations.md
  • docs/integrator/components/skyhook.md
  • docs/integrator/data-flow.md
  • docs/user/api-reference.md
  • docs/user/cli-reference.md

@yuanchen8911 yuanchen8911 requested a review from a team as a code owner April 21, 2026 00:30
@yuanchen8911 yuanchen8911 force-pushed the fix-docs-review-findings branch from de1541b to 8be2f97 Compare April 21, 2026 00:46
@yuanchen8911 yuanchen8911 changed the title fix(docs/api): add missing accelerators, docs-review fixes, and enum-update rule fix(docs/api): accelerator/service/deployer enum alignment + docs-review fixes + audit rule Apr 21, 2026
@yuanchen8911 yuanchen8911 changed the title fix(docs/api): accelerator/service/deployer enum alignment + docs-review fixes + audit rule fix(docs/api): fix, clean up docs and add doc update audit rule Apr 21, 2026
@yuanchen8911 yuanchen8911 force-pushed the fix-docs-review-findings branch from 8be2f97 to f48aecc Compare April 21, 2026 01:06
@yuanchen8911

Copy link
Copy Markdown
Contributor Author

@coderabbitai Please re-review the four open threads about rtx-pro-6000 against the current commit (f48aecca). Those comments were written when rtx-pro-6000 was in the docs but not in api/aicr/v1/server.yaml. The current commit adds it to all 5 enum: blocks in server.yaml alongside the doc pages, so the Go type, the OpenAPI contract, and the docs are now all in sync on {h100, gb200, b200, a100, l40, rtx-pro-6000, any}. The "remove rtx-pro-6000 from docs until OpenAPI ships" concern should be resolved.

@coderabbitai

coderabbitai Bot commented Apr 21, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check the current state of rtx-pro-6000 in server.yaml
echo "=== server.yaml enum blocks containing accelerator values ==="
grep -n "rtx-pro-6000\|b200\|gb200\|h100\|a100\|l40\|any" api/aicr/v1/server.yaml | grep -A0 "enum\|rtx\|b200" | head -60

echo ""
echo "=== Full enum blocks in server.yaml ==="
grep -n -A10 "enum:" api/aicr/v1/server.yaml | grep -E "enum:|h100|gb200|b200|a100|l40|rtx-pro-6000|any" | head -80

echo ""
echo "=== Authoritative Go type ==="
grep -n "rtx-pro-6000\|b200\|gb200\|h100\|a100\|l40\|any\|CriteriaAccelerator" pkg/recipe/criteria.go | head -40

echo ""
echo "=== Count of enum blocks in server.yaml ==="
grep -c "enum:" api/aicr/v1/server.yaml

echo ""
echo "=== All lines with rtx-pro-6000 in server.yaml ==="
grep -n "rtx-pro-6000" api/aicr/v1/server.yaml

echo ""
echo "=== All lines with rtx-pro-6000 in docs/ ==="
grep -rn "rtx-pro-6000" docs/

Length of output: 8532


@yuanchen8911 Verified against the current branch. The four rtx-pro-6000 threads are fully resolved:

api/aicr/v1/server.yaml — all 5 accelerator enum blocks now include rtx-pro-6000:

Line Location
123 GET /v1/recipeaccelerator query param
131 GET /v1/recipegpu alias param
490 GET /v1/queryaccelerator query param
498 GET /v1/querygpu alias param
1229 components.schemas.Criteria.accelerator

pkg/recipe/criteria.go canonical set: {a100, b200, gb200, h100, l40, rtx-pro-6000} + any — matches every enum block exactly.

Docs pages updated: docs/README.md, docs/contributor/api-server.md, docs/contributor/cli.md, docs/contributor/data.md, docs/contributor/validations.md, docs/user/api-reference.md, docs/user/cli-reference.md — all consistent.

The Go type, OpenAPI contract, and all documentation are now fully in sync on {h100, gb200, b200, a100, l40, rtx-pro-6000, any}. I'll resolve those four threads now.

[resolve]

@yuanchen8911 yuanchen8911 enabled auto-merge (squash) April 21, 2026 02:18
lockwobr
lockwobr previously approved these changes Apr 21, 2026

@lockwobr lockwobr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Apply the corrections identified in a cross-docs review. Three enum
drifts between the Go source types and the documented/advertised values
are closed here:

  - **Accelerator**: B200 (supported since PR NVIDIA#455) and RTX PRO 6000
    (supported as CriteriaAcceleratorRTXPro6000 with real overlays
    under recipes/overlays/rtx-pro-6000-*.yaml) were missing from the
    OpenAPI contract and most documentation.
  - **Service**: `kind` and `lke` were defined in CriteriaServiceType
    (pkg/recipe/criteria.go) but missing from the OpenAPI `service`
    enum and every documented service listing.
  - **Deployer**: `argocd-helm` was defined in the OpenAPI deployer
    enum (api/aicr/v1/server.yaml:845) but not documented in the user
    API reference or CLI flag table.

Both enums are now updated in every place they're surfaced:

  - api/aicr/v1/server.yaml — five accelerator enum blocks and three
    service enum blocks;
  - user docs (docs/README.md glossary, user cli-reference and
    api-reference) and contributor docs (api-server, cli, data,
    validations);
  - the site-docs glossary mirror (site/docs/getting-started/index.md);
  - Go-visible surfaces in the defining package: godoc in
    pkg/recipe/doc.go, field comment in pkg/recipe/criteria.go,
    package godoc in pkg/api/doc.go and pkg/server/doc.go, and the
    `aicr recipe` --help Description in pkg/cli/recipe.go;
  - .github/ISSUE_TEMPLATE/bug_report.yml GPU-type hint.

While normalizing service listings, legacy `self-managed` references
were removed from the two package godocs (pkg/api/doc.go,
pkg/server/doc.go) and the contributor `validate` struct-tag example —
`self-managed` is parsed as an alias for `any`, not a distinct enum
value, so advertising it as a valid standalone option was misleading.

Other docs corrections in scope: replace HTML entities (&lt;) with
literal < in the Performance Characteristics bullets across
docs/integrator/data-flow.md, docs/contributor/api-server.md and
docs/contributor/cli.md so they render correctly in MDX; refresh the
CI pipeline description in docs/contributor/index.md to the current
tool versions (Go 1.26, golangci-lint v2.10.1) per .settings.yaml;
fix the GPU_TYPES shell array in docs/contributor/cli.md to add b200
and rtx-pro-6000 and drop the unsupported l4 so copy-pasted examples
don't fail at runtime; replace two fictional invalid-accelerator
error examples with the literal output produced by the binary today
(captured by running `aicr recipe --accelerator invalid-gpu` and
`GET /v1/recipe?accelerator=invalid-gpu` against HEAD); and rewrite
three ungrammatical sentences in the Skyhook integrator page.

Add a dedicated bullet to the "Documentation updates" rule in
.claude/CLAUDE.md and AGENTS.md for enum/constant additions, so this
class of drift is less likely to recur. The bullet names a broader
audit surface than any single review pass: OpenAPI contract, user/
contributor docs, the site-docs mirror, package godoc and urfave/cli
Description strings in the defining package, and
.github/ISSUE_TEMPLATE/*.yml dropdowns. It also prescribes starting
from the authoritative Go type rather than a known-good sibling value
— grepping for gb200 catches forward b200 additions but misses
pre-existing drift like rtx-pro-6000, which had no sibling documented
anywhere.
@yuanchen8911 yuanchen8911 merged commit 00a2dbc into NVIDIA:main Apr 21, 2026
33 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.

3 participants