Skip to content

[steps] Unify the default gating of steps with no if: across steps, composite scopes, and hooks - #4061

Open
sswrk wants to merge 2 commits into
szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-filesfrom
szymonswierk/eng-22387-steps-unify-no-if-gating-policy
Open

[steps] Unify the default gating of steps with no if: across steps, composite scopes, and hooks#4061
sswrk wants to merge 2 commits into
szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-filesfrom
szymonswierk/eng-22387-steps-unify-no-if-gating-policy

Conversation

@sswrk

@sswrk sswrk commented Jul 23, 2026

Copy link
Copy Markdown
Member

Why

For a step with no if:, whether the step should run was decided in 3 separate places: BuildStep.shouldExecuteStep, the composite function scope (same rule), and the hook executor (its own rule). That bypass means composite scopes never see hook defaults, which is a blocker for adding support for composite functions in hooks.

How

A single gate now decides whether any step runs, taking a single input: a bool telling whether a step with no if: should run. Composite functions called from hooks therefore inherit the hook's rule. Steps with an explicit if: are unaffected.

Behavior-preserving refactor.

Test Plan

  • Existing steps/hook tests still pass.
  • Added unit coverage for the run-by-default value on shouldExecuteStep /
    isActive, and hook sibling skip/continue cases for the before/after defaults.

@linear-code

linear-code Bot commented Jul 23, 2026

Copy link
Copy Markdown

ENG-22387

sswrk commented Jul 23, 2026

Copy link
Copy Markdown
Member Author

@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 3 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-files@ab74d1e). Learn more about missing BASE report.

Files with missing lines Patch % Lines
packages/steps/src/BuildWorkflow.ts 57.15% 3 Missing ⚠️
Additional details and impacted files
@@                                             Coverage Diff                                             @@
##             szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-files    #4061   +/-   ##
===========================================================================================================
  Coverage                                                                            ?   62.22%           
===========================================================================================================
  Files                                                                               ?      995           
  Lines                                                                               ?    44754           
  Branches                                                                            ?     9412           
===========================================================================================================
  Hits                                                                                ?    27845           
  Misses                                                                              ?    15462           
  Partials                                                                            ?     1447           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sswrk sswrk added the no changelog PR that doesn't require a changelog entry label Jul 23, 2026
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-steps-unify-no-if-gating-policy branch 2 times, most recently from 88b25ed to afe2ad9 Compare July 23, 2026 17:06
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-files branch 2 times, most recently from 2e31826 to f859121 Compare July 24, 2026 11:43
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-steps-unify-no-if-gating-policy branch from afe2ad9 to de031b5 Compare July 24, 2026 11:43
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-files branch from f859121 to 5a62c3b Compare July 24, 2026 11:49
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-steps-unify-no-if-gating-policy branch from de031b5 to 73ece96 Compare July 24, 2026 11:49
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-files branch from 5a62c3b to 62b5bae Compare July 24, 2026 12:31
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-steps-unify-no-if-gating-policy branch from 73ece96 to be7ec02 Compare July 24, 2026 12:31
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-files branch from 62b5bae to 496e454 Compare July 24, 2026 13:02
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-steps-unify-no-if-gating-policy branch 2 times, most recently from 0236cea to f14d4f6 Compare July 24, 2026 14:12
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-files branch 2 times, most recently from d04c89f to b805c1f Compare July 24, 2026 14:39
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-steps-unify-no-if-gating-policy branch from f14d4f6 to fb5d85f Compare July 24, 2026 14:40
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-files branch from b805c1f to 5113e42 Compare July 24, 2026 14:58
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-steps-unify-no-if-gating-policy branch from fb5d85f to 0a629b7 Compare July 24, 2026 14:59
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-files branch from 5113e42 to 4c6e667 Compare July 24, 2026 15:16
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-steps-unify-no-if-gating-policy branch from 0a629b7 to 32f79bd Compare July 24, 2026 15:16
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-steps-unify-no-if-gating-policy branch 2 times, most recently from 079d504 to f20c574 Compare July 27, 2026 10:10
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-files branch from 09e0c46 to 6983371 Compare July 27, 2026 10:10
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-steps-unify-no-if-gating-policy branch from f20c574 to 79cbcd4 Compare July 27, 2026 11:11
@sswrk sswrk changed the title [steps] Unify no-if gating defaults behind a shared run-by-default policy [steps] Unify the no-if gating default across steps, composite scopes, and hooks Jul 27, 2026
@sswrk sswrk changed the title [steps] Unify the no-if gating default across steps, composite scopes, and hooks [steps] Unify the default gating of steps with no if: across steps, composite scopes, and hooks Jul 27, 2026
@sswrk
sswrk marked this pull request as ready for review July 27, 2026 13:08

@claude claude 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.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@hSATAC hSATAC 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.

LGTM.

Comment thread packages/steps/src/BuildStep.ts Outdated
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-files branch from 18d77aa to 9551a61 Compare July 28, 2026 12:58
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-steps-unify-no-if-gating-policy branch 2 times, most recently from bfe042d to c692851 Compare July 28, 2026 15:30
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-files branch from 9551a61 to 8364018 Compare July 28, 2026 15:30
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-steps-unify-no-if-gating-policy branch from c692851 to f9f51cc Compare July 29, 2026 09:01
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-files branch 3 times, most recently from 2f8a515 to ab74d1e Compare July 29, 2026 09:26
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-steps-unify-no-if-gating-policy branch from f9f51cc to e693624 Compare July 29, 2026 09:26
@github-actions

Copy link
Copy Markdown

⏩ The changelog entry check has been skipped since the "no changelog" label is present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog PR that doesn't require a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants