Skip to content

feat(vendor): native component updater PR workflow - #2756

Merged
Andriy Knysh (aknysh) merged 74 commits into
mainfrom
osterman/native-component-updater
Aug 4, 2026
Merged

Andriy Knysh (aknysh) merged 74 commits into
mainfrom
osterman/native-component-updater

Conversation

@osterman

@osterman Erik Osterman (Cloud Posse) (osterman) commented Jul 15, 2026 •

Copy link
Copy Markdown
Member

Atmos CI

validation

Manually tested end-to-end as a real user — following --help/docs, in isolated sandboxes, and against a real repository (cloudposse/infra-live):

  • Opened two real pull requests exercising both the default and the full vendor.ci.pull_request config surface (title/body templates, labels, draft, reviewers, assignees) — #1701, #1702 (left as drafts, not merged).
  • That testing surfaced and fixed 5 real bugs along the way:
    • --pull-request created a pull request but never printed its URL in the default table output.
    • atmos.yaml's vendor.update.*/vendor.ci.* config (groups, execution mode, PR title/labels/draft/reviewers) was silently ignored — read from the wrong viper instance instead of the parsed config.
    • --all double-counted every component when a repo vendors exclusively via component.yaml and leaves an unused component type (e.g. packer) unconfigured.
    • A pull request's link was discarded entirely when a post-creation step failed (hit for real: GitHub rejecting a review request from the PR's own author).
    • SBOM's oci-artifacts coverage entry always claimed "complete" regardless of whether any OCI artifact existed in the project.
  • Also manually verified atmos vendor verify/clean/--refresh-lock/--lock-enforcement (all three modes) and atmos sbom generate (CycloneDX vs. SPDX, NTIA mode, experimental gating, upload-outside-CI) in isolated sandboxes.
  • Added ATMOS_PRO_GITHUB_TOKEN (the token github/sts mints) to the Component Updater's GitHub token precedence, so atmos auth exec --identity <github-sts-identity> -- atmos vendor update --pull-request gets a token that triggers downstream Actions workflows on the PR it opens — unlike the default GITHUB_TOKEN, which GitHub excludes from re-triggering workflows.

references

Summary by CodeRabbit

  • New Features
    • Added experimental atmos sbom generate with provenance/NTIA modes, SPDX/CycloneDX output, and optional CI artifact upload.
    • Added native atmos vendor update --pull-request workflows with component/group selection and deterministic PR publishing.
    • Added atmos vendor verify, atmos vendor clean, and vendor.lock.yaml drift protection.
    • Added lock refresh/enforcement options, semver-range resolution, and improved source provenance metadata.
  • Bug Fixes
    • Improved cancellation handling and transient OCI decompression recovery.
  • Documentation
    • Expanded SBOM, vendoring, lockfile, and component-updater guidance.

@atmos-pro

atmos-pro Bot commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Tip

Atmos Pro  

No affected stacks workflow was detected for this pull request.
If this is expected, no action is needed.
Learn More. Ask AI.

@github-actions github-actions Bot added the size/l Large size PR label Jul 15, 2026
@github-actions

github-actions Bot commented Jul 15, 2026 •

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues found.

Scanned Files

None

@osterman Erik Osterman (Cloud Posse) (osterman) added the minor New features that do not break anything label Jul 15, 2026
@github-actions

github-actions Bot commented Jul 15, 2026 •

Copy link
Copy Markdown

Note

Release Documentation Complete ✅

  • Changelog: website/blog/2026-07-17-sbom-provenance.mdx
  • Roadmap: website/src/data/roadmap.js

Thank you!

@osterman Erik Osterman (Cloud Posse) (osterman) added no-release Do not create a new release (wait for additional code changes) and removed minor New features that do not break anything labels Jul 15, 2026
@coderabbitai

coderabbitai Bot commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

💤 Files selected but had no reviewable changes (5)
  • website/docs/cli/commands/ci/validate.mdx
  • website/docs/cli/commands/init.mdx
  • website/docs/cli/commands/sbom/usage.mdx
  • website/docs/cli/commands/scaffold/generate.mdx
  • website/docs/cli/commands/toolchain/toolchain-search.mdx
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 679e06c6-647a-460f-aa35-7f339fcef40e

📥 Commits

Reviewing files that changed from the base of the PR and between 668e81d and 707f886.

📒 Files selected for processing (5)
  • website/docs/cli/commands/ci/validate.mdx
  • website/docs/cli/commands/init.mdx
  • website/docs/cli/commands/sbom/usage.mdx
  • website/docs/cli/commands/scaffold/generate.mdx
  • website/docs/cli/commands/toolchain/toolchain-search.mdx

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR adds native vendor update pull requests, vendor lock verification and cleaning, provenance SBOM generation and upload, OCI retry handling, artifact identity tracking, GitHub PR publishing, expanded vendoring controls, and related CLI, schema, documentation, and skill updates.

Changes

Native vendor automation and provenance

Layer / File(s) Summary
Vendor update and lockfile workflow
cmd/vendor/..., internal/exec/..., pkg/vendoring/...
Adds staged vendor updates, group and component selection, lock enforcement and refresh behavior, materialization checks, vendor clean, and vendor verify.
Pull request publishing
pkg/git/..., pkg/vendoring/updater/...
Adds provider-neutral pull request contracts, GitHub reconciliation, safe branch preparation, worktree execution, structured results, and Markdown summaries.
SBOM generation and publication
cmd/sbom/..., pkg/sbom/..., pkg/ci/...
Adds experimental SBOM generation in CycloneDX and SPDX formats, Terraform and dependency evidence, NTIA validation, and GitHub Actions artifact upload.
Artifact and vendoring provenance
pkg/downloader/..., pkg/provisioner/..., pkg/terraform/...
Adds immutable artifact identity resolution, source redaction, HTTP cache metadata, provenance receipt fields, and Terraform lock metadata parsing.
Documentation and repository guidance
docs/prd/..., website/..., agent-skills/..., .claude/...
Documents vendor locks, component updater migration, SBOM provenance, CI artifacts, and code-hygiene workflow changes.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related PRs

Suggested reviewers: aknysh, sgtoj

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 58.38% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(vendor): native component updater PR workflow' directly summarizes the main change—a new native Component Updater workflow for Atmos that creates pull requests automatically.
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.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch osterman/native-component-updater

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 5

🧹 Nitpick comments (8)
pkg/vendoring/updater/result_test.go (1)

12-22: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider using a table-driven test.

As per coding guidelines, prefer table-driven tests for testing multiple scenarios. Refactoring this to a table-driven structure will make it easier to add test cases for other scenarios (e.g., when PullRequest is nil, or when Failure is present).

🛠️ Proposed refactor to a table-driven test
 func TestMarkdownSummaryIncludesPRAndDryRun(t *testing.T) {
-	summary := MarkdownSummary(&Result{
-		Scope: "all", Check: true, Updated: 1, Status: "updated", Branch: "atmos/component-updater/all", Commit: "abc123",
-		PullRequest: &PullRequest{Number: 42, URL: "https://github.com/acme/repo/pull/42"},
-		Updates:     []vendoring.SourceUpdateResult{{Component: "terraform/vpc", CurrentVersion: "1.0.0", LatestVersion: "1.1.0", Status: vendoring.StatusUpdated}},
-	})
-	assert.Contains(t, summary, "dry run")
-	assert.Contains(t, summary, "[`#42`](https://github.com/acme/repo/pull/42)")
-	assert.Contains(t, summary, "terraform/vpc")
-	assert.False(t, strings.Contains(summary, "<script"))
+	tests := []struct {
+		name     string
+		result   *Result
+		contains []string
+	}{
+		{
+			name: "includes PR and dry run",
+			result: &Result{
+				Scope: "all", Check: true, Updated: 1, Status: "updated", Branch: "atmos/component-updater/all", Commit: "abc123",
+				PullRequest: &PullRequest{Number: 42, URL: "https://github.com/acme/repo/pull/42"},
+				Updates:     []vendoring.SourceUpdateResult{{Component: "terraform/vpc", CurrentVersion: "1.0.0", LatestVersion: "1.1.0", Status: vendoring.StatusUpdated}},
+			},
+			contains: []string{"dry run", "[`#42`](https://github.com/acme/repo/pull/42)", "terraform/vpc"},
+		},
+	}
+
+	for _, tt := range tests {
+		t.Run(tt.name, func(t *testing.T) {
+			summary := MarkdownSummary(tt.result)
+			for _, c := range tt.contains {
+				assert.Contains(t, summary, c)
+			}
+			assert.False(t, strings.Contains(summary, "<script"))
+		})
+	}
 }
🤖 Prompt for 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.

In `@pkg/vendoring/updater/result_test.go` around lines 12 - 22, Refactor
TestMarkdownSummaryIncludesPRAndDryRun into a table-driven test with named
cases, keeping the existing PR and dry-run assertions as one scenario. Structure
the cases so additional scenarios, such as nil PullRequest or a populated
Failure, can be added with their expected summary assertions without duplicating
test setup.

Source: Coding guidelines

pkg/git/providers/github/pull_request.go (1)

17-41: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Missing doc comments on exported ProviderName, Provider, and New.

Per coding guidelines, "Document all exported functions, types, and methods following Go's documentation conventions." NewWithClientFactory has one; these three don't.

🤖 Prompt for 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.

In `@pkg/git/providers/github/pull_request.go` around lines 17 - 41, Add Go-style
doc comments to the exported ProviderName constant, Provider type, and New
function, with each comment beginning with its corresponding identifier and
briefly describing its purpose; leave the existing NewWithClientFactory
documentation unchanged.

Source: Coding guidelines

cmd/vendor/component_updater_test.go (1)

1-38: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy lift

Missing coverage for validateUpdateInvocation and the group-empty-set path.

The existing tests exercise updateScope, filterGroupComponents, and renderPRTemplates well, but validateUpdateInvocation — which gates every mutating flow (--all/--group/--component conflicts, format, execution/batching modes, PR templates) — has no test coverage at all. Given the critical bug flagged in runVendorUpdate (group scope falling back to a full repo-wide update when the filtered set is empty), a regression test reproducing atmos vendor update --group <empty-group> would be valuable here per the guideline for bug fixes: "first write a reproducing test, confirm it fails, implement the fix iteratively."

🤖 Prompt for 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.

In `@cmd/vendor/component_updater_test.go` around lines 1 - 38, Add tests in the
vendor updater test suite covering validateUpdateInvocation for conflicting
scopes and invalid format, execution, batching, and PR-template options. Also
add a regression test for runVendorUpdate with a group whose filtered component
set is empty, asserting it does not fall back to a repository-wide update and
preserves the expected empty-result behavior.

Source: Coding guidelines

pkg/git/branch.go (2)

1-118: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy lift

No test coverage for this new, explicitly "safety-critical" file.

PrepareBranch's own doc comment calls its checks safety-critical (never checks out/pushes base, never force-pushes), yet no branch_test.go is present in this change. Per coding guidelines, "*_test.go" files should "target more than 85% coverage" and this is exactly the kind of destructive-operation-guarding logic worth locking down with tests (dirty-worktree rejection, existing-remote-branch reuse vs. new-branch-from-base, default-branch parsing, GitHub remote parsing for SSH/HTTPS forms).

🤖 Prompt for 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.

In `@pkg/git/branch.go` around lines 1 - 118, Add branch_test.go coverage for the
safety-critical PrepareBranch flow, including dirty-worktree rejection, existing
remote feature-branch reuse, and creation from the fetched base branch, while
verifying destructive branch operations are not performed. Also test
DefaultBranch parsing and GitHubRepository handling of SSH and HTTPS remotes,
targeting more than 85% coverage for the symbols in branch.go.

Source: Coding guidelines


27-61: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Exported I/O functions across the new Git/GitHub PR-publishing path lack perf.Track instrumentation. All four functions do real subprocess/network I/O and are exported, so each should carry defer perf.Track(atmosConfig, "pkg.FuncName")() per coding guidelines; cmd/vendor/update.go's existing perf.Track(nil, "vendor.updateRunE")() shows nil is an accepted substitute where no config is threaded through.

  • pkg/git/branch.go#L27-L61: add defer perf.Track(nil, "git.PrepareBranch")() at the top of PrepareBranch.
  • pkg/git/branch.go#L65-L80: add defer perf.Track(nil, "git.DefaultBranch")() at the top of DefaultBranch.
  • pkg/git/branch.go#L84-L105: add defer perf.Track(nil, "git.GitHubRepository")() at the top of GitHubRepository.
  • pkg/git/providers/github/pull_request.go#L44-L101: add defer perf.Track(nil, "github.Provider.Reconcile")() at the top of Reconcile.
🤖 Prompt for 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.

In `@pkg/git/branch.go` around lines 27 - 61, Instrument all four exported I/O
functions with deferred performance tracking: add perf.Track(nil,
"git.PrepareBranch") at the start of PrepareBranch in pkg/git/branch.go:27-61,
perf.Track(nil, "git.DefaultBranch") at the start of DefaultBranch in
pkg/git/branch.go:65-80, perf.Track(nil, "git.GitHubRepository") at the start of
GitHubRepository in pkg/git/branch.go:84-105, and perf.Track(nil,
"github.Provider.Reconcile") at the start of Reconcile in
pkg/git/providers/github/pull_request.go:44-101.

Source: Coding guidelines

cmd/vendor/update.go (1)

33-33: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Example string doesn't cover the new --all/--group/--format flags.

As per coding guidelines, "Provide comprehensive help text for all commands and flags, include examples in command help." Consider adding at least one example each for --group and --all.

🤖 Prompt for 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.

In `@cmd/vendor/update.go` at line 33, Update the vendor update command’s example
help text to include representative usage for the new --group and --all flags,
while preserving the existing examples; include --format as well if it is part
of the newly added flags documented by this command.

Source: Coding guidelines

pkg/git/providers/github/pull_request_test.go (1)

16-44: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy lift

Good test, but only covers the "existing PR" branch.

The create-new-PR path (empty List result), the 401/403 and "bad credentials" error-wrapping branches in githubError, and the assignees/reviewers request calls are all untested. Consider extending this into a table-driven test per coding guidelines ("use table-driven tests, target more than 85% coverage").

🤖 Prompt for 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.

In `@pkg/git/providers/github/pull_request_test.go` around lines 16 - 44, Extend
TestReconcileExistingPullRequest into a table-driven suite covering existing and
newly created pull requests, including the empty List result, 401/403 responses,
bad-credentials wrapping through githubError, and assignee/reviewer request
calls. Configure each case’s mock responses and expected method/path assertions,
while preserving the current existing-PR assertions and targeting the
repository’s required coverage.

Source: Coding guidelines

cmd/vendor/component_updater.go (1)

187-268: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Redundant base-branch lookup, plus complexity-linter bypass instead of extraction.

prepareComponentUpdateBranch and publishComponentUpdate each independently call atmosgit.DefaultBranch when vendor.ci.pull_request.base_branch is unset, doing two network round trips (git ls-remote) for the same value within a single command run, with a (low but nonzero) chance the two calls disagree if the remote's default branch is retargeted mid-run. Consider having prepareComponentUpdateBranch return the resolved base alongside the branch name and threading it into publishComponentUpdate instead of re-resolving it.

Separately, both this function and validateUpdateInvocation (line 77) use //nolint:cyclop,funlen,revive / //nolint:cyclop,gocognit,revive to bypass the project's complexity/length limits rather than extracting named helpers. As per coding guidelines, "Keep cyclomatic complexity at or below 15 and functions at or below 60 lines and 40 statements; extract focused named helpers and retain a linear orchestration pipeline."

🤖 Prompt for 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.

In `@cmd/vendor/component_updater.go` around lines 187 - 268, Resolve the base
branch once in prepareComponentUpdateBranch, return it with the branch name, and
pass it into publishComponentUpdate instead of calling atmosgit.DefaultBranch
again. Refactor publishComponentUpdate and validateUpdateInvocation into focused
named helpers so each stays within the project’s complexity, length, and
statement limits, then remove their cyclop/funlen/gocognit/ revive nolint
suppressions while preserving the existing orchestration and behavior.

Source: Coding guidelines

🤖 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 `@cmd/vendor/component_updater.go`:
- Around line 315-320: Update renderComponentUpdaterJSON to handle the error
returned by data.WriteJSON(result) instead of discarding it. Propagate or report
the write failure through the existing command error-handling path so JSON
output failures, including broken pipes, do not appear as successful silent
executions.
- Around line 24-56: Update runVendorUpdate so group-scoped execution never
falls through to the unscoped runRepoWideUpdate when filterGroupComponents
returns no components; return an empty report instead. Also avoid repeating
repo-wide discovery for the mutation path: preserve and use the caller’s already
narrowed group selection from update.go rather than overwriting it through a
second discovery.

In `@cmd/vendor/update.go`:
- Around line 88-149: Set result.Status to "updated" only when
report.UpdatedCount() is greater than zero within the report-handling block
around runVendorUpdate; preserve the existing result population and rendering
for zero-update and check runs, allowing their status to remain non-updated. Do
not change the separate selected-component handling or pull/publish logic.

In `@docs/prd/component-updater.md`:
- Around line 48-61: Provision Atmos in both documented GitHub Actions examples
before invoking atmos vendor update: update docs/prd/component-updater.md lines
48-61 and
agent-skills/skills/atmos-migration/references/from-component-updater.md lines
3-7 with an installation or setup step that makes the atmos executable available
on the runner, while preserving the existing update command and workflow
behavior.

In `@pkg/schema/vendor_update.go`:
- Line 12: Document every listed exported identifier using Go-style comments
that begin with the identifier name and end with a period:
VendorUpdateExecutionConfig, VendorUpdateBatchingConfig,
VendorUpdateGroupConfig, VendorPullRequestConfig, and VendorSummaryConfig in
pkg/schema/vendor_update.go (12-12, 17-17, 23-23, 34-34, and 46-46), plus
PullRequestResult, PullRequestPublisherFactory, RegisterPullRequestPublisher,
NewPullRequestPublisher, and RegisteredPullRequestPublishers in
pkg/git/pull_request.go (27-27, 39-39, 46-46, 52-52, and 62-62).

---

Nitpick comments:
In `@cmd/vendor/component_updater_test.go`:
- Around line 1-38: Add tests in the vendor updater test suite covering
validateUpdateInvocation for conflicting scopes and invalid format, execution,
batching, and PR-template options. Also add a regression test for
runVendorUpdate with a group whose filtered component set is empty, asserting it
does not fall back to a repository-wide update and preserves the expected
empty-result behavior.

In `@cmd/vendor/component_updater.go`:
- Around line 187-268: Resolve the base branch once in
prepareComponentUpdateBranch, return it with the branch name, and pass it into
publishComponentUpdate instead of calling atmosgit.DefaultBranch again. Refactor
publishComponentUpdate and validateUpdateInvocation into focused named helpers
so each stays within the project’s complexity, length, and statement limits,
then remove their cyclop/funlen/gocognit/ revive nolint suppressions while
preserving the existing orchestration and behavior.

In `@cmd/vendor/update.go`:
- Line 33: Update the vendor update command’s example help text to include
representative usage for the new --group and --all flags, while preserving the
existing examples; include --format as well if it is part of the newly added
flags documented by this command.

In `@pkg/git/branch.go`:
- Around line 1-118: Add branch_test.go coverage for the safety-critical
PrepareBranch flow, including dirty-worktree rejection, existing remote
feature-branch reuse, and creation from the fetched base branch, while verifying
destructive branch operations are not performed. Also test DefaultBranch parsing
and GitHubRepository handling of SSH and HTTPS remotes, targeting more than 85%
coverage for the symbols in branch.go.
- Around line 27-61: Instrument all four exported I/O functions with deferred
performance tracking: add perf.Track(nil, "git.PrepareBranch") at the start of
PrepareBranch in pkg/git/branch.go:27-61, perf.Track(nil, "git.DefaultBranch")
at the start of DefaultBranch in pkg/git/branch.go:65-80, perf.Track(nil,
"git.GitHubRepository") at the start of GitHubRepository in
pkg/git/branch.go:84-105, and perf.Track(nil, "github.Provider.Reconcile") at
the start of Reconcile in pkg/git/providers/github/pull_request.go:44-101.

In `@pkg/git/providers/github/pull_request_test.go`:
- Around line 16-44: Extend TestReconcileExistingPullRequest into a table-driven
suite covering existing and newly created pull requests, including the empty
List result, 401/403 responses, bad-credentials wrapping through githubError,
and assignee/reviewer request calls. Configure each case’s mock responses and
expected method/path assertions, while preserving the current existing-PR
assertions and targeting the repository’s required coverage.

In `@pkg/git/providers/github/pull_request.go`:
- Around line 17-41: Add Go-style doc comments to the exported ProviderName
constant, Provider type, and New function, with each comment beginning with its
corresponding identifier and briefly describing its purpose; leave the existing
NewWithClientFactory documentation unchanged.

In `@pkg/vendoring/updater/result_test.go`:
- Around line 12-22: Refactor TestMarkdownSummaryIncludesPRAndDryRun into a
table-driven test with named cases, keeping the existing PR and dry-run
assertions as one scenario. Structure the cases so additional scenarios, such as
nil PullRequest or a populated Failure, can be added with their expected summary
assertions without duplicating test setup.
🪄 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: CHILL

Plan: Pro

Run ID: 0a878653-83bb-4c5c-ad3a-21ab27f825c5

📥 Commits

Reviewing files that changed from the base of the PR and between 6b3b0ef and 517c0ac.

📒 Files selected for processing (20)
  • agent-skills/skills/atmos-migration/SKILL.md
  • agent-skills/skills/atmos-migration/references/from-component-updater.md
  • agent-skills/skills/atmos-modernization/SKILL.md
  • agent-skills/skills/atmos-vendoring/SKILL.md
  • agent-skills/skills/atmos-vendoring/references/component-updater.md
  • cmd/vendor/component_updater.go
  • cmd/vendor/component_updater_test.go
  • cmd/vendor/update.go
  • docs/prd/component-updater.md
  • docs/prd/git-ops.md
  • docs/prd/vendor-update.md
  • errors/errors.go
  • pkg/git/branch.go
  • pkg/git/providers/github/pull_request.go
  • pkg/git/providers/github/pull_request_test.go
  • pkg/git/pull_request.go
  • pkg/schema/schema.go
  • pkg/schema/vendor_update.go
  • pkg/vendoring/updater/result.go
  • pkg/vendoring/updater/result_test.go

Comment thread cmd/vendor/component_updater.go Resolved
Comment thread cmd/vendor/component_updater.go Resolved
Comment thread cmd/vendor/update.go Resolved
Comment thread docs/prd/component-updater.md Resolved
Comment thread pkg/schema/vendor_update.go Resolved
@codecov

codecov Bot commented Jul 15, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.91030% with 394 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.52%. Comparing base (a330649) to head (707f886).

Files with missing lines Patch % Lines
pkg/vendoring/lockfile/lockfile.go 88.18% 31 Missing and 29 partials ⚠️
cmd/vendor/update.go 60.74% 46 Missing and 7 partials ⚠️
pkg/sbom/terraform.go 84.67% 20 Missing and 1 partial ⚠️
pkg/vendoring/install/component.go 84.12% 13 Missing and 7 partials ⚠️
cmd/vendor/verify.go 77.38% 11 Missing and 8 partials ⚠️
pkg/downloader/artifact.go 85.36% 9 Missing and 9 partials ⚠️
cmd/vendor/config.go 67.34% 8 Missing and 8 partials ⚠️
internal/exec/vendor_utils.go 85.58% 9 Missing and 7 partials ⚠️
internal/exec/vendor.go 77.41% 5 Missing and 9 partials ⚠️
pkg/sbom/sbom.go 93.59% 6 Missing and 7 partials ⚠️
... and 26 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2756      +/-   ##
==========================================
+ Coverage   82.35%   82.52%   +0.17%     
==========================================
  Files        1810     1840      +30     
  Lines      175753   178374    +2621     
