Skip to content

feat: add workflow environment variable support with hierarchical merging - #2050

Merged
Andriy Knysh (aknysh) merged 15 commits into
mainfrom
Benbentwo/workflow-env-vars
Feb 9, 2026
Merged

Andriy Knysh (aknysh) merged 15 commits into
mainfrom
Benbentwo/workflow-env-vars

Conversation

@Benbentwo

@Benbentwo Ben (Benbentwo) commented Feb 2, 2026 •

Copy link
Copy Markdown
Contributor

what

  • Add env map support at workflow and step levels in workflow YAML files
  • Environment variables are merged hierarchically with step-level overriding workflow-level for the same keys
  • Support inheritance pattern where different keys from workflow and step levels are both available to the command

why

  • Users need the ability to define common environment variables at the workflow level
  • Step-level env vars allow overriding workflow defaults for specific steps
  • Hierarchical merging provides a flexible, intuitive interface consistent with how stack fields work

references

  • Enables user feature request for workflow environment variable support
  • Follows existing hierarchical pattern used for stack field overrides

Summary by CodeRabbit

  • New Features

    • Workflow- and step-scoped environment maps added; variables merge hierarchically with step values taking precedence and identity/auth vars appended.
  • Bug Fixes

    • Environment preparation now always starts from the system/global base environment and consistently preserves/merges it across steps.
  • Documentation

    • CLI docs and a new blog post describe merge order, scoping, and precedence.
  • Tests

    • Expanded unit and fixture tests covering merge, precedence, override, scoping, and auth interactions; tests now validate dynamic environment composition.

@Benbentwo
Ben (Benbentwo) requested a review from a team as a code owner February 2, 2026 17:28
@github-actions github-actions Bot added the size/l Large size PR label Feb 2, 2026
@github-actions

github-actions Bot commented Feb 2, 2026 •

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues found.

Scanned Files

None

@Benbentwo Ben (Benbentwo) added the minor New features that do not break anything label Feb 2, 2026
@github-actions

github-actions Bot commented Feb 2, 2026

Copy link
Copy Markdown

Warning

Release Documentation Required

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

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

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

@osterman

Copy link
Copy Markdown
Member

Add the missing documentation as well for the new configuration setting.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 342ea06701

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

Comment thread pkg/workflow/executor.go
@coderabbitai

coderabbitai Bot commented Feb 2, 2026 •

Copy link
Copy Markdown
Contributor

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

Workflow and step-scoped environment maps were added and merged hierarchically. Execution now builds a reusable baseEnv (system + atmos/toolchain PATH), merges workflow.Env and step.Env (step wins), and authentication appends identity env vars onto the merged environment before step execution. PrepareEnvironment now always merges provided baseEnv onto os.Environ().

Changes

Cohort / File(s) Summary
Schema
pkg/schema/workflow.go
Added Env map[string]string to WorkflowDefinition and WorkflowStep.
Executor runtime
pkg/workflow/executor.go
Added mergeWorkflowEnv; changed prepareStepEnvironment and prepareAuthenticatedEnvironment signatures to accept merged/base env and workflow/step maps; moved env merging before auth and adjusted callers.
Internal adapters
internal/exec/workflow_adapters.go
PrepareEnvironment now starts from os.Environ() and appends/merges the provided baseEnv unconditionally.
Internal utils
internal/exec/workflow_utils.go
prepareStepEnvironment signature changed to accept baseEnv, workflowEnvMap, stepEnvMap; ExecuteWorkflow builds one reusable baseEnv (system + atmos + toolchain PATH) and no longer augments PATH per-step.
Executor package helpers
pkg/workflow/...
Refactored auth path to accept a base env slice (prepareAuthenticatedEnvironment) and to prepend identity auth vars onto that base.
Unit tests — adapters & utils
internal/exec/workflow_adapters_test.go, internal/exec/workflow_utils_test.go
Mocks updated to use dynamic env checks (gomock.Any() + DoAndReturn); tests added/updated to assert baseEnv presence, merge behavior, and precedence (step overrides workflow).
Unit tests — executor
pkg/workflow/executor_test.go
Updated to pass explicit baseEnv slices; many new tests for env merge, precedence, and auth interactions added.
Fixtures & docs
tests/fixtures/scenarios/workflows/.../test.yaml, website/blog/.../2026-02-02-workflow-environment-variables.mdx, website/docs/cli/configuration/workflows.mdx, website/src/data/roadmap.js
Added workflow/step env test scenarios, blog and docs describing hierarchical env merging, precedence, scoping, examples, and roadmap entry.
Snapshots
tests/snapshots/TestCLICommands_atmos_workflow_not_found.stderr.golden
Updated snapshot to include newly added workflow names from fixtures.

Sequence Diagram

sequenceDiagram
    participant User as User
    participant Executor as Executor
    participant OS as OS
    participant Auth as AuthManager
    participant Runner as Runner

    User->>Executor: request run step (workflow.Env, step.Env, identity?)
    Executor->>OS: read os.Environ()
    OS-->>Executor: system env
    Executor->>Executor: baseEnv = system env + atmos/toolchain PATH
    Executor->>Executor: mergedEnv = merge(workflow.Env, step.Env)  -- step wins
    Executor->>Auth: prepareStepEnvironment(baseEnv, identity?, mergedEnv)
    alt identity provided and auth provider exists
        Auth-->>Executor: identity env vars
        Executor->>Executor: finalEnv = baseEnv + mergedEnv + identity env
    else
        Executor->>Executor: finalEnv = baseEnv + mergedEnv
    end
    Executor->>Runner: execute step with finalEnv
    Runner-->>User: step result
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested reviewers

  • osterman
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding workflow environment variable support with hierarchical merging, which aligns with the PR's core objective.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch Benbentwo/workflow-env-vars

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 and usage tips.

@coderabbitai

coderabbitai Bot commented Feb 2, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This pull request introduces environment variable support at both workflow and step levels in workflow execution. Variables are hierarchically merged with step-level variables overriding workflow-level duplicates for the same keys. The feature is implemented across schema definitions, execution logic, comprehensive tests, and documentation.

Changes

Cohort / File(s) Summary
Schema Definitions
pkg/schema/workflow.go
Added Env map[string]string fields to WorkflowStep and WorkflowDefinition structs to support environment variable configuration at both levels.
Execution Logic
internal/exec/workflow_utils.go, pkg/workflow/executor.go
Updated prepareStepEnvironment signature to accept workflowEnvMap and stepEnvMap parameters. Added mergeWorkflowEnv function to combine workflow and step environment variables with step-level precedence. Integrated merged environment handling into execution flow with proper precedence (system → global → workflow → step).
Unit Tests
internal/exec/workflow_utils_test.go, pkg/workflow/executor_test.go
Updated existing test calls to reflect new function signatures. Added comprehensive test coverage for environment merging logic, precedence rules, workflow-level and step-level variable handling, identity-based authentication with environment variables, and Atmos command environment propagation.
Integration Tests
tests/fixtures/scenarios/workflows/.../test.yaml
Expanded test fixture with workflow-level and step-level environment variable examples demonstrating override semantics, merging behavior, and inheritance patterns.
Documentation
website/blog/2026-02-02-workflow-environment-variables.mdx, website/src/data/roadmap.js
Added blog post explaining the hierarchical environment variable feature with precedence chain and YAML examples. Updated roadmap with shipped milestone entry for the feature.

Sequence Diagram(s)

sequenceDiagram
    participant Executor
    participant prepareStepEnvironment
    participant mergeWorkflowEnv
    participant Runner

    Executor->>prepareStepEnvironment: Call with workflowEnv, stepEnv
    prepareStepEnvironment->>mergeWorkflowEnv: Merge workflow and step vars
    mergeWorkflowEnv-->>prepareStepEnvironment: Return merged map (step overrides)
    prepareStepEnvironment->>prepareStepEnvironment: Build final env slice<br/>(system → global → merged)
    prepareStepEnvironment-->>Executor: Return env slice
    Executor->>Runner: Execute with final environment<br/>(system + global + workflow + step)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

  • osterman
  • aknysh
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 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 main change: adding workflow environment variable support with hierarchical merging, which is the core feature across all modified files.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch Benbentwo/workflow-env-vars

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 and usage tips.

@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

🤖 Fix all issues with AI agents
In `@internal/exec/workflow_utils.go`:
- Around line 123-150: The prepareStepEnvironment function currently calls
os.Environ() internally which ignores the single consolidated base environment
and PATH/toolchain setup; change prepareStepEnvironment signature to accept
baseEnv []string instead of calling os.Environ(), update ExecuteWorkflow to
construct baseEnv once via envpkg.MergeGlobalEnv(os.Environ(), globalEnv) and
pass that baseEnv into prepareStepEnvironment for non-identity steps, and for
identity-bearing steps construct baseEnv inside the auth flow before adding
credentials; also update all callers of prepareStepEnvironment and preserve the
existing mergedEnv logic (workflowEnvMap + stepEnvMap overriding) and appending
envpkg.ConvertMapToSlice(mergedEnv) to the provided baseEnv.
🧹 Nitpick comments (1)
internal/exec/workflow_utils_test.go (1)

978-1071: Consider collapsing the env cases into a table‑driven test. These scenarios are structurally similar and could be expressed as a single table for easier extension. As per coding guidelines: Use table-driven tests for testing multiple scenarios in Go.

Comment thread internal/exec/workflow_utils.go
@Benbentwo

Copy link
Copy Markdown
Contributor Author

Documentation added in commit 31c5c4e. Updated website/docs/cli/configuration/workflows.mdx with:

  • Environment Variable Precedence section
  • Workflow-level env examples
  • Step-level override examples
  • Shell commands with environment examples

@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

🤖 Fix all issues with AI agents
In `@internal/exec/workflow_utils.go`:
- Around line 181-186: The auth-env preparation error returned from
authManager.PrepareShellEnvironment should be wrapped with the static sentinel
(errUtils.ErrAuthenticationFailed) so callers can reliably use errors.Is; update
the error return to combine the sentinel and the original authErr (e.g. combined
:= errors.Join(errUtils.ErrAuthenticationFailed, authErr)) and then wrap that
combined error in the existing fmt.Errorf context for PrepareShellEnvironment
(or use fmt.Errorf with %w), ensuring you import the standard errors package and
reference authManager.PrepareShellEnvironment and
errUtils.ErrAuthenticationFailed.
🧹 Nitpick comments (1)
internal/exec/workflow_utils_test.go (1)

833-1043: Consolidate the prepareStepEnvironment variants into a table-driven test.

These scenarios are all the same behavior with different inputs; a table makes this easier to extend and maintain.

♻️ Suggested refactor
-// TestPrepareStepEnvironment tests the prepareStepEnvironment function.
-func TestPrepareStepEnvironment_NoIdentity(t *testing.T) {
-	// When no identity is specified, should return base environment with workflow/step env merged.
-	baseEnv := []string{"BASE_VAR=base-value"}
-	env, err := prepareStepEnvironment(baseEnv, "", "step1", nil, nil, nil)
-
-	assert.NoError(t, err)
-	// Should return the base environment.
-	assert.Contains(t, env, "BASE_VAR=base-value")
-}
-
-// TestPrepareStepEnvironment_NilAuthManager tests prepareStepEnvironment with nil auth manager.
-func TestPrepareStepEnvironment_NilAuthManager(t *testing.T) {
-	baseEnv := []string{"BASE_VAR=base-value"}
-	env, err := prepareStepEnvironment(baseEnv, "some-identity", "step1", nil, nil, nil)
-
-	assert.ErrorIs(t, err, errUtils.ErrAuthManager)
-	assert.Nil(t, env)
-}
+func TestPrepareStepEnvironment_NoIdentity(t *testing.T) {
+	tests := []struct {
+		name              string
+		baseEnv           []string
+		workflowEnv       map[string]string
+		stepEnv           map[string]string
+		expectEmpty       bool
+		expectContains    []string
+		expectNotContains []string
+	}{
+		{
+			name:           "base only",
+			baseEnv:        []string{"BASE_VAR=base-value"},
+			expectContains: []string{"BASE_VAR=base-value"},
+		},
+		{
+			name:        "empty base",
+			baseEnv:     []string{},
+			expectEmpty: true,
+		},
+		{
+			name:           "workflow env",
+			baseEnv:        []string{"BASE_VAR=base-value"},
+			workflowEnv:    map[string]string{"WORKFLOW_VAR": "workflow-value"},
+			expectContains: []string{"BASE_VAR=base-value", "WORKFLOW_VAR=workflow-value"},
+		},
+		{
+			name:           "step env",
+			baseEnv:        []string{"BASE_VAR=base-value"},
+			stepEnv:        map[string]string{"STEP_VAR": "step-value"},
+			expectContains: []string{"BASE_VAR=base-value", "STEP_VAR=step-value"},
+		},
+		{
+			name:              "step overrides workflow",
+			baseEnv:           []string{"BASE_VAR=base-value"},
+			workflowEnv:       map[string]string{"MY_VAR": "workflow-value"},
+			stepEnv:           map[string]string{"MY_VAR": "step-value"},
+			expectContains:    []string{"MY_VAR=step-value"},
+			expectNotContains: []string{"MY_VAR=workflow-value"},
+		},
+		{
+			name:           "merge workflow and step",
+			baseEnv:        []string{"BASE_VAR=base-value"},
+			workflowEnv:    map[string]string{"WORKFLOW_VAR": "workflow-value"},
+			stepEnv:        map[string]string{"STEP_VAR": "step-value"},
+			expectContains: []string{"BASE_VAR=base-value", "WORKFLOW_VAR=workflow-value", "STEP_VAR=step-value"},
+		},
+	}
+
+	for _, tt := range tests {
+		t.Run(tt.name, func(t *testing.T) {
+			env, err := prepareStepEnvironment(tt.baseEnv, "", "step1", nil, tt.workflowEnv, tt.stepEnv)
+			assert.NoError(t, err)
+			if tt.expectEmpty {
+				assert.Empty(t, env)
+				return
+			}
+			for _, expected := range tt.expectContains {
+				assert.Contains(t, env, expected)
+			}
+			for _, unexpected := range tt.expectNotContains {
+				assert.NotContains(t, env, unexpected)
+			}
+		})
+	}
+}
+
+// TestPrepareStepEnvironment_NilAuthManager tests prepareStepEnvironment with nil auth manager.
+func TestPrepareStepEnvironment_NilAuthManager(t *testing.T) {
+	baseEnv := []string{"BASE_VAR=base-value"}
+	env, err := prepareStepEnvironment(baseEnv, "some-identity", "step1", nil, nil, nil)
+
+	assert.ErrorIs(t, err, errUtils.ErrAuthManager)
+	assert.Nil(t, env)
+}

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

Comment thread internal/exec/workflow_utils.go
coderabbitai[bot]
coderabbitai Bot previously approved these changes Feb 2, 2026
@codecov

codecov Bot commented Feb 3, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.24390% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.10%. Comparing base (06c8561) to head (f18e3f5).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/exec/workflow_utils.go 77.77% 2 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2050      +/-   ##
==========================================
+ Coverage   76.08%   76.10%   +0.01%     
==========================================
  Files         797      797              
  Lines       74625    74649      +24     
==========================================
+ Hits        56780    56808      +28     
+ Misses      14302    14296       -6     
- Partials     3543     3545       +2     
Flag Coverage Δ
unittests 76.10% <90.24%> (+0.01%) ⬆️

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

Files with missing lines Coverage Δ
internal/exec/workflow_adapters.go 100.00% <100.00%> (ø)
pkg/workflow/executor.go 97.60% <100.00%> (+0.12%) ⬆️
internal/exec/workflow_utils.go 70.50% <77.77%> (+0.85%) ⬆️

... and 6 files with indirect coverage changes

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

coderabbitai[bot]
coderabbitai Bot previously approved these changes Feb 3, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Feb 3, 2026
Comment thread website/docs/cli/configuration/workflows.mdx
Comment thread website/src/data/roadmap.js Outdated
Ben (Benbentwo) and others added 6 commits February 5, 2026 10:24
Refactors the legacy executor's prepareStepEnvironment function to accept
baseEnv []string as a parameter instead of calling os.Environ() internally.

Changes:
- prepareStepEnvironment now takes baseEnv as first parameter
- Removes globalEnv parameter (caller merges it into baseEnv)
- ExecuteWorkflow constructs baseEnv once before the step loop
- Toolchain PATH is included in baseEnv upfront
- Updated all test calls to pass baseEnv parameter

Benefits:
- Aligns with modern executor pattern
- Improves testability (tests can pass controlled base env)
- More efficient (base env constructed once instead of per-step)
- Better PR #1899 compatibility for step handler architecture

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Wrap the error from authManager.PrepareShellEnvironment with
errUtils.ErrAuthenticationFailed so callers can reliably use
errors.Is() to detect authentication failures.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add clear documentation explaining that workflow environment variables
are scoped to individual steps:
- Workflow-level env applies to all steps
- Step-level env only applies to that specific step
- Step-level env does NOT persist to subsequent steps
- Shell exports within a step do NOT persist to subsequent steps

Also adds an env-scoping test case to verify this behavior.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add env-scoping to the workflow_not_found snapshot after adding the
new scoping test case to the fixtures.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <erik@cloudposse.com>
Reduce verbose examples to a single concise example showing both
workflow and step level env usage. Keep essential info: precedence
order and scoping behavior.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@internal/exec/workflow_adapters_test.go`:
- Around line 551-552: Update the inline comment that reads "Adapter now always
merges baseEnv with os.Environ(), so we use gomock.Any() and verify the behavior
rather than exact env slice" to end with a period to satisfy the godot linter;
locate this comment in the workflow_adapters_test.go test (near the gomock.Any()
usage in the test that verifies env merging) and append a trailing period to the
comment line.

In `@internal/exec/workflow_adapters.go`:
- Around line 103-106: The comment above the fullEnv initialization is missing a
terminal period and will fail the godot linter; update the comment sentences in
the block that references os.Environ() and fullEnv so each ends with a period
(e.g., ensure the two comment lines both terminate with a period).
🧹 Nitpick comments (2)
website/docs/cli/configuration/workflows.mdx (1)

144-160: Consider wrapping the YAML example in a <File> component for consistency.

Other workflow YAML examples in this file use the <File title="..."> wrapper (e.g., lines 55, 87, 105, 126). This bare code block breaks the visual pattern.

📝 Suggested change
-```yaml
-workflows:
-  deploy-multi-region:
-    env:
-      TF_LOG: INFO
-    steps:
-      - command: terraform apply vpc -s plat-ue2-dev --auto-approve
-        env:
-          AWS_REGION: us-east-2
-      - command: terraform apply vpc -s plat-uw2-dev --auto-approve
-        env:
-          AWS_REGION: us-west-2
-```
+<File title="stacks/workflows/deploy.yaml">
+```yaml
+workflows:
+  deploy-multi-region:
+    env:
+      TF_LOG: INFO
+    steps:
+      - command: terraform apply vpc -s plat-ue2-dev --auto-approve
+        env:
+          AWS_REGION: us-east-2
+      - command: terraform apply vpc -s plat-uw2-dev --auto-approve
+        env:
+          AWS_REGION: us-west-2
+```
+</File>
internal/exec/workflow_utils_test.go (1)

1130-1160: Align the fallback test name/comments with what it actually executes.

The test runs a well‑formed command, so it doesn’t exercise the fallback path and reads as misleading. Consider renaming and clarifying comments to avoid a tautological test.

🔧 Clarify intent and naming
-// TestExecuteWorkflow_ShellFieldsFallback tests that ExecuteWorkflow falls back to
-// strings.Fields when shell.Fields fails to parse the command.
-func TestExecuteWorkflow_ShellFieldsFallback(t *testing.T) {
+// TestExecuteWorkflow_ShellFieldsNormalParse ensures ExecuteWorkflow succeeds with a
+// well-formed command (fallback coverage is in TestExecuteWorkflow_ShellFieldsFallbackWithMalformedCommand).
+func TestExecuteWorkflow_ShellFieldsNormalParse(t *testing.T) {
@@
-	// Use a command with unclosed quote that shell.Fields can't parse.
-	// This tests the fallback path to strings.Fields.
-	// Note: The command itself will fail when executed, but we're testing
-	// that the parsing fallback works correctly.
+	// Use a well-formed command.
+	// Malformed fallback is covered in TestExecuteWorkflow_ShellFieldsFallbackWithMalformedCommand.
As per coding guidelines Test behavior, not implementation - Never test stub functions - Avoid tautological tests - Use `errors.Is()` for error checking - Remove always-skipped tests.

Comment thread internal/exec/workflow_adapters_test.go Outdated
Comment thread internal/exec/workflow_adapters.go Outdated
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

@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)
website/src/data/roadmap.js (1)

252-255: ⚠️ Potential issue | 🟡 Minor

Initiative marked 100% shipped but contains an in-progress milestone.

Line 253 sets progress: 100 and status: 'shipped' for the Workflows Overhaul initiative, yet line 255 still has "New workflow step types" as status: 'in-progress'. Either bump that milestone to shipped or adjust the initiative progress/status to reflect the remaining work.

@aknysh
Andriy Knysh (aknysh) merged commit aab4968 into main Feb 9, 2026
57 checks passed
@aknysh
Andriy Knysh (aknysh) deleted the Benbentwo/workflow-env-vars branch February 9, 2026 23:11
@github-actions

Copy link
Copy Markdown

These changes were released in v1.206.0-rc.4.

This branch was successfully deployed

1 active deployment
preview — f18e3f57 Deployed Feb 9, 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/l Large size PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants