Skip to content

Expose automation steps, decoded query results, and execution controls - #3278

Merged
Andriy Knysh (aknysh) merged 6 commits into
osterman/starlark-interpreter-fixesfrom
osterman/aal-step-library
Oct 14, 2026
Merged

Andriy Knysh (aknysh) merged 6 commits into
osterman/starlark-interpreter-fixesfrom
osterman/aal-step-library

Conversation

@osterman

@osterman Erik Osterman (Cloud Posse) (osterman) commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

what

Expose the registered Atmos step library through the shared pkg/automation Go API and Starlark steps.* bindings. Scripts can use prompts, HTTP requests, containers, archives, and the other registered handlers, with values, metadata, and named outputs available to subsequent calls.

Add lazy JSON decoding through result.data while preserving raw process stdout/stderr and step value. atmos.list, atmos.describe, and configuration getters default to captured JSON; explicit format/output choices still apply. Add --format=json to the CLI configuration getters without changing their raw-output default.

Expose timeout and retry options on exec.run and component.exec through a shared Go execution policy. A timeout covers all attempts and backoff; retries apply to checked ordinary nonzero exits and can match output conditions.

Document the APIs and restrictions, update help recordings, and add changelog and roadmap entries. The enclosing runner still owns workflow scheduling, identity preparation, background jobs, and freshness policies.

why

Scripts should reuse Atmos's step handlers and execution controls, and inspect structured command results without repeating JSON parsing or subprocess policy. Language bindings convert arguments and results; the shared Go interfaces own execution behavior.

validation

  • Go build and CLI binary build
  • Short tests across scripting, automation, flags, YAML, configuration getters, steps, and workflows
  • Targeted standalone/custom-command/workflow regression tests
  • Race tests for result decoding, query defaults, execution policy, and script dispatch
  • Changed-code lint and commit hooks
  • Real CLI query, decoding, timeout, help, and invalid-input smoke checks
  • Production documentation build with MDX and link validation (identical read-only Git tag lookups cached locally)

references

Stacked on #3276 in the linear automation stack. This PR changes 81 files, below the 150-file review limit.

Summary by CodeRabbit

  • New Features
    • Automation scripts can call registered workflow steps and use their returned values, metadata, and outputs in later operations.
    • Process calls support configurable timeouts and retries for eligible failures; captured output reflects the final attempt.
    • Automation query commands capture JSON by default and expose decoded results through data.
    • config get, stack config get, and stack get support --format/-f with raw and json output.
  • Documentation
    • Added guidance and examples for step-library calls, structured query results, and process controls.

@osterman Erik Osterman (Cloud Posse) (osterman) added the minor New features that do not break anything label Oct 6, 2026
@atmos-pro

atmos-pro Bot commented Oct 6, 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 Oct 6, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues found.

Scanned Files

None

@github-actions

github-actions Bot commented Oct 6, 2026

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"

@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

CI timing summary

Latest completed GitHub Actions runs for a5a088099e02.

  • PR wall-clock time: 13h 59m 00s
  • Aggregate runner time: 10h 44m 50s
  • Included: 19 workflows, 129 jobs (including matrix jobs)

Wall-clock time spans the earliest included workflow creation through the latest completion. Aggregate runner time adds each job's execution time, so concurrent jobs are counted separately.

Workflow Elapsed Runner time Jobs
✅ Tests 1h 11m 05s 8h 47m 20s 98
✅ Benchmarks 30m 12s 28m 44s 1
✅ Screengrabs 26m 41s 25m 30s 2
✅ Website Preview Build 15m 57s 15m 00s 1
✅ Native CI 9m 58s 19m 14s 6
✅ CodeQL 6m 35s 15m 44s 6
✅ atmos.ci 5m 16s 4m 06s 1
✅ Dependency Review 4m 43s 3m 52s 1
✅ Pre-commit 2m 39s 1m 48s 1
✅ Validate Codeowners 1m 53s 22s 1
✅ TruffleHog secret scan 1m 52s 51s 1
✅ Link Check 1m 39s 38s 1
✅ vhs 1m 37s 17s 3
✅ Release Documentation Check 1m 33s 26s 1
✅ Verify Repository Symlinks 1m 12s 21s 1
✅ autofix.ci 1m 05s 14s 1
✅ PR Size Labeler 24s 20s 1
✅ Quality Gate Signal 7s 3s 1
⏭️ Feature release 1s 0s 1
Longest jobs (top 10)
Job Workflow Duration Conclusion
benchmark Benchmarks 28m 44s ✅ success
build Screengrabs 25m 13s ✅ success
[race] non-acceptance test suite (shard 1/4) Tests 21m 16s ✅ success
website-deploy-preview Website Preview Build 15m 00s ✅ success
[floci] go e2e Tests 14m 30s ✅ success
Acceptance Tests (windows, shard 3/10) Tests 13m 53s ✅ success
Acceptance Tests (windows, shard 9/10) Tests 13m 30s ✅ success
Acceptance Tests (macos, shard 1/10) Tests 13m 27s ✅ success
Acceptance Tests (windows, shard 8/10) Tests 13m 26s ✅ success
[race] non-acceptance test suite (shard 4/4) Tests 13m 13s ✅ success

Updated automatically when a PR workflow finishes.

@osterman
Erik Osterman (Cloud Posse) (osterman) changed the base branch from osterman/starlark-language-reference to osterman/starlark-interpreter-fixes October 6, 2026 15:38
@osterman Erik Osterman (Cloud Posse) (osterman) changed the title feat(automation): expose the step library to scripts Expose automation steps, decoded query results, and execution controls Oct 6, 2026
@mergify mergify Bot removed the stacked Stacked label Oct 6, 2026
@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

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

⚙️ Run configuration
  • Configuration used: Repository: cloudposse/atmos/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 36511b42-1e0c-4fc4-93c7-b8590f330af8
📥 Commits

Reviewing files that changed from the base of the PR and between be21f65 and a5a0880.

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

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: cloudposse/atmos/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fa95becf-cde3-4580-91f7-a3b8f109745f
📥 Commits

Reviewing files that changed from the base of the PR and between 2c12115 and be21f65.

📒 Files selected for processing (2)
  • NOTICE
  • website/src/data/roadmap.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • website/src/data/roadmap.js

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.

📝 Walkthrough

This change adds raw and JSON formats to configuration and stack getters. It adds a Go step-library API and exposes registered step handlers to Starlark scripts. It also adds process timeouts, retries, decoded JSON results, and default capture and format behavior for selected Atmos query wrappers.

Changes: Automation APIs and formatted output

Layer / File(s) Summary
Formatted configuration getters and query defaults
cmd/config/*, cmd/stack/*, pkg/yaml/*, pkg/flags/*, pkg/script/starlark/stdlib/atmos/*
Configuration and stack getters accept --format/-f, with raw as the default and json as an alternative. Selected automation query wrappers default to JSON format and captured output.
Automation contracts and process policies
pkg/automation/*, errors/automation.go, pkg/script/*, pkg/script/starlark/*
The automation package adds step-call and result types, a step-library interface, and an execution policy. Process calls carry timeout and retry policies. Process results expose lazily decoded JSON data alongside raw fields.
Step-library execution and integration
pkg/runner/step/*, pkg/workflow/*, internal/exec/*, cmd/standalone_script.go, pkg/script/starlark/*
AutomationLibrary validates and runs registered handlers. Starlark exposes registered step names and steps.run. Script hosts provide or fork the library for standalone, embedded, workflow, and parallel execution.
Output handling and documentation
pkg/runner/step/*, pkg/automation/README.md, pkg/script/README.md, website/docs/*, website/blog/*, website/src/data/roadmap.js, website/static/casts/*, NOTICE
Runner output writers support capturing and displaying command output. Documentation and examples describe step calls, execution policies, decoded results, query defaults, and CLI output formats. The roadmap and product description are updated.

Priority: ➖ Normal

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

Change: Feature

Suggested reviewers: aknysh

Merge Risk: ⚪ Minimal · up to be21f

The reviewed changes update product and roadmap descriptions; no actionable user-facing regression is apparent in this scope.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 70 functions across 51 files. (1 skipped:… 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 summarizes the pull request's main changes: exposing automation steps, decoded query results, and execution controls.
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 70 functions across 51 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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[bot]
coderabbitai Bot previously approved these changes Oct 6, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Oct 6, 2026

Copy link
Copy Markdown
Member Author

CodeRabbit (@coderabbitai) review

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Oct 10, 2026

Copy link
Copy Markdown
Member Author

CodeRabbit (@coderabbitai) review

@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

No files to review.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Oct 11, 2026

Copy link
Copy Markdown
Member Author

CodeRabbit (@coderabbitai) review

@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Oct 12, 2026
@osterman

Copy link
Copy Markdown
Member Author

CodeRabbit (@coderabbitai) review

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

No files to review.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@atmos-pro

atmos-pro Bot commented Oct 14, 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.

@atmos-pro

atmos-pro Bot commented Oct 14, 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.233.0-rc.0.

This branch was successfully deployed

1 active and 1 inactive deployments
preview — a5a08809 Deployed Oct 13, 2026 by github-actions[bot]
screengrabs — a5a08809 Deployed Oct 13, 2026 by osterman via build #3264
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.

2 participants