Skip to content

feat(hooks): run custom step types as lifecycle hooks (kind: step) - #2658

Merged
Andriy Knysh (aknysh) merged 13 commits into
mainfrom
osterman/kyiv-v10
Jun 25, 2026
Merged

feat(hooks): run custom step types as lifecycle hooks (kind: step)#2658
Andriy Knysh (aknysh) merged 13 commits into
mainfrom
osterman/kyiv-v10

Conversation

@osterman

@osterman Erik Osterman (Cloud Posse) (osterman) commented Jun 24, 2026

Copy link
Copy Markdown
Member

what

  • Add a new kind: step component-lifecycle hook that delegates to the workflow/custom-command step registry, making every registered step type (container, http, toast, log, markdown, …) runnable on terraform lifecycle events — name a step type: and pass its parameters under with:.
  • Plumb the operation outcome to hooks: user hooks now fire on the failure path (not just success), a new when: success|failure|always selector (default success) controls outcome-based firing, and {{ .status }}/{{ .exit_code }}/{{ .error }} template context plus ATMOS_HOOK_* env vars (alongside component/stack) let a hook announce exactly what happened.
  • Tighten the hooks JSON schema into a structured per-hook envelope (kind enum incl. step, events, on_failure, when, type, with, retry) across all three schema copies, kept non-breaking (additionalProperties: true).
  • Add docs (hooks reference + new sections), a PRD, a changelog blog post, and a roadmap milestone; unit tests cover routing, nested with: decode, when filtering, outcome template/env exposure, retry, and on_failure.

why

  • The hook system previously hard-coded a small kind list (store, command, infracost, checkov, kics, trivy, git); every new capability meant a new kind. Reusing the existing, well-tested step registry lets the whole step library work as hooks without forking the abstraction.
  • A key use case — "the VPC component in the foobar stack failed" — was impossible: after-* hooks fired only on success (cobra skips PostRunE on error) and the outcome reached only CI hooks, never user hooks. Firing user hooks on failure with when + outcome context closes that gap while defaulting to success-only so existing hooks (e.g. store) keep their behavior.

references

  • PRD: docs/prd/hooks-step-types.md
  • Docs: /stacks/hooks#kind-step-run-a-step-type and #reacting-to-success-or-failure
  • The http step type used in the Slack example lands in a separate PR; the bridge works today with every registered step type.

Add a `kind: step` hook that delegates to the workflow/custom-command step
registry, making every registered step type (container, http, toast, log, ...)
available on terraform lifecycle events. Name a step `type:` and pass its
parameters under `with:`; `on_failure` and `retry` are envelope-level policy
applied around the step (no import cycle — pkg/hooks imports pkg/runner/step).

Also plumb the operation outcome to hooks so they can report what happened:
- user hooks now fire on the failure path (not just success)
- a `when: success|failure|always` selector (default success) preserves
  back-compat while letting hooks opt into failure firing
- `{{ .status }}`/`{{ .exit_code }}`/`{{ .error }}` template context and
  ATMOS_HOOK_* env vars expose the outcome alongside component/stack

Includes a structured hook-envelope JSON schema (kind enum incl. step, when,
type, with), docs, PRD, changelog, and roadmap updates.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@atmos-pro

atmos-pro Bot commented Jun 24, 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 Jun 24, 2026
@github-actions github-actions Bot added the size/l Large size PR label Jun 24, 2026
@mergify

mergify Bot commented Jun 24, 2026

Copy link
Copy Markdown

💥 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 Jun 24, 2026
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 43db3984-50e4-4056-81c5-68c792690a9d

📥 Commits

Reviewing files that changed from the base of the PR and between 5989651 and 360db91.

📒 Files selected for processing (8)
  • examples/say-something/README.md
  • examples/say-something/atmos.yaml
  • examples/say-something/components/terraform/hello-world/main.tf
  • examples/say-something/components/terraform/hello-world/variables.tf
  • examples/say-something/components/terraform/hello-world/versions.tf
  • examples/say-something/stacks/deploy/test.yaml
  • pkg/hooks/step_engine_test.go
  • website/docs/stacks/hooks.mdx
✅ Files skipped from review due to trivial changes (4)
  • examples/say-something/components/terraform/hello-world/variables.tf
  • examples/say-something/components/terraform/hello-world/versions.tf
  • examples/say-something/components/terraform/hello-world/main.tf
  • examples/say-something/stacks/deploy/test.yaml
🚧 Files skipped from review as they are similar to previous changes (2)
  • pkg/hooks/step_engine_test.go
  • website/docs/stacks/hooks.mdx

📝 Walkthrough

Walkthrough

Adds shared when conditions for workflow and custom command steps, threads lifecycle outcomes through hook execution, registers kind: step hooks, and refactors Terraform hook setup to reuse a prepared hook context.

Changes

Conditional execution and step-backed hooks

Layer / File(s) Summary
Condition contracts and schema wiring
pkg/schema/condition.go, pkg/schema/condition_test.go, pkg/schema/task.go, pkg/schema/task_test.go, pkg/schema/workflow.go, pkg/config/load.go, pkg/datafetcher/schema/atmos/manifest/1.0.json, pkg/datafetcher/schema/config/global/1.0.json, pkg/datafetcher/schema_condition_validation_test.go, tests/fixtures/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json, website/static/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json, website/docs/workflows/workflows/workflow/steps/step.mdx, website/docs/cli/configuration/commands/command/steps.mdx, tests/test-cases/native-ci-e2e.yaml, website/src/data/roadmap.js
Condition decoding and evaluation are added, workflow/task shapes gain when, schemas accept the new condition and retry forms, and validation/docs cover the condition syntax.
Workflow and custom command step gating
pkg/workflow/executor.go, pkg/workflow/executor_test.go, internal/exec/workflow_utils.go, internal/exec/workflow_utils_test.go, cmd/cmd_utils.go, cmd/custom_command_integration_test.go
Workflow and custom command steps now evaluate when before execution, skip false conditions, and gate authentication and follow-up work on runnable steps.
Hook outcomes and filtering
pkg/hooks/kind.go, pkg/hooks/hook.go, pkg/hooks/command_engine.go, pkg/hooks/hooks.go, pkg/hooks/hooks_test.go, pkg/datafetcher/schema/stacks/stack-config/1.0.json, pkg/datafetcher/schema/atmos/manifest/1.0.json, pkg/datafetcher/schema/config/global/1.0.json, tests/fixtures/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json, examples/hooks-checkov/README.md, examples/hooks-checkov/stacks/deploy/test.yaml, examples/hooks-custom-command/README.md, examples/hooks-custom-command/stacks/deploy/test.yaml, examples/hooks-infracost/README.md, examples/hooks-infracost/components/terraform/nat-gateway/versions.tf, examples/hooks-infracost/stacks/deploy/test.yaml, examples/hooks-kics/README.md, examples/hooks-kics/stacks/deploy/test.yaml, examples/hooks-trivy/README.md, examples/hooks-trivy/stacks/deploy/test.yaml, gists/aws-store-hooks/stacks/producer.yaml, website/docs/cli/configuration/stores.mdx, website/docs/migration/terragrunt.mdx, website/docs/tutorials/sharing-state/stores.mdx
Hook execution now carries lifecycle outcome data, uses when and RunStatus for preflight/runtime filtering, exposes outcome values to templates and ATMOS_HOOK_* env vars, and updates hook schemas, examples, and event names.
Step-backed hook execution
pkg/hooks/step_engine.go, pkg/hooks/step_engine_test.go, docs/prd/hooks-step-types.md, website/blog/2026-06-23-hooks-step-types.mdx, website/docs/stacks/hooks.mdx, website/src/data/roadmap.js
kind: step hooks are registered, translated into workflow steps, executed with retry/on-failure handling, and documented across the PRD, blog, roadmap, and hooks reference.
Terraform hook context preparation
cmd/terraform/utils.go
Terraform hook execution now builds a shared hook context once, attaches outcome data to user hooks, and reuses that context for CI hooks.

Sequence Diagram(s)

sequenceDiagram
  participant ExecuteWorkflow
  participant workflowConditionContext
  participant Condition

  ExecuteWorkflow->>workflowConditionContext: build CI/status context
  workflowConditionContext-->>ExecuteWorkflow: schema.ConditionContext
  ExecuteWorkflow->>Condition: Evaluate(step.When)
  alt matches
    Condition-->>ExecuteWorkflow: true
    ExecuteWorkflow->>ExecuteWorkflow: render and execute step
  else does not match
    Condition-->>ExecuteWorkflow: false
    ExecuteWorkflow->>ExecuteWorkflow: mark step skipped
  end
Loading
sequenceDiagram
  participant runHooksWithOutput
  participant runHooksOnErrorWithOutput
  participant prepareHookContext
  participant runUserHooks
  participant Hooks

  alt success path
    runHooksWithOutput->>prepareHookContext: build hookContext
    prepareHookContext-->>runHooksWithOutput: hookContext
    runHooksWithOutput->>runUserHooks: run user hooks with RunSuccess
    runUserHooks->>Hooks: RunAll(outcome)
    runHooksWithOutput->>Hooks: RunCIHooksOptions(&hctx.atmosConfig, &hctx.info)
  else error path
    runHooksOnErrorWithOutput->>prepareHookContext: build hookContext
    prepareHookContext-->>runHooksOnErrorWithOutput: hookContext
    runHooksOnErrorWithOutput->>runUserHooks: run user hooks with RunFailure
    runUserHooks->>Hooks: RunAll(outcome)
  end
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~90+ minutes

Possibly related PRs

  • cloudposse/atmos#2309: Both PRs modify hook selection and execution behavior in the core hooks path.
  • cloudposse/atmos#2382: Both PRs touch cmd/terraform/utils.go and the CI hook invocation plumbing.
  • cloudposse/atmos#2520: Both PRs update the Terraform hook setup path in cmd/terraform/utils.go and related hook-context handling.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 26.21% 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 matches the main change: adding kind: step to run registered step types as lifecycle hooks.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch osterman/kyiv-v10

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

🧹 Nitpick comments (1)
pkg/hooks/hooks.go (1)

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

Add perf tracking to RunAll.

RunAll is a changed public method that performs preflight and hook engine execution, so it does not fit the trivial getter/setter or pure lookup exceptions.

As per coding guidelines, “Add defer perf.Track(atmosConfig, "pkg.FuncName")() + blank line to all public functions.”

🤖 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/hooks/hooks.go` around lines 126 - 132, Add performance tracking to the
RunAll method in the Hooks struct. At the beginning of the RunAll function body,
add a defer statement calling perf.Track with atmosConfig and the function
identifier "pkg.hooks.RunAll", followed by a blank line before the existing
outcome assignment. This aligns with the coding guidelines requiring performance
tracking on all public methods that perform substantive operations.

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/manifest/1.0.json`:
- Around line 1337-1342: The current hook schema only accepts object types and
breaks backward compatibility with legacy include-string values like `some-hook:
!include ...`. Modify the additionalProperties definition for hooks by replacing
the single object schema with a oneOf structure that allows either a string type
(for legacy includes) or the existing object type with its properties and
additionalProperties. Apply this same oneOf pattern to any other schema copies
that define hooks in the manifest file to ensure consistency across all hook
definitions.

In `@pkg/hooks/command_engine.go`:
- Around line 271-273: The exported function BuildAtmosEnv is missing the
required performance tracking hook that should be added to all public functions.
Add the appropriate perf tracking hook at the beginning of the BuildAtmosEnv
function before the call to the internal buildAtmosEnv function, following the
same tracking pattern used in other exported functions in the same file.

In `@pkg/hooks/hooks.go`:
- Around line 155-158: The when filtering using RunsOnStatus(outcome.Status) is
applied after preflight checks, causing verifyAllBinaries to validate all hooks
regardless of whether they should run based on the when condition. This means on
a failure path, a success-only hook with missing commands can fail preflight
before failure hooks execute. Move the when status filtering earlier by checking
hook.RunsOnStatus(outcome.Status) before running preflight validation, or
refactor the preflight logic to skip validation for hooks that should not run
based on their when condition, ensuring failure-path hooks are not blocked by
non-applicable success-only hooks during preflight.

In `@website/src/data/roadmap.js`:
- Line 336: The roadmap entry for 'Run any step type as a lifecycle hook (kind:
step)' at line 336 is missing the required `pr` field that should reference the
pull request number associated with this shipped milestone. Add a `pr:
<pr-number>` property to this roadmap item object (following the same pattern as
the existing `prd`, `changelog`, and other metadata fields). Additionally,
locate the corresponding initiative object that contains this milestone and
update its `progress` percentage field to reflect the completion of this shipped
item, ensuring the roadmap metadata remains consistent across the file as per
the coding guidelines.

---

Nitpick comments:
In `@pkg/hooks/hooks.go`:
- Around line 126-132: Add performance tracking to the RunAll method in the
Hooks struct. At the beginning of the RunAll function body, add a defer
statement calling perf.Track with atmosConfig and the function identifier
"pkg.hooks.RunAll", followed by a blank line before the existing outcome
assignment. This aligns with the coding guidelines requiring performance
tracking on all public methods that perform substantive operations.
🪄 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: 4c1b00ba-c700-4fe4-a1fa-49dc83db8375

📥 Commits

Reviewing files that changed from the base of the PR and between 2c6912a and e25c819.

📒 Files selected for processing (15)
  • cmd/terraform/utils.go
  • docs/prd/hooks-step-types.md
  • pkg/datafetcher/schema/atmos/manifest/1.0.json
  • pkg/datafetcher/schema/config/global/1.0.json
  • pkg/datafetcher/schema/stacks/stack-config/1.0.json
  • pkg/hooks/command_engine.go
  • pkg/hooks/hook.go
  • pkg/hooks/hooks.go
  • pkg/hooks/hooks_test.go
  • pkg/hooks/kind.go
  • pkg/hooks/step_engine.go
  • pkg/hooks/step_engine_test.go
  • website/blog/2026-06-23-hooks-step-types.mdx
  • website/docs/stacks/hooks.mdx
  • website/src/data/roadmap.js

Comment thread pkg/datafetcher/schema/atmos/manifest/1.0.json
Comment thread pkg/hooks/command_engine.go
Comment thread pkg/hooks/hooks.go Outdated
Comment thread website/src/data/roadmap.js Outdated
… roadmap)

- preflight/verifyAllBinaries skip hooks that won't run for the current
  outcome status, so a success-only hook with a missing binary cannot block
  failure-path (when: failure) hooks; extracted verifyHookBinary helper
- hooks JSON schema per-hook value accepts `!include` strings again
  (oneOf string|object) across all three schema copies
- add perf.Track to exported BuildAtmosEnv
- roadmap: add pr: 2658 to the kind:step milestone and bump extensibility
  progress 93 -> 94

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues found.

Scanned Files

None

@mergify mergify Bot removed the conflict This PR has conflicts label Jun 24, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 24, 2026
Comment thread pkg/hooks/hooks.go Fixed
…ateData

Size the augmented template-data map from a single len(section) instead of
len(section)+3; CodeQL's go/allocation-size-overflow rule flags len(x)+N.
The map grows as needed for the three outcome keys.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 24, 2026
@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.48148% with 73 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.44%. Comparing base (a622ff6) to head (5216011).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/hooks/step_engine.go 65.21% 28 Missing and 4 partials ⚠️
cmd/cmd_utils.go 71.42% 13 Missing and 3 partials ⚠️
cmd/terraform/utils.go 64.28% 7 Missing and 3 partials ⚠️
pkg/schema/condition.go 96.78% 4 Missing and 3 partials ⚠️
pkg/hooks/hooks.go 92.68% 4 Missing and 2 partials ⚠️
internal/exec/workflow_utils.go 88.88% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2658      +/-   ##
==========================================
+ Coverage   80.40%   80.44%   +0.04%     
==========================================
  Files        1400     1402       +2     
  Lines      132569   133010     +441     
==========================================
+ Hits       106590   107006     +416     
- Misses      20093    20104      +11     
- Partials     5886     5900      +14     
Flag Coverage Δ
unittests 80.44% <86.48%> (+0.04%) ⬆️

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

Files with missing lines Coverage Δ
pkg/config/load.go 83.95% <100.00%> (+0.01%) ⬆️
pkg/hooks/command_engine.go 89.36% <100.00%> (-0.28%) ⬇️
pkg/hooks/hook.go 92.00% <100.00%> (+3.11%) ⬆️
pkg/hooks/kind.go 100.00% <ø> (ø)
pkg/schema/task.go 96.17% <100.00%> (+0.18%) ⬆️
pkg/schema/workflow.go 68.42% <ø> (ø)
pkg/workflow/executor.go 87.10% <100.00%> (+0.51%) ⬆️
internal/exec/workflow_utils.go 71.58% <88.88%> (+0.49%) ⬆️
pkg/hooks/hooks.go 81.95% <92.68%> (+0.37%) ⬆️
pkg/schema/condition.go 96.78% <96.78%> (ø)
... and 3 more

... and 7 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mergify

mergify Bot commented Jun 24, 2026

Copy link
Copy Markdown

💥 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 Jun 24, 2026
# Conflicts:
#	pkg/hooks/command_engine.go
#	pkg/hooks/hooks.go
#	pkg/hooks/hooks_test.go
#	website/src/data/roadmap.js
@github-actions

Copy link
Copy Markdown

Resource Changes Found for bucket in test

Atmos CI create

Plan: 5 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.kics_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.kics_target will be created
  + resource "aws_s3_bucket" "kics_target" {
      + acceleration_status         = (known after apply)
      + acl                         = (known after apply)
      + arn                         = (known after apply)
      + bucket                      = "atmos-native-ci-e2e-kics-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: 5 to add, 0 to change, 0 to destroy.

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


Workspace "test" doesn't exist.

You can create this workspace with the "new" subcommand 
or include the "-or-create" flag with the "select" subcommand.

@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: 9

Caution

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

⚠️ Outside diff range comments (1)
pkg/datafetcher/schema/atmos/manifest/1.0.json (1)

1643-1646: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Validate hook retry with the actual retry schema.

This block says hook retries use the workflow-step retry contract, but the schema currently accepts any object here. That weakens validation for a new public config surface and diverges from workflow steps. Reuse the concrete retry schema here and mirror that into the other schema copies.

🤖 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/datafetcher/schema/atmos/manifest/1.0.json` around lines 1643 - 1646, The
hook retry field is too loosely validated because it currently uses a generic
object instead of the workflow-step retry contract. Update the retry definition
in the manifest schema to reference the concrete retry schema used by workflow
steps, and apply the same change to the other duplicated schema copies so all
public config surfaces stay consistent.
🧹 Nitpick comments (1)
internal/exec/workflow_utils_test.go (1)

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

Add a skipped-step-with-identity case here.

This covers the simple skip path, but it will not catch the eager-auth regression where a when: never step still fails during auth initialization before the skip check. A second case with Identity set would lock that behavior down. As per coding guidelines, “All features need tests” and “Maintain 80% minimum test coverage.”

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

In `@internal/exec/workflow_utils_test.go` around lines 1193 - 1215, Add a second
test case in TestExecuteWorkflow_SkipsStepWhenConditionIsFalse that sets
WorkflowStep.Identity and still uses a never condition, so ExecuteWorkflow is
exercised with auth initialization present. Reuse the existing workflow test
setup and assert the step is skipped without error, verifying the skip happens
before any eager auth path in ExecuteWorkflow/WorkflowStep handling.

Source: Coding guidelines

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

Inline comments:
In `@cmd/custom_command_integration_test.go`:
- Around line 271-276: The test helper writeCmd in
custom_command_integration_test.go relies on platform-specific shell commands
and should be replaced with a Go-native approach. Update the test to avoid
cmd/printf by using a helper subprocess launched via os.Executable() and
test-helper mode, or inject a fake runner and perform file writes with the Go
stdlib instead. Keep the change localized to writeCmd and the surrounding test
setup so the test no longer depends on shell behavior.

In `@internal/exec/workflow_utils.go`:
- Around line 379-382: The upfront auth setup in workflow step handling is still
running for steps that will be skipped by the `when` condition. Update the auth
pre-scan in `workflow_utils.go` so it uses the same `workflowConditionContext()`
gating as the `step.When.Evaluate(...)` check, or move auth initialization
behind the runnable-step path in the workflow step loop. Make sure the logic
around `needsAuth`, `step.When`, and the auth manager creation only applies to
steps that will actually execute.

In `@pkg/hooks/hooks.go`:
- Around line 44-47: The preflight cache is keyed too broadly by only HookEvent,
but Hooks.preflight now varies by event, status, and isCI, so a prior non-CI or
failure run can incorrectly skip checks for a later runnable hook set. Update
the caching in Hooks.preflight/related event tracking to key by the full
runnable-hook filter (including status and CI state, not just event) so
dependency installation and binary verification still run when the hook set
changes.

In `@pkg/schema/condition_test.go`:
- Around line 270-278: TestRegisterConditionPredicate mutates the package-global
predicate registry by registering custom-test-condition and leaves it behind for
later tests; add a t.Cleanup in TestRegisterConditionPredicate to restore the
prior state or delete that predicate after the assertions. Use
RegisterConditionPredicate and MustCondition to locate the test, and make sure
the cleanup keeps the package test run isolated.

In `@pkg/schema/condition.go`:
- Around line 14-31: The new public API in condition.go is missing Go doc
comments, so add concise documentation for each exported ConditionPredicate*
constant, ErrInvalidWhenCondition, and ConditionPredicateFunc. Follow Go
conventions by placing a comment starting with the symbol name immediately above
each declaration in the condition package so the extension points and error
meaning are clear to consumers.

In `@pkg/schema/workflow.go`:
- Around line 253-256: Keep the step/task conversion logic in sync with the new
say-step fields by updating the Task model and the conversion helpers in task.go
so Voice, Rate, and Print are preserved when normalizing a WorkflowStep into a
Task. Inspect the existing step field copying around the Task conversion methods
and add these three fields wherever the surrounding step properties are mapped,
ensuring any constructors, copy helpers, or serialization tags on Task reflect
the new schema fields.

In `@pkg/workflow/executor.go`:
- Around line 216-220: The workflow step condition context always hardcodes
Status to success in workflowConditionContext, so workflow steps can never match
when: failure. Update the evaluation path used by runSteps and
workflowConditionContext to either reject outcome-based predicates like failure
for workflow steps up front or pass a real step status into
schema.ConditionContext before evaluating step.When.

In `@tests/fixtures/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json`:
- Around line 124-194: The fixture schema is out of sync with the shipped
manifest schema because definitions.hooks still accepts arbitrary values instead
of the structured hook envelope. Update the atmos-manifest fixture to match
pkg/datafetcher/schema/atmos/manifest/1.0.json by aligning the hooks definition
with the new envelope shape and keeping the existing condition/when changes
consistent across the schema.

In `@website/static/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json`:
- Around line 124-194: Workflow-step `when` currently accepts outcome predicates
like `success` and `failure`, but `workflow_utils` only evaluates steps with a
success status, so `failure` is schema-valid yet unreachable at runtime. Update
the condition schema around `condition_predicate` and `condition` to restrict
step-level usage to predicates that can actually be evaluated for steps, or
otherwise separate hook-only predicates from step predicates. Use the existing
`condition_predicate` and `condition` definitions as the place to narrow
validation so `failure` is rejected for workflow steps while remaining available
where it is supported.

---

Outside diff comments:
In `@pkg/datafetcher/schema/atmos/manifest/1.0.json`:
- Around line 1643-1646: The hook retry field is too loosely validated because
it currently uses a generic object instead of the workflow-step retry contract.
Update the retry definition in the manifest schema to reference the concrete
retry schema used by workflow steps, and apply the same change to the other
duplicated schema copies so all public config surfaces stay consistent.

---

Nitpick comments:
In `@internal/exec/workflow_utils_test.go`:
- Around line 1193-1215: Add a second test case in
TestExecuteWorkflow_SkipsStepWhenConditionIsFalse that sets
WorkflowStep.Identity and still uses a never condition, so ExecuteWorkflow is
exercised with auth initialization present. Reuse the existing workflow test
setup and assert the step is skipped without error, verifying the skip happens
before any eager auth path in ExecuteWorkflow/WorkflowStep handling.
🪄 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: 0905fbe4-328a-4a74-aebf-e1c7525ba360

📥 Commits

Reviewing files that changed from the base of the PR and between 0ff4dae and 596e1dc.

📒 Files selected for processing (27)
  • cmd/cmd_utils.go
  • cmd/custom_command_integration_test.go
  • internal/exec/workflow_utils.go
  • internal/exec/workflow_utils_test.go
  • pkg/config/load.go
  • pkg/datafetcher/schema/atmos/manifest/1.0.json
  • pkg/datafetcher/schema/config/global/1.0.json
  • pkg/datafetcher/schema_condition_validation_test.go
  • pkg/hooks/command_engine.go
  • pkg/hooks/hook.go
  • pkg/hooks/hooks.go
  • pkg/hooks/hooks_test.go
  • pkg/hooks/kind.go
  • pkg/hooks/step_engine_test.go
  • pkg/schema/condition.go
  • pkg/schema/condition_test.go
  • pkg/schema/task.go
  • pkg/schema/workflow.go
  • pkg/workflow/executor.go
  • pkg/workflow/executor_test.go
  • tests/fixtures/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json
  • tests/test-cases/native-ci-e2e.yaml
  • website/docs/cli/configuration/commands/command/steps.mdx
  • website/docs/stacks/hooks.mdx
  • website/docs/workflows/workflows/workflow/steps/step.mdx
  • website/src/data/roadmap.js
  • website/static/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json
✅ Files skipped from review due to trivial changes (3)
  • website/docs/workflows/workflows/workflow/steps/step.mdx
  • tests/test-cases/native-ci-e2e.yaml
  • website/src/data/roadmap.js
🚧 Files skipped from review as they are similar to previous changes (4)
  • pkg/hooks/kind.go
  • pkg/hooks/command_engine.go
  • pkg/hooks/hooks_test.go
  • pkg/hooks/step_engine_test.go

@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

Caution

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

⚠️ Outside diff range comments (1)
pkg/schema/task_test.go (1)

250-282: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Assert the new When field in these round-trip tests.

pkg/schema/task.go now copies When in both directions, but these fixtures only verify the say fields. Adding one When assertion to each test keeps the conversion contract covered. As per coding guidelines, "All features need tests."

Also applies to: 287-318

🤖 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/schema/task_test.go` around lines 250 - 282, The round-trip tests for
Task conversion are missing coverage for the new When field, so update the
TaskToWorkflowStep and related conversion test fixtures to set a When value on
the Task and assert it is preserved on the resulting workflow step; use the
Task.ToWorkflowStep and corresponding reverse-conversion test cases to verify
When is copied in both directions alongside the existing fields.

Source: Coding guidelines

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

Inline comments:
In `@cmd/cmd_utils.go`:
- Around line 683-706: The runnable-step check in custom command execution is
being done too late, after dependency setup has already run. Move the
step-condition evaluation in the custom command flow (around the hasRunnableStep
logic in cmd_utils.go) ahead of ResolveCommandDependencies and EnsureTools, then
short-circuit early when no steps are runnable so skipped commands do not
install tools or fail unnecessarily.

In `@pkg/datafetcher/schema_condition_validation_test.go`:
- Around line 21-27: The schema validation tests are missing coverage for the
scalar-child all form, so add a valid workflow and hook case for the decoded
condition shape used by condition handling. Update the valid condition fixtures
in schema_condition_validation_test.go to include the scalar all operand
alongside the existing scalar/list/all/any/not entries, and make sure the test
exercises the same all:"ci" variant that condition_test.go already accepts so
schema and runtime stay aligned.

In `@pkg/datafetcher/schema/atmos/manifest/1.0.json`:
- Around line 166-173: The condition schema for the all branch is too narrow
because it only accepts an array, while the runtime and existing tests already
accept a scalar nested condition like {"all":"ci"}. Update the all property in
the step_condition definition (and the copied condition/properties/all shape) so
it allows either a single step_condition or an array of step_condition items,
keeping the existing minimum-items behavior only for the array form.

---

Outside diff comments:
In `@pkg/schema/task_test.go`:
- Around line 250-282: The round-trip tests for Task conversion are missing
coverage for the new When field, so update the TaskToWorkflowStep and related
conversion test fixtures to set a When value on the Task and assert it is
preserved on the resulting workflow step; use the Task.ToWorkflowStep and
corresponding reverse-conversion test cases to verify When is copied in both
directions alongside the existing fields.
🪄 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: 23ff495b-a539-4a73-96ab-0f6b17d54dea

📥 Commits

Reviewing files that changed from the base of the PR and between 0ff4dae and 8fa5006.

📒 Files selected for processing (28)
  • cmd/cmd_utils.go
  • cmd/custom_command_integration_test.go
  • internal/exec/workflow_utils.go
  • internal/exec/workflow_utils_test.go
  • pkg/config/load.go
  • pkg/datafetcher/schema/atmos/manifest/1.0.json
  • pkg/datafetcher/schema/config/global/1.0.json
  • pkg/datafetcher/schema_condition_validation_test.go
  • pkg/hooks/command_engine.go
  • pkg/hooks/hook.go
  • pkg/hooks/hooks.go
  • pkg/hooks/hooks_test.go
  • pkg/hooks/kind.go
  • pkg/hooks/step_engine_test.go
  • pkg/schema/condition.go
  • pkg/schema/condition_test.go
  • pkg/schema/task.go
  • pkg/schema/task_test.go
  • pkg/schema/workflow.go
  • pkg/workflow/executor.go
  • pkg/workflow/executor_test.go
  • tests/fixtures/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json
  • tests/test-cases/native-ci-e2e.yaml
  • website/docs/cli/configuration/commands/command/steps.mdx
  • website/docs/stacks/hooks.mdx
  • website/docs/workflows/workflows/workflow/steps/step.mdx
  • website/src/data/roadmap.js
  • website/static/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json
✅ Files skipped from review due to trivial changes (4)
  • website/docs/cli/configuration/commands/command/steps.mdx
  • website/docs/workflows/workflows/workflow/steps/step.mdx
  • tests/test-cases/native-ci-e2e.yaml
  • website/src/data/roadmap.js
🚧 Files skipped from review as they are similar to previous changes (14)
  • pkg/hooks/kind.go
  • pkg/schema/workflow.go
  • internal/exec/workflow_utils_test.go
  • pkg/config/load.go
  • internal/exec/workflow_utils.go
  • pkg/datafetcher/schema/config/global/1.0.json
  • website/static/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json
  • pkg/hooks/command_engine.go
  • pkg/hooks/hook.go
  • pkg/hooks/step_engine_test.go
  • pkg/schema/condition.go
  • pkg/hooks/hooks_test.go
  • pkg/hooks/hooks.go
  • pkg/workflow/executor.go

Comment thread cmd/cmd_utils.go
Comment thread pkg/datafetcher/schema_condition_validation_test.go
Comment thread pkg/datafetcher/schema/atmos/manifest/1.0.json

@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/datafetcher/schema/atmos/manifest/1.0.json (1)

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

Reuse workflow_retry for the workflow step retry to avoid drift.

The new workflow_retry definition is byte-for-byte identical to the inline retry schema on workflow steps (Lines 1508-1561). The hooks retry already points at #/definitions/workflow_retry; pointing the workflow step there too keeps a single source of truth so the two can't silently diverge.

♻️ Replace the inline step retry with a `$ref` (Lines 1508-1561)
-                      "retry": {
-                        "title": "retry",
-                        "description": "Retry configuration for workflow step execution",
-                        "oneOf": [
-                          {
-                            "type": "string",
-                            "pattern": "^!include"
-                          },
-                          {
-                            "type": "object",
-                            "additionalProperties": false,
-                            "properties": {
-                              "max_attempts": { "type": "integer", "minimum": 1, "description": "Maximum number of retry attempts" },
-                              "initial_delay": { "type": "string", "description": "Initial delay between retries (e.g., '1s', '500ms')" },
-                              "max_delay": { "type": "string", "description": "Maximum delay between retries (e.g., '30s', '1m')" },
-                              "backoff_strategy": { "type": "string", "enum": ["constant","linear","exponential"], "description": "Strategy for increasing delay between retries" },
-                              "multiplier": { "type": "number", "minimum": 1, "description": "Multiplier for exponential/linear backoff" },
-                              "random_jitter": { "type": "number", "minimum": 0, "maximum": 1, "description": "Random jitter factor (0-1) to add to delays" },
-                              "max_elapsed_time": { "type": "string", "description": "Maximum total time for all retry attempts (e.g., '5m', '1h')" }
-                            },
-                            "required": []
-                          }
-                        ]
-                      },
+                      "retry": {
+                        "$ref": "`#/definitions/workflow_retry`"
+                      },

Mirror the same change in the other schema copies. As per the PR also editing tests/fixtures/... and website/static/... copies.

🤖 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/datafetcher/schema/atmos/manifest/1.0.json` around lines 1608 - 1661, The
workflow step retry schema is duplicated inline even though the identical
workflow_retry definition already exists, so replace the inline retry object on
the workflow step with a $ref to workflow_retry to keep a single source of
truth. Update the schema entry in the workflow step definition so it points to
the shared workflow_retry symbol, and mirror the same ref-based change in the
other schema copies under tests/fixtures and website/static to keep all
generated/docs copies consistent.
🤖 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/datafetcher/schema/atmos/manifest/1.0.json`:
- Around line 1608-1661: The workflow step retry schema is duplicated inline
even though the identical workflow_retry definition already exists, so replace
the inline retry object on the workflow step with a $ref to workflow_retry to
keep a single source of truth. Update the schema entry in the workflow step
definition so it points to the shared workflow_retry symbol, and mirror the same
ref-based change in the other schema copies under tests/fixtures and
website/static to keep all generated/docs copies consistent.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 841c3174-d3b7-4d4f-a669-b164dd14b624

📥 Commits

Reviewing files that changed from the base of the PR and between 8fa5006 and 6b9c7fa.

📒 Files selected for processing (7)
  • cmd/cmd_utils.go
  • pkg/datafetcher/schema/atmos/manifest/1.0.json
  • pkg/datafetcher/schema/config/global/1.0.json
  • pkg/datafetcher/schema_condition_validation_test.go
  • pkg/schema/task_test.go
  • tests/fixtures/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json
  • website/static/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json
🚧 Files skipped from review as they are similar to previous changes (6)
  • pkg/schema/task_test.go
  • pkg/datafetcher/schema_condition_validation_test.go
  • tests/fixtures/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json
  • website/static/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json
  • pkg/datafetcher/schema/config/global/1.0.json
  • cmd/cmd_utils.go

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 24, 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.

Caution

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

⚠️ Outside diff range comments (1)
examples/hooks-trivy/README.md (1)

3-13: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Prose contradicts the new after.terraform.plan event.

Line 3 now documents an after.terraform.plan hook, but lines 12–13 still say the scan "runs before plan" (and line 29 says "trivy runs first"). With after.terraform.plan the scan fires after the plan is generated — still before apply, but no longer "before plan". Please align the surrounding prose so readers aren't misled about ordering.

📝 Suggested wording tweak
-- Static-analysis scan runs **before plan**, so security issues surface
-  before any infrastructure action.
+- Static-analysis scan runs **after plan but before apply**, so security
+  issues surface before any infrastructure changes are applied.

You'll likely want to revisit line 29 ("trivy runs first") and the "Run"/"Expected" section too.

🤖 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 `@examples/hooks-trivy/README.md` around lines 3 - 13, The README prose for the
trivy hook is out of sync with the new after.terraform.plan event. Update the
descriptive text in the trivy hook example to say the scan runs after the plan
is generated (not before plan) and revise any “trivy runs first” wording in the
Run/Expected section so the ordering matches the hook behavior. Keep the
explanation aligned with the trivy example’s hook kind and event names so
readers understand it executes after plan but before apply.
🤖 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 `@examples/hooks-trivy/README.md`:
- Around line 3-13: The README prose for the trivy hook is out of sync with the
new after.terraform.plan event. Update the descriptive text in the trivy hook
example to say the scan runs after the plan is generated (not before plan) and
revise any “trivy runs first” wording in the Run/Expected section so the
ordering matches the hook behavior. Keep the explanation aligned with the trivy
example’s hook kind and event names so readers understand it executes after plan
but before apply.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0b243cb5-b79f-4f58-a04b-65f39a270d33

📥 Commits

Reviewing files that changed from the base of the PR and between 6b9c7fa and d03a726.

📒 Files selected for processing (23)
  • examples/hooks-checkov/README.md
  • examples/hooks-checkov/stacks/deploy/test.yaml
  • examples/hooks-custom-command/README.md
  • examples/hooks-custom-command/stacks/deploy/test.yaml
  • examples/hooks-infracost/README.md
  • examples/hooks-infracost/components/terraform/nat-gateway/versions.tf
  • examples/hooks-infracost/stacks/deploy/test.yaml
  • examples/hooks-kics/README.md
  • examples/hooks-kics/stacks/deploy/test.yaml
  • examples/hooks-trivy/README.md
  • examples/hooks-trivy/stacks/deploy/test.yaml
  • gists/aws-store-hooks/stacks/producer.yaml
  • pkg/datafetcher/schema/atmos/manifest/1.0.json
  • pkg/datafetcher/schema/config/global/1.0.json
  • pkg/datafetcher/schema/stacks/stack-config/1.0.json
  • pkg/hooks/hook_test.go
  • tests/fixtures/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json
  • website/docs/cli/configuration/stores.mdx
  • website/docs/migration/terragrunt.mdx
  • website/docs/stacks/hooks.mdx
  • website/docs/tutorials/sharing-state/stores.mdx
  • website/src/data/roadmap.js
  • website/static/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json
✅ Files skipped from review due to trivial changes (5)
  • website/docs/cli/configuration/stores.mdx
  • examples/hooks-kics/README.md
  • examples/hooks-checkov/README.md
  • examples/hooks-infracost/components/terraform/nat-gateway/versions.tf
  • website/src/data/roadmap.js
🚧 Files skipped from review as they are similar to previous changes (6)
  • pkg/datafetcher/schema/atmos/manifest/1.0.json
  • pkg/datafetcher/schema/config/global/1.0.json
  • website/static/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json
  • tests/fixtures/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json
  • website/docs/stacks/hooks.mdx
  • pkg/datafetcher/schema/stacks/stack-config/1.0.json

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 24, 2026
@aknysh
Andriy Knysh (aknysh) merged commit f9f53da into main Jun 25, 2026
71 checks passed
@aknysh
Andriy Knysh (aknysh) deleted the osterman/kyiv-v10 branch June 25, 2026 15:20
@atmos-pro

atmos-pro Bot commented Jun 25, 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

Copy link
Copy Markdown

These changes were released in v1.222.0-rc.10.

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/l Large size PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants