Skip to content

feat: add date-anchored default editions - #2762

Merged
Andriy Knysh (aknysh) merged 54 commits into
mainfrom
osterman/date-anchored-default-editions
Aug 3, 2026
Merged

Andriy Knysh (aknysh) merged 54 commits into
mainfrom
osterman/date-anchored-default-editions

Conversation

@osterman

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

Copy link
Copy Markdown
Member

what

  • Add date-anchored edition: defaults, the --edition override, and atmos describe/list edition commands.
  • Journal default changes and add config, CLI, docs, snapshot, and cast coverage for edition-aware behavior.
  • Make describe component/dependents honor graceful YAML error handling without requiring implicit identity authentication.

why

  • Let projects upgrade Atmos without silently adopting later default changes, while giving operators visibility into effective defaults.
  • Avoid duplicate post-auth error output and let component inspection continue when recoverable YAML values cannot resolve.

references

  • N/A

Summary by CodeRabbit

  • New Features

    • Added experimental date-pinned configuration editions via --edition, ATMOS_EDITION, or atmos.yaml.
    • Added describe edition and list editions commands for inspecting default changes.
    • Added component mock support with --use-mocks.
    • Added configurable component filtering, provenance display, error handling, and help filtering.
  • Bug Fixes

    • Improved table sizing, terminal wrapping, whitespace, tree output, authentication handling, and validation exclusions.
    • Preserved clearer error details and prevented unintended authentication attempts.
  • Documentation

    • Added documentation and examples for editions and updated command and configuration references.

@atmos-pro

atmos-pro Bot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

Tip

Atmos Pro  

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

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

mergify Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Important

Cloud Posse Engineering Team Review Required

This 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 #pr-reviews channel.

@github-actions

github-actions Bot commented Jul 17, 2026 •

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues found.

Scanned Files

None

@mergify mergify Bot added the needs-cloudposse Needs Cloud Posse assistance label Jul 17, 2026
@github-actions

Copy link
Copy Markdown

Resource Changes Found for bucket in test

Atmos CI

create

Plan: 4 to add, 0 to change, 0 to destroy.
To reproduce this locally, run:

atmos terraform plan bucket -s test

Create

+ aws_s3_bucket.checkov_target
+ aws_s3_bucket.this
+ aws_s3_bucket.trivy_target
+ aws_s3_bucket_public_access_block.trivy_target
Terraform Plan Summary
  # aws_s3_bucket.checkov_target will be created
  + resource "aws_s3_bucket" "checkov_target" {
      + acceleration_status         = (known after apply)
      + acl                         = (known after apply)
      + arn                         = (known after apply)
      + bucket                      = "atmos-native-ci-e2e-checkov-test"
      + bucket_domain_name          = (known after apply)
      + bucket_prefix               = (known after apply)
      + bucket_regional_domain_name = (known after apply)
      + force_destroy               = false
      + hosted_zone_id              = (known after apply)
      + id                          = (known after apply)
      + object_lock_enabled         = (known after apply)
      + policy                      = (known after apply)
      + region                      = (known after apply)
      + request_payer               = (known after apply)
      + tags_all                    = (known after apply)
      + website_domain              = (known after apply)
      + website_endpoint            = (known after apply)

      + cors_rule (known after apply)

      + grant (known after apply)

      + lifecycle_rule (known after apply)

      + logging (known after apply)

      + object_lock_configuration (known after apply)

      + replication_configuration (known after apply)

      + server_side_encryption_configuration (known after apply)

      + versioning (known after apply)

      + website (known after apply)
    }

  # aws_s3_bucket.this will be created
  + resource "aws_s3_bucket" "this" {
      + acceleration_status         = (known after apply)
      + acl                         = (known after apply)
      + arn                         = (known after apply)
      + bucket                      = "atmos-native-ci-e2e-test"
      + bucket_domain_name          = (known after apply)
      + bucket_prefix               = (known after apply)
      + bucket_regional_domain_name = (known after apply)
      + force_destroy               = false
      + hosted_zone_id              = (known after apply)
      + id                          = (known after apply)
      + object_lock_enabled         = (known after apply)
      + policy                      = (known after apply)
      + region                      = (known after apply)
      + request_payer               = (known after apply)
      + tags                        = {
          + "AtmosFixture" = "native-ci-e2e"
          + "Stage"        = "test"
        }
      + tags_all                    = {
          + "AtmosFixture" = "native-ci-e2e"
          + "Stage"        = "test"
        }
      + website_domain              = (known after apply)
      + website_endpoint            = (known after apply)

      + cors_rule (known after apply)

      + grant (known after apply)

      + lifecycle_rule (known after apply)

      + logging (known after apply)

      + object_lock_configuration (known after apply)

      + replication_configuration (known after apply)

      + server_side_encryption_configuration (known after apply)

      + versioning (known after apply)

      + website (known after apply)
    }

  # aws_s3_bucket.trivy_target will be created
  + resource "aws_s3_bucket" "trivy_target" {
      + acceleration_status         = (known after apply)
      + acl                         = (known after apply)
      + arn                         = (known after apply)
      + bucket                      = "atmos-native-ci-e2e-trivy-test"
      + bucket_domain_name          = (known after apply)
      + bucket_prefix               = (known after apply)
      + bucket_regional_domain_name = (known after apply)
      + force_destroy               = false
      + hosted_zone_id              = (known after apply)
      + id                          = (known after apply)
      + object_lock_enabled         = (known after apply)
      + policy                      = (known after apply)
      + region                      = (known after apply)
      + request_payer               = (known after apply)
      + tags_all                    = (known after apply)
      + website_domain              = (known after apply)
      + website_endpoint            = (known after apply)

      + cors_rule (known after apply)

      + grant (known after apply)

      + lifecycle_rule (known after apply)

      + logging (known after apply)

      + object_lock_configuration (known after apply)

      + replication_configuration (known after apply)

      + server_side_encryption_configuration (known after apply)

      + versioning (known after apply)

      + website (known after apply)
    }

  # aws_s3_bucket_public_access_block.trivy_target will be created
  + resource "aws_s3_bucket_public_access_block" "trivy_target" {
      + block_public_acls       = true
      + block_public_policy     = true
      + bucket                  = (known after apply)
      + id                      = (known after apply)
      + ignore_public_acls      = true
      + restrict_public_buckets = true
    }

Plan: 4 to add, 0 to change, 0 to destroy.

Changes to Outputs:
  + bucket_name = "atmos-native-ci-e2e-test"

@coderabbitai

coderabbitai Bot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

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

Use the following commands to manage reviews:

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

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This change adds date-anchored configuration editions, edition inspection commands, describe-component execution controls, adaptive terminal rendering, authentication updates, and expanded validation and documentation.

Changes

Editions and configuration

Layer / File(s) Summary
Edition model and default resolution
pkg/edition/*, pkg/config/*, pkg/schema/schema.go, pkg/flags/*
Adds edition anchors, journals, override resolution, precedence handling, default snapshots, and configuration schema fields.
Edition CLI commands
cmd/describe_edition.go, cmd/list/editions.go, cmd/list/list.go, cmd/*edition*_test.go
Adds edition description and journal listing commands with range anchors, output formats, validation, and tests.

Describe execution and authentication

Layer / File(s) Summary
Describe controls and degradation
cmd/describe_component.go, internal/exec/*, cmd/help_topics_render.go
Adds mock handling, explicit provenance tracking, error modes, schema/full filtering, degraded YAML processing, and configurable help rendering.
Authentication and list behavior
pkg/auth/*, cmd/list/stacks.go, pkg/list/list_instances.go
Adds deferred store authentication, adaptive auth tables, and format-default handling for row-shaped list options.

Terminal and output rendering

Layer / File(s) Summary
Terminal width and table layout
internal/tui/templates/*, pkg/list/format/*, pkg/list/renderer/*, pkg/provenance/*
Adds configured terminal width limits, ANSI-aware sizing, table roles and options, provenance width integration, and normalized tree output.
Root and validation wiring
cmd/root.go, cmd/validate_editorconfig.go, atmos.yaml, pkg/config/default.go
Updates global argument parsing, edition synchronization, terminal defaults, editorconfig exclusions, CI settings, and configuration validation.

Snapshots and documentation

Layer / File(s) Summary
Snapshot normalization and fixtures
tests/cli_test.go, tests/cli_snapshot_test.go, tests/snapshots/*, tests/test-cases/*, website/static/casts/*
Preserves shell continuations, prevents semantic line merging, updates output fixtures, and adds command help captures.
Documentation and project metadata
docs/*, website/blog/*, website/docs/*, website/src/data/roadmap.js, .gitattributes, lychee.toml
Documents editions, changed defaults, terminal settings, command behavior, snapshot handling, and roadmap metadata.

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

Possibly related PRs

Suggested reviewers: aknysh

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 58.45% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the pull request's primary change: adding date-anchored default editions.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch osterman/date-anchored-default-editions

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

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 7

🧹 Nitpick comments (4)
pkg/auth/manager_test.go (1)

995-997: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low value

Close pipe ends in cleanup.

Close both ends of the pipe in the cleanup handler to prevent file descriptor leaks if an assertion fails early.

🛠️ Proposed fix
 	t.Cleanup(func() {
 		os.Stderr = oldStderr
+		_ = r.Close()
+		_ = w.Close()
 	})
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/auth/manager_test.go` around lines 995 - 997, Update the t.Cleanup
handler in the relevant test to close both pipe endpoints in addition to
restoring os.Stderr. Ensure the cleanup closes the read and write descriptors
even when assertions fail early, using the pipe variables already created by the
test.
cmd/describe_edition.go (2)

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

Update the deprecated Cobra field.

Cobra replaced FParseErrWhitelist with FParseErrAllowlist in recent versions. Update the field name to avoid relying on deprecated APIs.

💡 Proposed change
-	FParseErrWhitelist: struct{ UnknownFlags bool }{UnknownFlags: false},
+	FParseErrAllowlist: cobra.FParseErrAllowlist{UnknownFlags: false},
🤖 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/describe_edition.go` at line 27, Replace the deprecated
FParseErrWhitelist field with Cobra’s FParseErrAllowlist field in the command
configuration, preserving the existing UnknownFlags: false setting.

67-72: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Use standard parser for command-specific flags.

As per coding guidelines: "Commands must use flags.NewStandardParser() for command-specific flags". Consider refactoring the flag setup to adhere to the CLI guidelines.

🤖 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/describe_edition.go` around lines 67 - 72, Update init and the
describeEditionCmd flag setup to use flags.NewStandardParser() for
command-specific flags instead of directly registering the format flag through
PersistentFlags(). Preserve the existing format option, shorthand, default
value, and help text while adhering to the standard parser configuration.

Source: Coding guidelines

cmd/describe_edition_test.go (1)

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

Use table-driven tests for multiple test scenarios.

As per coding guidelines, "Use table-driven tests for testing multiple scenarios in Go." Consider converting these sequential blocks into standard table-driven test suites:

  • cmd/describe_edition_test.go#L12-L42: refactor TestEditionPinSource to iterate over a slice of test cases.
  • cmd/list/editions_test.go#L12-L24: refactor TestParseOptionalAnchor to iterate over a slice of test cases.
  • cmd/list/editions_test.go#L45-L51: refactor TestExecuteListEditionsWithOptionsInvalidAnchors to iterate over a slice of test cases.
🤖 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/describe_edition_test.go` around lines 12 - 42, Refactor the three
multi-scenario tests into table-driven suites: update TestEditionPinSource in
cmd/describe_edition_test.go (12-42), TestParseOptionalAnchor in
cmd/list/editions_test.go (12-24), and
TestExecuteListEditionsWithOptionsInvalidAnchors in cmd/list/editions_test.go
(45-51) to define case slices and iterate with subtests, preserving each
scenario’s setup, expected result, and assertions.

Source: Coding guidelines

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

Inline comments:
In `@internal/tui/templates/templater.go`:
- Line 333: Update the changed comments near GetTerminalWidth and the
corresponding comment at the referenced location so each ends with a period,
without altering their content or behavior.
- Around line 342-345: Update the terminal-width condition in the templating
logic around term.GetSize so detected widths are accepted only when termWidth
exceeds the two-column margin. For widths of 1 or 2, preserve the existing
fallback screenWidth and source behavior, preventing the later uint conversion
from receiving a non-positive value.

In `@pkg/config/default_snapshot_test.go`:
- Around line 73-75: Update the regenerateSnapshot flow in
default_snapshot_test.go to load the existing snapshot and validate matching
Old/New journal values before overwriting the baseline. Move the
regenerateSnapshot call in the regenerateSnapshotEnvVar branch behind this
validation, preserving the current early return only after the guardrail
succeeds.

In `@pkg/config/load.go`:
- Around line 497-503: Update the error return in the applyEditionDefaults call
within the configuration-loading flow to wrap the original error with
descriptive context using %w, while preserving the existing early return and
atmosConfig value.

In `@pkg/list/format/table.go`:
- Around line 917-924: Update the CreateStyledTable documentation comment to
begin with the exported function name, and add defer perf.Track(...)() as the
first statement in CreateStyledTableWithOptions, followed by a blank line before
the remaining implementation.

In `@website/docs/cli/commands/list/list-stacks.mdx`:
- Line 191: Update the precedence statement in the list-stacks documentation to
show CLI --format first, ATMOS_LIST_FORMAT second, config file third, and the
tree default last.

In `@website/docs/cli/configuration/edition.mdx`:
- Line 88: Update the September 2025 rollback description to state that the
anchor predates ten journal entries, and include that it restores unfiltered
help and the previous describe.component.filter: full default while preserving
the other listed settings.

---

Nitpick comments:
In `@cmd/describe_edition_test.go`:
- Around line 12-42: Refactor the three multi-scenario tests into table-driven
suites: update TestEditionPinSource in cmd/describe_edition_test.go (12-42),
TestParseOptionalAnchor in cmd/list/editions_test.go (12-24), and
TestExecuteListEditionsWithOptionsInvalidAnchors in cmd/list/editions_test.go
(45-51) to define case slices and iterate with subtests, preserving each
scenario’s setup, expected result, and assertions.

In `@cmd/describe_edition.go`:
- Line 27: Replace the deprecated FParseErrWhitelist field with Cobra’s
FParseErrAllowlist field in the command configuration, preserving the existing
UnknownFlags: false setting.
- Around line 67-72: Update init and the describeEditionCmd flag setup to use
flags.NewStandardParser() for command-specific flags instead of directly
registering the format flag through PersistentFlags(). Preserve the existing
format option, shorthand, default value, and help text while adhering to the
standard parser configuration.

In `@pkg/auth/manager_test.go`:
- Around line 995-997: Update the t.Cleanup handler in the relevant test to
close both pipe endpoints in addition to restoring os.Stderr. Ensure the cleanup
closes the read and write descriptors even when assertions fail early, using the
pipe variables already created by the test.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

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

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ab6ef5da-1d9a-49a1-a04e-78668eadbe4c

📥 Commits

Reviewing files that changed from the base of the PR and between 580f5c0 and 0b47b60.

📒 Files selected for processing (68)
  • atmos.yaml
  • cmd/describe_component.go
  • cmd/describe_edition.go
  • cmd/describe_edition_test.go
  • cmd/describe_error_mode_flag.go
  • cmd/describe_skip_auth_test.go
  • cmd/help_topics_render.go
  • cmd/list/editions.go
  • cmd/list/editions_test.go
  • cmd/list/list.go
  • cmd/list/stacks.go
  • cmd/root.go
  • demo/casts/atmos.d/screengrabs/cli.yaml
  • docs/fixes/2026-07-17-date-anchored-defaults.md
  • docs/prd/editions.md
  • internal/exec/describe_component.go
  • internal/exec/describe_component_test.go
  • internal/exec/describe_dependents.go
  • internal/exec/utils.go
  • internal/tui/templates/templater.go
  • pkg/auth/list/formatter_table.go
  • pkg/auth/list/formatter_test.go
  • pkg/auth/list/table_width.go
  • pkg/auth/list/table_width_test.go
  • pkg/auth/manager.go
  • pkg/auth/manager_test.go
  • pkg/config/atmos.yaml
  • pkg/config/default.go
  • pkg/config/default_snapshot_test.go
  • pkg/config/edition.go
  • pkg/config/edition_invariants_test.go
  • pkg/config/load.go
  • pkg/config/load_config_args.go
  • pkg/config/load_edition_test.go
  • pkg/config/testdata/default-config-snapshot.yaml
  • pkg/edition/anchor.go
  • pkg/edition/anchor_test.go
  • pkg/edition/describe.go
  • pkg/edition/errors.go
  • pkg/edition/journal.go
  • pkg/edition/journal_invariants_test.go
  • pkg/edition/journal_test.go
  • pkg/edition/resolve.go
  • pkg/edition/resolve_test.go
  • pkg/flags/global/flags.go
  • pkg/flags/global_builder.go
  • pkg/flags/global_registry.go
  • pkg/list/format/table.go
  • pkg/list/list_instances.go
  • pkg/list/renderer/renderer.go
  • pkg/provenance/tree_renderer.go
  • pkg/schema/schema.go
  • pkg/ui/markdown/renderer.go
  • tests/cli_test.go
  • tests/test-cases/atmos-pro.yaml
  • website/blog/2026-07-16-config-editions.mdx
  • website/docs/cli/commands/describe/describe-component.mdx
  • website/docs/cli/commands/describe/describe-edition.mdx
  • website/docs/cli/commands/list/list-editions.mdx
  • website/docs/cli/commands/list/list-instances.mdx
  • website/docs/cli/commands/list/list-stacks.mdx
  • website/docs/cli/configuration/edition.mdx
  • website/docs/cli/configuration/logs.mdx
  • website/docs/cli/configuration/settings/terminal.mdx
  • website/docs/cli/global-flags.mdx
  • website/src/data/roadmap.js
  • website/static/casts/screengrabs/atmos-describe-edition--help.cast
  • website/static/casts/screengrabs/atmos-list-editions--help.cast
💤 Files with no reviewable changes (1)
  • pkg/auth/manager.go

Comment thread internal/tui/templates/templater.go Resolved
Comment thread internal/tui/templates/templater.go Resolved
Comment thread pkg/config/default_snapshot_test.go Resolved
Comment thread pkg/config/load.go Resolved
Comment thread pkg/list/format/table.go Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
pkg/auth/manager_helpers.go (1)

320-322: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Adjust error wrapping format to match guidelines.

The coding guidelines specify wrapping errors with the context first using the fmt.Errorf("context: %w", err) pattern. Swapping the order here aligns with that convention.

♻️ Proposed refactor
-	if !isAuthConfigured(authConfig) {
-		return nil, fmt.Errorf("%w: authentication requires at least one identity configured in atmos.yaml", errUtils.ErrAuthNotConfigured)
-	}
+	if !isAuthConfigured(authConfig) {
+		return nil, fmt.Errorf("authentication requires at least one identity configured in atmos.yaml: %w", errUtils.ErrAuthNotConfigured)
+	}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/auth/manager_helpers.go` around lines 320 - 322, Update the error
construction in the isAuthConfigured validation to place the descriptive
authentication context before the wrapped errUtils.ErrAuthNotConfigured value,
following the fmt.Errorf("context: %w", err) convention while preserving the
existing message and sentinel error.

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 `@pkg/auth/manager_helpers.go`:
- Around line 320-322: Update the error construction in the isAuthConfigured
validation to place the descriptive authentication context before the wrapped
errUtils.ErrAuthNotConfigured value, following the fmt.Errorf("context: %w",
err) convention while preserving the existing message and sentinel error.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: dec6cc21-3394-49fa-9c0f-a806a56f746e

📥 Commits

Reviewing files that changed from the base of the PR and between 0b47b60 and cfd0951.

📒 Files selected for processing (3)
  • cmd/describe_component.go
  • cmd/describe_skip_auth_test.go
  • pkg/auth/manager_helpers.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • cmd/describe_component.go

@github-actions github-actions Bot added size/xl Extra large size PR and removed size/l Large size PR labels Jul 17, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Caution

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

⚠️ Outside diff range comments (1)
pkg/list/format/tree_instances.go (1)

45-55: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use left padding only. TrimRight won’t strip the padded space once Lip Gloss appends its ANSI reset, so this still leaves trailing whitespace in plain-text output. PaddingLeft(1) and dropping the trim keeps the same visual result.

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

In `@pkg/list/format/tree_instances.go` around lines 45 - 55, Update the heading
style construction in the tree formatting path to use Lip Gloss’s PaddingLeft(1)
instead of symmetric Padding(0, 1). Remove the strings.TrimRight call around
h1Style.Render(title) and return the rendered title with treeNewline unchanged,
preserving the visual left padding without trailing output whitespace.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pkg/list/format/tree_instances.go`:
- Line 40: Remove the final treeNewline concatenation from the renderer return
expressions in pkg/list/format/tree_instances.go lines 40-40 and
pkg/list/format/tree_stacks.go lines 28-28, so both renderers return trimmed
content without owning the trailing newline; leave newline appending to
data.Writeln.

In
`@tests/snapshots/TestCLICommands_atmos_auth_env_without_--login_returns_config_env_vars.stdout.golden`:
- Line 5: Update the formatter responsible for CLI auth environment output so
each export assignment is emitted on its own line rather than concatenated with
spaces. Preserve the existing export ordering, then regenerate the affected
golden snapshot to match the line-oriented output.

In
`@tests/snapshots/TestCLICommands_atmos_workflow_shell_command_not_found.stderr.golden`:
- Line 1: Fix the terminal-aware rendering logic so intentional newline
boundaries between independent text blocks are preserved instead of being
stripped or collapsed. Apply the change to the renderer responsible for these
CLI outputs, then regenerate snapshots with the -regenerate-snapshots flag:
tests/snapshots/TestCLICommands_atmos_workflow_shell_command_not_found.stderr.golden:1-1,
tests/snapshots/TestCLICommands_atmos_terraform_apply_help.stdout.golden:8-8,
tests/snapshots/TestCLICommands_atmos_helmfile_apply_--help.stdout.golden:6-6,
tests/snapshots/TestCLICommands_describe_component_with_path_not_in_component_directory.stderr.golden:11-11,
and
tests/snapshots/TestCLICommands_config_alias_tp_--help_shows_terraform_plan_help.stdout.golden:8-8.

In
`@tests/snapshots/TestCLICommands_describe_component_with_relative_path.stdout.golden`:
- Around line 46-47: Update the shared provenance producer used by the CLI
component-description flow so unknown source locations emit a valid line or are
omitted instead of rendering as :0; then regenerate the expected outputs with
the -regenerate-snapshots flag. Apply the regenerated results to
tests/snapshots/TestCLICommands_describe_component_with_relative_path.stdout.golden
lines 46-47,
tests/snapshots/TestCLICommands_describe_component_with_component_name_(backward_compatibility).stdout.golden
lines 46-47, and
tests/snapshots/TestCLICommands_describe_component_with_current_directory_(.).stdout.golden
lines 46-47; do not edit golden files manually.

---

Outside diff comments:
In `@pkg/list/format/tree_instances.go`:
- Around line 45-55: Update the heading style construction in the tree
formatting path to use Lip Gloss’s PaddingLeft(1) instead of symmetric
Padding(0, 1). Remove the strings.TrimRight call around h1Style.Render(title)
and return the rendered title with treeNewline unchanged, preserving the visual
left padding without trailing output whitespace.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

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

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f557e36d-f51f-4dde-b524-aebe06b1c245

📥 Commits

Reviewing files that changed from the base of the PR and between cfd0951 and 4e9c752.

📒 Files selected for processing (81)
  • pkg/list/format/tree_instances.go
  • pkg/list/format/tree_stacks.go
  • tests/snapshots/TestCLICommands_atmos_--chdir_config_isolation.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_--help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_--help_config_aliases_section.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_atlantis_--help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_atlantis_generate_--help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_atlantis_generate_help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_--help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_atlantis_help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_auth_env_--help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_auth_env_--login_--format_bash.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_auth_env_without_--login_returns_config_env_vars.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_auth_exec_--help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_auth_validate_(invalid_config).stderr.golden
  • tests/snapshots/TestCLICommands_atmos_auth_validate_--help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_auth_validate_--verbose.stderr.golden
  • tests/snapshots/TestCLICommands_atmos_describe_component_mock_-s_dev_(stack-names_example).stdout.golden
  • tests/snapshots/TestCLICommands_atmos_describe_component_mock_-s_production_(stack-names_example).stdout.golden
  • tests/snapshots/TestCLICommands_atmos_describe_component_vpc_-s_dev_(native-terraform_example).stdout.golden
  • tests/snapshots/TestCLICommands_atmos_describe_component_vpc_-s_my-legacy-prod-stack.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_describe_component_vpc_-s_no-name-prod.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_describe_component_vpc_-s_production_(native-terraform_example).stdout.golden
  • tests/snapshots/TestCLICommands_atmos_describe_config.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_describe_config_-f_yaml.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_describe_config_imports.stderr.golden
  • tests/snapshots/TestCLICommands_atmos_describe_config_imports.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_describe_configuration.stderr.golden
  • tests/snapshots/TestCLICommands_atmos_describe_configuration.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_doesnt_warn_if_in_git_repo_with_atmos_config.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_helmfile_--help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_helmfile_apply_--help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_helmfile_apply_help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_helmfile_help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_list_instances.tty.golden
  • tests/snapshots/TestCLICommands_atmos_list_stacks_(native-terraform_example).stdout.golden
  • tests/snapshots/TestCLICommands_atmos_list_stacks_(stack-manifest-name).stdout.golden
  • tests/snapshots/TestCLICommands_atmos_list_stacks_(stack-names_example).stdout.golden
  • tests/snapshots/TestCLICommands_atmos_terraform_-help_passthrough.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_terraform_-version_passthrough.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_terraform_apply_help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_toolchain_info_non-existent_tool.stderr.golden
  • tests/snapshots/TestCLICommands_atmos_toolchain_info_tar.gz_format_tool.stderr.golden
  • tests/snapshots/TestCLICommands_atmos_toolchain_install_--help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_toolchain_install_non-existent_tool.stderr.golden
  • tests/snapshots/TestCLICommands_atmos_toolchain_registry_search.stderr.golden
  • tests/snapshots/TestCLICommands_atmos_workflow_failure.stderr.golden
  • tests/snapshots/TestCLICommands_atmos_workflow_failure_with_filepath.stderr.golden
  • tests/snapshots/TestCLICommands_atmos_workflow_failure_with_stack.stderr.golden
  • tests/snapshots/TestCLICommands_atmos_workflow_invalid_step_type.stderr.golden
  • tests/snapshots/TestCLICommands_atmos_workflow_shell_command_not_found.stderr.golden
  • tests/snapshots/TestCLICommands_config_alias_tp_--help_shows_terraform_plan_help.stdout.golden
  • tests/snapshots/TestCLICommands_deploy_component_help_shows_stack_flag.stdout.golden
  • tests/snapshots/TestCLICommands_describe_component_from_nested_dir_discovers_atmos.yaml_in_parent.stdout.golden
  • tests/snapshots/TestCLICommands_describe_component_help_shows_stack_flag.stdout.golden
  • tests/snapshots/TestCLICommands_describe_component_with_component_name_(backward_compatibility).stdout.golden
  • tests/snapshots/TestCLICommands_describe_component_with_current_directory_(.).stdout.golden
  • tests/snapshots/TestCLICommands_describe_component_with_path_not_in_component_directory.stderr.golden
  • tests/snapshots/TestCLICommands_describe_component_with_relative_path.stdout.golden
  • tests/snapshots/TestCLICommands_describe_component_with_stack_flag.stdout.golden
  • tests/snapshots/TestCLICommands_echo_info_help_shows_verbose_flag.stdout.golden
  • tests/snapshots/TestCLICommands_echo_info_runs_with_verbose_flag.stderr.golden
  • tests/snapshots/TestCLICommands_helmfile_command_with_terraform_component_path.stderr.golden
  • tests/snapshots/TestCLICommands_help_flag_works.stdout.golden
  • tests/snapshots/TestCLICommands_indentation.stdout.golden
  • tests/snapshots/TestCLICommands_list_stacks_works.stdout.golden
  • tests/snapshots/TestCLICommands_secrets-masking_describe_config.stdout.golden
  • tests/snapshots/TestCLICommands_show_component_help_shows_inherited_stack_flag.stdout.golden
  • tests/snapshots/TestCLICommands_terraform_help_shows_stack_flag.stdout.golden
  • tests/snapshots/TestCLICommands_terraform_plan_with_path_not_in_component_directory.stderr.golden
  • tests/snapshots/TestCLICommands_terraform_provision_help_shows_inherited_stack_flag.stdout.golden
  • tests/snapshots/TestCLICommands_tf_plan_help_shows_inherited_stack_flag.stdout.golden
  • tests/test-cases/flag-inheritance.yaml
  • tests/test-cases/generate-files.yaml
  • tests/test-cases/native-terraform-example.yaml
  • tests/test-cases/stack-manifest-name.yaml
  • tests/test-cases/stack-names-example.yaml
  • tests/test-cases/stack-templates.yaml
  • tests/test-cases/toolchain-example.yaml
💤 Files with no reviewable changes (4)
  • tests/snapshots/TestCLICommands_atmos_describe_config_imports.stderr.golden
  • tests/snapshots/TestCLICommands_atmos_describe_configuration.stderr.golden
  • tests/snapshots/TestCLICommands_echo_info_runs_with_verbose_flag.stderr.golden
  • tests/snapshots/TestCLICommands_atmos_auth_validate_--verbose.stderr.golden

Comment thread pkg/list/format/tree_instances.go Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

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

Inline comments:
In `@pkg/provenance/tree_renderer.go`:
- Around line 110-112: Update the rendering logic in tree_renderer.go to format
the file and optional line number together before applying the existing color
styling, so the line number receives the same gray style as the file.
Consolidate the branches handling non-positive and positive entry.Line values
while preserving their current output formats.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

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

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 798478c0-9b3d-442e-9b55-50a7ab8251e3

📥 Commits

Reviewing files that changed from the base of the PR and between 53c919d and 53612ee.

📒 Files selected for processing (18)
  • cmd/helmfile/apply.go
  • pkg/list/format/tree_instances.go
  • pkg/list/format/tree_instances_test.go
  • pkg/list/format/tree_stacks.go
  • pkg/list/format/tree_stacks_test.go
  • pkg/provenance/tree_renderer.go
  • pkg/provenance/tree_renderer_test.go
  • pkg/utils/component_reverse_path_utils.go
  • tests/cli_test.go
  • tests/snapshots/TestCLICommands_atmos_helmfile_apply_--help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_helmfile_apply_help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_terraform_apply_help.stdout.golden
  • tests/snapshots/TestCLICommands_config_alias_tp_--help_shows_terraform_plan_help.stdout.golden
  • tests/snapshots/TestCLICommands_describe_component_with_component_name_(backward_compatibility).stdout.golden
  • tests/snapshots/TestCLICommands_describe_component_with_current_directory_(.).stdout.golden
  • tests/snapshots/TestCLICommands_describe_component_with_path_not_in_component_directory.stderr.golden
  • tests/snapshots/TestCLICommands_describe_component_with_relative_path.stdout.golden
🚧 Files skipped from review as they are similar to previous changes (11)
  • tests/snapshots/TestCLICommands_atmos_helmfile_apply_--help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stdout.golden
  • tests/snapshots/TestCLICommands_config_alias_tp_--help_shows_terraform_plan_help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_helmfile_apply_help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_terraform_apply_help.stdout.golden
  • tests/snapshots/TestCLICommands_describe_component_with_path_not_in_component_directory.stderr.golden
  • tests/snapshots/TestCLICommands_describe_component_with_current_directory_(.).stdout.golden
  • pkg/list/format/tree_stacks.go
  • tests/snapshots/TestCLICommands_describe_component_with_component_name_(backward_compatibility).stdout.golden
  • pkg/list/format/tree_instances.go
  • tests/snapshots/TestCLICommands_describe_component_with_relative_path.stdout.golden

Comment thread pkg/provenance/tree_renderer.go Resolved
… Hub flakiness

CI hit a transient 502 from registry-1.docker.io pulling testcontainers-go's
ryuk reaper image, failing TestDockerRuntime_RemoteRegistryCache_Integration
before the test body even ran.

- Disable Ryuk for this test: it already terminates its network and registry
  container explicitly via t.Cleanup, so the reaper (and its own image pull)
  is unnecessary, mirroring the same trade-off tests/floci_containers_test.go
  makes for rootless Podman.
- Pull the registry:2 and busybox:1.36 images through mirror.gcr.io instead
  of Docker Hub directly, sidestepping Docker Hub's rate limiting and
  transient 5xx responses.
- Wrap the registry container pull in pkg/container/pull.go's existing
  transient-error retry policy (same package, no new logic) for residual
  hardening against blips from the mirror itself.

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

mergify Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

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

…d-default-editions

# Conflicts:
#	.github/workflows/dependency-review.yml
#	website/package.json
#	website/pnpm-lock.yaml
CanonicalEnvKey (commit ff17119) uppercased every environment variable
key on Windows to collapse the Path/PATH case-duplication bug, but that was
too broad: it also rewrote unrelated mixed-case names, breaking Terraform's
TF_CLI_ARGS_<command> convention (e.g. TF_CLI_ARGS_plan became
TF_CLI_ARGS_PLAN), which failed TestMergeSystemEnvWithGlobal_TFCliArgsHandling
and TestMergeSystemEnvSimpleWithGlobal on Windows CI.

Only PATH is the variable Atmos code itself writes under a fixed casing
while Windows natively supplies it under another ("Path"), so only PATH
needs normalizing; every other name stays exactly as given, matching the
existing case-sensitive convention.

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

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

⚠️ Outside diff range comments (2)
cmd/describe_component.go (1)

243-256: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Gate describe component auth on processTemplates too.

resolveAuthManagerParams carries ProcessTemplates only into ExecuteDescribeComponentParams, while resolveAuthManager() uses identityExplicit or processYamlFunctions && hasIdentityBackedStore(...). That lets the default --process-templates=true, --process-functions=false path skip auth manager creation even though atmos.Component() inside templates can need authenticated credentials. Mirror the stacks helper in describe_component.go and cover the templates-only quadrant.

🤖 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/describe_component.go` around lines 243 - 256, Update the describe
component auth decision around resolveAuthManager to include processTemplates
alongside identityExplicit and processYamlFunctions when determining whether
authentication is required. Mirror the corresponding stacks helper’s gating
logic, ensuring the templates-only path (processTemplates enabled,
processYamlFunctions disabled) creates the auth manager before template
execution. Add or update coverage for this quadrant.
cmd/validate_editorconfig.go (1)

205-211: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Include Color when applying the editorconfig color override.

settings.terminal.no_color is deprecated in favor of settings.terminal.color, so this path should also honor !atmosConfig.Settings.Terminal.Color when --no-color is not explicitly 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/validate_editorconfig.go` around lines 205 - 211, Update
applyEditorConfigColorOverride to honor the terminal Color setting when
--no-color is not explicitly provided: apply the override when either the
deprecated NoColor value is enabled or Terminal.Color is false, while preserving
the explicit flag handling.
🧹 Nitpick comments (4)
cmd/validate_editorconfig.go (2)

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

runEditorConfigForFiles exceeds the function-size/complexity guideline.

The function spans ~79 lines and needs a //nolint:funlen,gocognit,revive suppression. As per coding guidelines, "Keep cyclomatic complexity at or below 15 and functions at or below 60 lines and 40 statements; extract named helpers and keep orchestrators as linear pipelines." Some branches (dry-run listing, spinner-wrapped validation) could be extracted into named helpers similar to runEditorConfigStructuredOutput, letting this function become a thinner pipeline and dropping the nolint.

🤖 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/validate_editorconfig.go` around lines 312 - 391, Refactor
runEditorConfigForFiles into a thin orchestration pipeline by extracting the
dry-run file listing and spinner-wrapped validation/reporting branches into
named helpers, following the existing runEditorConfigStructuredOutput pattern.
Preserve configuration initialization, exclude merging, version checks,
structured-output routing, diagnostics, and error behavior; then remove the
//nolint:funlen,gocognit,revive suppression once the function meets the size and
complexity limits.

Source: Coding guidelines


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

Use data-channel writers for the EditorConfig stdout outputs.

The dry-run file list and the rich/SARIF report bodies are stdout data, not UI or logging. Replace log.Info(file), fmt.Fprintln(cmd.OutOrStdout(), ...), and cmd.OutOrStdout().Write(...) with data.Writeln(...), data.Write(...), or JSON/YAML helpers as appropriate.

🤖 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/validate_editorconfig.go` around lines 336 - 349, Update the dry-run
output loop in the validation command to write each file through the
data-channel writer instead of log.Info. Also replace stdout report-body writes
using fmt.Fprintln and cmd.OutOrStdout().Write with the appropriate
data.Writeln, data.Write, or JSON/YAML helper, while leaving UI and diagnostic
logging unchanged.

Source: Coding guidelines

cmd/root.go (1)

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

Two independent implementations of the same config-validation command matcher.

isBuiltinConfigValidationCommand (cmd.CommandPath()-based) and matchesConfigValidationCommand/isBuiltinConfigValidationArgs (raw-args-token-based) both hardcode the identical three command shapes ("config validate", "validate config", "validate schema config") through separate code paths. Adding a new built-in validation command later requires remembering to update both, or they silently drift out of sync (e.g., one path allows continuing on config error, the other doesn't).

Consider deriving both from one shared list of token sequences (e.g. [][]string{{"config","validate"}, {"validate","config"}, {"validate","schema","config"}}), building the cmd.CommandPath() strings from that same list for the cobra-based check.

🤖 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/root.go` around lines 1653 - 1737, Unify the duplicated command-shape
definitions used by matchesConfigValidationCommand and
isBuiltinConfigValidationCommand. Introduce one shared list of token sequences,
have the raw-argument matcher iterate over it, and derive the Cobra command-path
checks from the same sequences while preserving the existing command shapes and
argument behavior.
cmd/describe_component.go (1)

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

--use-mocks validation looks correct but appears untested.

The new f.useMocks && !f.processYamlFunctions rejection branch isn't exercised by any test in the reviewed cmd/describe_component_test.go/cmd/describe_skip_auth_test.go diffs (only the flag registration is added at line 521 of the latter). Worth a small table test similar to the error-mode wrong-type tests already in this file.

🤖 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/describe_component.go` around lines 196 - 215, Add a table-driven test
covering getRunnableDescribeComponentCmd with useMocks enabled and
processYamlFunctions disabled, asserting it returns
errUtils.ErrInvalidFlagValue. Follow the existing error-mode wrong-type test
pattern in the describe component command tests and preserve successful behavior
when processYamlFunctions is enabled.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/prd/editions.md`:
- Around line 24-25: Update the no-pin compatibility statement in the editions
documentation to clarify that unpinned projects use the latest defaults and may
change behavior after upgrades. State that pinning an edition preserves
historical defaults, and remove the claim that behavior remains byte-for-byte
identical with zero breaking changes.
- Around line 132-139: The default-change workflow must cover every live default
layer, not only setDefaultConfiguration. Update both setDefaultConfiguration and
defaultCliConfig for affected existing defaults, ensure journaled keys are
excluded from embedded configuration, then append the dated Entry and regenerate
snapshots; retain the reduced workflow for genuinely new defaults.

---

Outside diff comments:
In `@cmd/describe_component.go`:
- Around line 243-256: Update the describe component auth decision around
resolveAuthManager to include processTemplates alongside identityExplicit and
processYamlFunctions when determining whether authentication is required. Mirror
the corresponding stacks helper’s gating logic, ensuring the templates-only path
(processTemplates enabled, processYamlFunctions disabled) creates the auth
manager before template execution. Add or update coverage for this quadrant.

In `@cmd/validate_editorconfig.go`:
- Around line 205-211: Update applyEditorConfigColorOverride to honor the
terminal Color setting when --no-color is not explicitly provided: apply the
override when either the deprecated NoColor value is enabled or Terminal.Color
is false, while preserving the explicit flag handling.

---

Nitpick comments:
In `@cmd/describe_component.go`:
- Around line 196-215: Add a table-driven test covering
getRunnableDescribeComponentCmd with useMocks enabled and processYamlFunctions
disabled, asserting it returns errUtils.ErrInvalidFlagValue. Follow the existing
error-mode wrong-type test pattern in the describe component command tests and
preserve successful behavior when processYamlFunctions is enabled.

In `@cmd/root.go`:
- Around line 1653-1737: Unify the duplicated command-shape definitions used by
matchesConfigValidationCommand and isBuiltinConfigValidationCommand. Introduce
one shared list of token sequences, have the raw-argument matcher iterate over
it, and derive the Cobra command-path checks from the same sequences while
preserving the existing command shapes and argument behavior.

In `@cmd/validate_editorconfig.go`:
- Around line 312-391: Refactor runEditorConfigForFiles into a thin
orchestration pipeline by extracting the dry-run file listing and
spinner-wrapped validation/reporting branches into named helpers, following the
existing runEditorConfigStructuredOutput pattern. Preserve configuration
initialization, exclude merging, version checks, structured-output routing,
diagnostics, and error behavior; then remove the //nolint:funlen,gocognit,revive
suppression once the function meets the size and complexity limits.
- Around line 336-349: Update the dry-run output loop in the validation command
to write each file through the data-channel writer instead of log.Info. Also
replace stdout report-body writes using fmt.Fprintln and cmd.OutOrStdout().Write
with the appropriate data.Writeln, data.Write, or JSON/YAML helper, while
leaving UI and diagnostic logging unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

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

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: eb0af39b-ad28-45ec-9651-19e10d4c6ff1

📥 Commits

Reviewing files that changed from the base of the PR and between 745db58 and d350cfd.

📒 Files selected for processing (16)
  • atmos.yaml
  • cmd/describe_component.go
  • cmd/describe_component_test.go
  • cmd/describe_edition.go
  • cmd/describe_edition_test.go
  • cmd/describe_skip_auth_test.go
  • cmd/list/editions_test.go
  • cmd/list/stacks.go
  • cmd/list/stacks_test.go
  • cmd/root.go
  • cmd/root_helpers_test.go
  • cmd/root_test.go
  • cmd/validate_editorconfig.go
  • cmd/validate_editorconfig_test.go
  • demo/casts/atmos.d/screengrabs/cli.yaml
  • docs/prd/editions.md

Comment thread docs/prd/editions.md Resolved
Comment thread docs/prd/editions.md Resolved
Fixes flag-parser architecture, error-wrap order, test fd leak, and
Viper test-isolation issues; applies low-risk table-driven test
refactors where CodeRabbit's suggestion still applied against current
code. These findings only ever existed as prose inside CodeRabbit
review-body "Nitpick comments" sections, never as separate resolvable
threads, so nothing tracked them until now.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Two CodeRabbit findings: the "zero breaking change" claim for unpinned
projects contradicted the doc's own note that changed defaults become
newly effective for unpinned projects on upgrade; and the contributor
workflow only mentioned setDefaultConfiguration, omitting the
defaultCliConfig agreement the invariant tests actually require.

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

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

⚠️ Outside diff range comments (1)
pkg/auth/manager_helpers_test.go (1)

912-920: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Make the propagation test portable and assert CliConfigPath.

Line 913 hardcodes the absolute Unix path /tmp/atmos-config, and the test only verifies si.Stack; a regression in CLI config path propagation would pass unnoticed. Use a relative test path and assert the manager’s stored or observable config path.

As per coding guidelines, tests must remain cross-platform and use relative paths within the worktree.

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

In `@pkg/auth/manager_helpers_test.go` around lines 912 - 920, Update the test
case around CreateManagerWithAtmosConfigForStack to use a relative worktree path
instead of the hardcoded /tmp/atmos-config value, and add an assertion that the
manager’s stored or observable CliConfigPath matches that value. Preserve the
existing stack propagation assertion.

Source: Coding guidelines

🧹 Nitpick comments (2)
pkg/auth/manager_helpers.go (1)

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

Document the new exported helper.

Add a Go doc comment beginning with CreateManagerWithAtmosConfigForStack and ending with a period.

As per coding guidelines, all exported Go functions must be documented.

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

In `@pkg/auth/manager_helpers.go` around lines 313 - 317, Add a Go doc comment
immediately before CreateManagerWithAtmosConfigForStack that begins with the
function name and ends with a period, briefly describing the helper’s purpose.

Source: Coding guidelines

pkg/auth/manager_helpers_test.go (1)

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

Use a table-driven structure for these scenarios.

This new test covers multiple behaviors; represent the cases as table data so inputs and expected outcomes remain consistent as coverage grows.

As per coding guidelines, Go tests covering multiple scenarios should be table-driven.

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

In `@pkg/auth/manager_helpers_test.go` around lines 893 - 922, Refactor
TestCreateManagerWithAtmosConfigForStack into a table-driven test, representing
each scenario’s inputs and expected outcomes in test cases and executing them
through a shared subtest loop. Preserve the existing coverage for unconfigured
auth errors, nil atmosConfig behavior, and propagation of CliConfigPath and
stack into the manager.

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 `@pkg/auth/manager_helpers_test.go`:
- Around line 912-920: Update the test case around
CreateManagerWithAtmosConfigForStack to use a relative worktree path instead of
the hardcoded /tmp/atmos-config value, and add an assertion that the manager’s
stored or observable CliConfigPath matches that value. Preserve the existing
stack propagation assertion.

---

Nitpick comments:
In `@pkg/auth/manager_helpers_test.go`:
- Around line 893-922: Refactor TestCreateManagerWithAtmosConfigForStack into a
table-driven test, representing each scenario’s inputs and expected outcomes in
test cases and executing them through a shared subtest loop. Preserve the
existing coverage for unconfigured auth errors, nil atmosConfig behavior, and
propagation of CliConfigPath and stack into the manager.

In `@pkg/auth/manager_helpers.go`:
- Around line 313-317: Add a Go doc comment immediately before
CreateManagerWithAtmosConfigForStack that begins with the function name and ends
with a period, briefly describing the helper’s purpose.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 3d547460-c410-4780-ad61-ec4092269ca3

📥 Commits

Reviewing files that changed from the base of the PR and between d350cfd and f8f4b2f.

📒 Files selected for processing (9)
  • cmd/describe_component_test.go
  • cmd/describe_edition.go
  • cmd/list/editions_test.go
  • docs/prd/editions.md
  • pkg/auth/manager_helpers.go
  • pkg/auth/manager_helpers_test.go
  • pkg/auth/manager_test.go
  • pkg/config/load_edition_test.go
  • tests/cli_snapshot_test.go
🚧 Files skipped from review as they are similar to previous changes (3)
  • docs/prd/editions.md
  • cmd/describe_component_test.go
  • tests/cli_snapshot_test.go

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 31, 2026
@mergify

mergify Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

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

…d-default-editions

# Conflicts:
#	tests/snapshots/TestCLICommands_describe_component_with_component_name_(backward_compatibility).stdout.golden
#	tests/snapshots/TestCLICommands_describe_component_with_current_directory_(.).stdout.golden
#	tests/snapshots/TestCLICommands_describe_component_with_relative_path.stdout.golden

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

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

⚠️ Outside diff range comments (2)
cmd/root.go (1)

630-633: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Initialize the terminal limit before Cobra renders help.

Cobra’s standard --help path prints usage and exits before running PersistentPreRun, so settings.terminal.max_width is only installed after help rendering would have used the default GetTerminalWidth(). Move templates.SetTerminalWidthLimit(...) to a startup path before RootCmd.Execute(), or inject the configured width directly into the help renderer. Add coverage for configured help output.

🤖 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/root.go` around lines 630 - 633, Move the templates.SetTerminalWidthLimit
call out of the later configuration flow and initialize it before
RootCmd.Execute() so Cobra’s standard help rendering uses
settings.terminal.max_width. Preserve the zero-value behavior that leaves
detected width unclamped, and add coverage verifying configured help output
honors the limit.
internal/exec/utils.go (1)

927-948: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Rebuild generated names after rendering.

spacelift_stack and atlantis_project are generated from Settings/Vars and then rendered by templates/YAML functions. If those inputs contain renderable values, postProcessTemplatesAndYamlFunctions only restores decoded sections and leaves stale pre-rendered names in ComponentSection. Rebuild the names after rendering when the name inputs support templates, YAML functions, or context tokens that are replaced after rendering.

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

In `@internal/exec/utils.go` around lines 927 - 948, The generated names assigned
by BuildSpaceliftStackNameFromComponentConfig and
BuildAtlantisProjectNameFromComponentConfig become stale when their
Settings/Vars inputs are rendered. After postProcessTemplatesAndYamlFunctions
completes, rebuild and reassign spacelift_stack and atlantis_project when their
inputs contain templates, YAML functions, or context tokens subject to
replacement, while preserving error propagation and empty-name handling.
🧹 Nitpick comments (1)
cmd/root_test.go (1)

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

Use a table-driven test for bootstrap decisions.

These tests exercise the same applyCIGitCloneBootstrap behavior with different arguments, environment values, and expected results. Combine them into named table cases. Keep the global configuration restoration for each subtest.

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

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

In `@cmd/root_test.go` around lines 269 - 316, Combine the three
applyCIGitCloneBootstrap tests into one named table-driven test covering
arguments, environment values, and expected application/configuration states.
Run each case as a subtest, preserving saveRestoreAtmosConfig and all relevant
environment setup inside each subtest so global state is restored independently.

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 `@cmd/root.go`:
- Around line 630-633: Move the templates.SetTerminalWidthLimit call out of the
later configuration flow and initialize it before RootCmd.Execute() so Cobra’s
standard help rendering uses settings.terminal.max_width. Preserve the
zero-value behavior that leaves detected width unclamped, and add coverage
verifying configured help output honors the limit.

In `@internal/exec/utils.go`:
- Around line 927-948: The generated names assigned by
BuildSpaceliftStackNameFromComponentConfig and
BuildAtlantisProjectNameFromComponentConfig become stale when their
Settings/Vars inputs are rendered. After postProcessTemplatesAndYamlFunctions
completes, rebuild and reassign spacelift_stack and atlantis_project when their
inputs contain templates, YAML functions, or context tokens subject to
replacement, while preserving error propagation and empty-name handling.

---

Nitpick comments:
In `@cmd/root_test.go`:
- Around line 269-316: Combine the three applyCIGitCloneBootstrap tests into one
named table-driven test covering arguments, environment values, and expected
application/configuration states. Run each case as a subtest, preserving
saveRestoreAtmosConfig and all relevant environment setup inside each subtest so
global state is restored independently.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a12d9b0a-9f3a-4696-9daa-e1dfe6cda01a

📥 Commits

Reviewing files that changed from the base of the PR and between f8f4b2f and cca66ee.

📒 Files selected for processing (11)
  • cmd/root.go
  • cmd/root_test.go
  • cmd/toolchain/registry/styling.go
  • internal/exec/utils.go
  • lychee.toml
  • pkg/ansi/trim.go
  • pkg/config/load.go
  • pkg/list/format/table.go
  • pkg/toolchain/list_table.go
  • tests/snapshots/TestCLICommands_atmos_list_instances.tty.golden
  • tests/snapshots/TestCLICommands_atmos_toolchain_registry_search.stderr.golden
🚧 Files skipped from review as they are similar to previous changes (2)
  • tests/snapshots/TestCLICommands_atmos_toolchain_registry_search.stderr.golden
  • pkg/list/format/table.go

coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 2, 2026
…d-default-editions

# Conflicts:
#	internal/exec/describe_stacks.go
#	tests/cli_test.go
#	tests/snapshots/TestCLICommands_atmos_describe_config_-f_yaml.stdout.golden
#	tests/snapshots/TestCLICommands_describe_component_from_nested_dir_discovers_atmos.yaml_in_parent.stdout.golden
#	tests/snapshots/TestCLICommands_indentation.stdout.golden
coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 2, 2026
…main merge

Three describe-component golden snapshots had silently reverted to their
pre-schema-filter/pre-provenance content during the merge with origin/main's
PR #2807 — a non-conflicting auto-merge overwrote earlier regenerated content
without a conflict marker to flag it, breaking Acceptance Tests on all three
platforms (linux/windows/macos).

Also fixes a real regression in sanitizeOutput's provisioned_by_user
normalization: the regex combined during that same merge unconditionally
appended a trailing space, even when the source had no padding to normalize,
breaking TestSanitizeOutput_WithCustomReplacements. Now only pads when the
source actually had trailing whitespace to collapse.

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

mergify Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

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.
Consider refactoring it into smaller, more focused PRs to facilitate a smoother review process.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 3, 2026
origin/main's store refactor (#2575) moved NewSSMStore/SSMStoreOptions
from pkg/store into pkg/store/providers, breaking this test's build
(a non-conflicting cross-package break from the merge, not flagged by
git as a conflict).

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

atmos-pro Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Tip

Atmos Pro  

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

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Warning

Release Documentation Required

This PR is labeled minor or major and requires documentation updates:

  • Changelog entry - Add a blog post in website/blog/YYYY-MM-DD-feature-name.mdx
  • Roadmap update - Update website/src/data/roadmap.js with the new milestone

Alternatively: If this change doesn't require release documentation, remove the minor or major label.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

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

This branch was successfully deployed

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

Labels

minor New features that do not break anything size/xxl

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants