Repository navigation
feat: Atmos Git β foundational capability for GitOps enablement - #2597
Conversation
Establishes Git as a reusable Atmos capability (peer to Toolchain, Auth, and Hooks): a pkg/git service with a provider registry (cli provider in v1), managed repositories under git.repositories with automatic XDG workdirs, local git hook shims, a git hook kind for lifecycle publishing, Kubernetes deployment-repo provisioning (Argo CD / Flux), and native CI clone support with GitHub STS credentials and CI cache reconciliation. Co-Authored-By: Claude Fable 5 <[email protected]>
β¦provider Implements Phase 2 of the Atmos GitOps PRD (docs/prd/git-ops.md): - Provider registry following the standard Atmos registry pattern; the cli provider is the host-agnostic default (chosen because GitHub STS materializes credentials as GIT_CONFIG_* env vars, which subprocess git honors and go-git ignores) - Named repository resolution from git.repositories with defaults: provider cli, remote origin, signing auto, push retries 3, automatic XDG workdirs so the native CI cache captures managed clones - Clone defined as reconcile: clone-if-absent, else fetch + checkout + ff-only (CI cache restores may be stale); dirty workdirs fail explicitly - Safety rules: ff-only pull, no force push, push retry with rebase on non-fast-forward rejection, path-scoped commits with unmanaged-dirty-tree detection, worktree path-traversal validation - Commit author injection per invocation for CI runners with no git identity; signing modes auto/always/never; provenance trailers - Identity env composition via EnsureIdentityEnvironment (DI interface); stderr streamed to an injectable (masked) writer with a bounded tail used only for error classification β never embedded in error chains - New sentinels in errors/errors.go per the PRD error table - Fake-runner unit tests + local bare-repo integration tests (no network); 86-88% coverage Co-Authored-By: Claude Fable 5 <[email protected]>
atmos git command group (cmd/git, command registry pattern):
- clone/pull/status/diff/commit/push with the PRD flag architecture:
flags.NewStandardParser, ATMOS_GIT_* env vars, inherited global --identity,
--sign/--no-sign mutual exclusion, --path string slice, --dry-run
- Argument resolution: configured repository name -> URI (https://, git@,
git:: go-getter form with ?ref=/?depth=) -> filesystem path (./ forces path)
- --all bulk clone/pull/status: bounded concurrency, per-repo identity,
attempt-all with errors.Join aggregation
- Native CI no-arg clone: ci.enabled + provider detection clones the current
repository into the working directory (actions/checkout replacement);
outside CI fails with ErrGitRepositoryRequired and actionable hints
- Identity env composed via auth manager EnsureIdentityEnvironment
git hook kind (pkg/hooks/kinds/git, self-registered like store/command):
- Publishes via lifecycle events (e.g. after.terraform.apply): commit
generated files in the current repository by default, or a named managed
repository (provision-style clone/reconcile) when repository: is set
- Templated commit messages ({{ .component }}/{{ .stack }}), provenance
trailers (Atmos-Stack, Atmos-Component, Atmos-Source-SHA), path-scoped
commits with traversal validation, push-after-commit with retry,
clean no-op when nothing changed; inherits --skip-hooks and on_failure
82-94% coverage on new packages; lint gate clean.
Co-Authored-By: Claude Fable 5 <[email protected]>
- atmos git hooks install/uninstall/run: .git/hooks shims (worktree-aware via git rev-parse --git-path hooks), Atmos-marker overwrite protection with --force, core.hooksPath warning, run dispatches through the shared shell runner with stdin forwarding and exit-code propagation - atmos git list on the pkg/list pipeline: name/uri/provider/branch/workdir columns, status behind --check-status (bounded concurrent probes at extraction time), default sort name:asc, git.list.columns config, atmos list git-repositories alias - Docusaurus docs: command pages for the git group, git configuration reference, git hook kind in stack hooks docs - Changelog blog post (atmos-gitops) and roadmap milestone under the CI/CD Simplification initiative Co-Authored-By: Claude Fable 5 <[email protected]>
|
Tip Atmos Pro Β
No affected stacks workflow was detected for this pull request. |
Co-Authored-By: Claude Fable 5 <[email protected]>
Dependency Reviewβ No vulnerabilities or license issues found.Scanned FilesNone |
|
Warning This PR exceeds the recommended limit of 10,000 lines.Large PRs are difficult to review and may be rejected due to their size. Please verify that this PR does not address multiple issues. |
|
No actionable comments were generated in the recent review. π βΉοΈ Recent review infoβοΈ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: π Files selected for processing (1)
π WalkthroughWalkthroughAdds experimental ChangesAtmos GitOps Capability
Estimated code review effortπ― 5 (Critical) | β±οΈ ~150 minutes β¨ Finishing Touchesπ§ͺ Generate unit tests (beta)
|
β¦ example The no-arg 'atmos git clone' checkout replacement previously constructed the clone URL in cmd/git by hardcoding https://github.com β wrong layer, and broken for GitHub Enterprise and non-GitHub CI providers. - Add ServerURL and CloneURL to the CI provider Context so each provider supplies its own checkout metadata: the github provider honors GITHUB_SERVER_URL (GitHub Enterprise), the generic provider reads common conventions (CI_SERVER_URL/CI_REPOSITORY_URL/GIT_URL), and providers that cannot determine a clone URL leave it empty - Export the public ci.Context alias (internal provider type) following the existing pkg/ci alias pattern - cmd/git consumes ciCtx.CloneURL verbatim and fails with a clear error when the provider supplies none β no host assumptions outside pkg/ci - Blog: replace the contrived publish example with the real-world provider lock file case (.terraform.lock.hcl committed back after apply), and document that omitting repository: targets the current repository Co-Authored-By: Claude Fable 5 <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 1
Note
Due to the large number of review comments, Critical, Major severity comments were prioritized as inline comments.
π‘ Minor comments (53)
cmd/git/list.go-170-174 (1)
170-174:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 170-173's comment should end with a period (after the last line) to satisfy the
godotlinter.π Suggested fix
// loadGitListConfig loads Atmos configuration for the list command. // It honours global flags (--base-path, --config, --config-path, --profile) // from opts but intentionally skips stack validation (git list needs only the -// top-level `git` section, not the full stacks tree) +// top-level `git` section, not the full stacks tree).π€ 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/git/list.go` around lines 170 - 174, The block comment above loadGitListConfig is missing a terminal period; update the comment that starts "// loadGitListConfig loads Atmos configuration for the list command." through the following lines so the final line ends with a period to satisfy the godot linter (i.e., ensure the last sentence of the multi-line comment ends with a period).Source: Coding guidelines
cmd/git/list.go-105-107 (1)
105-107:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 105-107's comment should end with a period (after the last line) to satisfy the
godotlinter.π Suggested fix
// renderGitRepositoriesList runs the extraction and rendering pipeline given a // pre-loaded Atmos configuration. It is split from listGitRepositories so the -// rendering logic can be exercised in unit tests without a full Atmos environment +// rendering logic can be exercised in unit tests without a full Atmos environment.π€ 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/git/list.go` around lines 105 - 107, The comment block describing renderGitRepositoriesList (split from listGitRepositories) is missing a period at the end; update the comment text for renderGitRepositoriesList so it ends with a period (add a trailing period to the final sentence in that comment) to satisfy the godot linter.Source: Coding guidelines
cmd/git/clone.go-305-306 (1)
305-306:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 305's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// resolveCIWorkdir returns workdirFlag if non-empty, otherwise the process cwd +// resolveCIWorkdir returns workdirFlag if non-empty, otherwise the process cwd.π€ 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/git/clone.go` around lines 305 - 306, The comment for the resolveCIWorkdir function is missing a trailing period and fails the godot linter; update the comment above resolveCIWorkdir (the line starting "// resolveCIWorkdir returns workdirFlag if non-empty, otherwise the process cwd") to end with a period so it reads "...process cwd." ensuring the comment now terminates with a period.Source: Coding guidelines
cmd/git/list.go-248-250 (1)
248-250:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 248-249's comment should end with a period (after "lowercased key)") to satisfy the
godotlinter.π Suggested fix
// parseGitColumnSpec parses a single column specification. -// "Name" is a shorthand for "Name={{ .name }}" (lowercased key) +// "Name" is a shorthand for "Name={{ .name }}" (lowercased key).π€ 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/git/list.go` around lines 248 - 250, The comment above parseGitColumnSpec ("parseGitColumnSpec parses a single column specification. "Name" is a shorthand for "Name={{ .name }}" (lowercased key)") is missing a trailing period; update the comment for the parseGitColumnSpec function to end with a period after the closing parenthesis so it satisfies the godot linter (ensure the block comment that documents parseGitColumnSpec ends with a period).Source: Coding guidelines
cmd/git/flags.go-75-76 (1)
75-76:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 75's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// newDiffParser creates a StandardParser for `atmos git diff` +// newDiffParser creates a StandardParser for `atmos git diff`.π€ 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/git/flags.go` around lines 75 - 76, The comment above newDiffParser (the doc comment for the function newDiffParser creating a StandardParser for `atmos git diff`) is missing a trailing period; update that comment to end with a period so it conforms to the godot linter (add a period at the end of the sentence in the comment).Source: Coding guidelines
cmd/git/list_extract.go-64-70 (1)
64-70:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 64-69's comment should end with a period (after the last line) to satisfy the
godotlinter.π Suggested fix
// extractGitRepoRows returns one row map per configured repository. // When checkStatus is false, the "status" key is omitted from every row and // no filesystem or git subprocess work is performed. // When checkStatus is true, status probes run concurrently with a bounded // worker pool (statusWorkerPoolSize) and the resolved value is materialised -// into each row before rendering (column templates remain pure) +// into each row before rendering (column templates remain pure).π€ 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/git/list_extract.go` around lines 64 - 70, The block comment above the function extractGitRepoRows should end with a period to satisfy the godot linter; update the trailing sentence "When checkStatus is true, status probes run concurrently with a bounded worker pool (statusWorkerPoolSize) and the resolved value is materialised into each row before rendering (column templates remain pure)" to end with a period so the comment for extractGitRepoRows complies with the linter.Source: Coding guidelines
cmd/git/list_extract.go-27-29 (1)
27-29:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 27-28's comment should end with a period (after "stub)") to satisfy the
godotlinter.π Suggested fix
// StatusProber is a seam for status probing used in tests. -// Production code uses the git provider; tests substitute a stub +// Production code uses the git provider; tests substitute a stub.π€ 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/git/list_extract.go` around lines 27 - 29, The block comment immediately above the StatusProber interface ("Production code uses the git provider; tests substitute a stub)") is missing a terminal period; update that comment so it ends with a period (i.e., change the trailing ")" line to end with ").") to satisfy the godot linter and keep the comment text intact.Source: Coding guidelines
cmd/git/list_extract.go-33-34 (1)
33-34:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 33's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// providerStatusProber probes status via the registered git provider +// providerStatusProber probes status via the registered git provider.π€ 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/git/list_extract.go` around lines 33 - 34, The comment for the type providerStatusProber is missing a trailing period which breaks the `godot` linter; update the comment "// providerStatusProber probes status via the registered git provider" to end with a period (i.e. add "." at the end) so the comment becomes a complete sentence and satisfies the linter rule for the providerStatusProber struct.Source: Coding guidelines
cmd/git/clone.go-211-212 (1)
211-212:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 211's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// resolveAdHocWorkdir returns workdirFlag if non-empty, otherwise <cwd>/<repoName> +// resolveAdHocWorkdir returns workdirFlag if non-empty, otherwise <cwd>/<repoName>.π€ 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/git/clone.go` around lines 211 - 212, The comment above the resolveAdHocWorkdir function is missing a trailing period and fails the godot linter; update the comment for resolveAdHocWorkdir (the line starting "// resolveAdHocWorkdir returns workdirFlag if non-empty, otherwise <cwd>/<repoName>.") to end with a period so it becomes a fully punctuated sentence.Source: Coding guidelines
cmd/git/list.go-292-294 (1)
292-294:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 292-293's comment should end with a period (after "defaults)") to satisfy the
godotlinter.π Suggested fix
// columnsCompletionForGitList provides dynamic tab completion for --columns. -// Returns column names from atmos.yaml git.list.columns, plus defaults +// Returns column names from atmos.yaml git.list.columns, plus defaults.π€ 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/git/list.go` around lines 292 - 294, The comment header for the function columnsCompletionForGitList is missing a terminating period; update the comment that currently ends with "plus defaults)" to end with a period (e.g., "plus defaults).") so it complies with the godot linter and comment style rules, ensuring the corrected comment still describes the function providing dynamic tab completion for --columns and returning column names from atmos.yaml git.list.columns plus defaults.Source: Coding guidelines
cmd/git/clone.go-260-261 (1)
260-261:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 260's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// runCICheckout performs the no-arg CI current-repository checkout +// runCICheckout performs the no-arg CI current-repository checkout.π€ 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/git/clone.go` around lines 260 - 261, The comment above the runCICheckout function ("// runCICheckout performs the no-arg CI current-repository checkout.") must end with a period to satisfy the godot linter; update the comment for the runCICheckout function to ensure it terminates with a period (i.e., add a trailing "." to the existing comment text).Source: Coding guidelines
cmd/git/git.go-63-64 (1)
63-64:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 63's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// GetName returns the command name +// GetName returns the command name.π€ 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/git/git.go` around lines 63 - 64, The comment above the GetName method for GitCommandProvider must end with a period to satisfy the godot linter; update the comment for the function GetName() on type GitCommandProvider so the sentence ends with a period (e.g., change "// GetName returns the command name" to include a trailing period) and commit the change.Source: Coding guidelines
cmd/git/flags.go-140-141 (1)
140-141:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 140's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// wrapRepoNotFound wraps ErrGitRepositoryNotFound with actionable hints +// wrapRepoNotFound wraps ErrGitRepositoryNotFound with actionable hints.π€ 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/git/flags.go` around lines 140 - 141, The comment above the wrapRepoNotFound function is missing a trailing period; update the comment for wrapRepoNotFound to end with a period to satisfy the godot linter (e.g., change "// wrapRepoNotFound wraps ErrGitRepositoryNotFound with actionable hints." ensuring the final character is a period).Source: Coding guidelines
cmd/git/list.go-47-48 (1)
47-48:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 47's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// listParser handles flag parsing for `atmos git list` +// listParser handles flag parsing for `atmos git list`.π€ 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/git/list.go` around lines 47 - 48, The comment for the package-level variable listParser is missing a terminal period; update the comment above the declaration of listParser (the line starting with "// listParser handles flag parsing for `atmos git list`.") to end with a period so it reads "// listParser handles flag parsing for `atmos git list`." ensuring it satisfies the godot linter.Source: Coding guidelines
cmd/git/list_extract.go-74-76 (1)
74-76:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 74-75's comment should end with a period (after the last line) to satisfy the
godotlinter.π Suggested fix
// extractGitRepoRowsWithProber is the testable variant that accepts an -// injected StatusProber so tests can verify gating without real filesystem I/O +// injected StatusProber so tests can verify gating without real filesystem I/O.π€ 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/git/list_extract.go` around lines 74 - 76, The top-of-function comment for extractGitRepoRowsWithProber is missing a terminal period; update the comment block that precedes the function definition (the two-line comment starting with "extractGitRepoRowsWithProber is the testable variant...") to end with a period so it satisfies the godot linter (ensure the last line of that comment ends with a '.' character).Source: Coding guidelines
cmd/git/flags.go-83-84 (1)
83-84:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 83's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// newCommitParser creates a StandardParser for `atmos git commit` +// newCommitParser creates a StandardParser for `atmos git commit`.π€ 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/git/flags.go` around lines 83 - 84, The comment on the function newCommitParser does not end with a period (violates godot); update the doc comment above newCommitParser to end with a period so it conforms to the linter (ensure the comment text "// newCommitParser creates a StandardParser for `atmos git commit`." ends with a trailing period).Source: Coding guidelines
cmd/git/flags.go-3-9 (1)
3-9:β οΈ Potential issue | π‘ Minor | β‘ Quick winImport order violation.
Atmos imports should be sorted alphabetically by import path. The correct order is:
github.com/cloudposse/atmos/errors(aliaserrUtils)github.com/cloudposse/atmos/pkg/flagsgithub.com/cloudposse/atmos/pkg/git(aliasatmosgit)github.com/cloudposse/atmos/pkg/schemaCurrently
pkg/gitappears beforepkg/flags.π Suggested fix
import ( errUtils "github.com/cloudposse/atmos/errors" - atmosgit "github.com/cloudposse/atmos/pkg/git" - "github.com/cloudposse/atmos/pkg/flags" + atmosgit "github.com/cloudposse/atmos/pkg/git" "github.com/cloudposse/atmos/pkg/schema" )π€ 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/git/flags.go` around lines 3 - 9, Import ordering in the import block is incorrect; reorder the imports alphabetically by import path so they read: github.com/cloudposse/atmos/errors (errUtils), github.com/cloudposse/atmos/pkg/flags, github.com/cloudposse/atmos/pkg/git (atmosgit), github.com/cloudposse/atmos/pkg/schema; modify the import block in cmd/git/flags.go to place the flags import before the atmosgit import and ensure aliases errUtils and atmosgit remain unchanged.Source: Coding guidelines
cmd/git/git.go-107-108 (1)
107-108:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 107's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// IsExperimental returns whether this command is experimental +// IsExperimental returns whether this command is experimental.π€ 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/git/git.go` around lines 107 - 108, The comment for the IsExperimental method on GitCommandProvider ("IsExperimental returns whether this command is experimental") is missing a trailing period; update the comment above func (g *GitCommandProvider) IsExperimental() bool to end with a period so it satisfies the godot linter (ensure the comment reads as a complete sentence with a final period).Source: Coding guidelines
cmd/git/clone.go-333-335 (1)
333-335:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 333's comment should end with a period (after "attempt-all, not fail-fast)") to satisfy the
godotlinter.π Suggested fix
-// runConcurrent runs f for each name with bounded concurrency (4 workers) -// and collects all errors via errors.Join (attempt-all, not fail-fast) +// runConcurrent runs f for each name with bounded concurrency (4 workers) +// and collects all errors via errors.Join (attempt-all, not fail-fast).π€ 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/git/clone.go` around lines 333 - 335, The comment above the runConcurrent function does not end with a period which fails the godot linter; update the comment for func runConcurrent (the block starting "// runConcurrent runs f for each name...") so it ends with a period (add a trailing "." after "attempt-all, not fail-fast)"), ensuring the comment sentence is properly terminated.Source: Coding guidelines
cmd/git/list.go-279-281 (1)
279-281:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 279-280's comment should end with a period (after "support)") to satisfy the
godotlinter.π Suggested fix
// buildGitListSorters returns the default sorter (name ascending). -// The sort specification is reserved for future --sort flag support +// The sort specification is reserved for future --sort flag support.π€ 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/git/list.go` around lines 279 - 281, The comment above buildGitListSorters is missing a terminal period; update the block comment starting "// The sort specification is reserved for future --sort flag support)" to end with a period so the sentence reads "...support)." (i.e., ensure the comment for the buildGitListSorters function ends with a period to satisfy the godot linter).Source: Coding guidelines
cmd/git/clone.go-248-249 (1)
248-249:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 248's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// checkCIEnabled returns an error when ci.enabled is false or config is nil +// checkCIEnabled returns an error when ci.enabled is false or config is nil.π€ 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/git/clone.go` around lines 248 - 249, Update the comment for the checkCIEnabled function so it ends with a period to satisfy the godot linter; locate the comment immediately above the checkCIEnabled() declaration and add a trailing period to the sentence describing its behavior.Source: Coding guidelines
cmd/git/clone.go-223-224 (1)
223-224:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 223's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// runCloneNoArg handles the no-argument form: CI current-repository checkout replacement +// runCloneNoArg handles the no-argument form: CI current-repository checkout replacement.π€ 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/git/clone.go` around lines 223 - 224, The comment above the runCloneNoArg function is missing a trailing period; update the comment that currently reads "runCloneNoArg handles the no-argument form: CI current-repository checkout replacement" to end with a period so it satisfies the godot linter (i.e., ensure the comment for runCloneNoArg ends with a "." character).Source: Coding guidelines
cmd/git/clone.go-83-84 (1)
83-84:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 83's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// runClone orchestrates the clone subcommand +// runClone orchestrates the clone subcommand.π€ 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/git/clone.go` around lines 83 - 84, The comment above the runClone function ("// runClone orchestrates the clone subcommand.") must end with a period to satisfy the godot linter; update the comment for the runClone function to ensure it ends with a trailing period (e.g., add a period at the end of the existing comment).Source: Coding guidelines
cmd/git/list.go-76-77 (1)
76-77:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 76's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// parseGitListOptions maps Viper state into a GitListOptions struct +// parseGitListOptions maps Viper state into a GitListOptions struct.π€ 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/git/list.go` around lines 76 - 77, The comment above the parseGitListOptions function ("// parseGitListOptions maps Viper state into a GitListOptions struct.") is missing a terminating period per the godot linter; update the comment for the parseGitListOptions function to end with a period (ensure the full sentence ends with a "."), then run the linter to confirm the warning is resolved.Source: Coding guidelines
cmd/git/list.go-217-219 (1)
217-219:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 217-218's comment should end with a period (after "set)") to satisfy the
godotlinter.π Suggested fix
// defaultGitListColumns returns the default column set for git list. -// The status column is appended only when --check-status is set +// The status column is appended only when --check-status is set.π€ 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/git/list.go` around lines 217 - 219, The function comment for defaultGitListColumns (the two-line comment starting with "defaultGitListColumns returns the default column set for git list." and "The status column is appended only when --check-status is set") must end with a period to satisfy the godot linter; update that comment so both lines end with a period (ensure the second line ends with a period after "set)") to fix the lint error referencing defaultGitListColumns/includeStatus.Source: Coding guidelines
cmd/git/git.go-33-34 (1)
33-34:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 33's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// gitCmd is the `atmos git` parent command +// gitCmd is the `atmos git` parent command.π€ 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/git/git.go` around lines 33 - 34, The comment above the gitCmd variable ("// gitCmd is the `atmos git` parent command") must end with a period to satisfy the godot linter; update the comment for the gitCmd declaration so it finishes with a trailing period (i.e., ensure the comment string for gitCmd ends with ".").Source: Coding guidelines
cmd/git/git.go-55-56 (1)
55-56:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 55's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// GitCommandProvider implements the CommandProvider interface for `atmos git` +// GitCommandProvider implements the CommandProvider interface for `atmos git`.π€ 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/git/git.go` around lines 55 - 56, The comment for the GitCommandProvider type lacks a terminal period; update the comment above GitCommandProvider (the "// GitCommandProvider implements the CommandProvider interface for `atmos git`" comment) to end with a period to satisfy the godot linter (e.g. add a trailing "." at the end of that comment).Source: Coding guidelines
cmd/git/clone.go-360-364 (1)
360-364:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 360's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// ciRepoURI constructs a clone URI from a "owner/repo" CI repository string +// ciRepoURI constructs a clone URI from a "owner/repo" CI repository string. // Using https:// so ambient credentials (GITHUB_TOKEN via git config) apply.π€ 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/git/clone.go` around lines 360 - 364, The top-of-function comment for ciRepoURI is missing a terminal period; update the comment above the ciRepoURI(repo string) function so the sentence ends with a period (i.e., "Using https:// so ambient credentials (GITHUB_TOKEN via git config) apply.") to satisfy the godot linter.Source: Coding guidelines
cmd/git/flags.go-124-125 (1)
124-125:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 124's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// resolveIntPrecedence returns flagVal when non-zero, otherwise configVal +// resolveIntPrecedence returns flagVal when non-zero, otherwise configVal.π€ 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/git/flags.go` around lines 124 - 125, The comment above resolveIntPrecedence lacks a trailing period; update the comment text ("resolveIntPrecedence returns flagVal when non-zero, otherwise configVal.") to end with a period to satisfy the godot linter, making sure the function comment remains grammatically complete and unchanged otherwise.Source: Coding guidelines
cmd/git/list_extract.go-106-107 (1)
106-107:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 106's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// buildBaseRow builds a repository row without status +// buildBaseRow builds a repository row without status.π€ 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/git/list_extract.go` around lines 106 - 107, Update the function comment for buildBaseRow so it ends with a period: change the comment line "// buildBaseRow builds a repository row without status" to include a trailing period to satisfy the godot linter (ensure the comment above buildBaseRow in list_extract.go now ends with a period).Source: Coding guidelines
cmd/git/diff.go-43-44 (1)
43-44:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 43's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// runDiff shows the diff for a repository by name or path +// runDiff shows the diff for a repository by name or path.π€ 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/git/diff.go` around lines 43 - 44, Update the comment for the runDiff function so it ends with a period to satisfy the godot linter; locate the comment above func runDiff(ctx context.Context, arg string, paths []string) error and add a trailing period to the sentence ("// runDiff shows the diff for a repository by name or path.") so the comment ends with punctuation.Source: Coding guidelines
cmd/git/clone.go-317-318 (1)
317-318:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 317's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// runCloneAll clones/reconciles all configured repositories concurrently +// runCloneAll clones/reconciles all configured repositories concurrently.π€ 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/git/clone.go` around lines 317 - 318, The doc comment above the runCloneAll function ("runCloneAll clones/reconciles all configured repositories concurrently.") is missing a trailing period; update the comment for function runCloneAll to end with a period to satisfy the godot linter (ensure the comment string for runCloneAll ends with a '.' character).Source: Coding guidelines
cmd/git/flags.go-116-117 (1)
116-117:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 116's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// resolveStringPrecedence returns flagVal when non-empty, otherwise configVal +// resolveStringPrecedence returns flagVal when non-empty, otherwise configVal.π€ 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/git/flags.go` around lines 116 - 117, The comment above the function resolveStringPrecedence is missing a trailing period; update the comment string for resolveStringPrecedence to end with a period (e.g., change "// resolveStringPrecedence returns flagVal when non-empty, otherwise configVal" to end with a ".") so it satisfies the godot linter.Source: Coding guidelines
cmd/git/flags.go-33-34 (1)
33-34:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 33's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// newCloneParser creates a StandardParser for `atmos git clone` +// newCloneParser creates a StandardParser for `atmos git clone`.π€ 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/git/flags.go` around lines 33 - 34, The comment for the newCloneParser function ("newCloneParser creates a StandardParser for `atmos git clone`.") is missing a trailing period; update the comment above the newCloneParser function to end with a period to satisfy the godot linter (ensure the comment for newCloneParser ends with a '.' and re-run linting).Source: Coding guidelines
cmd/git/git.go-85-87 (1)
85-87:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 85-86's comment should end with a period (after "flags)") to satisfy the
godotlinter.π Suggested fix
// GetCompatibilityFlags returns compatibility flags for this command. -// The git command group has no compatibility flags +// The git command group has no compatibility flags.π€ 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/git/git.go` around lines 85 - 87, Update the function comment for GetCompatibilityFlags to end with a period so it satisfies the godot linter; specifically modify the doc comment above the GitCommandProvider.GetCompatibilityFlags method (the two lines starting with "// GetCompatibilityFlags returns compatibility flags for this command." and "// The git command group has no compatibility flags.") to ensure the sentence ends with a period (e.g., add a trailing period after "flags)".Source: Coding guidelines
cmd/git/list.go-233-235 (1)
233-235:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 233-234's comment should end with a period (after "formats)") to satisfy the
godotlinter.π Suggested fix
// parseGitColumnsFlag converts string column specs into column.Config values. -// Supports "Name" (maps to {{ .name }}) and "Name={{ .template }}" formats +// Supports "Name" (maps to {{ .name }}) and "Name={{ .template }}" formats.π€ 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/git/list.go` around lines 233 - 235, Update the function comment for parseGitColumnsFlag so it ends with a period: change the two-line comment starting with "// parseGitColumnsFlag converts string column specs into column.Config values." and the following line describing supported formats to ensure the final sentence ends with a period (i.e., "...formats)."). This satisfies the godot linter by adding the missing trailing period to the comment.Source: Coding guidelines
cmd/git/list.go-23-24 (1)
23-24:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 23's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// Flag and env-var names for `atmos git list` +// Flag and env-var names for `atmos git list`.π€ 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/git/list.go` around lines 23 - 24, The top-of-block comment above the const declaration in cmd/git/list.go ("Flag and env-var names for `atmos git list`") must end with a period to satisfy the godot linter; update that comment text to ensure it ends with a trailing period (i.e., ensure the comment line immediately before the const (...) block ends with a "." character).Source: Coding guidelines
cmd/git/flags.go-55-56 (1)
55-56:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 55's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// newPullParser creates a StandardParser for `atmos git pull` +// newPullParser creates a StandardParser for `atmos git pull`.π€ 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/git/flags.go` around lines 55 - 56, The comment for the newPullParser function must end with a period to satisfy the godot linter: update the comment starting with "newPullParser creates a StandardParser for `atmos git pull`" (the doc comment immediately above the newPullParser function) so it ends with a period.Source: Coding guidelines
cmd/git/flags.go-67-68 (1)
67-68:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 67's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// newStatusParser creates a StandardParser for `atmos git status` +// newStatusParser creates a StandardParser for `atmos git status`.π€ 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/git/flags.go` around lines 67 - 68, The comment above the newStatusParser function ("newStatusParser creates a StandardParser for `atmos git status`.") must end with a period to satisfy the godot linter; update the comment for the function newStatusParser so it terminates with a period.Source: Coding guidelines
cmd/git/diff.go-17-18 (1)
17-18:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 17's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// diffParser handles flag parsing for `atmos git diff` +// diffParser handles flag parsing for `atmos git diff`.π€ 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/git/diff.go` around lines 17 - 18, The comment above the variable diffParser (var diffParser = newDiffParser()) is missing a terminating period; update the comment that describes diffParser (the line starting with "// diffParser handles flag parsing for `atmos git diff`") to end with a period so it satisfies the godot linter (e.g., change it to "// diffParser handles flag parsing for `atmos git diff`.").Source: Coding guidelines
cmd/git/list.go-50-51 (1)
50-51:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 50's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// listCmd is the `atmos git list` subcommand +// listCmd is the `atmos git list` subcommand.π€ 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/git/list.go` around lines 50 - 51, The comment above the listCmd variable ("// listCmd is the `atmos git list` subcommand.") must end with a period to satisfy the godot linter; update the comment for the listCmd declaration (the comment starting with "// listCmd is the `atmos git list` subcommand") to ensure it ends with a trailing period.Source: Coding guidelines
cmd/git/clone.go-165-166 (1)
165-166:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 165's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// runCloneURI clones an ad hoc URI (not a configured repository) +// runCloneURI clones an ad hoc URI (not a configured repository).π€ 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/git/clone.go` around lines 165 - 166, The comment above runCloneURI is missing a trailing period; update the comment "// runCloneURI clones an ad hoc URI (not a configured repository)" to end with a period so it reads "// runCloneURI clones an ad hoc URI (not a configured repository)." to satisfy the godot linter.Source: Coding guidelines
cmd/git/git.go-79-81 (1)
79-81:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 79-80's comment should end with a period (after "arguments)") to satisfy the
godotlinter.π Suggested fix
// GetPositionalArgsBuilder returns the positional args builder for this command. -// The parent git command has no positional arguments +// The parent git command has no positional arguments.π€ 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/git/git.go` around lines 79 - 81, The comment above GetPositionalArgsBuilder on GitCommandProvider violates the godot linter because it does not end with a period; update the comment lines "// GetPositionalArgsBuilder returns the positional args builder for this command." and "// The parent git command has no positional arguments" (the comment for the GetPositionalArgsBuilder method on type GitCommandProvider) so each sentence ends with a period (e.g., add a trailing "." to the second sentence).Source: Coding guidelines
cmd/git/list.go-38-39 (1)
38-39:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 38's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// GitListOptions holds parsed options for `atmos git list` +// GitListOptions holds parsed options for `atmos git list`.π€ 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/git/list.go` around lines 38 - 39, The comment above the GitListOptions type is missing a trailing period and violates the godot linter; update the doc comment for GitListOptions (the line with "GitListOptions holds parsed options for `atmos git list`") to end with a period so it reads "GitListOptions holds parsed options for `atmos git list`." Ensure the change is applied to the comment immediately preceding the GitListOptions struct declaration.Source: Coding guidelines
cmd/git/clone.go-56-57 (1)
56-57:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 56's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// cloneOptions holds parsed flags for the clone subcommand +// cloneOptions holds parsed flags for the clone subcommand.π€ 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/git/clone.go` around lines 56 - 57, The comment for the type cloneOptions ("cloneOptions holds parsed flags for the clone subcommand.") is missing a terminating period; update the comment above the cloneOptions type declaration so it ends with a period to satisfy the godot linter (i.e., ensure the comment for cloneOptions is a complete sentence ending with a '.').Source: Coding guidelines
cmd/git/list.go-193-195 (1)
193-195:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 193-194's comment should end with a period (after "defaults)") to satisfy the
godotlinter.π Suggested fix
// getGitListColumns returns the column configuration for the list output. -// Precedence: --columns flag > atmos.yaml git.list.columns > defaults +// Precedence: --columns flag > atmos.yaml git.list.columns > defaults.π€ 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/git/list.go` around lines 193 - 195, The comment above getGitListColumns spans two lines and the sentence "Precedence: --columns flag > atmos.yaml git.list.columns > defaults." is missing a trailing period; update the comment for the getGitListColumns function so the sentence ends with a period (ensure the closing parenthesis and period are present) to satisfy the godot linter.Source: Coding guidelines
cmd/git/flags.go-96-97 (1)
96-97:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 96's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// newPushParser creates a StandardParser for `atmos git push` +// newPushParser creates a StandardParser for `atmos git push`.π€ 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/git/flags.go` around lines 96 - 97, The comment for the newPushParser function ("// newPushParser creates a StandardParser for `atmos git push`") is missing a trailing period; update the comment above the newPushParser function to end with a period to satisfy the godot linter (i.e., ensure the comment for newPushParser ends with a full stop).Source: Coding guidelines
cmd/git/list.go-313-314 (1)
313-314:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 313's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// defaultGitColumnNames returns default column name suggestions for tab completion +// defaultGitColumnNames returns default column name suggestions for tab completion.π€ 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/git/list.go` around lines 313 - 314, The comment for the function defaultGitColumnNames does not end with a period; update the comment line "// defaultGitColumnNames returns default column name suggestions for tab completion." to terminate with a period so it satisfies the godot linter (ensure the comment text remains otherwise unchanged and applies to the defaultGitColumnNames function declaration).Source: Coding guidelines
cmd/git/git.go-58-59 (1)
58-59:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 58's comment should end with a period to satisfy the
godotlinter.π Suggested fix
-// GetCommand returns the git parent command (with all subcommands attached) +// GetCommand returns the git parent command (with all subcommands attached).π€ 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/git/git.go` around lines 58 - 59, The comment above the GetCommand method on GitCommandProvider is missing a trailing period; update the comment for the GetCommand function (the line starting "// GetCommand returns the git parent command (with all subcommands attached).") to end with a period so it satisfies the godot linterβlocate the GetCommand function in git.go and add the missing period to the end of the comment sentence.Source: Coding guidelines
cmd/git/list_extract.go-144-146 (1)
144-146:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 144-145's comment should end with a period (after "missing)") to satisfy the
godotlinter.π Suggested fix
// probeStatusConcurrently materialises the "status" field in each row using a -// bounded worker pool. Rows without a "workdir" value get status "missing" +// bounded worker pool. Rows without a "workdir" value get status "missing".π€ 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/git/list_extract.go` around lines 144 - 146, The top-of-function comment for probeStatusConcurrently is missing a terminal period which fails the godot linter; update the comment that starts with "probeStatusConcurrently materialises the "status" field..." and ensure the final sentence ("Rows without a "workdir" value get status "missing")") ends with a period so the comment reads correctly and passes the linter.Source: Coding guidelines
cmd/git/git.go-27-29 (1)
27-29:β οΈ Potential issue | π‘ Minor | β‘ Quick winComments must end with periods.
Line 27-28's comment should end with a period (after "subcommands)") to satisfy the
godotlinter.π Suggested fix
// SetAtmosConfig is called from root.go after atmosConfig is initialized, -// making the configuration available to all git subcommands +// making the configuration available to all git subcommands.π€ 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/git/git.go` around lines 27 - 29, The top-of-function comment for SetAtmosConfig (the block starting "SetAtmosConfig is called from root.go after atmosConfig is initialized, making the configuration available to all git subcommands") is missing a terminal period; update that comment to end with a period so it satisfies the godot linter (i.e., add a period after "subcommands").Source: Coding guidelines
cmd/git/coverage_boost_test.go-17-17 (2)
17-17:β οΈ Potential issue | π‘ Minor | β‘ Quick winAdd periods to section header comments.
Section header comments on lines 17, 73, 141, 155, 186, 217, 229, 248, 264, and 281 do not end with periods, violating the godot linter rule. As per coding guidelines, all comments must end with periods.
Also applies to: 73-73, 141-141, 155-155, 186-186, 217-217, 229-229, 248-248, 264-264, 281-281
π€ 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/git/coverage_boost_test.go` at line 17, Update the section header comments to end with a period to satisfy the godot linter rule: locate header comment lines like "// ---- runCommit: argKindName path ----" (and the other similar "---- ..." header comments in this file) and append a trailing period so they read e.g. "// ---- runCommit: argKindName path ----."; ensure all listed headers (the ones around the earlier reported lines) are updated consistently.Source: Coding guidelines
17-17:β οΈ Potential issue | π‘ Minor | β‘ Quick winAdd period to comment.
The comment on line 17 does not end with a period, which violates the godot linter rule. As per coding guidelines, all comments must end with periods.
Fix
-// ---- runCommit: argKindName path ---- +// ---- runCommit: argKindName path ----.π€ 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/git/coverage_boost_test.go` at line 17, The inline comment "// ---- runCommit: argKindName path ----" is missing a terminal period; update that comment to end with a period (e.g., "// ---- runCommit: argKindName path ----.") so it satisfies the godot linter rule and coding guidelines.Source: Coding guidelines
|
Important Cloud Posse Engineering Team Review RequiredThis pull request modifies files that require Cloud Posse's review. Please be patient, and a core maintainer will review your changes. To expedite this process, reach out to us on Slack in the |
Codecov Reportβ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2597 +/- ##
==========================================
+ Coverage 79.09% 79.18% +0.08%
==========================================
Files 1228 1262 +34
Lines 118701 121365 +2664
==========================================
+ Hits 93890 96106 +2216
- Misses 19651 19942 +291
- Partials 5160 5317 +157
Flags with carried forward coverage won't be shown. Click here to find out more.
π New features to boost your workflow:
|
There was a problem hiding this comment.
π§Ή Nitpick comments (1)
cmd/git/clean.go (1)
3-18: β‘ Quick winOrganize imports into three groups separated by blank lines.
Per coding guidelines, imports should be in three groups: (1) Go stdlib, (2) 3rd-party, (3) Atmos packages. Currently missing blank line separation between groups.
β»οΈ Proposed fix
import ( "context" "fmt" "os" "os/exec" "path/filepath" "strings" + "github.com/spf13/cobra" "github.com/spf13/viper" + errUtils "github.com/cloudposse/atmos/errors" atmosgit "github.com/cloudposse/atmos/pkg/git" "github.com/cloudposse/atmos/pkg/perf" "github.com/cloudposse/atmos/pkg/ui" )π€ 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/git/clean.go` around lines 3 - 18, Reorder the import block in cmd/git/clean.go into three groups separated by single blank lines: first list Go stdlib imports (context, fmt, os, os/exec, path/filepath, strings), then third-party imports (github.com/spf13/cobra, github.com/spf13/viper), and finally Atmos package imports (errUtils "github.com/cloudposse/atmos/errors", atmosgit "github.com/cloudposse/atmos/pkg/git", "github.com/cloudposse/atmos/pkg/perf", "github.com/cloudposse/atmos/pkg/ui"); ensure there is exactly one blank line between each group and no other changes to identifiers or aliases.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/git/clean.go`:
- Around line 3-18: Reorder the import block in cmd/git/clean.go into three
groups separated by single blank lines: first list Go stdlib imports (context,
fmt, os, os/exec, path/filepath, strings), then third-party imports
(github.com/spf13/cobra, github.com/spf13/viper), and finally Atmos package
imports (errUtils "github.com/cloudposse/atmos/errors", atmosgit
"github.com/cloudposse/atmos/pkg/git", "github.com/cloudposse/atmos/pkg/perf",
"github.com/cloudposse/atmos/pkg/ui"); ensure there is exactly one blank line
between each group and no other changes to identifiers or aliases.
βΉοΈ Review info
βοΈ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 7912626e-eb71-438f-9a55-16243da45f7c
π Files selected for processing (11)
cmd/git/clean.gocmd/git/clean_test.gocmd/git/flags.gocmd/git/git.gocmd/markdown/atmos_git_usage.mdexamples/demo-gitops/README.mdexamples/demo-gitops/atmos.yamlpkg/git/resolve.gopkg/xdg/xdg.gowebsite/docs/cli/commands/git/git-clean.mdxwebsite/docs/cli/commands/git/usage.mdx
β Files skipped from review due to trivial changes (3)
- examples/demo-gitops/atmos.yaml
- website/docs/cli/commands/git/git-clean.mdx
- website/docs/cli/commands/git/usage.mdx
π§ Files skipped from review as they are similar to previous changes (3)
- cmd/git/flags.go
- cmd/git/git.go
- pkg/git/resolve.go
Lead the `atmos git` usage intro, command description, and help text with the GitOps enablement value: making automated Git commits easy, safe, and conventional both locally and in CI across projects. Regenerate the affected top-level --help golden snapshots and fix a stale `pull --ff-only` reference (retry uses `pull --rebase`). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
There was a problem hiding this comment.
Caution
Some comments are outside the diff and canβt be posted inline due to platform limitations.
β οΈ Outside diff range comments (1)
website/docs/cli/commands/git/usage.mdx (1)
30-68:β οΈ Potential issue | π Major | β‘ Quick winAdd the required command-doc sections (
Usage,Arguments/Flags,Examples).This page has frontmatter/Intro/Screengrab, but it still misses mandatory sections for new CLI command docs. Please add:
## Usage## Arguments/Flagswith<dl><dt>/<dd>## ExamplesUse the command forms in
cmd/markdown/atmos_git_usage.mdas the canonical source so CLI and website docs stay aligned.As per coding guidelines, βCLI command docs MUST include β¦ Usage β¦ Arguments/Flags with
<dl><dt>/<dd>β¦ Examples section,β and βKeep CLI documentation and website documentation in sync.βπ€ 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 `@website/docs/cli/commands/git/usage.mdx` around lines 30 - 68, The usage.mdx file for the git command is missing three mandatory documentation sections. Add a Usage section that describes the general command syntax and purpose, add an Arguments/Flags section using HTML definition list elements (dl, dt, dd) to document each parameter and option with descriptions, and add an Examples section showing practical usage scenarios. Consult cmd/markdown/atmos_git_usage.md as the authoritative source for the correct command forms and argument details to ensure consistency between CLI help text and website documentation.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.
Outside diff comments:
In `@website/docs/cli/commands/git/usage.mdx`:
- Around line 30-68: The usage.mdx file for the git command is missing three
mandatory documentation sections. Add a Usage section that describes the general
command syntax and purpose, add an Arguments/Flags section using HTML definition
list elements (dl, dt, dd) to document each parameter and option with
descriptions, and add an Examples section showing practical usage scenarios.
Consult cmd/markdown/atmos_git_usage.md as the authoritative source for the
correct command forms and argument details to ensure consistency between CLI
help text and website documentation.
βΉοΈ Review info
βοΈ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 90ccbebe-232f-457f-86e6-748662b24ce8
π Files selected for processing (6)
cmd/git/git.gocmd/markdown/atmos_git_usage.mdtests/snapshots/TestCLICommands_atmos_--help.stdout.goldentests/snapshots/TestCLICommands_atmos_--help_config_aliases_section.stdout.goldentests/snapshots/TestCLICommands_help_flag_works.stdout.goldenwebsite/docs/cli/commands/git/usage.mdx
β Files skipped from review due to trivial changes (2)
- tests/snapshots/TestCLICommands_atmos_--help.stdout.golden
- tests/snapshots/TestCLICommands_help_flag_works.stdout.golden
π§ Files skipped from review as they are similar to previous changes (2)
- tests/snapshots/TestCLICommands_atmos_--help_config_aliases_section.stdout.golden
- cmd/git/git.go
There was a problem hiding this comment.
Caution
Some comments are outside the diff and canβt be posted inline due to platform limitations.
β οΈ Outside diff range comments (1)
cmd/markdown/atmos_git_usage.md (1)
4-10:β οΈ Potential issue | π‘ Minor | β‘ Quick winRemove
$prompt tokens from all shell examples.Lines 4β10 all use leading
$prompts without showing output, which triggers markdownlint MD014 (commands-show-output). Since this example documents commands without displaying their output, remove the prompt prefix from each line.π§Ή Proposed fix
```shell -$ atmos git clone <name-or-uri> -$ atmos git pull <name-or-path> -$ atmos git status <name-or-path> -$ atmos git diff <name-or-path> -$ atmos git commit <name-or-path> --message "msg" -$ atmos git push <name-or-path> -$ atmos git clean <name> +atmos git clone <name-or-uri> +atmos git pull <name-or-path> +atmos git status <name-or-path> +atmos git diff <name-or-path> +atmos git commit <name-or-path> --message "msg" +atmos git push <name-or-path> +atmos git clean <name></details> <details> <summary>π€ Prompt for AI Agents</summary>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/markdown/atmos_git_usage.mdaround lines 4 - 10, Remove the leading$
prompt token from each of the seven command lines (atmos git clone, pull,
status, diff, commit, push, and clean) in the markdown file. These lines display
commands without showing their output, which violates the markdownlint MD014
rule that requires either output to be shown or the prompt to be omitted. Simply
delete the$prefix from the beginning of each command line, leaving only the
command itself.</details> <!-- cr-comment:v1:1c64b26bfdf86afb1ec957d1 --> _Source: Linters/SAST tools_ </blockquote></details> </blockquote></details>π€ 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. Outside diff comments: In `@cmd/markdown/atmos_git_usage.md`: - Around line 4-10: Remove the leading `$ ` prompt token from each of the seven command lines (atmos git clone, pull, status, diff, commit, push, and clean) in the markdown file. These lines display commands without showing their output, which violates the markdownlint MD014 rule that requires either output to be shown or the prompt to be omitted. Simply delete the `$ ` prefix from the beginning of each command line, leaving only the command itself.
βΉοΈ Review info
βοΈ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID:
a9bfbca5-2218-4036-8f19-e25b6dee5d37π Files selected for processing (7)
cmd/git/git.gocmd/markdown/atmos_git_usage.mdtests/snapshots/TestCLICommands_atmos_--help.stdout.goldentests/snapshots/TestCLICommands_atmos_--help_config_aliases_section.stdout.goldentests/snapshots/TestCLICommands_help_flag_works.stdout.goldenwebsite/docs/cli/commands/git/usage.mdxwebsite/src/data/roadmap.jsβ Files skipped from review due to trivial changes (5)
- tests/snapshots/TestCLICommands_help_flag_works.stdout.golden
- tests/snapshots/TestCLICommands_atmos_--help.stdout.golden
- website/src/data/roadmap.js
- tests/snapshots/TestCLICommands_atmos_--help_config_aliases_section.stdout.golden
- website/docs/cli/commands/git/usage.mdx
π§ Files skipped from review as they are similar to previous changes (1)
- cmd/git/git.go
The Build (windows) job hit the 15-minute timeout mid-`go build` (job ran 15m19s). windows-latest compiles this large dependency tree far slower than the Linux (self-hosted, s3-cache) and macOS runners, and a cold Go build cache after dependency changes forces a full recompile that crosses the limit. The build is clean β all packages compile β so this is purely a runtime ceiling; give it headroom. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
β¦build) version-windows depended on build-windows, so the CI Version step recompiled and re-linked the entire atmos.exe a second time per job β work version-linux and version-macos (via version-default) never repeat, since they just run the already-built binary. On the slow windows-latest runner this doubled the build phase and was a major contributor to the Build (windows) timeout. The CI Build step runs `make build-windows` before the Version step, so version-windows now just runs ./build/atmos.exe, matching the other platforms. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Tip Atmos Pro Β
No affected stacks workflow was detected for this pull request. |
|
Warning Release Documentation RequiredThis PR is labeled
|
|
These changes were released in v1.222.0-rc.0. |
β¦ry (#2607) * WIP: kubernetes native component + provision targets (pre-merge snapshot) Snapshot of in-progress Kubernetes-native-component work prior to merging origin/main (which contains the Atmos Git foundation, #2597). Lint findings in the new code were resolved (static error sentinels, named constants, perf.Track, complexity refactors, gosec file modes, file-length split into executor_bulk.go). pkg/auth/cloud/gcp/files.go was fast-forwarded to its origin/main state to clear pre-merge lint noise. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(kubernetes): publish rendered manifests to git via provision.targets Add a reusable target-provisioner registry (pkg/provisioner/target) and a ProvisionArtifact model so a component can render once and deliver to a selectable destination by kind. Implement the git target: it consumes the merged pkg/git service to clone-reconcile a managed git.repositories.<name>, write the rendered manifests under a templated path (replacing the managed subtree), path-scoped commit with provenance trailers, and push with retry; pull_request is deferred. Wire apply/deploy through provision.targets: kind 'kubernetes' keeps the inline cluster SDK apply, any other kind routes the artifact through the registry, with a new --target flag (precedence: --target > provision.default > implicit cluster). Add typed provision.targets schema (Go + stack-config/manifest JSON schemas), render the provision section so target path/commit templates materialize, plus an example, docs, a changelog blog post, and a roadmap milestone. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * [autocommit] formatting fixes * feat(kubernetes): add validate subcommand and harden git target delivery Incremental work on the native Kubernetes component feature: add an `atmos kubernetes validate` subcommand (with docs), guard the git target's writeArtifact against root/empty paths so a managed-path clear can never wipe the repository (new ErrGitTargetPathInvalid/ErrGitArtifactWrite sentinels), route operation flags through the standard parser, and refresh component docs, examples, and CLI golden snapshots accordingly. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * [autocommit] formatting fixes * fix(kubernetes): address CodeRabbit review feedback on PR #2607 - validate: bound server-side dry-run with a 5m context timeout so a hung Kubernetes API call cannot block indefinitely - git target: harden writeArtifact root-path guard with filepath.Clean so dot-equivalent paths ("./", "a/..") cannot reach os.RemoveAll and wipe the worktree; extend regression test coverage - docs: add required description frontmatter and Screengrab block to the kubernetes validate command page Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(kubernetes): classify new section constants and fix Windows path test Acceptance Tests failed on all platforms because the kubernetes-native component PR added five new *SectionName constants without wiring them into the schema-coverage ratchet, and a path test assumed Unix-absolute paths. - datafetcher: classify the new section constants in schema_section_coverage_test.go β `kubernetes` as a top-level manifest section (alongside terraform/helmfile/packer/ansible) and the Kubernetes component sub-fields `provider`/`paths`/`manifests`/`render` as non-manifest sections (matching the packer `template` / ansible `playbook`/`inventory` precedent) - schema: model `kubernetes` in the canonical website manifest schema (top-level section, components.kubernetes, and the kubernetes_* defs), mirroring the already-updated embedded schema so TestSchemaCoversAllSections stays green instead of tracking a knownSchemaGap - kubernetes: fix TestManifestPathHelpers on Windows β "/tmp/absolute.yaml" is not absolute without a drive letter, so use t.TempDir() which is absolute on every OS Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * test(kubernetes): add envtest e2e tier plus expanded unit coverage Add an end-to-end test tier for the Kubernetes native component that runs against a real kube-apiserver+etcd control plane (controller-runtime envtest). The control-plane binaries are provisioned on demand by the tests via the Atmos toolchain using an inline registry.ToolRegistry β no Makefile target, no setup-envtest, no atmos.yaml. Gated behind the `envtest` build tag and limited to Linux/macOS (there is no official kube-apiserver build for Windows). A new [envtest] CI job runs the tier on ubuntu and macos. The tier covers the client.go behavior the in-memory fake dynamic client cannot: server-side-apply field ownership, dry-run diff semantics, real discovery/RESTMapper resolution, and a CRD round-trip. Also bundles expanded unit-test coverage across the kubernetes component, describe-affected, stack processor, component graph, and git provisioner. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(ci): disable CGO for kubernetes control-plane tests and clarify job name The envtest job invoked `go test` directly, bypassing the Makefile's global CGO_ENABLED=0. With CGO on, a transitive dependency of the Atmos toolchain (bearsh/hid β libudev, via the auth/webauthn chain) tried to compile and failed on runners that lack libudev, breaking the build. Set CGO_ENABLED=0 to match Atmos's build policy; those CGO paths are unused by the tests. Also rename the job to "[Kubernetes] control plane" β leading with the subsystem and what is exercised, rather than the cryptic "[envtest]" label. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * chore(ci): rename Kubernetes job to "[kubernetes] e2e tests" Match the lowercase bracket-label convention of the other jobs ([k3s], [mock-*]) and describe the job as the Kubernetes end-to-end test tier. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * Add Kubernetes CI job summaries * fix kubernetes ci hook summaries * fix coderabbit review findings * fix kubernetes docs usage id * Harden spacelift admin stack ignore-missing-template-values test Assert the appended affected entry (component/stack/type) so the test is a meaningful regression guard instead of only checking no-error/non-nil. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * Add unified diffs to Kubernetes plan/diff (terminal + CI summary) kubernetes plan/diff now emit a per-object unified diff in the terminal and a collapsible "Kubernetes Diff" block in the CI job summary (GitHub ```diff syntax). The diff was already computed in client.Diff() (live vs dry-run after normalizeForDiff) and discarded; this retains it via objectResult.Diff -> KubernetesObjectCIResult.Diff -> the summary template. Secret objects are omitted from the diff so their data never reaches the unmasked job summary. Mirrors the Terraform convention of a secondary <details> block, and reuses Terraform's tail-preserving truncation, extracted into the shared pkg/ci/internal/plugin.TruncateDetail helper. Includes unit + envtest coverage and updated user-facing docs (CI templates/ summary variables, job summaries, kubernetes command/usage pages, launch blog). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * [autocommit] formatting fixes * docs: fix fragile inline diff-fence formatting in CI templates page Address CodeRabbit review on PR #2607: an inline ` ```diff ` with single-backtick delimiters renders/copies poorly. Reword to "diff block using GitHub's `diff` fenced code syntax". Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * ci(link-check): exclude flaky no-color.org from lychee The Check Markdown Links job failed (exit 2) on two timeouts for https://no-color.org/ (referenced from docs/prd/help-system-architecture.md and docs/prd/io-handling-strategy.md) β even with max_retries=3 and a 60s timeout. The link is valid (the NO_COLOR standard site); it just intermittently times out from CI, like the other excluded hosts (gnu.org, tldp.org, kubernetes.io, regex101.com, β¦). Add it to the lychee exclude list. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(kubernetes): mark atmos kubernetes command experimental Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(ci): pin kubernetes-e2e setup-go SHA and refresh --help snapshots The post-merge CI surfaced two failures introduced by the origin/main merge and the experimental-flag change: - verify (SHA-pin): the kubernetes-e2e job's "Set up Go" step still pinned the pre-merge actions/setup-go@4a36011 (# v6) while the merge bumped every other occurrence to @924ae3a; align it so SHA-pin verification passes. - Acceptance Tests (linux/macos/windows): marking `atmos kubernetes` experimental changed `atmos --help` to print `kubernetes [command] [EXPERIMENTAL]`, so the three top-level help golden snapshots were stale. Regenerated via -regenerate-snapshots (only the kubernetes line changed). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(examples): migrate Kubernetes examples to the native emulator Replace the hand-rolled k3s scaffolding (docker-compose.yml, the KUBECONFIG mixin, and the `atmos k3s` custom commands) in the kubernetes, kustomize, and demo-helmfile examples with the native emulator (components.emulator.kubernetes, driver: k3s, ephemeral). - kubernetes / kustomize: bind a `kubernetes/emulator` identity that harvests the emulator's kubeconfig and injects KUBECONFIG. - demo-helmfile: consume the emulator via the `!emulator kubernetes kubeconfig` YAML function plus toolchain-installed helmfile/helm/kubectl/kustomize. Fixes uncovered while wiring these end-to-end: - The native Kubernetes component now applies the selected identity's prepared environment (KUBECONFIG) to the in-process client, so kubernetes/emulator (and aws/eks) identities actually reach the cluster. - The k3s kubeconfig harvest polls for readiness (k3s writes k3s.yaml shortly after the API port opens) instead of racing a one-shot read. - `atmos helmfile apply` resolves its binary through the toolchain (matching the `version` subcommand), so a toolchain-installed helmfile is found. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(emulator): Gitea git-server emulator + local GitOps round trip Add a `gitea` emulator driver (new `git` target) that serves Git over HTTP, so the git provision target's render -> commit -> push path is testable end to end with no external Git host. A manager bootstrap creates a throwaway admin user and an auto-initialized `deployments` repo on `up` (mirroring the Vault bootstrap), and emulators in a stack now join a shared per-stack network so a GitOps controller in the k3s emulator can reach Gitea by name. examples/local-gitops/ is the centerpiece: it stands up the Gitea + k3s emulators, installs Flux, and reconciles what Atmos pushes to Gitea back into the cluster. Two gated E2E tests drive that example (push-only and the full Flux round trip); both pass against real Podman. Also fixes a pre-existing Podman gap: the `podman ps` List parser dropped port bindings, leaving emulator endpoints empty under Podman; add parsePodmanPorts. Bundles in-flight host-runtime container support (container.runtime.host) and related container/runner/schema/docs changes present on this branch. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(ci): align demo-helmfile jobs with the native k3s emulator migration demo-helmfile was migrated from a docker-compose k3s cluster to the native Kubernetes emulator (`atmos emulator up kubernetes`, kubeconfig harvested via the `!emulator` YAML function), but the CI jobs were not updated, so both failed: - [k3s] demo-helmfile ran `docker compose up -d --wait` against an example that no longer ships a compose file ("no configuration file provided"). `atmos test` now starts k3s itself, so drop the obsolete docker-compose + wait-for-k3s steps and the stale job-level KUBECONFIG (the component sets it via `!emulator`). - [validate] demo-helmfile validated stacks with yaml-ls-check, which can't resolve the new `!emulator` tag. Exclude demo-helmfile from that matrix (as every other function-using example already is); its stacks are still validated by `atmos validate stacks` inside the [k3s] job. Validated locally on Podman: `atmos test` brings up k3s, applies the nginx helmfile release, and tears the emulator down (exit 0). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(emulator): CI-proof the local-gitops commit identity and kubeconfig retry Two CI failures on the local-gitops / native-emulator work: - [floci] go e2e: TestLocalGitOpsPushE2E failed with `git commit (exit 128)` β the CI runner has no global git identity, and the deployments repo did not pin one, so the provisioner's commit hit "Please tell me who you are". Pin `commit.author` on the example's deployments repo (the schema documents this as required in CI) and make the E2E run with GIT_CONFIG_GLOBAL/SYSTEM=os.DevNull so it reproduces the no-ambient-identity runner and self-validates the fix. - [Acceptance/windows]: TestManager_Resolve_KubernetesKubeconfigError flaked β with kubeconfigReadyTimeout=0 the harvest retry used `time.Now().After(deadline)` (strict >). On Windows's coarse monotonic clock the first post-attempt read can equal the deadline, so it polled again (an extra List call) and tripped the mock's Times(2). Use reached-or-passed semantics (`!time.Now().Before(deadline)`) so a zero timeout makes exactly one attempt on every platform. Validated on Podman: push E2E passes with no ambient git identity; emulator unit tests (incl. the kubeconfig test) pass. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * refactor(examples): make local-gitops a symmetric `gitops up`/`down` command Replace the asymmetric `atmos gitops` / `atmos teardown` pair with a single `gitops` command group exposing `up` and `down` subcommands (the nested custom-command pattern), so standing the loop up and tearing it down read symmetrically. Update the README accordingly. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * refactor(examples): provision local-gitops Flux via component `source:` Replace the `atmos vendor pull` step in the local-gitops demo with just-in-time component source provisioning. The flux component now declares a `source:` pointing at the pinned Flux install release asset, so Atmos fetches it through the shared provisioner (the same go-getter machinery `atmos vendor` uses) instead of a separate vendor.yaml. - flux.yaml: add `source:` (uri + ttl), render via `paths: ["."]` - atmos.yaml: drop the `atmos vendor pull` step from `gitops up` - delete vendor.yaml and the committed files/.gitignore; gitignore the now-ephemeral components/kubernetes/flux/ directory - README: remove the vendor step and the vendor.yaml reference - local_gitops_test.go: drop the vendor pull call from the round-trip E2E Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * Fix acceptance CI failures * Use portable GitOps cleanup command --------- Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> Co-authored-by: atmos-pro[bot] <173522224+atmos-pro[bot]@users.noreply.github.com>
* WIP: kubernetes native component + provision targets (pre-merge snapshot) Snapshot of in-progress Kubernetes-native-component work prior to merging origin/main (which contains the Atmos Git foundation, #2597). Lint findings in the new code were resolved (static error sentinels, named constants, perf.Track, complexity refactors, gosec file modes, file-length split into executor_bulk.go). pkg/auth/cloud/gcp/files.go was fast-forwarded to its origin/main state to clear pre-merge lint noise. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(kubernetes): publish rendered manifests to git via provision.targets Add a reusable target-provisioner registry (pkg/provisioner/target) and a ProvisionArtifact model so a component can render once and deliver to a selectable destination by kind. Implement the git target: it consumes the merged pkg/git service to clone-reconcile a managed git.repositories.<name>, write the rendered manifests under a templated path (replacing the managed subtree), path-scoped commit with provenance trailers, and push with retry; pull_request is deferred. Wire apply/deploy through provision.targets: kind 'kubernetes' keeps the inline cluster SDK apply, any other kind routes the artifact through the registry, with a new --target flag (precedence: --target > provision.default > implicit cluster). Add typed provision.targets schema (Go + stack-config/manifest JSON schemas), render the provision section so target path/commit templates materialize, plus an example, docs, a changelog blog post, and a roadmap milestone. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * [autocommit] formatting fixes * feat(kubernetes): add validate subcommand and harden git target delivery Incremental work on the native Kubernetes component feature: add an `atmos kubernetes validate` subcommand (with docs), guard the git target's writeArtifact against root/empty paths so a managed-path clear can never wipe the repository (new ErrGitTargetPathInvalid/ErrGitArtifactWrite sentinels), route operation flags through the standard parser, and refresh component docs, examples, and CLI golden snapshots accordingly. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * [autocommit] formatting fixes * fix(kubernetes): address CodeRabbit review feedback on PR #2607 - validate: bound server-side dry-run with a 5m context timeout so a hung Kubernetes API call cannot block indefinitely - git target: harden writeArtifact root-path guard with filepath.Clean so dot-equivalent paths ("./", "a/..") cannot reach os.RemoveAll and wipe the worktree; extend regression test coverage - docs: add required description frontmatter and Screengrab block to the kubernetes validate command page Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(kubernetes): classify new section constants and fix Windows path test Acceptance Tests failed on all platforms because the kubernetes-native component PR added five new *SectionName constants without wiring them into the schema-coverage ratchet, and a path test assumed Unix-absolute paths. - datafetcher: classify the new section constants in schema_section_coverage_test.go β `kubernetes` as a top-level manifest section (alongside terraform/helmfile/packer/ansible) and the Kubernetes component sub-fields `provider`/`paths`/`manifests`/`render` as non-manifest sections (matching the packer `template` / ansible `playbook`/`inventory` precedent) - schema: model `kubernetes` in the canonical website manifest schema (top-level section, components.kubernetes, and the kubernetes_* defs), mirroring the already-updated embedded schema so TestSchemaCoversAllSections stays green instead of tracking a knownSchemaGap - kubernetes: fix TestManifestPathHelpers on Windows β "/tmp/absolute.yaml" is not absolute without a drive letter, so use t.TempDir() which is absolute on every OS Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * test(kubernetes): add envtest e2e tier plus expanded unit coverage Add an end-to-end test tier for the Kubernetes native component that runs against a real kube-apiserver+etcd control plane (controller-runtime envtest). The control-plane binaries are provisioned on demand by the tests via the Atmos toolchain using an inline registry.ToolRegistry β no Makefile target, no setup-envtest, no atmos.yaml. Gated behind the `envtest` build tag and limited to Linux/macOS (there is no official kube-apiserver build for Windows). A new [envtest] CI job runs the tier on ubuntu and macos. The tier covers the client.go behavior the in-memory fake dynamic client cannot: server-side-apply field ownership, dry-run diff semantics, real discovery/RESTMapper resolution, and a CRD round-trip. Also bundles expanded unit-test coverage across the kubernetes component, describe-affected, stack processor, component graph, and git provisioner. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(ci): disable CGO for kubernetes control-plane tests and clarify job name The envtest job invoked `go test` directly, bypassing the Makefile's global CGO_ENABLED=0. With CGO on, a transitive dependency of the Atmos toolchain (bearsh/hid β libudev, via the auth/webauthn chain) tried to compile and failed on runners that lack libudev, breaking the build. Set CGO_ENABLED=0 to match Atmos's build policy; those CGO paths are unused by the tests. Also rename the job to "[Kubernetes] control plane" β leading with the subsystem and what is exercised, rather than the cryptic "[envtest]" label. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * chore(ci): rename Kubernetes job to "[kubernetes] e2e tests" Match the lowercase bracket-label convention of the other jobs ([k3s], [mock-*]) and describe the job as the Kubernetes end-to-end test tier. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * Add Kubernetes CI job summaries * feat: add native Helm component support * fix kubernetes ci hook summaries * fix coderabbit review findings * fix kubernetes docs usage id * Harden spacelift admin stack ignore-missing-template-values test Assert the appended affected entry (component/stack/type) so the test is a meaningful regression guard instead of only checking no-error/non-nil. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * Add unified diffs to Kubernetes plan/diff (terminal + CI summary) kubernetes plan/diff now emit a per-object unified diff in the terminal and a collapsible "Kubernetes Diff" block in the CI job summary (GitHub ```diff syntax). The diff was already computed in client.Diff() (live vs dry-run after normalizeForDiff) and discarded; this retains it via objectResult.Diff -> KubernetesObjectCIResult.Diff -> the summary template. Secret objects are omitted from the diff so their data never reaches the unmasked job summary. Mirrors the Terraform convention of a secondary <details> block, and reuses Terraform's tail-preserving truncation, extracted into the shared pkg/ci/internal/plugin.TruncateDetail helper. Includes unit + envtest coverage and updated user-facing docs (CI templates/ summary variables, job summaries, kubernetes command/usage pages, launch blog). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * [autocommit] formatting fixes * docs: fix fragile inline diff-fence formatting in CI templates page Address CodeRabbit review on PR #2607: an inline ` ```diff ` with single-backtick delimiters renders/copies poorly. Reword to "diff block using GitHub's `diff` fenced code syntax". Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * ci(link-check): exclude flaky no-color.org from lychee The Check Markdown Links job failed (exit 2) on two timeouts for https://no-color.org/ (referenced from docs/prd/help-system-architecture.md and docs/prd/io-handling-strategy.md) β even with max_retries=3 and a 60s timeout. The link is valid (the NO_COLOR standard site); it just intermittently times out from CI, like the other excluded hosts (gnu.org, tldp.org, kubernetes.io, regex101.com, β¦). Add it to the lychee exclude list. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(kubernetes): mark atmos kubernetes command experimental Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(ci): pin kubernetes-e2e setup-go SHA and refresh --help snapshots The post-merge CI surfaced two failures introduced by the origin/main merge and the experimental-flag change: - verify (SHA-pin): the kubernetes-e2e job's "Set up Go" step still pinned the pre-merge actions/setup-go@4a36011 (# v6) while the merge bumped every other occurrence to @924ae3a; align it so SHA-pin verification passes. - Acceptance Tests (linux/macos/windows): marking `atmos kubernetes` experimental changed `atmos --help` to print `kubernetes [command] [EXPERIMENTAL]`, so the three top-level help golden snapshots were stale. Regenerated via -regenerate-snapshots (only the kubernetes line changed). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat: mark native Helm command as experimental Flip the helm CommandProvider's IsExperimental() to true so the command (and its subcommands) render the [EXPERIMENTAL] badge and honor settings.experimental / ATMOS_EXPERIMENTAL gating. Also surface the experimental status in the command docs and blog post, and regenerate the top-level help snapshots that now show the badge. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(examples): migrate Kubernetes examples to the native emulator Replace the hand-rolled k3s scaffolding (docker-compose.yml, the KUBECONFIG mixin, and the `atmos k3s` custom commands) in the kubernetes, kustomize, and demo-helmfile examples with the native emulator (components.emulator.kubernetes, driver: k3s, ephemeral). - kubernetes / kustomize: bind a `kubernetes/emulator` identity that harvests the emulator's kubeconfig and injects KUBECONFIG. - demo-helmfile: consume the emulator via the `!emulator kubernetes kubeconfig` YAML function plus toolchain-installed helmfile/helm/kubectl/kustomize. Fixes uncovered while wiring these end-to-end: - The native Kubernetes component now applies the selected identity's prepared environment (KUBECONFIG) to the in-process client, so kubernetes/emulator (and aws/eks) identities actually reach the cluster. - The k3s kubeconfig harvest polls for readiness (k3s writes k3s.yaml shortly after the API port opens) instead of racing a one-shot read. - `atmos helmfile apply` resolves its binary through the toolchain (matching the `version` subcommand), so a toolchain-installed helmfile is found. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(emulator): Gitea git-server emulator + local GitOps round trip Add a `gitea` emulator driver (new `git` target) that serves Git over HTTP, so the git provision target's render -> commit -> push path is testable end to end with no external Git host. A manager bootstrap creates a throwaway admin user and an auto-initialized `deployments` repo on `up` (mirroring the Vault bootstrap), and emulators in a stack now join a shared per-stack network so a GitOps controller in the k3s emulator can reach Gitea by name. examples/local-gitops/ is the centerpiece: it stands up the Gitea + k3s emulators, installs Flux, and reconciles what Atmos pushes to Gitea back into the cluster. Two gated E2E tests drive that example (push-only and the full Flux round trip); both pass against real Podman. Also fixes a pre-existing Podman gap: the `podman ps` List parser dropped port bindings, leaving emulator endpoints empty under Podman; add parsePodmanPorts. Bundles in-flight host-runtime container support (container.runtime.host) and related container/runner/schema/docs changes present on this branch. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(ci): align demo-helmfile jobs with the native k3s emulator migration demo-helmfile was migrated from a docker-compose k3s cluster to the native Kubernetes emulator (`atmos emulator up kubernetes`, kubeconfig harvested via the `!emulator` YAML function), but the CI jobs were not updated, so both failed: - [k3s] demo-helmfile ran `docker compose up -d --wait` against an example that no longer ships a compose file ("no configuration file provided"). `atmos test` now starts k3s itself, so drop the obsolete docker-compose + wait-for-k3s steps and the stale job-level KUBECONFIG (the component sets it via `!emulator`). - [validate] demo-helmfile validated stacks with yaml-ls-check, which can't resolve the new `!emulator` tag. Exclude demo-helmfile from that matrix (as every other function-using example already is); its stacks are still validated by `atmos validate stacks` inside the [k3s] job. Validated locally on Podman: `atmos test` brings up k3s, applies the nginx helmfile release, and tears the emulator down (exit 0). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(emulator): CI-proof the local-gitops commit identity and kubeconfig retry Two CI failures on the local-gitops / native-emulator work: - [floci] go e2e: TestLocalGitOpsPushE2E failed with `git commit (exit 128)` β the CI runner has no global git identity, and the deployments repo did not pin one, so the provisioner's commit hit "Please tell me who you are". Pin `commit.author` on the example's deployments repo (the schema documents this as required in CI) and make the E2E run with GIT_CONFIG_GLOBAL/SYSTEM=os.DevNull so it reproduces the no-ambient-identity runner and self-validates the fix. - [Acceptance/windows]: TestManager_Resolve_KubernetesKubeconfigError flaked β with kubeconfigReadyTimeout=0 the harvest retry used `time.Now().After(deadline)` (strict >). On Windows's coarse monotonic clock the first post-attempt read can equal the deadline, so it polled again (an extra List call) and tripped the mock's Times(2). Use reached-or-passed semantics (`!time.Now().Before(deadline)`) so a zero timeout makes exactly one attempt on every platform. Validated on Podman: push E2E passes with no ambient git identity; emulator unit tests (incl. the kubeconfig test) pass. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * refactor(examples): make local-gitops a symmetric `gitops up`/`down` command Replace the asymmetric `atmos gitops` / `atmos teardown` pair with a single `gitops` command group exposing `up` and `down` subcommands (the nested custom-command pattern), so standing the loop up and tearing it down read symmetrically. Update the README accordingly. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(helm): real unified diff for native Helm components Replace the dry-run-manifest dump in `atmos helm diff`/`plan` with a true unified diff computed by the helm-diff library (used as a Go library, not the CLI plugin β v3.15.10 pins the same helm.sh/helm/v4 v4.2.1 Atmos uses). Secret values are redacted. The chart is rendered client-side, so two of the three baseline modes are fully offline: - deployed release (default; reads the release via action.NewGet β cluster only for the baseline) - --from-manifest=<path> (local baseline file; offline) - --against=target[:<name>] (current manifests in a git deployment-repo provision target; offline β the GitOps producer-side diff) Adds an optional Fetcher capability to the provision-target registry and implements it on the git target (read-only clone+read). Adds a .Diff CI job summary (collapsible block, Secrets omitted) at parity with the kubernetes component, plus the --against/--from-manifest/--context flags. Docs, blog, and the examples/helm README are updated. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * [autocommit] formatting fixes * fix(helm): absolute HELM_PLUGINS + classify Helm manifest sections Fixes three CI failures introduced by the native-Helm / helmfile-plugins work: - demo-helmfile k3s E2E (`Error: unknown command "diff" for "helm"`): the managed HELM_PLUGINS directory was a path relative to the Atmos base dir (e.g. `.tools/helm-plugins`), so helm could not find installed plugins when helmfile ran helm from a component working directory. Resolve it to an absolute path, mirroring how toolchain binary PATH entries are absolutized. - TestEverySectionConstantIsClassified: classify the native-Helm section constants. Top-level `helm` (peer of `helmfile`/`kubernetes`) is a manifest section; its schema modeling is tracked as a known gap alongside the full native-Helm manifest schema. `chart`/`values`/`values_files`/`repositories`/ `plugins` are component sub-fields (like the kubernetes sub-fields). - TestCLICommands: regenerate the helmfile / helmfile-apply help snapshots for the new `--ci` flag. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * docs(helmfile): note helm-diff plugin prerequisite for diff/apply/deploy `atmos helmfile diff`, `apply`, and `deploy` shell out to `helm diff`, so they require the helm-diff plugin. Document the two ways to satisfy it: declare it on the component (`plugins: [diff@...]`) for Atmos-managed install, or install it yourself with `helm plugin install` when not using the Atmos toolchain. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * test: improve native helm coverage * test: increase helm coverage * [autocommit] formatting fixes * test: make helmfile tests windows compatible * refactor(examples): provision local-gitops Flux via component `source:` Replace the `atmos vendor pull` step in the local-gitops demo with just-in-time component source provisioning. The flux component now declares a `source:` pointing at the pinned Flux install release asset, so Atmos fetches it through the shared provisioner (the same go-getter machinery `atmos vendor` uses) instead of a separate vendor.yaml. - flux.yaml: add `source:` (uri + ttl), render via `paths: ["."]` - atmos.yaml: drop the `atmos vendor pull` step from `gitops up` - delete vendor.yaml and the committed files/.gitignore; gitignore the now-ephemeral components/kubernetes/flux/ directory - README: remove the vendor step and the vendor.yaml reference - local_gitops_test.go: drop the vendor pull call from the round-trip E2E Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * test: compare helmfile cwd by file identity * test: raise native-helm-component patch coverage to ~84% Cover the lowest-coverage files flagged by Codecov on the native-Helm-component feature branch, lifting patch coverage from 69.58% to ~84% (above the 80% gate): - pkg/component/helm: in-memory Helm storage driver exercises the cluster client lifecycle (install/upgrade/get/delete) without a cluster; cover external-target delivery, hook orchestration, diff baselines, and bulk paths - pkg/ci/plugins/helmfile: mirror the helm CI plugin onAfterOperation tests - pkg/provisioner/target{,/git}: Fetch dispatcher + git Fetch round-trip - pkg/manifest: list expansion, decode error, OutputDir/stdout write paths - pkg/helm/plugin: EnsureForComponent, ExtractSpecs coercion - cmd/helm, cmd/helmfile: resolveHelmBinary and CI-mode helper functions - internal/exec: add a renderAndDeliver seam to unit-test deliverHelmfileToTarget without the helmfile binary Tests only; the lone production change is a one-line test seam. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * test: make TestResolveHelmBinary environment-independent resolveHelmBinary delegates to ToolchainEnvironment.Resolve, which returns the bare name "helm" when nothing is installed but a toolchain/PATH-resolved absolute path (e.g. .tools/bin/helm/.../helm[.exe]) when helm IS installed β which it is on the CI runners. Assert the resolved binary's base name instead of an exact string so the test passes on Linux, macOS, and Windows CI. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * Add declarative Helm repository support * Fix acceptance CI failures * Use portable GitOps cleanup command * Fix Git emulator URL test expectation * [autocommit] formatting fixes * Update vendoring globs acceptance expectation * Add K3s deploy smoke test for Helm example * [autocommit] formatting fixes * Add Helm repository coverage to Helm example * [autocommit] formatting fixes * Silence experimental banner in Helm example test * Use shared terminal settings for markdown errors * Fix CI failures for Helm component tests * Fix macOS CI runner selection * Fix k3s example CI failures * Wait for k3s node readiness * Fix acceptance test expectations * Fix stack config helm repository schema ref * Allow current ORAS advisory until fixed release --------- Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> Co-authored-by: atmos-pro[bot] <173522224+atmos-pro[bot]@users.noreply.github.com> Co-authored-by: aknysh <[email protected]> Co-authored-by: Andriy Knysh <[email protected]>
* WIP: kubernetes native component + provision targets (pre-merge snapshot) Snapshot of in-progress Kubernetes-native-component work prior to merging origin/main (which contains the Atmos Git foundation, cloudposse#2597). Lint findings in the new code were resolved (static error sentinels, named constants, perf.Track, complexity refactors, gosec file modes, file-length split into executor_bulk.go). pkg/auth/cloud/gcp/files.go was fast-forwarded to its origin/main state to clear pre-merge lint noise. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(kubernetes): publish rendered manifests to git via provision.targets Add a reusable target-provisioner registry (pkg/provisioner/target) and a ProvisionArtifact model so a component can render once and deliver to a selectable destination by kind. Implement the git target: it consumes the merged pkg/git service to clone-reconcile a managed git.repositories.<name>, write the rendered manifests under a templated path (replacing the managed subtree), path-scoped commit with provenance trailers, and push with retry; pull_request is deferred. Wire apply/deploy through provision.targets: kind 'kubernetes' keeps the inline cluster SDK apply, any other kind routes the artifact through the registry, with a new --target flag (precedence: --target > provision.default > implicit cluster). Add typed provision.targets schema (Go + stack-config/manifest JSON schemas), render the provision section so target path/commit templates materialize, plus an example, docs, a changelog blog post, and a roadmap milestone. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * [autocommit] formatting fixes * feat(kubernetes): add validate subcommand and harden git target delivery Incremental work on the native Kubernetes component feature: add an `atmos kubernetes validate` subcommand (with docs), guard the git target's writeArtifact against root/empty paths so a managed-path clear can never wipe the repository (new ErrGitTargetPathInvalid/ErrGitArtifactWrite sentinels), route operation flags through the standard parser, and refresh component docs, examples, and CLI golden snapshots accordingly. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * [autocommit] formatting fixes * fix(kubernetes): address CodeRabbit review feedback on PR cloudposse#2607 - validate: bound server-side dry-run with a 5m context timeout so a hung Kubernetes API call cannot block indefinitely - git target: harden writeArtifact root-path guard with filepath.Clean so dot-equivalent paths ("./", "a/..") cannot reach os.RemoveAll and wipe the worktree; extend regression test coverage - docs: add required description frontmatter and Screengrab block to the kubernetes validate command page Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(kubernetes): classify new section constants and fix Windows path test Acceptance Tests failed on all platforms because the kubernetes-native component PR added five new *SectionName constants without wiring them into the schema-coverage ratchet, and a path test assumed Unix-absolute paths. - datafetcher: classify the new section constants in schema_section_coverage_test.go β `kubernetes` as a top-level manifest section (alongside terraform/helmfile/packer/ansible) and the Kubernetes component sub-fields `provider`/`paths`/`manifests`/`render` as non-manifest sections (matching the packer `template` / ansible `playbook`/`inventory` precedent) - schema: model `kubernetes` in the canonical website manifest schema (top-level section, components.kubernetes, and the kubernetes_* defs), mirroring the already-updated embedded schema so TestSchemaCoversAllSections stays green instead of tracking a knownSchemaGap - kubernetes: fix TestManifestPathHelpers on Windows β "/tmp/absolute.yaml" is not absolute without a drive letter, so use t.TempDir() which is absolute on every OS Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * test(kubernetes): add envtest e2e tier plus expanded unit coverage Add an end-to-end test tier for the Kubernetes native component that runs against a real kube-apiserver+etcd control plane (controller-runtime envtest). The control-plane binaries are provisioned on demand by the tests via the Atmos toolchain using an inline registry.ToolRegistry β no Makefile target, no setup-envtest, no atmos.yaml. Gated behind the `envtest` build tag and limited to Linux/macOS (there is no official kube-apiserver build for Windows). A new [envtest] CI job runs the tier on ubuntu and macos. The tier covers the client.go behavior the in-memory fake dynamic client cannot: server-side-apply field ownership, dry-run diff semantics, real discovery/RESTMapper resolution, and a CRD round-trip. Also bundles expanded unit-test coverage across the kubernetes component, describe-affected, stack processor, component graph, and git provisioner. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(ci): disable CGO for kubernetes control-plane tests and clarify job name The envtest job invoked `go test` directly, bypassing the Makefile's global CGO_ENABLED=0. With CGO on, a transitive dependency of the Atmos toolchain (bearsh/hid β libudev, via the auth/webauthn chain) tried to compile and failed on runners that lack libudev, breaking the build. Set CGO_ENABLED=0 to match Atmos's build policy; those CGO paths are unused by the tests. Also rename the job to "[Kubernetes] control plane" β leading with the subsystem and what is exercised, rather than the cryptic "[envtest]" label. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * chore(ci): rename Kubernetes job to "[kubernetes] e2e tests" Match the lowercase bracket-label convention of the other jobs ([k3s], [mock-*]) and describe the job as the Kubernetes end-to-end test tier. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * Add Kubernetes CI job summaries * feat: add native Helm component support * fix kubernetes ci hook summaries * fix coderabbit review findings * fix kubernetes docs usage id * Harden spacelift admin stack ignore-missing-template-values test Assert the appended affected entry (component/stack/type) so the test is a meaningful regression guard instead of only checking no-error/non-nil. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * Add unified diffs to Kubernetes plan/diff (terminal + CI summary) kubernetes plan/diff now emit a per-object unified diff in the terminal and a collapsible "Kubernetes Diff" block in the CI job summary (GitHub ```diff syntax). The diff was already computed in client.Diff() (live vs dry-run after normalizeForDiff) and discarded; this retains it via objectResult.Diff -> KubernetesObjectCIResult.Diff -> the summary template. Secret objects are omitted from the diff so their data never reaches the unmasked job summary. Mirrors the Terraform convention of a secondary <details> block, and reuses Terraform's tail-preserving truncation, extracted into the shared pkg/ci/internal/plugin.TruncateDetail helper. Includes unit + envtest coverage and updated user-facing docs (CI templates/ summary variables, job summaries, kubernetes command/usage pages, launch blog). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * [autocommit] formatting fixes * docs: fix fragile inline diff-fence formatting in CI templates page Address CodeRabbit review on PR cloudposse#2607: an inline ` ```diff ` with single-backtick delimiters renders/copies poorly. Reword to "diff block using GitHub's `diff` fenced code syntax". Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * ci(link-check): exclude flaky no-color.org from lychee The Check Markdown Links job failed (exit 2) on two timeouts for https://no-color.org/ (referenced from docs/prd/help-system-architecture.md and docs/prd/io-handling-strategy.md) β even with max_retries=3 and a 60s timeout. The link is valid (the NO_COLOR standard site); it just intermittently times out from CI, like the other excluded hosts (gnu.org, tldp.org, kubernetes.io, regex101.com, β¦). Add it to the lychee exclude list. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(kubernetes): mark atmos kubernetes command experimental Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(ci): pin kubernetes-e2e setup-go SHA and refresh --help snapshots The post-merge CI surfaced two failures introduced by the origin/main merge and the experimental-flag change: - verify (SHA-pin): the kubernetes-e2e job's "Set up Go" step still pinned the pre-merge actions/setup-go@4a36011 (# v6) while the merge bumped every other occurrence to @924ae3a; align it so SHA-pin verification passes. - Acceptance Tests (linux/macos/windows): marking `atmos kubernetes` experimental changed `atmos --help` to print `kubernetes [command] [EXPERIMENTAL]`, so the three top-level help golden snapshots were stale. Regenerated via -regenerate-snapshots (only the kubernetes line changed). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat: mark native Helm command as experimental Flip the helm CommandProvider's IsExperimental() to true so the command (and its subcommands) render the [EXPERIMENTAL] badge and honor settings.experimental / ATMOS_EXPERIMENTAL gating. Also surface the experimental status in the command docs and blog post, and regenerate the top-level help snapshots that now show the badge. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(examples): migrate Kubernetes examples to the native emulator Replace the hand-rolled k3s scaffolding (docker-compose.yml, the KUBECONFIG mixin, and the `atmos k3s` custom commands) in the kubernetes, kustomize, and demo-helmfile examples with the native emulator (components.emulator.kubernetes, driver: k3s, ephemeral). - kubernetes / kustomize: bind a `kubernetes/emulator` identity that harvests the emulator's kubeconfig and injects KUBECONFIG. - demo-helmfile: consume the emulator via the `!emulator kubernetes kubeconfig` YAML function plus toolchain-installed helmfile/helm/kubectl/kustomize. Fixes uncovered while wiring these end-to-end: - The native Kubernetes component now applies the selected identity's prepared environment (KUBECONFIG) to the in-process client, so kubernetes/emulator (and aws/eks) identities actually reach the cluster. - The k3s kubeconfig harvest polls for readiness (k3s writes k3s.yaml shortly after the API port opens) instead of racing a one-shot read. - `atmos helmfile apply` resolves its binary through the toolchain (matching the `version` subcommand), so a toolchain-installed helmfile is found. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(emulator): Gitea git-server emulator + local GitOps round trip Add a `gitea` emulator driver (new `git` target) that serves Git over HTTP, so the git provision target's render -> commit -> push path is testable end to end with no external Git host. A manager bootstrap creates a throwaway admin user and an auto-initialized `deployments` repo on `up` (mirroring the Vault bootstrap), and emulators in a stack now join a shared per-stack network so a GitOps controller in the k3s emulator can reach Gitea by name. examples/local-gitops/ is the centerpiece: it stands up the Gitea + k3s emulators, installs Flux, and reconciles what Atmos pushes to Gitea back into the cluster. Two gated E2E tests drive that example (push-only and the full Flux round trip); both pass against real Podman. Also fixes a pre-existing Podman gap: the `podman ps` List parser dropped port bindings, leaving emulator endpoints empty under Podman; add parsePodmanPorts. Bundles in-flight host-runtime container support (container.runtime.host) and related container/runner/schema/docs changes present on this branch. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(ci): align demo-helmfile jobs with the native k3s emulator migration demo-helmfile was migrated from a docker-compose k3s cluster to the native Kubernetes emulator (`atmos emulator up kubernetes`, kubeconfig harvested via the `!emulator` YAML function), but the CI jobs were not updated, so both failed: - [k3s] demo-helmfile ran `docker compose up -d --wait` against an example that no longer ships a compose file ("no configuration file provided"). `atmos test` now starts k3s itself, so drop the obsolete docker-compose + wait-for-k3s steps and the stale job-level KUBECONFIG (the component sets it via `!emulator`). - [validate] demo-helmfile validated stacks with yaml-ls-check, which can't resolve the new `!emulator` tag. Exclude demo-helmfile from that matrix (as every other function-using example already is); its stacks are still validated by `atmos validate stacks` inside the [k3s] job. Validated locally on Podman: `atmos test` brings up k3s, applies the nginx helmfile release, and tears the emulator down (exit 0). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(emulator): CI-proof the local-gitops commit identity and kubeconfig retry Two CI failures on the local-gitops / native-emulator work: - [floci] go e2e: TestLocalGitOpsPushE2E failed with `git commit (exit 128)` β the CI runner has no global git identity, and the deployments repo did not pin one, so the provisioner's commit hit "Please tell me who you are". Pin `commit.author` on the example's deployments repo (the schema documents this as required in CI) and make the E2E run with GIT_CONFIG_GLOBAL/SYSTEM=os.DevNull so it reproduces the no-ambient-identity runner and self-validates the fix. - [Acceptance/windows]: TestManager_Resolve_KubernetesKubeconfigError flaked β with kubeconfigReadyTimeout=0 the harvest retry used `time.Now().After(deadline)` (strict >). On Windows's coarse monotonic clock the first post-attempt read can equal the deadline, so it polled again (an extra List call) and tripped the mock's Times(2). Use reached-or-passed semantics (`!time.Now().Before(deadline)`) so a zero timeout makes exactly one attempt on every platform. Validated on Podman: push E2E passes with no ambient git identity; emulator unit tests (incl. the kubeconfig test) pass. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * refactor(examples): make local-gitops a symmetric `gitops up`/`down` command Replace the asymmetric `atmos gitops` / `atmos teardown` pair with a single `gitops` command group exposing `up` and `down` subcommands (the nested custom-command pattern), so standing the loop up and tearing it down read symmetrically. Update the README accordingly. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * feat(helm): real unified diff for native Helm components Replace the dry-run-manifest dump in `atmos helm diff`/`plan` with a true unified diff computed by the helm-diff library (used as a Go library, not the CLI plugin β v3.15.10 pins the same helm.sh/helm/v4 v4.2.1 Atmos uses). Secret values are redacted. The chart is rendered client-side, so two of the three baseline modes are fully offline: - deployed release (default; reads the release via action.NewGet β cluster only for the baseline) - --from-manifest=<path> (local baseline file; offline) - --against=target[:<name>] (current manifests in a git deployment-repo provision target; offline β the GitOps producer-side diff) Adds an optional Fetcher capability to the provision-target registry and implements it on the git target (read-only clone+read). Adds a .Diff CI job summary (collapsible block, Secrets omitted) at parity with the kubernetes component, plus the --against/--from-manifest/--context flags. Docs, blog, and the examples/helm README are updated. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * [autocommit] formatting fixes * fix(helm): absolute HELM_PLUGINS + classify Helm manifest sections Fixes three CI failures introduced by the native-Helm / helmfile-plugins work: - demo-helmfile k3s E2E (`Error: unknown command "diff" for "helm"`): the managed HELM_PLUGINS directory was a path relative to the Atmos base dir (e.g. `.tools/helm-plugins`), so helm could not find installed plugins when helmfile ran helm from a component working directory. Resolve it to an absolute path, mirroring how toolchain binary PATH entries are absolutized. - TestEverySectionConstantIsClassified: classify the native-Helm section constants. Top-level `helm` (peer of `helmfile`/`kubernetes`) is a manifest section; its schema modeling is tracked as a known gap alongside the full native-Helm manifest schema. `chart`/`values`/`values_files`/`repositories`/ `plugins` are component sub-fields (like the kubernetes sub-fields). - TestCLICommands: regenerate the helmfile / helmfile-apply help snapshots for the new `--ci` flag. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * docs(helmfile): note helm-diff plugin prerequisite for diff/apply/deploy `atmos helmfile diff`, `apply`, and `deploy` shell out to `helm diff`, so they require the helm-diff plugin. Document the two ways to satisfy it: declare it on the component (`plugins: [diff@...]`) for Atmos-managed install, or install it yourself with `helm plugin install` when not using the Atmos toolchain. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * test: improve native helm coverage * test: increase helm coverage * [autocommit] formatting fixes * test: make helmfile tests windows compatible * refactor(examples): provision local-gitops Flux via component `source:` Replace the `atmos vendor pull` step in the local-gitops demo with just-in-time component source provisioning. The flux component now declares a `source:` pointing at the pinned Flux install release asset, so Atmos fetches it through the shared provisioner (the same go-getter machinery `atmos vendor` uses) instead of a separate vendor.yaml. - flux.yaml: add `source:` (uri + ttl), render via `paths: ["."]` - atmos.yaml: drop the `atmos vendor pull` step from `gitops up` - delete vendor.yaml and the committed files/.gitignore; gitignore the now-ephemeral components/kubernetes/flux/ directory - README: remove the vendor step and the vendor.yaml reference - local_gitops_test.go: drop the vendor pull call from the round-trip E2E Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * test: compare helmfile cwd by file identity * test: raise native-helm-component patch coverage to ~84% Cover the lowest-coverage files flagged by Codecov on the native-Helm-component feature branch, lifting patch coverage from 69.58% to ~84% (above the 80% gate): - pkg/component/helm: in-memory Helm storage driver exercises the cluster client lifecycle (install/upgrade/get/delete) without a cluster; cover external-target delivery, hook orchestration, diff baselines, and bulk paths - pkg/ci/plugins/helmfile: mirror the helm CI plugin onAfterOperation tests - pkg/provisioner/target{,/git}: Fetch dispatcher + git Fetch round-trip - pkg/manifest: list expansion, decode error, OutputDir/stdout write paths - pkg/helm/plugin: EnsureForComponent, ExtractSpecs coercion - cmd/helm, cmd/helmfile: resolveHelmBinary and CI-mode helper functions - internal/exec: add a renderAndDeliver seam to unit-test deliverHelmfileToTarget without the helmfile binary Tests only; the lone production change is a one-line test seam. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * test: make TestResolveHelmBinary environment-independent resolveHelmBinary delegates to ToolchainEnvironment.Resolve, which returns the bare name "helm" when nothing is installed but a toolchain/PATH-resolved absolute path (e.g. .tools/bin/helm/.../helm[.exe]) when helm IS installed β which it is on the CI runners. Assert the resolved binary's base name instead of an exact string so the test passes on Linux, macOS, and Windows CI. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * Add declarative Helm repository support * Fix acceptance CI failures * Use portable GitOps cleanup command * Fix Git emulator URL test expectation * [autocommit] formatting fixes * Update vendoring globs acceptance expectation * Add K3s deploy smoke test for Helm example * [autocommit] formatting fixes * Add Helm repository coverage to Helm example * [autocommit] formatting fixes * Silence experimental banner in Helm example test * Use shared terminal settings for markdown errors * Fix CI failures for Helm component tests * Fix macOS CI runner selection * Fix k3s example CI failures * Wait for k3s node readiness * Fix acceptance test expectations * Fix stack config helm repository schema ref * Allow current ORAS advisory until fixed release --------- Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> Co-authored-by: atmos-pro[bot] <173522224+atmos-pro[bot]@users.noreply.github.com> Co-authored-by: aknysh <[email protected]> Co-authored-by: Andriy Knysh <[email protected]>
what
Atmos Git: Git becomes a foundational platform capability, on par with Toolchain, Auth, and Hooks β the enablement layer for GitOps workflows where Atmos commits generated artifacts to a source-of-truth repository. PRD:
docs/prd/git-ops.md.gitconfig βgit.repositories.<name>declares managed repositories (uri, branch, remote, clone depth/filter/single-branch/submodules,auth.identity,commit.signing/commit.author,push.retries),git.hooksdeclares local Git hooks,git.listconfigures list output. Workdirs default to automatic XDG cache locations ($XDG_CACHE_HOME/atmos/git/repositories/<name>) so the native CI cache captures and restores managed clones.pkg/gitservice β provider registry (registry pattern) with thecliprovider in v1 (chosen because GitHub STS materializes credentials asGIT_CONFIG_*env vars, which subprocess git honors and go-git ignores). Clone is defined as reconcile (clone-if-absent, else fetch + checkout + ff-only) so stale CI-cache restores are just faster clones. Safety rules: ff-only pull, no force push ever, push retry-with-rebase on non-fast-forward rejection, path-scoped commits that fail on unrelated dirty files, worktree path-traversal validation, per-invocation commit author injection (CI runners need nouser.name), provenance trailers (Atmos-Stack,Atmos-Component,Atmos-Source-SHA).atmos gitcommand group βclone,pull,status,diff,commit,push,list,clean, plusgit hooks install|uninstall|run, registered under the Git help group.--allbulk operations (bounded concurrency, attempt-all witherrors.Join). Clone accepts configured names, plain URLs, and go-gettergit::...?ref=&depth=URIs. No-arg clone in native CI (ci.enabled: true) infers the current repository from CI metadata and clones into the workspace β anactions/checkoutreplacement.atmos list git-repositoriesalias registered.githook kind β publishes generated artifacts on lifecycle events (after.terraform.apply, ...) to the current repository by default or a named managed repository, with templated commit messages, trailers, clean no-ops, and push-after-commit with retry. Inherits--skip-hooksandon_failure.atmos git hooks installwrites worktree-aware.git/hooks/*shims (marker-protected,--forceto overwrite, warns whencore.hooksPathis set);rundispatches configured commands with stdin forwarding and exit-code propagation.ErrGitRepositoryNotFound,ErrGitAuthFailed,ErrGitPushRejected,ErrGitDirtyUnmanagedFiles,ErrGitPathEscapesWorktree,ErrGitHookNotConfigured,ErrGitRepositoryRequired,ErrGitProviderNotFound) with error-builder hints and exit-code mapping. Git stderr streams to the masked writer and is never embedded in error chains.website/docs/cli/commands/git/,gitconfiguration reference, hook kind docs, changelog blog post (atmos-gitops), roadmap milestone (CI/CD Simplification initiative), and a GitOps publishing demo atexamples/gitops(reconcile β review β publish against a managed deployment repo via custom commands).What this is β and isn't
Atmos owns the publishing side of GitOps: render β diff β commit β push, with centralized safety rules. Reconciliation stays with the consumer β Argo CD or Flux pulls from the repository, or CI applies on merge. There are no agents and no drift-correction loop in Atmos itself (explicit non-goal in the PRD); Atmos is the producer feeding the reconciler. This also isn't a replacement for the existing GitHub Actions plan/apply integration β it's the Git plumbing those pipelines use.
why
GitOps workflows have always needed glue: ad hoc scripts to render manifests into deployment repos, commit them, survive push races, and wire credentials. Atmos already owns rendering, lifecycle events, toolchain, and credentials (GitHub STS) β this PR gives it the Git operations between them, with centralized safety rules instead of per-pipeline shell scripts. It is the foundation for Kubernetes deployment-repository provisioning (Argo CD / Flux rendered-manifest publishing, on the kubernetes component branch) and a future
githubprovider for pull-request-based publishing to protected branches.references
docs/prd/git-ops.md(in this PR)pkg/git86%,pkg/git/providers/cli88%,pkg/hooks/kinds/git94%,cmd/git81%provision.gitnext)π€ Generated with Claude Code