Skip to content

Fix missing needs: declarations causing 22 actionlint expression errors in 4 workflows#17681

Merged
pelikhan merged 5 commits intomainfrom
copilot/fix-workflow-needs-declarations
Feb 22, 2026
Merged

Fix missing needs: declarations causing 22 actionlint expression errors in 4 workflows#17681
pelikhan merged 5 commits intomainfrom
copilot/fix-workflow-needs-declarations

Conversation

Copy link
Contributor

Copilot AI commented Feb 22, 2026

Jobs in 4 workflows referenced needs.X.outputs.* in activation job prompt steps without X in activation's needs:, causing actionlint [expression] errors and incorrect prompt substitutions (empty values at activation time since the referenced jobs hadn't run yet).

Compiler fixes

  • buildActivationJob: When a custom job (no explicit needs:) has outputs referenced in the markdown body, automatically add it to activationNeeds so it runs before activation
  • buildCustomJobs: Skip auto-adding needs: activation to jobs whose outputs are referenced in the markdown body — they should run independently before activation
  • buildMainJob: Also search data.CustomSteps (frontmatter steps: section) when computing direct dependencies for the agent job, not just the markdown body
  • generateKnownNeedsExpressions: Don't emit the generic output env var for jobs that declare explicit outputs not including output (was causing actionlint to flag undefined properties on known output types)
  • jobDependsOnActivation(): New helper to detect custom jobs that explicitly depend on activation
  • getCustomJobsDependingOnPreActivation(): Now excludes jobs that also depend on activation, preventing them from being incorrectly added to activation's needs: (which would create a cycle)
  • generatePrompt() / generatePromptInActivationJob(): Accept a beforeActivationJobs []string parameter and filter expression mappings so that outputs from post-activation jobs are not embedded in activation's step env vars — preventing actionlint errors when a custom job explicitly gates on activation completing
  • filterExpressionsForActivation(): New helper that removes expression mappings referencing custom jobs that run after activation from the activation job's prompt generation steps

Before the fix, precompute auto-received needs: activation, so activation's prompt ran before precompute and substituted empty values. After:

# bot-detection.lock.yml — before
activation:
  # no needs: precompute
precompute:
  needs: activation   # auto-added, wrong direction

# after
activation:
  needs: precompute   # correct: precompute runs first
precompute:
  # no needs: runs independently

Source fix (release.md)

config and release jobs now depend on both pre_activation and activation, establishing the correct ordering: pre_activation → activation → config → release → agent. This ensures the activation gate (permission check) must pass before these jobs run, while the compiler correctly avoids adding them to activation's own needs: (which would create a cycle).

# release.md — before
config:
  needs: [activation]
release:
  needs: [activation, config]

# after
config:
  needs: [pre_activation, activation]
release:
  needs: [pre_activation, activation, config]

Tests

New tests covering all new and updated compiler functions:

  • TestJobDependsOnActivation — 8 cases covering string, array, and invalid needs inputs for the new helper
  • TestGetCustomJobsDependingOnPreActivationExcludesActivationDependents — 4 cases verifying jobs with both pre_activation and activation in needs are excluded from the pre-activation set (preventing circular dependencies)
  • TestBuildCustomJobsDoesNotAutoAddActivationToOutputReferencedJobs — verifies the compiler skips auto-adding needs: activation when a job's outputs are referenced in the markdown body
  • TestFilterExpressionsForActivation — 8 unit cases covering nil customJobs, empty mappings, keep/filter by beforeActivationJobs, non-custom-job needs.* expressions, non-needs.* expressions, and malformed expressions
  • TestFilterExpressionsForActivationEndToEnd — integration test compiling a full workflow with precompute (before activation) and config (after activation), asserting activation depends on precompute but not config, and the substitution step only references precompute's outputs
Original prompt

This section details on the original issue you should resolve

<issue_title>[plan] Fix missing needs: declarations in 4 workflow files (22 actionlint expression errors)</issue_title>
<issue_description>## Objective

Fix 22 actionlint [expression] errors in 4 workflow markdown files by adding missing needs: job dependencies where needs.precompute.outputs.* or needs.check_ci_status.outputs.* are referenced.

Context

From Static Analysis Report discussion github/gh-aw#17668 (2026-02-22 scan):

  • 22 expression errors across 4 workflows
  • Jobs reference needs.precompute.outputs.* or needs.check_ci_status.outputs.* in their env: blocks without declaring those upstream jobs in their needs: field
  • This causes actionlint type errors because the outputs object type is {} (empty) from actionlint's perspective

Affected Files

  • .github/workflows/bot-detection.md — 12 errors (3 jobs reference needs.precompute.outputs.action, issue_body, issue_number, issue_title)
  • .github/workflows/hourly-ci-cleaner.md — 6 errors (needs.precompute.outputs.* + needs.check_ci_status.outputs.*)
  • .github/workflows/release.md — 3 errors (needs.precompute.outputs.* in 1 job)
  • .github/workflows/issue-monster.md — 1 error (needs.precompute.outputs.*)

Required Fix

For each affected job that uses needs.precompute.outputs.*, add precompute to that job's needs: list. Similarly add check_ci_status where referenced.

Example:

Before:

agent:
  # no needs: declared
  env:
    GH_AW_NEEDS_PRECOMPUTE_OUTPUTS_ACTION: ${{ needs.precompute.outputs.action }}

After:

agent:
  needs: [precompute]
  env:
    GH_AW_NEEDS_PRECOMPUTE_OUTPUTS_ACTION: ${{ needs.precompute.outputs.action }}

Steps

  1. Open each affected .md file and inspect the jobs section in the YAML frontmatter
  2. For each job referencing needs.precompute.outputs.*, add precompute to needs: if not already present
  3. For each job referencing needs.check_ci_status.outputs.*, add check_ci_status to needs: if not already present
  4. Run make build && ./gh-aw compile .github/workflows/bot-detection.md (and the other 3 files) to recompile
  5. Verify the actionlint expression errors are gone: make recompile && actionlint .github/workflows/bot-detection.lock.yml (and others)

Acceptance Criteria

  • All 22 expression errors resolved in the 4 affected workflows
  • All 4 workflows still compile successfully (make recompile)
  • make agent-finish passes with no new errors

Generated by Plan Command for issue #discussion #17668

  • expires on Feb 24, 2026, 7:00 AM UTC

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits February 22, 2026 11:59
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Fix compiler to add custom jobs (whose outputs are referenced in the
  markdown body) to activation's needs, preventing actionlint from
  complaining about undefined job outputs in expression contexts
- Fix buildCustomJobs to not auto-add activation dependency to jobs
  whose outputs are referenced in the markdown body (they run before
  activation now)
- Fix buildMainJob to also search frontmatter custom steps when finding
  referenced custom jobs for agent's needs
- Fix generateKnownNeedsExpressions to skip the generic 'output' env var
  for jobs that declare explicit outputs not including 'output'
- Fix release.md: change config and release jobs to depend on
  pre_activation instead of activation, enabling the correct ordering
  (pre_activation -> config -> release -> activation -> agent)

Fixes expression errors in:
- .github/workflows/bot-detection.lock.yml (12 errors)
- .github/workflows/hourly-ci-cleaner.lock.yml (6 errors)
- .github/workflows/release.lock.yml (3 errors)
- .github/workflows/issue-monster.lock.yml (1 error)

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix missing needs declarations in workflow files Fix missing needs: declarations causing 22 actionlint expression errors in 4 workflows Feb 22, 2026
jobs:
config:
needs: ["activation"]
needs: ["pre_activation"]
Copy link
Contributor

Choose a reason for hiding this comment

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

@copilot add activation as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in 67ab7dc. Both config and release now have needs: [pre_activation, activation] and needs: [pre_activation, activation, config] respectively. The compiler was also updated to prevent a circular dependency (getCustomJobsDependingOnPreActivation now skips jobs that also depend on activation) and to filter post-activation job expressions from the activation prompt steps.

console.log(`✓ Release tag: ${releaseTag}`);
release:
needs: ["activation", "config"]
needs: ["pre_activation", "config"]
Copy link
Contributor

Choose a reason for hiding this comment

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

@copilot add activation as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in 67ab7dcrelease now has needs: [pre_activation, activation, config].

@pelikhan pelikhan marked this pull request as ready for review February 22, 2026 12:36
Copilot AI review requested due to automatic review settings February 22, 2026 12:36
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes 22 actionlint expression errors across 4 workflow files by correcting job dependency declarations and enhancing the compiler to automatically detect and establish proper job ordering when custom job outputs are referenced in activation prompts.

Changes:

  • Enhanced compiler logic to automatically add custom jobs to activation's needs: when their outputs are referenced in the markdown body, preventing empty substitutions and actionlint errors
  • Updated compiler to skip auto-adding needs: activation to jobs whose outputs are used in activation prompts, as these must run before activation
  • Fixed circular dependency in release.md by changing config and release jobs from depending on activation to pre_activation

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/workflow/known_needs_expressions.go Added logic to skip generating generic "output" env var for jobs with explicit outputs that don't include "output", preventing actionlint type errors
pkg/workflow/compiler_jobs.go Added getCustomJobsReferencedInPromptWithNoActivationDep() to identify jobs that need to run before activation, and updated buildCustomJobs() to skip auto-adding activation dependency for these jobs
pkg/workflow/compiler_activation_jobs.go Enhanced buildActivationJob() to automatically add prompt-referenced jobs to activation dependencies, and updated buildMainJob() to include CustomSteps when analyzing job references
.github/workflows/smoke-gemini.lock.yml Incidental fix: corrected experimental flag from true to false for Gemini engine (recompilation side effect)
.github/workflows/release.md Fixed circular dependency by changing config and release jobs to depend on pre_activation instead of activation
.github/workflows/release.lock.yml Recompiled with correct job ordering: pre_activation → config → release → activation → agent
.github/workflows/issue-monster.lock.yml Removed generic "output" env var for search_issues job which declares specific outputs without "output"
.github/workflows/hourly-ci-cleaner.lock.yml Fixed activation to depend on check_ci_status (referenced in prompt), removed check_ci_status's incorrect dependency on activation
.github/workflows/bot-detection.lock.yml Fixed activation to depend on precompute (referenced in prompt), removed precompute's incorrect dependency on activation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

agent_version: "",
workflow_name: "Smoke Gemini",
experimental: true,
experimental: false,
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

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

The change from experimental: true to experimental: false for the Gemini engine appears to be unrelated to the PR's stated objective of fixing missing needs: declarations. While this is technically correct (the Gemini engine is defined as non-experimental in pkg/workflow/gemini_engine.go line 23), it should ideally be mentioned in the PR description or separated into its own commit for clarity.

This change likely occurred because the file was recompiled as part of fixing the other workflows, and the previous lock file had an incorrect value. Consider adding a note about this incidental fix in the PR description.

Copilot uses AI. Check for mistakes.
…mpiler filter for post-activation job expressions

Per reviewer feedback, add `activation` (alongside `pre_activation`) to the `needs:` of
both `config` and `release` jobs so they correctly gate on activation completing.

This required two compiler improvements to avoid a circular dependency:
- `jobDependsOnActivation()` helper function
- `getCustomJobsDependingOnPreActivation()` now excludes jobs that also depend on
  activation, preventing them from being incorrectly added to activation's needs
- `generatePrompt()` / `generatePromptInActivationJob()` accept `beforeActivationJobs`
  and filter expression mappings so activation's prompt steps don't reference outputs
  from post-activation jobs (which haven't run yet), preventing actionlint errors
- Update two test call-sites for the new parameter

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 22, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw -ifaceassert -nilfunc git rev-�� --show-toplevel -tests /usr/bin/git .egg (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw -ifaceassert -nilfunc git rev-�� --show-toplevel -tests /usr/bin/git (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha --noprofile .cfg 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha *.json&#39; &#39;!../../../pkg/workflow/js/**/*.json&#39; --ignore-path ../../../.prettierignore -f de/node/bin/git -f owner=github DiscussionsEnabl--show-toplevel git -C 08484230:pkg/workflow/compiler_activation_jobs.go config de/node/bin/bash remote.origin.urgit (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/11bd71901bbe5b1630ceea73d27597364c9af683
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/11bd71901bbe5b1630ceea73d27597364c9af683 --jq .object.sha --show-toplevel (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha get --local x_amd64/vet user.email (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha etup-go/git/ref/tags/v6 ache/go/1.25.0/x64/pkg/tool/linu--jq (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha --noprofile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha -unreachable=false /tmp/go-build3941925412/b018/vet.cfg 1925412/b297/vet.cfg (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha kflow/xml_comments_test.go /opt/hostedtoolcache/go/1.25.0/xgithub.com/github/gh-aw/pkg/workflow_test 0/x64/bin/npx l -buildtags /usr/bin/git git -C k/gh-aw/gh-aw/.github/workflows rev-parse de/node/bin/git l -tests $name) { has--show-toplevel /usr/bin/gh (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha cli/install.sh..-errorsas (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha -t security ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet OUTPUT -d 168.63.129.16 ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha -unreachable=false /tmp/go-build3941925412/b078/vet.cfg /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --show-toplevel (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v7
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v7 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v7 --jq .object.sha --noprofile -tests 0/x64/bin/npm (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v7 --jq .object.sha --noprofile -tests /usr/bin/git (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha --noprofile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha _test.go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha -unreachable=false /tmp/go-build3941925412/b020/vet.cfg 1925412/b286/vet.cfg (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/4dc6199c7b1a012772edbd06daecab0f50c9053c
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/4dc6199c7b1a012772edbd06daecab0f50c9053c --jq .object.sha --show-toplevel git /usr/bin/git get --local x_amd64/vet git rev-�� --show-toplevel x_amd64/vet r: $owner, name: $name) { hasDiscussionsEnabled } } --local user.name x_amd64/vet git (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha --noprofile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha kflow/xml_comments_test.go /opt/hostedtoolcache/go/1.25.0/x-w de_modules/.bin/node -bool -buildtags /usr/bin/git git 0/x6�� k/gh-aw/gh-aw/.github/workflows rev-parse /usr/bin/docker son -tests /usr/bin/git docker (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v5 --jq .object.sha gh-aw/actions/setup/sh/sanitize_path.sh&#39; &#39;:::&#39; &amp;&amp; echo &#34;$PATH&#34; x_amd64/link $name) { hasDiscussionsEnabled } } : ithub/workflows/build cal/bin/bash git rev-�� --show-toplevel (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v5 --jq .object.sha --show-toplevel (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha -c=4 -nolocalimports -importcfg /tmp/go-build1467287806/b062/importcfg -pack /home/REDACTED/work/gh-aw/gh-aw/pkg/cli/access_log.go /home/REDACTED/work/gh-aw/gh-aw/pkg/cli/actionlint.go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha -bool -buildtags /usr/bin/git -errorsas -ifaceassert -nilfunc git rev-�� --show-toplevel -tests /usr/bin/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha --noprofile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha kflow/xml_comments_test.go /opt/hostedtoolcache/go/1.25.0/xmain tions/setup/node_modules/.bin/no-lang=go1.25 -bool -buildtags /usr/bin/git git 0/x6�� /home/REDACTED/work/gh-aw/gh-aw/.ggo1.25.0 rev-parse (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha -bool -buildtags /usr/bin/git -errorsas -ifaceassert -nilfunc git rev-�� --show-toplevel -tests /usr/bin/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha --noprofile -tests /usr/bin/git (http block)
  • https://api.github.com/repos/anchore/sbom-action/git/ref/tags/v0
    • Triggering command: /usr/bin/gh gh api /repos/anchore/sbom-action/git/ref/tags/v0 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/anchore/sbom-action/git/ref/tags/v0 --jq .object.sha --show-toplevel ch /usr/bin/git ithub/workflows --local x_amd64/vet git rev-�� --show-toplevel x_amd64/vet /usr/bin/git --local rsion=6f1e8d5-di-C x_amd64/vet git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/anchore/sbom-action/git/ref/tags/v0 --jq .object.sha --show-toplevel git /usr/bin/git get --local x_amd64/vet git rev-�� --show-toplevel x_amd64/vet /usr/bin/git 6899012/b001/exegh user.name x_amd64/vet git (http block)
  • https://api.github.com/repos/docker/build-push-action/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v6 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v6 --jq .object.sha --show-toplevel git /usr/bin/git get --local x_amd64/vet git rev-�� --show-toplevel x_amd64/vet r: $owner, name: $name) { hasDiscussionsEnabled } } --local user.email x_amd64/vet git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v6 --jq .object.sha --show-toplevel ortcfg /usr/bin/git t/ref/tags/v5 g/cli/actionlint-1 x_amd64/vet git rev-�� --show-toplevel x_amd64/vet r: $owner, name: $name) { hasDiscussionsEnabled } } o actions/setup-git user.name x_amd64/vet git (http block)
  • https://api.github.com/repos/docker/login-action/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/docker/login-action/git/ref/tags/v3 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/login-action/git/ref/tags/v3 --jq .object.sha ch git /usr/bin/git tags/v6 --local x_amd64/vet git rev-�� --show-toplevel x_amd64/vet r: $owner, name: $name) { hasDiscussionsEnabled } } e=false user.email x_amd64/vet git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/login-action/git/ref/tags/v3 --jq .object.sha --show-toplevel git /usr/bin/git n/git/ref/tags/vgit --local x_amd64/vet git rev-�� --show-toplevel x_amd64/vet r: $owner, name: $name) { hasDiscussionsEnabled } } e=false user.email x_amd64/vet git (http block)
  • https://api.github.com/repos/docker/metadata-action/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v5 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v5 --jq .object.sha ACCEPT (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v5 --jq .object.sha --show-toplevel git /usr/bin/git /ref/tags/v7 --local x_amd64/vet git rev-�� --show-toplevel x_amd64/vet /usr/bin/git e=false user.email x_amd64/vet git (http block)
  • https://api.github.com/repos/docker/setup-buildx-action/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v3 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v3 --jq .object.sha -main/dist/index.js (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v3 --jq .object.sha ch 64/pkg/tool/linuowner=github /usr/bin/git .out g/workflow/actio-1 x_amd64/vet git rev-�� --show-toplevel x_amd64/vet /usr/bin/git g/workflow/activgit g/workflow/activ-C x_amd64/vet git (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb --jq .object.sha --show-toplevel /home/REDACTED/work/gh-aw/gh-aw/pkg/workflow/action_sha_validation_test.go /usr/bin/git /home/REDACTED/worgit /home/REDACTED/worrev-parse /home/REDACTED/wor--show-toplevel git rev-�� --show-toplevel /home/REDACTED/work/gh-aw/gh-aw/pkg/workflow/agentic_engine_test.go /usr/bin/git )$/\1/p flow-needs-declaapi tat git (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha -importcfg 64/pkg/tool/linux_amd64/vet /sh /repos/docker/megit --jq ache/go/1.25.0/x--name-only git rev-�� js/**/*.json&#39; --ignore-path ../../../.prettierignore ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha --show-toplevel (http block)
  • https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha HEAD 64/pkg/tool/linux_amd64/vet /usr/bin/git --show-toplevel (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@pelikhan
Copy link
Contributor

@copilot add tests

…ctivation, and updated getCustomJobsDependingOnPreActivation

Add 21 new test cases across two test files:

compiler_jobs_test.go:
- TestJobDependsOnActivation — 8 cases covering string, array and invalid input
- TestGetCustomJobsDependingOnPreActivationExcludesActivationDependents — 4 cases
  verifying jobs that also depend on activation are not returned as pre-activation jobs
- TestBuildCustomJobsDoesNotAutoAddActivationToOutputReferencedJobs — verifies the
  compiler does not auto-add needs:activation to jobs whose outputs appear in the markdown

known_needs_expressions_test.go:
- TestFilterExpressionsForActivation — 8 unit cases covering nil customJobs, empty
  mappings, keep/filter by beforeActivationJobs, non-custom-job needs expressions,
  non-needs expressions, and malformed expressions
- TestFilterExpressionsForActivationEndToEnd — integration test compiling a full
  workflow with precompute (before activation) and config (after activation) jobs,
  asserting that activation depends on precompute, not config, and that the
  substitution step only references precompute's outputs

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 22, 2026

@copilot add tests

Added in 32c1977. 21 new test cases across two files:

  • TestJobDependsOnActivation (8 cases) — covers string, array, and invalid needs inputs for the new helper
  • TestGetCustomJobsDependingOnPreActivationExcludesActivationDependents (4 cases) — verifies jobs with both pre_activation and activation in needs are correctly excluded from the pre-activation set (preventing circular dependencies)
  • TestBuildCustomJobsDoesNotAutoAddActivationToOutputReferencedJobs — verifies the compiler skips auto-adding needs: activation when a job's outputs are referenced in the markdown body
  • TestFilterExpressionsForActivation (8 unit cases) — covers nil customJobs, empty mappings, keep/filter by beforeActivationJobs, non-custom-job needs.* expressions, non-needs.* expressions, and malformed expressions
  • TestFilterExpressionsForActivationEndToEnd — integration test compiling a full workflow with precompute (before activation) and config (after activation), asserting activation depends on precompute but not config, and the substitution step only references precompute's outputs

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha --local .cfg 64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha get --local 64/pkg/tool/linux_amd64/vet http.https://gitgit (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha /tmp/go-build1211404840/b342/_pkg_.a -trimpath 1404840/b270/vet.cfg -p github.com/stretrev-parse -lang=go1.17 /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -uns�� -unreachable=false /tmp/go-build1211404840/b162/vet.cfg /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -c=4 -nolocalimports -importcfg /opt/hostedtoolcache/go/1.25.0/x/tmp/gh-aw/aw-master.patch (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --noprofile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha -unreachable=false /tmp/go-build1211404840/b102/vet.cfg /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha get --local 64/pkg/tool/linux_amd64/vet http.https://gitgit (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha -unreachable=false /tmp/go-build1211404840/b027/vet.cfg 1404840/b277/vet.cfg (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha get --local 64/pkg/tool/linux_amd64/vet http.https://gitgit (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha get --local 64/pkg/tool/linux_amd64/vet http.https://gitgit (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha (http block)
  • https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@pelikhan pelikhan merged commit 81342e5 into main Feb 22, 2026
116 checks passed
@pelikhan pelikhan deleted the copilot/fix-workflow-needs-declarations branch February 22, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[plan] Fix missing needs: declarations in 4 workflow files (22 actionlint expression errors)

3 participants