==========================================
+ Hits       144744   147211    +2467     
- Misses      23277    23342      +65     
- Partials     7732     7821      +89     
Flag Coverage Δ
unittests 82.52% <86.91%> (+0.17%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
cmd/root.go 78.41% <100.00%> (+0.02%) ⬆️
cmd/vendor/diff.go 88.37% <100.00%> (ø)
cmd/vendor/update_spinner.go 95.23% <100.00%> (+4.42%) ⬆️
errors/errors.go 100.00% <ø> (ø)
internal/exec/describe_stacks.go 96.38% <ø> (ø)
pkg/auth/manager_logout.go 84.73% <100.00%> (+0.08%) ⬆️
pkg/ci/providers/github/client.go 100.00% <100.00%> (ø)
pkg/config/load.go 87.46% <100.00%> (+0.31%) ⬆️
pkg/flags/registry.go 98.52% <100.00%> (+1.47%) ⬆️
pkg/git/providers/github/pull_request.go 100.00% <100.00%> (ø)
... and 59 more

... and 7 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🧹 Nitpick comments (1)
pkg/git/providers/github/pull_request_test.go (1)

48-81: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Assert the submitted pull-request and metadata payloads.

These checks only prove that endpoints were called; swapped or omitted title, body, base, head, draft, labels, assignees, or reviewers would still pass. Decode each request body and assert the configured values.

As per coding guidelines, tests must test behavior rather than implementation and provide comprehensive unit coverage.

🤖 Prompt for 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.

In `@pkg/git/providers/github/pull_request_test.go` around lines 48 - 81, Enhance
TestReconcileCreatesPullRequestAndAppliesMetadata by decoding each relevant
request body in the test server handler and asserting the configured title,
body, base, head, and draft values for the pull-request creation request, plus
labels, assignees, and reviewers for their metadata requests. Keep the existing
endpoint assertions while validating submitted behavior rather than only call
presence.

Source: Coding guidelines

🤖 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 `@pkg/git/branch_test.go`:
- Around line 94-100: Update GitHubRepository in branch.go to validate the
remote URL’s actual hostname, rejecting URLs whose path merely contains
“github.com” while preserving valid GitHub hosts. Extend the GitHubRepository
tests in branch_test.go with an example such as
https://example.com/github.com/cloudposse/atmos.git and assert
ErrComponentUpdaterConfig.

---

Nitpick comments:
In `@pkg/git/providers/github/pull_request_test.go`:
- Around line 48-81: Enhance TestReconcileCreatesPullRequestAndAppliesMetadata
by decoding each relevant request body in the test server handler and asserting
the configured title, body, base, head, and draft values for the pull-request
creation request, plus labels, assignees, and reviewers for their metadata
requests. Keep the existing endpoint assertions while validating submitted
behavior rather than only call presence.
🪄 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: CHILL

Plan: Pro

Run ID: 1a5fe0ab-22f6-4566-88e3-af05983a0de0

📥 Commits

Reviewing files that changed from the base of the PR and between 519d7d1 and 0fd03dc.

📒 Files selected for processing (11)
  • agent-skills/skills/atmos-migration/references/from-component-updater.md
  • cmd/vendor/component_updater.go
  • cmd/vendor/component_updater_test.go
  • cmd/vendor/update.go
  • docs/prd/component-updater.md
  • pkg/git/branch_test.go
  • pkg/git/providers/github/pull_request.go
  • pkg/git/providers/github/pull_request_test.go
  • pkg/git/pull_request.go
  • pkg/git/pull_request_test.go
  • pkg/schema/vendor_update.go
🚧 Files skipped from review as they are similar to previous changes (6)
  • agent-skills/skills/atmos-migration/references/from-component-updater.md
  • pkg/git/pull_request.go
  • pkg/git/providers/github/pull_request.go
  • docs/prd/component-updater.md
  • cmd/vendor/update.go
  • cmd/vendor/component_updater.go

Comment thread pkg/git/branch_test.go Resolved
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 17, 2026

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 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 `@pkg/schema/task.go`:
- Around line 963-973: Update decodeTaskOutput so errors from
mapstructure.NewDecoder and decoder.Decode are wrapped with descriptive context
using fmt.Errorf and %w rather than returned directly; preserve successful
decoding behavior.
🪄 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: CHILL

Plan: Pro

Run ID: 651c2e1b-aceb-4f30-9021-8b669d30375d

📥 Commits

Reviewing files that changed from the base of the PR and between 07ede2a and b229ba8.

📒 Files selected for processing (14)
  • cmd/vendor/component_updater.go
  • cmd/vendor/component_updater_test.go
  • cmd/vendor/update.go
  • pkg/git/branch.go
  • pkg/git/branch_test.go
  • pkg/git/git.go
  • pkg/git/git_test.go
  • pkg/git/providers/github/pull_request.go
  • pkg/git/providers/github/pull_request_test.go
  • pkg/schema/schema.go
  • pkg/schema/schema_auth.go
  • pkg/schema/task.go
  • pkg/schema/workflow.go
  • pkg/vendoring/updater/result_test.go
🚧 Files skipped from review as they are similar to previous changes (8)
  • pkg/vendoring/updater/result_test.go
  • pkg/schema/schema.go
  • pkg/git/branch.go
  • cmd/vendor/update.go
  • pkg/git/providers/github/pull_request.go
  • pkg/git/branch_test.go
  • cmd/vendor/component_updater.go
  • cmd/vendor/component_updater_test.go

Comment thread pkg/schema/task.go Resolved

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 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 `@pkg/git/git.go`:
- Line 485: Normalize CRLF line endings in the output parsing flow before
splitting the trimmed git output into lines, so each extracted path is free of
trailing carriage returns on Windows while preserving Linux and macOS behavior.
Update the strings processing around the lines assignment and keep the
subsequent path parsing unchanged.
🪄 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: CHILL

Plan: Pro

Run ID: 1d278d4d-b0e0-4385-98b4-8398e403fdc0

📥 Commits

Reviewing files that changed from the base of the PR and between 07ede2a and b229ba8.

📒 Files selected for processing (14)
  • cmd/vendor/component_updater.go
  • cmd/vendor/component_updater_test.go
  • cmd/vendor/update.go
  • pkg/git/branch.go
  • pkg/git/branch_test.go
  • pkg/git/git.go
  • pkg/git/git_test.go
  • pkg/git/providers/github/pull_request.go
  • pkg/git/providers/github/pull_request_test.go
  • pkg/schema/schema.go
  • pkg/schema/schema_auth.go
  • pkg/schema/task.go
  • pkg/schema/workflow.go
  • pkg/vendoring/updater/result_test.go
🚧 Files skipped from review as they are similar to previous changes (12)
  • pkg/vendoring/updater/result_test.go
  • pkg/git/git_test.go
  • pkg/schema/schema_auth.go
  • pkg/git/providers/github/pull_request.go
  • pkg/schema/workflow.go
  • pkg/git/branch_test.go
  • pkg/schema/schema.go
  • cmd/vendor/update.go
  • pkg/schema/task.go
  • cmd/vendor/component_updater.go
  • pkg/git/branch.go
  • cmd/vendor/component_updater_test.go

Comment thread pkg/git/git.go Resolved
Fixes a test bug where the "create" pull-request-error subtest was
masked by an earlier GET request hitting the same path, and adds
table-driven/fixture-based coverage for dry-run branches, validation
edge cases, publish error paths, and git branch/remote failure modes.
Raises patch-scoped statement coverage from 85.07% to 91.94%.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

@coderabbitai coderabbitai Bot 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.

🧹 Nitpick comments (3)
cmd/vendor/component_updater_test.go (2)

151-156: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Assert that --check leaves the filesystem unchanged.

lister.calls == 1 verifies the current implementation, not the dry-run contract. Assert that configured targets remain absent or unchanged so this test catches mutation regressions even if discovery internals change.

As per coding guidelines, “test behavior rather than implementation.”

🤖 Prompt for 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.

In `@cmd/vendor/component_updater_test.go` around lines 151 - 156, Update the test
around runVendorUpdate to verify the dry-run contract directly: after invoking
it with check enabled, assert that the configured target files or directories
remain absent or retain their original contents. Keep the existing result
assertions, but replace or supplement the lister.calls implementation-detail
assertion with filesystem-state assertions.

Source: Coding guidelines


657-689: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Leave the default case unset.

The “enabled by default” case explicitly sets vendor.ci.summary.enabled=true, so it cannot detect a broken default. Only call Set for the disabled case.

Proposed adjustment
 tests := []struct {
     name        string
-    enabled     bool
+    enabled     *bool
     wantWritten bool
 }{
-    {name: "enabled by default", enabled: true, wantWritten: true},
-    {name: "disabled", enabled: false, wantWritten: false},
+    {name: "enabled by default", wantWritten: true},
+    {name: "disabled", enabled: ptr.To(false), wantWritten: false},
 }
 
-viper.GetViper().Set("vendor.ci.summary.enabled", tt.enabled)
+if tt.enabled != nil {
+    viper.GetViper().Set("vendor.ci.summary.enabled", *tt.enabled)
+}

As per coding guidelines, tests must avoid tautological coverage.

🤖 Prompt for 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.

In `@cmd/vendor/component_updater_test.go` around lines 657 - 689, Update
TestVendorUpdateSummaryRespectsEnabledFlag so the enabled-by-default case leaves
vendor.ci.summary.enabled unset, while the disabled case explicitly sets it to
false. Preserve the existing table-driven assertions and use tt.enabled only to
configure the disabled scenario, allowing the test to verify the actual default
behavior.

Source: Coding guidelines

pkg/git/branch_test.go (1)

56-64: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Remove the local branch before testing remote reuse.

The local feature branch still exists, so this passes even if PrepareBranch never fetches or uses origin/atmos/component-updater/all. Delete it after checking out main to isolate the remote-reuse path.

Proposed adjustment
 runGitCommand(t, workdir, "push", "-u", "origin", "atmos/component-updater/all")
 runGitCommand(t, workdir, "checkout", "main")
+runGitCommand(t, workdir, "branch", "-D", "atmos/component-updater/all")
 
 require.NoError(t, PrepareBranch(ctx, PrepareBranchOptions{

As per coding guidelines, “test behavior rather than implementation.”

🤖 Prompt for 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.

In `@pkg/git/branch_test.go` around lines 56 - 64, Update the remote-reuse test
around PrepareBranch to delete the local atmos/component-updater/all branch
after checking out main and before invoking PrepareBranch. Keep the existing
assertions, ensuring the test can pass only when PrepareBranch reuses the branch
from origin.

Source: Coding guidelines

🤖 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.

Nitpick comments:
In `@cmd/vendor/component_updater_test.go`:
- Around line 151-156: Update the test around runVendorUpdate to verify the
dry-run contract directly: after invoking it with check enabled, assert that the
configured target files or directories remain absent or retain their original
contents. Keep the existing result assertions, but replace or supplement the
lister.calls implementation-detail assertion with filesystem-state assertions.
- Around line 657-689: Update TestVendorUpdateSummaryRespectsEnabledFlag so the
enabled-by-default case leaves vendor.ci.summary.enabled unset, while the
disabled case explicitly sets it to false. Preserve the existing table-driven
assertions and use tt.enabled only to configure the disabled scenario, allowing
the test to verify the actual default behavior.

In `@pkg/git/branch_test.go`:
- Around line 56-64: Update the remote-reuse test around PrepareBranch to delete
the local atmos/component-updater/all branch after checking out main and before
invoking PrepareBranch. Keep the existing assertions, ensuring the test can pass
only when PrepareBranch reuses the branch from origin.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1406578c-9df3-48b6-b322-b2e9ae459994

📥 Commits

Reviewing files that changed from the base of the PR and between b229ba8 and 0813f71.

📒 Files selected for processing (3)
  • cmd/vendor/component_updater_test.go
  • pkg/git/branch_test.go
  • pkg/git/providers/github/pull_request_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • pkg/git/providers/github/pull_request_test.go

Pins the transitive websocket-driver dependency (pulled in via
faye-websocket and sockjs) to >=0.7.5 via pnpm overrides, fixing a
critical message-corruption issue (GHSA-xv26-6w52-cph6) and a medium
resource-limit-bypass issue (GHSA-mp7j-qc5w-4988). Both are patched in
0.7.5, a patch-level bump not blocked by dependabot.yml's major-version
ignore policy.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
- pkg/schema/task.go: wrap decodeTaskOutput's mapstructure errors with
  context instead of returning them directly.
- pkg/git/git.go: normalize CRLF line endings before splitting
  git rev-parse output, so Windows runs don't leave a trailing \r on
  parsed repository paths.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 17, 2026
@mergify

mergify Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

💥 This pull request now has conflicts. Could you fix it Erik Osterman (Cloud Posse) (@osterman)? 🙏

…nent-updater

# Conflicts:
#	pkg/utils/yq_utils.go
@mergify

mergify Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

💥 This pull request now has conflicts. Could you fix it Erik Osterman (Cloud Posse) (@osterman)? 🙏

…nent-updater

# Conflicts:
#	docs/prd/git-ops.md
…n CI

The Windows acceptance job failed in TestTerraformRegistryCache: `atmos
terraform cache trust` ran `certutil -addstore -enterprise -f Root` on the
hosted runner and certutil hung until the 30s command timeout killed it
("certutil timed out after 30s: exit status 1" with no output), leaving the
proxy certificate untrusted.

The package already ships a native crypt32 installer that writes the
LocalMachine Root store directly (the scope windowsTrustStoreScopeForInstall
selects on CI) with no subprocess. Install and removal on Windows CI now try
certutil first and fall back to the native path on any failure, mirroring the
macOS system-keychain to login-keychain fallback in the same file. Removal's
fallback also covers a certificate that a fallback install placed in the
LocalMachine Root store, where certutil's enterprise delstore misses.

Adds fallback-success, double-failure, and fallback-not-taken tests using the
existing runTrustCommandFunc/installWindowsTrustFunc seams.

Co-Authored-By: Claude Fable 5 <[email protected]>
@mergify

mergify Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

💥 This pull request now has conflicts. Could you fix it Erik Osterman (Cloud Posse) (@osterman)? 🙏

…nent-updater

# Conflicts:
#	internal/exec/describe_stacks.go
…ublishing

The default GITHUB_TOKEN never triggers downstream on:pull_request/on:push
Actions workflows on the PR it opens. Add ATMOS_PRO_GITHUB_TOKEN (the token
the github/sts auth integration mints) to the GitHub client's token
precedence, between the explicit ATMOS_CI_GITHUB_TOKEN override and the
plain GITHUB_TOKEN/GH_TOKEN fallback, so pairing the Component Updater with
github/sts (via `atmos auth exec --identity <id> -- atmos vendor update
--pull-request`) gets a token that actually triggers downstream workflows.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
…reporting

Found and fixed via manual end-to-end testing against a real repository
(cloudposse/infra-live):

- atmos.yaml's vendor.update.*/vendor.ci.* config (groups, execution mode,
  batching mode, PR title/body/labels/draft/reviewers/assignees, summary
  enablement) was silently ignored: the reading code used the global
  viper.GetViper() singleton, which only reflects CLI-flag-bound keys, while
  LoadConfig parses atmos.yaml into a separate local viper. Bridge the
  parsed values into the global viper after config load, mirroring the
  existing profiles.base_path sync.
- `--all` (and any multi-type sweep) double-counted every component when a
  repo vendors exclusively via component.yaml and leaves an unused
  component type (e.g. packer) unconfigured: GetComponentBasePath silently
  fell back to the bare atmos base_path for that type, causing a second,
  mislabeled walk of the entire repo. Skip a type in the multi-type sweep
  when it has no configured base_path (via config or its env var override).
- `--pull-request` created a real pull request but never printed its URL in
  the default table output, leaving the user with no way to find it.
- A pull request's link was discarded entirely when a post-creation step
  failed (hit for real: GitHub rejecting a review request from the PR's own
  author) -- the PR itself already existed at that point but every layer
  (Reconcile, ReconcileComponentUpdatePullRequest, PublishComponentUpdate)
  returned nil instead of the partial result.
- The default PR body template was just a bare markdown table with no
  branding or explanation, reading as broken/unhelpful to a reviewer seeing
  it for the first time. Default now includes the Atmos CI badge and a
  one-line "Automated by `atmos vendor update --pull-request`" note ahead of
  the table.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
…d stub

The oci-artifacts coverage entry always claimed "complete: OCI artifacts are
represented by Atmos source receipts", even in a project with zero OCI
artifacts of any kind -- confirmed empirically in an isolated sandbox with
only a git-sourced vendor component. Scan the graph for vendor-domain
components whose atmos:kind is "oci" (set by the always-earlier-running
appendVendor) and report an honest, count-based detail string either way.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
…r-clean page

- Add the missing website/docs/cli/commands/vendor/vendor-clean.mdx page
  (the command was fully implemented and tested but had no doc page).
- Document vendor.lock_file/vendor.lock.enforcement and the full
  vendor.update.*/vendor.ci.* config surface in the vendor configuration
  reference (previously only described in a blog post and PRD).
- Document pairing the Component Updater with the github/sts auth
  integration for a token that triggers downstream Actions workflows, in
  the CLI reference, changelog post, and both relevant agent skills.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@mergify

mergify Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

💥 This pull request now has conflicts. Could you fix it Erik Osterman (Cloud Posse) (@osterman)? 🙏

…nent-updater

# Conflicts:
#	cmd/root.go
#	internal/exec/describe_stacks.go
#	lychee.toml
Splits overlong/compound sentences, converts passive to active voice,
removes leading-backtick sentence opens, and unpacks noun clusters
across the new vendor-lock, vendor-clean/verify, sbom, and
component-updater docs and blog posts. Also aligns new errors.go
sentinel error strings and doc comments with existing naming/phrasing
conventions (renames ErrComponentFolderNotFound to
ErrComponentDirNotFound for consistency with sibling errors).

Co-Authored-By: Claude Sonnet 5 <[email protected]>

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
.golangci.yml (1)

365-377: 📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy lift

Do not disable the file-length linter.

Lines 365-377 silence revive:file-length-limit for pkg/schema/task.go and pkg/vendoring/lockfile/lockfile.go. Split the files and keep the check active. If the split is deferred, link a tracking issue instead of adding an untracked TODO exemption.

As per coding guidelines, keep files smaller than 600 lines and never disable the file-length linter.

🤖 Prompt for 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.

In @.golangci.yml around lines 365 - 377, Remove the revive file-length-limit
exemptions for pkg/schema/task.go and pkg/vendoring/lockfile/lockfile.go from
the linter configuration. Split the oversized task and lockfile implementations
into appropriately named sibling files so each remains under 600 lines,
preserving the existing behavior and keeping file-length validation enabled; if
splitting is deferred, replace each untracked TODO with a link to a tracking
issue.

Source: Coding guidelines

internal/exec/describe_stacks.go (1)

360-380: 📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy lift

Use functional options for the scoped API.

ExecuteDescribeStacksScoped and executeDescribeStacks pass many settings positionally. The new public function already requires a //nolint:revive exemption. Use a functional-options API and keep existing wrappers as compatibility adapters. This reduces argument-order errors as more scope controls are added.

As per coding guidelines, use the functional options pattern for configurable APIs instead of functions with many parameters.

Also applies to: 399-400

🤖 Prompt for 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.

In `@internal/exec/describe_stacks.go` around lines 360 - 380, Refactor
ExecuteDescribeStacksScoped and executeDescribeStacks to accept functional
options for their configurable settings instead of the current long positional
parameter lists. Preserve existing public wrappers as compatibility adapters by
translating their arguments into the new options, and update all call sites
accordingly while retaining the existing behavior and performance tracking.

Source: Coding guidelines

🧹 Nitpick comments (2)
pkg/ci/providers/github/client.go (1)

22-30: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add a Go-doc summary for NewClient.

The comment directly above exported NewClient does not describe NewClient. Start the block with a sentence that begins with NewClient, then retain the token-precedence details.

Proposed fix
-// Token precedence: ATMOS_CI_GITHUB_TOKEN > ATMOS_PRO_GITHUB_TOKEN > GITHUB_TOKEN > GH_TOKEN.
+// NewClient creates a GitHub client with the highest-priority available token.
+//
+// Token precedence: ATMOS_CI_GITHUB_TOKEN > ATMOS_PRO_GITHUB_TOKEN > GITHUB_TOKEN > GH_TOKEN.

As per coding guidelines, “Document all exported functions, types, and methods following Go's documentation conventions.”

🤖 Prompt for 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.

In `@pkg/ci/providers/github/client.go` around lines 22 - 30, Add a Go-doc summary
at the start of the comment immediately preceding NewClient that begins with
“NewClient” and describes the function’s purpose, while preserving the existing
token-precedence details unchanged.

Source: Coding guidelines

internal/exec/vendor_test.go (1)

238-274: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use a table-driven test for the component scenarios.

TestParseVendorFlags_ComponentSliceFlag repeats the same setup and parse/assert sequence across four subtests. Store the cases in a table and run each case with t.Run. This makes the repeatable-slice contract easier to extend.

As per coding guidelines, use table-driven tests for testing multiple scenarios in Go.

🤖 Prompt for 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.

In `@internal/exec/vendor_test.go` around lines 238 - 274, Refactor the four
component scenarios in TestParseVendorFlags_ComponentSliceFlag into a
table-driven test, storing each case’s flag setup, expected component, and
expected error in a case table. Iterate over the cases with t.Run, reuse the
shared parseVendorFlags and assertion flow, and preserve the existing behavior
for unset, single-element, multi-element, and string-typed component flags.

Source: Coding guidelines

🤖 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 `@agent-skills/skills/atmos-migration/references/from-component-updater.md`:
- Around line 30-33: Add job-level GitHub Actions permissions to the workflow
example in
agent-skills/skills/atmos-migration/references/from-component-updater.md at
lines 30-33: grant contents: write and pull-requests: write, retain issues:
write only when labels or assignees are used, and document id-token: write for
the github/sts OIDC path. Apply the same permission guidance in
agent-skills/skills/atmos-vendoring/references/component-updater.md at line 9,
including the conditional issues permission.

---

Outside diff comments:
In @.golangci.yml:
- Around line 365-377: Remove the revive file-length-limit exemptions for
pkg/schema/task.go and pkg/vendoring/lockfile/lockfile.go from the linter
configuration. Split the oversized task and lockfile implementations into
appropriately named sibling files so each remains under 600 lines, preserving
the existing behavior and keeping file-length validation enabled; if splitting
is deferred, replace each untracked TODO with a link to a tracking issue.

In `@internal/exec/describe_stacks.go`:
- Around line 360-380: Refactor ExecuteDescribeStacksScoped and
executeDescribeStacks to accept functional options for their configurable
settings instead of the current long positional parameter lists. Preserve
existing public wrappers as compatibility adapters by translating their
arguments into the new options, and update all call sites accordingly while
retaining the existing behavior and performance tracking.

---

Nitpick comments:
In `@internal/exec/vendor_test.go`:
- Around line 238-274: Refactor the four component scenarios in
TestParseVendorFlags_ComponentSliceFlag into a table-driven test, storing each
case’s flag setup, expected component, and expected error in a case table.
Iterate over the cases with t.Run, reuse the shared parseVendorFlags and
assertion flow, and preserve the existing behavior for unset, single-element,
multi-element, and string-typed component flags.

In `@pkg/ci/providers/github/client.go`:
- Around line 22-30: Add a Go-doc summary at the start of the comment
immediately preceding NewClient that begins with “NewClient” and describes the
function’s purpose, while preserving the existing token-precedence details
unchanged.
🪄 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: CHILL

Plan: Pro Plus

Run ID: a4939127-d729-46db-b16b-904cb2d8af1d

📥 Commits

Reviewing files that changed from the base of the PR and between 7256dd9 and 3e4d4d0.

📒 Files selected for processing (25)
  • .golangci.yml
  • agent-skills/skills/atmos-ci/SKILL.md
  • agent-skills/skills/atmos-migration/references/from-component-updater.md
  • agent-skills/skills/atmos-modernization/SKILL.md
  • agent-skills/skills/atmos-sbom/SKILL.md
  • agent-skills/skills/atmos-vendoring/references/component-updater.md
  • cmd/root.go
  • cmd/sbom/sbom.go
  • cmd/vendor/component_updater.go
  • cmd/vendor/component_updater_test.go
  • cmd/vendor/execution_workdir_test.go
  • cmd/vendor/update.go
  • cmd/vendor/update_spinner.go
  • docs/prd/component-updater.md
  • docs/prd/git-ops.md
  • docs/prd/sbom-provenance.md
  • errors/errors.go
  • internal/exec/describe_stacks.go
  • internal/exec/vendor.go
  • internal/exec/vendor_component_utils.go
  • internal/exec/vendor_test.go
  • lychee.toml
  • pkg/auth/manager_logout.go
  • pkg/ci/providers/github/client.go
  • pkg/ci/providers/github/provider_test.go
🚧 Files skipped from review as they are similar to previous changes (9)
  • cmd/root.go
  • agent-skills/skills/atmos-modernization/SKILL.md
  • docs/prd/git-ops.md
  • cmd/vendor/update_spinner.go
  • errors/errors.go
  • cmd/sbom/sbom.go
  • docs/prd/component-updater.md
  • docs/prd/sbom-provenance.md
  • cmd/vendor/component_updater_test.go

…ent updater

The workflow example and token guidance omitted contents: write and
pull-requests: write, required under GitHub's read-only default
permissions for atmos vendor update --pull-request, and didn't
document id-token: write for the github/sts OIDC exchange.

Addresses CodeRabbit review comment on PR #2756.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 4, 2026
Markdown pipe-tables for flag/argument reference violate the
documented convention (CLAUDE.md: use <dl>/<dt>/<dd>, not tables,
for CLI arguments and flags). Converts the 5 offending tables found
in a repo-wide audit to match the <dl> pattern already used
correctly elsewhere (e.g. vendor/vendor-pull.mdx).

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@atmos-pro

atmos-pro Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Tip

Atmos Pro  

No affected stacks workflow was detected for this pull request.
If this is expected, no action is needed.
Learn More. Ask AI.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

These changes were released in v1.225.0-rc.7.

This branch was successfully deployed

1 active and 1 inactive deployments
preview — 707f8869 Deployed Aug 4, 2026 by github-actions[bot]
screengrabs — 707f8869 Deployed Aug 4, 2026 by aknysh via build #1030
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor New features that do not break anything size/xxl

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants