Skip to content

Generate atmos.yaml JSON Schema from code; add atmos config schema - #2761

Merged
Andriy Knysh (aknysh) merged 46 commits into
mainfrom
osterman/atmos-yaml-schema-validation
Jul 19, 2026
Merged

Andriy Knysh (aknysh) merged 46 commits into
mainfrom
osterman/atmos-yaml-schema-validation

Conversation

@osterman

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

Copy link
Copy Markdown
Member

what

  • Add a complete JSON Schema for atmos.yaml that is generated from the Go configuration structs (pkg/config/schema, go generate) — Go doc comments become schema descriptions, runtime-only fields are excluded, and YAML function (!include, !env, …), null, and scalar-string-list alternatives are injected so real configs validate.
  • Guard the schema so it can never go stale: a drift test regenerates in-process and byte-compares against the committed artifact; ratchet tests force classification of every new AtmosConfiguration field and every new YAML function constant; a corpus test validates all examples/** and demo/** configs plus this repository's own atmos.yaml and .atmos.d (which surfaced and fixed real gaps: map-form env, boolean pager, function-valued polymorphic fields).
  • Add atmos config schema [output-path], mirroring atmos stack schema, printing the embedded schema served at atmos://schema/atmos/config/1.0.
  • Seed a built-in config entry in the schemas registry so atmos validate schema validates atmos.yaml, atmos.d/**, and project-local profiles out of the box (overridable via schemas.config), add atmos config validate as a shorthand alias for atmos validate schema config, and stop the command from bailing out when no stacks directory exists — schema validation now works in config-only repositories.
  • Add atmos stack validate as the symmetric alias for atmos validate stacks, and make pkg/filematch resolve literal (non-glob) patterns with a direct stat instead of walking the entire tree — atmos validate schema in this repository drops from ~6s to ~0.6s, so per-file results stream immediately.
  • Wire the schema into the AI/MCP server (new read-only atmos_validate_schema tool alongside atmos_validate_stacks) and the experimental LSP server (line-positioned schema diagnostics for atmos.yaml documents and fragments, with anyOf cascade noise filtered to the most specific violation); pkg/validator gains ValidateYAMLContent for unsaved editor buffers.
  • Publish floating (.../atmos-config/1.0/...) and per-release pinned schema copies from the website workflows, and add command docs, a schemas reference section, MCP/LSP doc updates, a changelog post, and a roadmap milestone.

why

  • atmos.yaml has grown a larger configuration surface than stack manifests but had no schema at all: typos and mistyped sections were silently ignored by the loader, and editors offered no completion or validation.
  • A hand-written schema (like the stack-manifest one) would rot as options ship; generating it from the exact structs Atmos decodes into makes drift impossible, with CI enforcing regeneration.
  • Fixes a latent misdefault where atmos validate schema atmos matched atmos.yaml/atmos.yml but validated them against the stack-manifest schema, and a gap where atmos validate schema silently skipped all validation in repositories without a stacks directory.
  • Editor integration works with one yaml-language-server modeline (or natively via atmos lsp start), and pinned per-release URLs let teams upgrade the binary without silently absorbing schema changes — the same model the manifest schema adopted in Consolidate atmos-manifest schema, publish per-release pins #2749.

references

Summary by CodeRabbit

  • New Features
    • Added atmos config schema to print or write the generated atmos.yaml JSON Schema.
    • Added atmos config validate and atmos stack validate, plus built-in schema validation for atmos.yaml/atmos.d//local profile fragments via schemas.config override/disable.
    • Added atmos_validate_schema tool and LSP config-schema diagnostics with accurate line/column reporting.
    • Added native atmos validate ci / atmos ci validate workflow validation (including SARIF/annotations when enabled).
  • Documentation
    • Updated CLI, configuration, and blog docs for the new schema/validation commands, tooling, and editor integration.
  • Chores
    • Prod/preview deploys now generate schema artifacts and publish/pin versioned snapshots; schema drift is enforced by tests.

…nfig schema

Add pkg/config/schema (package configschema): reflects schema.AtmosConfiguration
into a draft 2020-12 JSON Schema via go:generate, with Go doc comments becoming
descriptions, runtime-only fields excluded, YAML function (!include, !env, ...),
null, and scalar-string-list alternatives injected, and polymorphic sections
(schemas, steps, durations, when conditions) modeled per their custom
unmarshalers. The committed artifact is embedded and served at
atmos://schema/atmos/config/1.0, guarded by a drift test plus classification
ratchets and an examples/ corpus test.

Add `atmos config schema [output-path]` mirroring `atmos stack schema`, and seed
a built-in `config` schemas entry so `atmos validate schema` validates
atmos.yaml, atmos.d fragments, and project-local profiles out of the box
(replacing the misdefault that validated atmos.yaml against the stack-manifest
schema).

Publish floating and per-release pinned schema copies from the website
workflows, and add the command docs, schemas reference section, changelog post,
and roadmap milestone.

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

atmos-pro Bot commented Jul 16, 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.

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

github-actions Bot commented Jul 16, 2026 •

Copy link
Copy Markdown

Dependency Review

The following issues were found:
  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ⚠️ 4 package(s) with unknown licenses.
See the Details below.

License Issues

go.mod

PackageVersionLicenseIssue Type
github.com/mattn/go-shellwords1.0.13NullUnknown License
github.com/mikefarah/yq/v44.52.4NullUnknown License
github.com/rhysd/actionlint1.7.12NullUnknown License
github.com/robfig/cron/v33.0.1NullUnknown License
Allowed Licenses: MIT, MIT-0, Apache-2.0, BSD-2-Clause, BSD-2-Clause-Views, BSD-3-Clause, ISC, MPL-2.0, 0BSD, Unlicense, CC0-1.0, CC-BY-3.0, CC-BY-4.0, CC-BY-SA-3.0, Python-2.0, OFL-1.1, LicenseRef-scancode-generic-cla, LicenseRef-scancode-unknown-license-reference, LicenseRef-scancode-unicode, LicenseRef-scancode-google-patent-license-golang
Excluded from license check: pkg:golang/github.com/antlr4-go/antlr/v4, pkg:golang/github.com/google/cel-go, pkg:golang/golang.org/x/image, pkg:golang/modernc.org/libc, pkg:golang/github.com/opencontainers/go-digest, pkg:npm/pako, pkg:npm/sax

Scanned Files

  • .github/workflows/validation-e2e.yml
  • go.mod

@mergify

mergify Bot commented Jul 16, 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.

@mergify

mergify Bot commented Jul 16, 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.

@mergify mergify Bot added the needs-cloudposse Needs Cloud Posse assistance label Jul 16, 2026
@coderabbitai

coderabbitai Bot commented Jul 16, 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

Adds generated JSON Schema support for atmos.yaml, built-in configuration and project validation, CLI/LSP/AI integrations, native GitHub Actions workflow validation, rich/SARIF diagnostics, release publishing, tests, fixtures, and documentation.

Changes

Validation platform

Layer / File(s) Summary
Schema generation and verification
pkg/config/schema/*, pkg/datafetcher/schema/atmos/config/1.0.json
Generates and customizes the configuration schema, embeds the artifact, and validates drift, compilation, corpus compatibility, and YAML functions.
Built-in schema validation
internal/exec/..., cmd/validate_schema.go, pkg/validator/*
Adds built-in config-schema selection, fragment discovery, position-aware reports, and in-memory YAML validation.
Diagnostics and CI validation
pkg/validation/*, pkg/ci/*, cmd/ci/*, cmd/validate_all.go
Adds shared diagnostic reports, rich/SARIF/text rendering, actionlint workflow validation, CI gates, and aggregate validation orchestration.
CLI, LSP, and AI integrations
cmd/config/*, cmd/stack/*, pkg/lsp/server/*, pkg/ai/tools/atmos/*
Adds schema and validation commands, routes config documents through schema diagnostics, and registers atmos_validate_schema.
Publishing and supporting updates
.github/workflows/*, website/*, tests/fixtures/*, pkg/filematch/*, go.mod
Publishes schema snapshots, updates documentation and help coverage, adds validation fixtures, improves literal file matching, and adds required dependencies.
Project guidance and planning
docs/prd/..., .claude/*, CLAUDE.md, lychee.toml, website/package.json
Adds validation parity planning and updates repository tooling and development guidance.

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

Sequence Diagram(s)

sequenceDiagram
  participant Developer
  participant AtmosCLI
  participant EmbeddedSchema
  participant YAMLValidator
  participant LSP
  participant Actionlint
  Developer->>AtmosCLI: Run config schema or validation command
  AtmosCLI->>EmbeddedSchema: Fetch generated schema
  EmbeddedSchema-->>AtmosCLI: Return schema bytes
  AtmosCLI->>YAMLValidator: Validate configuration files
  YAMLValidator-->>AtmosCLI: Return diagnostics
  AtmosCLI-->>Developer: Print text, rich, or SARIF results
  LSP->>YAMLValidator: Validate edited config document
  YAMLValidator-->>LSP: Return positioned diagnostics
  AtmosCLI->>Actionlint: Validate workflow files
  Actionlint-->>AtmosCLI: Return workflow diagnostics
Loading

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 51.81% 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
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly captures the main change: generating the atmos.yaml schema from code and adding the config schema command.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch osterman/atmos-yaml-schema-validation

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: 3

🧹 Nitpick comments (3)
pkg/config/schema/generator/main.go (1)

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

Prefer ui helpers over direct fmt.Fprintln to stderr.

As per coding guidelines, standard UI messages and errors should use ui.* helpers instead of printing directly to os.Stderr. Since this is a standalone go:generate binary rather than the main Atmos CLI, avoiding the heavy initialization of the ui package may be an acceptable exception. However, please consider it to maintain consistency.

🤖 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/config/schema/generator/main.go` around lines 19 - 24, Update main to use
the established ui helper for reporting run errors instead of calling
fmt.Fprintln directly on os.Stderr, while preserving the existing nonzero exit
behavior. If ui initialization is inappropriate for this standalone generator,
retain the current stderr approach as the documented exception.

Source: Coding guidelines

pkg/config/schema/schema.go (2)

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

Define static errors centrally.

As per coding guidelines, consider defining static errors in errors/errors.go rather than directly using errors.New within specific packages. While this is an internal generator package, keeping error declarations centralized ensures consistency across the codebase.

🤖 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/config/schema/schema.go` around lines 48 - 50, Move the static
ErrRepoRootNotFound declaration from the schema package into the shared
errors/errors.go location, preserving its exported name and message; update
schema package references to use the centralized error symbol instead of calling
errors.New locally.

Source: Coding guidelines


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

Wrap returned errors with context.

As per coding guidelines, Go's error handling idioms require wrapping errors with context using fmt.Errorf("...: %w", err) rather than returning them raw.

  • pkg/config/schema/schema.go#L60-L62: wrap the error from RepoRoot().
  • pkg/config/schema/schema.go#L80-L82: wrap the error from addGoComments().
  • pkg/config/schema/schema.go#L88-L90: wrap the error from json.MarshalIndent().
  • pkg/config/schema/schema.go#L113-L115: wrap the error from os.Getwd().
  • pkg/config/schema/schema.go#L116-L118: wrap the error from os.Chdir().
  • pkg/config/schema/schema.go#L122-L122: wrap the error from r.AddGoComments().
  • pkg/config/schema/generator/main.go#L28-L30: wrap the error from configschema.Generate().
  • pkg/config/schema/generator/main.go#L32-L34: wrap the error from configschema.RepoRoot().
  • pkg/config/schema/generator/main.go#L36-L38: wrap the error from os.MkdirAll().
  • pkg/config/schema/generator/main.go#L39-L41: wrap the error from os.WriteFile().
🤖 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/config/schema/schema.go` around lines 60 - 62, Wrap each raw error with
contextual fmt.Errorf messages while preserving %w propagation: in
pkg/config/schema/schema.go at 60-62 (RepoRoot), 80-82 (addGoComments), 88-90
(json.MarshalIndent), 113-115 (os.Getwd), 116-118 (os.Chdir), and 122
(r.AddGoComments); and in pkg/config/schema/generator/main.go at 28-30
(configschema.Generate), 32-34 (configschema.RepoRoot), 36-38 (os.MkdirAll), and
39-41 (os.WriteFile). Add the fmt import where needed and make each context
identify the failed operation.

Source: Coding guidelines

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

Inline comments:
In `@pkg/datafetcher/schema/atmos/config/1.0.json`:
- Line 2286: The synopsis extraction logic must preserve abbreviations such as
“e.g.” instead of truncating generated descriptions. Update the
synopsis-generation code used for CICacheConfig and ProvisionTarget, then
regenerate pkg/datafetcher/schema/atmos/config/1.0.json so both complete
descriptions are reflected.

In `@website/docs/cli/commands/config/config-schema.mdx`:
- Around line 8-17: Add the required Screengrab component import and render it
in the config schema command documentation alongside the existing Intro and
CastPlayer components, using the command’s screengrab asset; retain CastPlayer
as supplementary media.

In `@website/docs/cli/commands/config/usage.mdx`:
- Line 39: Update the Usage block in the config command documentation to include
the atmos config schema [output-path] invocation, keeping it consistent with the
existing subcommand list and CLI help text.

---

Nitpick comments:
In `@pkg/config/schema/generator/main.go`:
- Around line 19-24: Update main to use the established ui helper for reporting
run errors instead of calling fmt.Fprintln directly on os.Stderr, while
preserving the existing nonzero exit behavior. If ui initialization is
inappropriate for this standalone generator, retain the current stderr approach
as the documented exception.

In `@pkg/config/schema/schema.go`:
- Around line 48-50: Move the static ErrRepoRootNotFound declaration from the
schema package into the shared errors/errors.go location, preserving its
exported name and message; update schema package references to use the
centralized error symbol instead of calling errors.New locally.
- Around line 60-62: Wrap each raw error with contextual fmt.Errorf messages
while preserving %w propagation: in pkg/config/schema/schema.go at 60-62
(RepoRoot), 80-82 (addGoComments), 88-90 (json.MarshalIndent), 113-115
(os.Getwd), 116-118 (os.Chdir), and 122 (r.AddGoComments); and in
pkg/config/schema/generator/main.go at 28-30 (configschema.Generate), 32-34
(configschema.RepoRoot), 36-38 (os.MkdirAll), and 39-41 (os.WriteFile). Add the
fmt import where needed and make each context identify the failed operation.
🪄 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: f3663908-d626-46eb-803c-acce4bd71d90

📥 Commits

Reviewing files that changed from the base of the PR and between b59e1a3 and a43059b.

📒 Files selected for processing (25)
  • .github/workflows/website-deploy-prod.yml
  • .github/workflows/website-preview-build.yml
  • .gitignore
  • cmd/config/config.go
  • cmd/config/schema.go
  • cmd/config/schema_test.go
  • cmd/validate_schema.go
  • demo/casts/atmos.d/screengrabs/cli.yaml
  • go.mod
  • internal/exec/validate_schema.go
  • internal/exec/validate_schema_test.go
  • pkg/config/schema/corpus_test.go
  • pkg/config/schema/drift_test.go
  • pkg/config/schema/generate_test.go
  • pkg/config/schema/generator/main.go
  • pkg/config/schema/overrides.go
  • pkg/config/schema/ratchet_test.go
  • pkg/config/schema/schema.go
  • pkg/datafetcher/schema/atmos/config/1.0.json
  • website/blog/2026-07-16-atmos-yaml-schema.mdx
  • website/docs/cli/commands/config/config-schema.mdx
  • website/docs/cli/commands/config/usage.mdx
  • website/docs/cli/commands/validate/validate-schema.mdx
  • website/docs/cli/configuration/schemas.mdx
  • website/src/data/roadmap.js

…and LSP

Extend the schema corpus test to this repository's own atmos.yaml, .atmos.d,
and demo/** configs, and fix the over-strictness it exposed: command env
accepts the map form (commandEnvMapDecodeHook), terminal pager accepts a
boolean, and polymorphic anyOf wrappers gain the YAML-function alternative
(e.g. `env: !include defaults.yaml .env.command`).

Stop `atmos validate schema` from bailing out when no stacks directory exists
(WithStackValidation(false)) — schema validation must work in repositories
that only carry CLI configuration, such as profile-only setups.

Add the `atmos_validate_schema` AI/MCP tool alongside `atmos_validate_stacks`,
and teach the Atmos LSP server to validate atmos.yaml documents (including
atmos.d and profile fragments) against the generated schema, publishing
line-positioned diagnostics with anyOf cascade noise filtered to the most
specific violation. pkg/validator gains ValidateYAMLContent for in-memory
(unsaved editor buffer) validation.

Co-Authored-By: Claude Fable 5 <[email protected]>
Extract full type doc comments (WithFullComment) instead of go/doc synopses,
which truncated descriptions at abbreviations like "e.g." (CICacheConfig,
ProvisionTarget); regenerate the schema artifact. Add `atmos config schema`
to the config command group's Usage block.

Co-Authored-By: Claude Fable 5 <[email protected]>
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 16, 2026
…nfig`

A thin subcommand in the config group that validates atmos.yaml, atmos.d
fragments, and project-local profiles against the generated schema by
delegating to the same validator executor with the built-in `config` key
preset. Exits non-zero on violations, matching the long form.

Co-Authored-By: Claude Fable 5 <[email protected]>
…eral matches

Add `atmos stack validate` as an alias for `atmos validate stacks`, completing
the symmetry with `atmos config validate`.

Literal (non-glob) patterns in pkg/filematch now resolve with a direct stat
instead of walking the entire base path: a plain "atmos.yaml" match previously
traversed every file under the repository (including .git and node_modules)
per pattern, which made `atmos validate schema` sit on its spinner for seconds
in large repositories. Warm runs in this repository drop from ~6s to ~0.6s,
so per-file validation results now stream immediately. Literal nested paths
(e.g. "conf/atmos.yaml") also match now; previously the non-recursive depth
check silently prevented them from ever matching.

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
cmd/config/validate.go (1)

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

Prevent deferred tracking from being bypassed by early exits.

Calling errUtils.OsExit(1) immediately terminates the process, which prevents the deferred perf.Track cleanup in RunE from executing and flushing metrics.

Moving the tracking setup down into runConfigValidate allows you to explicitly flush the metrics right before the hard exit, all while keeping your test suite logic intact.

🛠️ Proposed fix to ensure metrics are flushed
-	RunE: func(cmd *cobra.Command, args []string) error {
-		defer perf.Track(atmosConfigPtr, "config.validateRunE")()
-		return runConfigValidate()
-	},
+	RunE: func(cmd *cobra.Command, args []string) error {
+		return runConfigValidate()
+	},
 }
 
 func runConfigValidate() error {
 	atmosConfig := atmosConfigPtr
 	if atmosConfig == nil {
 		atmosConfig = &schema.AtmosConfiguration{}
 	}
+
+	track := perf.Track(atmosConfig, "config.validateRunE")
+	defer track()
 
 	if err := exec.NewAtmosValidatorExecutor(atmosConfig).ExecuteAtmosValidateSchemaCmd(configSchemaKey, ""); err != nil {
 		if errors.Is(err, exec.ErrInvalidYAML) {
+			track() // Flush metrics before hard exit
 			errUtils.OsExit(1)
 		}
 		return err
 	}
 	return 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/config/validate.go` around lines 27 - 46, Move the perf.Track setup from
the RunE closure into runConfigValidate, retaining the same
"config.validateRunE" tracking key and deferring its cleanup there. Before
errUtils.OsExit(1) handles exec.ErrInvalidYAML, explicitly flush the tracking
cleanup, then exit so metrics are recorded despite the hard process termination.
🤖 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/config/validate.go`:
- Around line 27-46: Move the perf.Track setup from the RunE closure into
runConfigValidate, retaining the same "config.validateRunE" tracking key and
deferring its cleanup there. Before errUtils.OsExit(1) handles
exec.ErrInvalidYAML, explicitly flush the tracking cleanup, then exit so metrics
are recorded despite the hard process termination.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c77efa88-9a2f-4596-ad7d-63972cc01418

📥 Commits

Reviewing files that changed from the base of the PR and between a43059b and 112a709.

📒 Files selected for processing (32)
  • cmd/config/config.go
  • cmd/config/validate.go
  • cmd/config/validate_test.go
  • cmd/stack/stack.go
  • cmd/stack/validate.go
  • cmd/stack/validate_test.go
  • cmd/validate_schema.go
  • demo/casts/atmos.d/screengrabs/cli.yaml
  • pkg/ai/tools/atmos/setup.go
  • pkg/ai/tools/atmos/validate_schema.go
  • pkg/ai/tools/atmos/validate_schema_test.go
  • pkg/config/schema/corpus_test.go
  • pkg/config/schema/overrides.go
  • pkg/config/schema/schema.go
  • pkg/datafetcher/schema/atmos/config/1.0.json
  • pkg/filematch/filematch.go
  • pkg/filematch/filematch_test.go
  • pkg/lsp/server/config_schema.go
  • pkg/lsp/server/config_schema_test.go
  • pkg/lsp/server/diagnostics.go
  • pkg/validator/mock_schema_validator.go
  • pkg/validator/schema_validator.go
  • website/blog/2026-07-16-atmos-yaml-schema.mdx
  • website/docs/ai/mcp-server.mdx
  • website/docs/cli/commands/config/config-validate.mdx
  • website/docs/cli/commands/config/usage.mdx
  • website/docs/cli/commands/lsp/start.mdx
  • website/docs/cli/commands/stack/stack-validate.mdx
  • website/docs/cli/commands/stack/usage.mdx
  • website/docs/cli/commands/validate/validate-schema.mdx
  • website/docs/cli/configuration/ai/tools.mdx
  • website/docs/cli/configuration/schemas.mdx
🚧 Files skipped from review as they are similar to previous changes (10)
  • website/docs/cli/commands/config/usage.mdx
  • cmd/config/config.go
  • website/blog/2026-07-16-atmos-yaml-schema.mdx
  • demo/casts/atmos.d/screengrabs/cli.yaml
  • cmd/validate_schema.go
  • pkg/datafetcher/schema/atmos/config/1.0.json
  • website/docs/cli/configuration/schemas.mdx
  • website/docs/cli/commands/validate/validate-schema.mdx
  • pkg/config/schema/schema.go
  • pkg/config/schema/overrides.go

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 16, 2026
Plans extending all four `atmos validate` subcommands to reuse the
existing pkg/ci framework for GitHub Actions annotations and SARIF
output, including a line/column plumbing fix for schema validation.

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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/native-ci/phases/validate-command-parity.md`:
- Around line 43-45: Resolve the output contract for validate editorconfig
before implementation: either remove editorconfig from the all-four
--format=sarif requirement or revise its wiring to support a distinct,
non-conflicting output-format flag alongside the existing default/gcc option.
Update the “All four validate subcommands” statement and the editorconfig wiring
section consistently so they specify one unambiguous behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

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

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c2f616f3-bfdb-44cd-8bb8-9a22874fcc89

📥 Commits

Reviewing files that changed from the base of the PR and between 112a709 and c721905.

📒 Files selected for processing (1)
  • docs/prd/native-ci/phases/validate-command-parity.md

Pin websocket-driver to >=0.7.5 via a pnpm override to fix a critical
message-corruption issue and a moderate resource-limit-bypass issue
(GHSA advisories #253, #254). It's a transitive dep pulled in by
webpack-dev-server -> sockjs -> faye-websocket, not a direct dependency.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
…in table snapshot

This repo's own atmos.yaml sets ci.enabled: true, and CI runs `go test` via an
`atmos test acceptance` custom-command step that itself opens a CI log group.
That sets the ATMOS_CI_LOG_GROUP_ACTIVE sentinel on the go test process's own
environment, which every "does grouping emit markers" test in pkg/ci,
pkg/runner/step, and internal/exec then inherited -- making them see a false
"parent already grouping" and silently no-op, failing their assertions.
Reproduced locally by setting ATMOS_CI_LOG_GROUP_ACTIVE=1 before the fix
(fails) and after (passes) for each affected test.

Also stabilizes the "atmos toolchain info tar.gz format tool" (and its
atmos-inline-registry sibling) CLI snapshot test: lipgloss/table sizes the
VERSION/DATE/TITLE header columns from the widest actual (pre-sanitize) cell
content, so the header row's padding drifts whenever junegunn/fzf publishes a
release with a differently-sized version tag, even though sanitized data rows
stay stable. Added the header row to the existing diff-ignore pattern list
alongside the data-row patterns already there for the same reason.

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

GitHub Actions Windows runners check out the repo on one drive letter while
t.TempDir() and other temp paths can land on another. validationRepositoryPath
called filepath.Rel(cwd, path) unconditionally for absolute paths, which
errors on Windows when the two paths are on different volumes -- there's no
way to express a relative path across drives. This failed the entire
ExcludePaths call for any such path, breaking TestFilterValidationSchemaFiles
in internal/exec (and, in production, any --exclude validation on Windows CI
whenever an input path happened to resolve outside the checkout's drive).

Since such a path is outside the repo either way, no repo-relative exclude
glob can legitimately match it, so falling back to the absolute path (rather
than erroring) is correct: the file simply won't match a repo-relative
pattern and stays unfiltered. Added a Windows-gated regression test exercising
the fallback directly, since a real cross-volume path isn't reproducible on
Unix.

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

mergify Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

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

@mergify mergify Bot added the conflict This PR has conflicts label Jul 19, 2026
…chema-validation

# Conflicts:
#	website/package.json
#	website/pnpm-lock.yaml
The Check Markdown Links CI job failed with 27 errors, all shields.io/badge
and img.shields.io URLs returning Cloudflare 520 "Unknown status code" or a
bare 500 -- not real broken links. These are dynamically-generated badge
images used as illustrative examples in CI-status docs (job-summaries.mdx,
README.md, terraform CI summary golden fixtures), and shields.io's badge
endpoint is known to be flaky under lychee's request volume; verified they
render fine in a browser.

Broadened the existing narrow img.shields.io/github/release/ exclude (added
for a different shields.io quirk) to cover the whole shields.io domain,
following this file's established pattern for flaky third-party CI checks.
Verified locally with lychee against a minimal fixture: both shields.io/badge
and img.shields.io/badge URLs are now excluded.

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

TestEmbeddedSchemaIsCurrent was failing: the merged atmos init/scaffold
feature added toolchain.proxies (ToolchainProxy) to the config structs, but
the embedded pkg/datafetcher/schema/atmos/config/1.0.json wasn't regenerated
to match. Ran `go generate ./pkg/config/schema` and committed the result.

TestGeneratedSchemaAcceptsRealConfigs was also failing on the four new
examples/scaffolds/**/atmos.yaml files, e.g. "components.terraform.command:
Invalid type. Expected: string, given: array". These aren't real runtime
configs -- they're atmos scaffold template sources using [[ ... ]] Go-template
placeholder delimiters (e.g. `command: [[ .Config.terraform_command ]]`),
which YAML parses as an array literal but which the scaffold engine
substitutes before the result is ever schema-validated. Excluded
examples/scaffolds from the corpus scan, the same way tests/fixtures is
already excluded for its intentionally invalid configs.

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

mergify Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

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

@mergify mergify Bot added the conflict This PR has conflicts label Jul 19, 2026
…chema-validation

# Conflicts:
#	lychee.toml
#	tests/preconditions.go
#	tests/test-cases/toolchain.yaml
@aknysh
Andriy Knysh (aknysh) merged commit 6325b89 into main Jul 19, 2026
98 checks passed
@aknysh
Andriy Knysh (aknysh) deleted the osterman/atmos-yaml-schema-validation branch July 19, 2026 23:45
@atmos-pro

atmos-pro Bot commented Jul 19, 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.

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

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

Copy link
Copy Markdown

These changes were released in v1.223.1-rc.2.

This branch was successfully deployed

1 active deployment
preview — 1de65f8f Deployed Jul 19, 2026 by github-actions[bot]
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.

JSON/YAML schema for atmos.yaml file itself

2 participants