Skip to content

feat(ci): add weekly recipe-health-refresh workflow#1320

Merged
njhensley merged 7 commits into
NVIDIA:mainfrom
njhensley:ci/recipe-health-refresh
Jun 12, 2026
Merged

feat(ci): add weekly recipe-health-refresh workflow#1320
njhensley merged 7 commits into
NVIDIA:mainfrom
njhensley:ci/recipe-health-refresh

Conversation

@njhensley

Copy link
Copy Markdown
Member

Summary

Add .github/workflows/recipe-health-refresh.yaml, a weekly drift-only bot PR that keeps docs/user/recipe-health.md current, plus the tools/health support needed to surface per-dimension detail in the run's step summary.

Motivation / Context

ADR-009 §5 calls for the public recipe-health matrix to stay current via a weekly, drift-only bot PR — a structural clone of the proven bom-refresh.yaml loop. V1 health changes only on code/registry/chart merges, so a weekly cadence (not daily) is correct, and the job is offset from bom-refresh so the two Monday bot PRs don't contend for runners or /ok re-fire.

Fixes: #1230
Related: #1224 (epic), #1229 (the recipe-health-docs target + committed matrix)

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/server)
  • Recipe engine / data (pkg/recipe)
  • 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: .github/workflows/, tools/health, Makefile

Implementation Notes

Structurally mirrors bom-refresh.yaml (same pinned action SHAs, global contents: read with the job escalating to contents: write + pull-requests: write, peter-evans/create-pull-request on the built-in GITHUB_TOKEN, branch chore/health-refresh, delete-branch: true, labels documentation / area/docs / area/recipes), with one deliberate divergence: no Helm setup — the health generator is render-free, so the refresh is hermetic and network-free.

Per ADR-009 §5 the step summary is the only home for the structural per-dimension states (resolves / chart_pinned / constraints_wellformed), which the committed matrix omits. To surface them, tools/health gains a -summary-out flag and a renderDetail pass (per-dimension tally + per-recipe table), wired through a new make recipe-health-summary target that the workflow points at $GITHUB_STEP_SUMMARY. The detail is appended (not truncated) per the $GITHUB_STEP_SUMMARY contract, and renders in a fixed dimension order so it stays byte-stable. Matrix rendering is unchanged — verified the matrix functions are untouched and the change to markdown.go is purely additive.

Testing

go test ./tools/health/...                  # ok
golangci-lint v2.12.2 -c .golangci.yaml run ./tools/health/...   # 0 issues
go vet ./tools/health/...                   # clean
yamllint -c .yamllint.yaml .github/workflows/recipe-health-refresh.yaml   # clean
actionlint .github/workflows/recipe-health-refresh.yaml          # clean
make recipe-health-summary                  # renders detail: 32 recipes, all pass
  • tools/health coverage 81.1%; new functions 87–100%. No new exported symbols.
  • -race was not run locally (no cgo/gcc in this environment) — CI's race job covers it.

Risk Assessment

  • Low — Isolated change, well-tested, easy to revert
  • Medium — Touches multiple components or has broader impact
  • High — Breaking change, affects critical paths, or complex rollout

Rollout notes: New scheduled workflow; first run can be triggered manually via workflow_dispatch. No migration. Fully revertable by deleting the workflow file. Note: the matrix it refreshes is published by #1229 (open) — until that lands, the first run's PR will include the initial matrix body rather than an incremental drift.

Checklist

  • Tests pass locally (make test with -race)
  • Linter passes (make lint)
  • I did not skip/disable tests to make CI green
  • I added/updated tests for new functionality
  • I updated docs if user-facing behavior changed
  • Changes follow existing patterns in the codebase
  • Commits are cryptographically signed (git commit -S)

Clone bom-refresh.yaml to keep docs/user/recipe-health.md current via a
weekly, drift-only bot PR (ADR-009 §5, closes NVIDIA#1230). Mondays 06:30 UTC
(offset from bom-refresh's 06:00 so the two bot PRs don't contend for
runners or /ok re-fire) plus workflow_dispatch; global contents:read
with
the job escalating to contents:write + pull-requests:write; peter-evans
create-pull-request onto chore/health-refresh, labeled documentation /
area/docs / area/recipes, on the built-in GITHUB_TOKEN.

The one deliberate divergence from bom-refresh: no Helm setup — the
health
generator is render-free, so the refresh is hermetic and network-free.

Per ADR-009 §5 the step summary is the only home for the structural
per-dimension states (resolves / chart_pinned / constraints_wellformed),
which the committed matrix omits. To surface them, tools/health gains a
-summary-out flag and a renderDetail pass (per-dimension tally +
per-recipe
table), wired through a new `make recipe-health-summary` target the
workflow points at $GITHUB_STEP_SUMMARY. Matrix rendering is unchanged.
@njhensley njhensley requested review from a team as code owners June 11, 2026 19:04
@njhensley njhensley added the theme/ci-dx CI pipelines, developer experience, and build tooling label Jun 11, 2026
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

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 PR adds a weekly GitHub Actions workflow (cron + dispatch) that regenerates docs/user/recipe-health.md, writes per-dimension structural detail to the GitHub step summary, and opens/updates a drift-only PR on branch chore/health-refresh. It adds a Makefile target and a -summary-out flag in tools/health to append a deterministic "Structural detail" Markdown section (per-dimension tallies and per-recipe dimension-state matrix) with safe table-cell escaping. Tests validate rendering content, determinism, note normalization, "not scored" handling, and summary append behavior.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

Possibly related PRs

  • NVIDIA/aicr#1304: Modifies the same tools/health generator; this PR adds -summary-out and structural detail rendering used by the new workflow.
  • NVIDIA/aicr#1301: Related changes to health dimension computation that the rendering relies on.

Suggested labels

size/L, area/recipes

Suggested reviewers

  • mchmarny
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat(ci): add weekly recipe-health-refresh workflow' directly matches the main change: adding a new GitHub Actions workflow file for weekly recipe health refresh.
Description check ✅ Passed The description comprehensively covers the changeset: the new workflow, tools/health enhancements, Makefile changes, test coverage, and design rationale aligned with ADR-009. All changes are addressed.
Linked Issues check ✅ Passed The PR implements all coding requirements from #1230: weekly cron with offset, permission escalation, Helm omission, make recipe-health-docs invocation, peter-evans/create-pull-request setup, chore/health-refresh branch, labels, and step-summary detail via -summary-out flag.
Out of Scope Changes check ✅ Passed All changes are directly scoped to #1230 requirements: the workflow file, tools/health -summary-out support, Makefile recipe-health-summary target, ADR-009 documentation reference update, and test coverage. No out-of-scope modifications detected.

✏️ 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: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/recipe-health-refresh.yaml:
- Around line 47-49: Add a brief inline comment above the permissions block
explaining why elevated job-level permissions are required: state that contents:
write and pull-requests: write are needed so the workflow can create and update
the "drift-only" pull request (or create/update repository contents) as part of
the recipe-health refresh job; reference the permissions block and the specific
keys contents: write and pull-requests: write so reviewers can see the
justification at a glance.
- Around line 32-37: Add a top-level GitHub Actions concurrency block to this
workflow to prevent overlapping runs that update the same branch; add a
concurrency key (e.g., concurrency: { group:
"recipe-health-refresh-chore/health-refresh", cancel-in-progress: true }) at the
workflow root so scheduled and manual (workflow_dispatch) runs are serialized
and in-progress runs are cancelled when a new run starts — update the YAML
around the existing on: (schedule / workflow_dispatch) stanza to include this
concurrency configuration referencing the fixed branch name
`chore/health-refresh`.
🪄 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: Enterprise

Run ID: a0ad2eca-c6a5-4745-ab73-7fd4e3b85aa5

📥 Commits

Reviewing files that changed from the base of the PR and between 8d17940 and 546dff0.

📒 Files selected for processing (6)
  • .github/workflows/recipe-health-refresh.yaml
  • Makefile
  • docs/design/009-recipe-health-tracking.md
  • tools/health/main.go
  • tools/health/main_test.go
  • tools/health/markdown.go

Comment thread .github/workflows/recipe-health-refresh.yaml
Comment thread .github/workflows/recipe-health-refresh.yaml
@github-actions github-actions Bot added size/XL and removed size/L labels Jun 11, 2026
dims
dims previously approved these changes Jun 11, 2026

@mchmarny mchmarny left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Clean structural clone of bom-refresh.yaml for the weekly recipe-health matrix refresh; the writeRendered extraction is a nice tidy-up and the detailNotes table-injection hardening is well-tested. One medium worth addressing before merge: the bot is told to apply a documentation label, which isn't a real repo label (only area/*/theme/* exist — see #1315). It's inherited from bom-refresh.yaml, so not introduced here, but this PR also edits the ADR line that documents it. Plus one optional nit. Nothing blocks merge.

Comment thread .github/workflows/recipe-health-refresh.yaml Outdated
Comment thread .github/workflows/recipe-health-refresh.yaml
@njhensley njhensley enabled auto-merge (squash) June 11, 2026 23:32
@njhensley njhensley merged commit cd30fe5 into NVIDIA:main Jun 12, 2026
32 checks passed
@njhensley njhensley deleted the ci/recipe-health-refresh branch June 23, 2026 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci area/docs size/XL theme/ci-dx CI pipelines, developer experience, and build tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: weekly health-refresh bot PR for the recipe-health matrix

4 participants