Skip to content

docs(bom): wrap auto-generated image inventory with hand-written prose#773

Merged
mchmarny merged 4 commits into
mainfrom
feat/bom-docs-prose
May 6, 2026
Merged

docs(bom): wrap auto-generated image inventory with hand-written prose#773
mchmarny merged 4 commits into
mainfrom
feat/bom-docs-prose

Conversation

@mchmarny

@mchmarny mchmarny commented May 6, 2026

Copy link
Copy Markdown
Member

Summary

Closes the second half of #741 (1b — content/prose). The first half landed via #763 (tooling, deterministic output, scheduled refresh); this PR adds the explanation around the auto-generated table that customers need to interpret it.

Refs #739, #741. Filed alongside as a follow-up: #765 (gpu-operator BOM extracts a bare vgpu-manager ref — surfaced by publishing the doc, scoped out of this PR).

Type of Change

  • Documentation update

Component(s) Affected

  • Docs (docs/user/container-images.md)
  • Build/tooling (Makefilebom-docs splice logic)
  • Core libraries (pkg/bomNoTitle flag)

Implementation Notes

Doc structure. docs/user/container-images.md is now wrapped:

[hand-written intro: page purpose, refresh cadence, JSON companion]

<!-- BEGIN AICR-BOM -->
[auto-generated body: summary, components table, per-component image lists]
<!-- END AICR-BOM -->

[hand-written outro: explicit-vs-implicit, registry rationale,
 reproducibility caveat, regeneration instructions, related links]

make bom-docs splices instead of overwriting. The target now:

  1. Requires the doc and its markers to exist (errors clearly otherwise).
  2. Runs the BOM tool with -no-title to a temp dir.
  3. Uses awk to replace content between <!-- BEGIN AICR-BOM --> and <!-- END AICR-BOM --> with the fresh body, preserving everything outside.

Verified idempotent: two consecutive make bom-docs runs produce identical md5.

pkg/bom API addition. Metadata.NoTitle bool opt-in flag (off by default) that suppresses the H1 line so the body can be embedded as a section of a larger document. The same pattern will be useful for the planned per-bundle SBOM in pkg/bundler (#750).

Numbering note. I'd drifted from the actual issue numbering in earlier work; cross-references in this PR's commit message, the doc itself, and the freshly-corrected #739 epic body now consistently use:

# Title
739 Supply chain epic
740 Pinning policy decision
741 Document image inventory (this PR closes 1b)
742 BOM tool (delivered via #747)
743 Air-gap mirroring guide
744 Untagged refs (delivered via #761)
745 Provenance audit
748 Pin chart versions (Phase A delivered via #758)
749 Digest-pin explicit refs

Testing

unset GITLAB_TOKEN && make qualify
# Codebase qualification completed

Idempotency check:

$ md5sum docs/user/container-images.md
c937c78eb0966f884b8f127a6287c826  docs/user/container-images.md

$ make bom-docs
Updated docs/user/container-images.md (prose preserved, auto-generated section refreshed)

$ md5sum docs/user/container-images.md
c937c78eb0966f884b8f127a6287c826  docs/user/container-images.md

pkg/bom coverage held with new TestWriteMarkdown_NoTitleSuppressesH1.

Risk Assessment

  • Low — Doc-only change for the prose; new NoTitle flag is opt-in and defaults off (no behavior change for existing callers); make bom-docs is now safer (errors on missing markers instead of clobbering prose). Easy to revert.

Rollout notes: Future contributors who edit recipes need to run make bom-docs to refresh the auto-generated section; the splice preserves their prose untouched. The weekly refresh action keeps the same behavior.

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 (the doc page itself is what's changing)
  • Changes follow existing patterns in the codebase
  • Commits are cryptographically signed (git commit -S)

Closes the second half of #741 (1b — content/prose). The first half
landed via #763 (tooling, deterministic output, scheduled refresh); this
PR adds the explanation around the auto-generated table that customers
need to interpret it.

What's new in `docs/user/container-images.md`:

- Plain-language intro explaining the page's purpose, who maintains it,
  and how it relates to the CycloneDX JSON release artifact.
- "How to read this list" section: explicit-vs-implicit images,
  per-registry rationale (why ngc/ghcr/quay/registry.k8s.io/ECR/etc.),
  and the reproducibility caveat for unpinned charts.
- "Regenerating locally" with the three relevant make targets.
- "Related" links to component catalog, the supply-chain epic, and the
  air-gap follow-up issue.

Auto-generated content is now bracketed by `<!-- BEGIN AICR-BOM -->` /
`<!-- END AICR-BOM -->`. `make bom-docs` splices fresh BOM content
between the markers via awk; prose outside the markers is preserved.
Verified idempotent (md5 stable across consecutive runs).

Mechanics that enable the splice:

- `pkg/bom.Metadata.NoTitle` — opt-in flag suppressing the H1 in
  WriteMarkdown so the body can be embedded as a section of a larger
  doc (off by default; existing callers unchanged).
- `tools/bom -no-title` plumbs the flag through.
- `make bom-docs` now requires existing markers in the doc and refuses
  to clobber prose; prints a clear error if markers are missing.

Issue cross-references in this commit and in the doc itself use the
correct numbering (#739 epic; #740 pinning policy; #741 docs;
#742 BOM tool; #743 air-gap; #744 untagged refs;
#745 provenance; #748 chart pins; #749 digest pins).
@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

@mchmarny mchmarny self-assigned this May 6, 2026
@coderabbitai

coderabbitai Bot commented May 6, 2026

Copy link
Copy Markdown

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: a9a5b646-9292-4f90-9339-a7b01b463822

📥 Commits

Reviewing files that changed from the base of the PR and between 69c6720 and 4288a18.

📒 Files selected for processing (6)
  • Makefile
  • docs/user/container-images.md
  • pkg/bom/bom.go
  • pkg/bom/bom_test.go
  • pkg/bom/markdown.go
  • tools/bom/main.go

📝 Walkthrough

Walkthrough

The pull request introduces support for suppressing H1 titles in BOM Markdown output. A new NoTitle boolean field is added to the BOM Metadata struct, and the Markdown writer is updated to conditionally output the title header based on this flag. The BOM CLI tool gains a --no-title flag that threads this setting through the generation pipeline. A Makefile target bom-docs is added to regenerate auto-generated content within the container-images documentation file. The container-images.md file is expanded from a placeholder into comprehensive documentation. A test verifies the NoTitle functionality.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and specifically describes the main change: wrapping auto-generated BOM content with hand-written prose in the documentation.
Description check ✅ Passed The description is comprehensive and directly related to the changeset, explaining the PR's purpose, implementation details, testing, and risk assessment.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/bom-docs-prose

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

@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

Coverage Report ✅

Metric Value
Coverage 75.0%
Threshold 70%
Status Pass
Coverage Badge
![Coverage](https://img.shields.io/badge/coverage-75.0%25-green)

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/NVIDIA/aicr/pkg/bom 90.83% (+0.04%) 👍
github.com/NVIDIA/aicr/tools/bom 0.00% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/NVIDIA/aicr/pkg/bom/bom.go 98.04% (ø) 51 50 1
github.com/NVIDIA/aicr/pkg/bom/markdown.go 75.00% (+0.35%) 72 (+1) 54 (+1) 18 👍
github.com/NVIDIA/aicr/tools/bom/main.go 0.00% (ø) 108 (+1) 0 108 (+1)

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

@mchmarny mchmarny enabled auto-merge (squash) May 6, 2026 10:08
@mchmarny mchmarny merged commit 4428115 into main May 6, 2026
44 of 58 checks passed
@mchmarny mchmarny deleted the feat/bom-docs-prose branch May 6, 2026 10:29
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