Skip to content

fix: ReferenceError: core is not defined in staged mode activation step - #21642

Closed
mnkiefer with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-failed-activation-step
Closed

mnkiefer with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-failed-activation-step

Conversation

Copilot AI commented Mar 18, 2026 •

Copy link
Copy Markdown
Contributor

When safe-outputs: staged: true is set, the activation step crashes with ReferenceError: core is not defined because generate_aw_info.cjs calls logStagedPreviewInfo() from staged_preview.cjs, which resolves core from the global scope. On lock files compiled before setupGlobals was introduced, global.core is never set.

Changes

  • generate_aw_info.cjs: Remove the logStagedPreviewInfo import and call core.info directly using the core parameter already passed to main() — eliminating the global.core dependency entirely
  • generate_aw_info.test.cjs: Add tests covering staged=true and staged=false logging paths via the explicit core parameter
// Before — breaks when global.core is unset
if (awInfo.staged) {
  logStagedPreviewInfo("Generating workflow info in staged mode — no changes applied");
}

// After — uses core parameter directly, works in all contexts
if (awInfo.staged) {
  core.info("🎭 Staged Mode Preview — Generating workflow info in staged mode — no changes applied");
}

The other callers of logStagedPreviewInfo (safe-output handlers) are unaffected — they run exclusively inside github-script steps where global.core is always set via setupGlobals.

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 go x_amd64/vet git rev-�� --show-toplevel x_amd64/vet /usr/bin/git c69a6a4d:.githubgit go 64/pkg/tool/linu--show-toplevel git (http block)
  • https://api.github.com/orgs/test-owner/actions/secrets
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name b-mcp-structural-analysis.lock.yml GO111MODULE cal/bin/git GOINSECURE GOMOD GOMODCACHE 5tkwHBuqTVt0 show�� an.lock.yml GOPROXY ache/go/1.25.0/x64/bin/git GOSUMDB GOWORK 64/bin/go 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 /tmp/gh-aw-test-runs/20260318-194502-28845/test-1122596693 status /usr/bin/git .github/workflowgit go 64/bin/git git rev-�� --show-toplevel git /usr/bin/git /workflows/grumpgit 3807227/b409/imprev-parse de/node/bin/git git (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 3752636/b437/_pkg_.a go (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 c69a6a4d:.github/workflows/hourly-ci-cleaner.lock.yml go ache/node/24.14.0/x64/bin/git lock.yml GO111MODULE 64/bin/go git show�� 27/001/test-complex-frontmatter-with-tools.md go 64/pkg/tool/linux_amd64/compile mary.lock.yml GO111MODULE 64/bin/go 64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel git /usr/bin/git /workflows/jsweegit go rgo/bin/git git rev-�� --show-toplevel git /usr/bin/git y-test.md go p/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel git /usr/bin/git 40cdb89ae739e37fgit go cal/bin/git git rev-�� --show-toplevel git /usr/bin/git ithub/workflows go 64/pkg/tool/linu--show-toplevel git (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 user.name Test User 3752636/b449/workflow.test -triage-agent.logit erignore bin/git 3752636/b449/workflow.test e=/t�� t0 git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha add origin /usr/lib/git-core/git p.lock.yml go p/bin/git /usr/lib/git-core/git main�� run --auto /usr/bin/git --detach go x86_64/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git 40cdb89ae739e37fgit .cfg /home/REDACTED/.lo--show-toplevel git rev-�� --show-toplevel git /usr/bin/git 4502-28845/test-git go t 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 ional-pragmatist.lock.yml GO111MODULE bin/git GOINSECURE GOMOD GOMODCACHE git show�� an.lock.yml GOPROXY ache/node/24.14.0/x64/bin/git GOSUMDB GOWORK 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha n.lock.yml GOPROXY 64/bin/git GOSUMDB GOWORK 64/bin/go git show�� -arborist.lock.yml go de/node/bin/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha go1.25.0 -c=4 -nolocalimports -importcfg /tmp/go-build1583752636/b411/importcfg -pack /tmp/go-build1583752636/b411/_testmain.go show�� -monster.lock.yml go p/bin/git ck 'scripts/**/*/opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/link GO111MODULE 64/bin/go 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 --get remote.origin.url /usr/bin/git p.lock.yml erignore /home/REDACTED/.lo--show-toplevel git init�� 64/bin/go git /usr/bin/git /workflows/functgit go t git (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 remote.origin.url /usr/bin/git p.lock.yml erignore ache/node/24.14.--show-toplevel git chec�� -b test-branch /usr/bin/git /workflows/functgit go /home/REDACTED/.lo--show-toplevel git (http block)
  • https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha itattributes-test446868670/.github/workflows stmain.go ache/go/1.25.0/x64/pkg/tool/linux_amd64/link l GO111MODULE x86_64/git ache/go/1.25.0/x64/pkg/tool/linux_amd64/link show�� 3752636/b425/parser.test go 3752636/b425/importcfg.link ock.yml GO111MODULE /opt/hostedtoolc--show-toplevel uFYU6I8gUmIBK/VAcWHyeEbbGeJNRVwWBK/Y7sFaDhY_zYD42 (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq .object.sha c6a885209726a3ab40cdb89ae739e37fc69a6a4d:.github/workflows/go-logger.lock.yml go /opt/pipx_bin/git -analysis.lock.ygit GO111MODULE p/bin/git git show�� runs/20260318-194502-28845/test-1311811482/custom/workflows go 3752636/b420/vet.cfg l GO111MODULE x86_64/git git (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq .object.sha c6a885209726a3ab40cdb89ae739e37fc69a6a4d:.github/workflows/go-logo1.25.0 go /snap/bin/git -analysis.lock.ygit GO111MODULE rgo/bin/git git show�� c6a885209726a3ab40cdb89ae739e37fc69a6a4d:.github/workflows/issue-monster.lock.yml go /opt/pipx_bin/git ht.lock.yml GO111MODULE p/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/1/artifacts
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 go ache/go/1.25.0/x64/bin/git .yml GO111MODULE 64/bin/go git show�� ub/workflows go x_amd64/link .yml GO111MODULE 64/bin/go x_amd64/link (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12345/artifacts
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 go it .yml GO111MODULE 64/bin/go git show�� c69a6a4d:.github/workflows/go-faremote.origin.url go 64/bin/git eport.lock.yml GO111MODULE 64/bin/go git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 go x86_64/git agram.lock.yml GO111MODULE 64/bin/go git show�� c69a6a4d:.github/workflows/go-fan.lock.yml go /home/REDACTED/.config/composer/vendor/bin/git eport.lock.yml GO111MODULE 64/bin/go git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/2/artifacts
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 go x_amd64/compile .yml GO111MODULE 64/bin/go x_amd64/compile show�� c69a6a4d:.github/workflows/go-fan.lock.yml go /home/REDACTED/.local/bin/git .yml GO111MODULE 64/bin/go git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/3/artifacts
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 go ndor/bin/git .yml GO111MODULE 64/bin/go git show�� c69a6a4d:.github/workflows/go-faremote.origin.url go cal/bin/git .yml GO111MODULE 64/bin/go git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/4/artifacts
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 go x_amd64/compile .yml GO111MODULE 64/bin/go x_amd64/compile show�� c69a6a4d:.github/workflows/go-fan.lock.yml go rgo/bin/git .yml GO111MODULE 64/bin/go git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/5/artifacts
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 go /home/REDACTED/.local/bin/git .yml GO111MODULE 64/bin/go git show�� c69a6a4d:.github/workflows/go-fan.lock.yml go t .yml GO111MODULE 64/bin/go git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path b-mcp-tools-report.lock.yml GO111MODULE t GOINSECURE GOMOD GOMODCACHE git show�� y-reviewer.lock.yml GOPROXY nfig/composer/vendor/bin/git GOSUMDB GOWORK 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 100 GOWORK 64/bin/go git show�� t-spec-maintainer.lock.yml ache/go/1.25.0/xGO111MODULE cal/bin/git (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 6 -trimpath 64/bin/go x_amd64/link show�� e-analyzer.md go x86_64/git y.lock.yml GO111MODULE 64/bin/go sb/WrsaZCqRpvSTiHMe1VZH/CV7k7xB_8PrFuEMPUBX- (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 c69a6a4d:.github/workflows/githu-p go it ml GO111MODULE 64/bin/go git show�� c69a6a4d:.github/workflows/grump-c=4 go 64/bin/git yml GO111MODULE 64/bin/go git (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq .object.sha y-ci-cleaner.lock.yml ortcfg ache/go/1.25.0/x64/bin/git r.lock.yml GO111MODULE 64/bin/go git show�� nspector.lock.ym-p ache/go/1.25.0/xmain ndor/bin/git l GO111MODULE 64/bin/go git (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v2.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha uctions-janitor.lock.yml ortcfg /home/REDACTED/.local/bin/git r.lock.yml GO111MODULE 64/bin/go git show�� nspector.lock.yml go t l GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha uctions-janitor.lock.yml go /home/REDACTED/.config/composer/vendor/bin/git r.lock.yml GO111MODULE 64/bin/go git show�� nspector.lock.yml go 0/x64/bin/git l GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha uctions-janitor.lock.yml go ache/go/1.25.0/x64/bin/git (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v3.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq .object.sha uctions-janitor.lock.yml go t r.lock.yml GO111MODULE 64/bin/go git show�� nspector.lock.ym-errorsas go nfig/composer/ve-nilfunc l GO111MODULE 64/bin/go git (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 c69a6a4d:.github/workflows/githu-p go 64/bin/git ml GO111MODULE 64/bin/go git show�� 2905384840/.github/workflows go de/node/bin/git yml GO111MODULE 64/bin/go git (http block)
  • https://api.github.com/repos/nonexistent/repo/actions/runs/12345
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion k.yml GO111MODULE 64/bin/go git estl�� c69a6a4d:.github/workflows/go-pattern-detector.lock.yml go /home/REDACTED/.config/composer/vendor/bin/git l GO111MODULE 64/bin/go git (http block)
  • https://api.github.com/repos/owner/repo/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo /home/REDACTED/.config/composer/vendor/bin/git (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo cal/bin/git (http block)
  • https://api.github.com/repos/owner/repo/contents/file.md
    • Triggering command: /tmp/go-build1583752636/b399/cli.test /tmp/go-build1583752636/b399/cli.test -test.testlogfile=/tmp/go-build1583752636/b399/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true GOINSECURE GOMOD GOMODCACHE git show�� gger.lock.yml GOPROXY 0/x64/bin/git GOSUMDB GOWORK 64/bin/go git (http block)
  • https://api.github.com/repos/test-owner/test-repo/actions/secrets
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name b-mcp-structural-analysis.lock.yml GO111MODULE p/bin/git GOINSECURE GOMOD GOMODCACHE git show�� an.lock.yml GOPROXY x86_64/git GOSUMDB GOWORK 64/bin/go git (http block)

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


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI linked an issue Mar 18, 2026 that may be closed by this pull request
Copilot AI and others added 2 commits March 18, 2026 19:41
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
…ation step

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failed activation step in staged mode fix: ReferenceError: core is not defined in staged mode activation step Mar 18, 2026
Copilot AI requested a review from mnkiefer March 18, 2026 19:50
@pelikhan pelikhan closed this Mar 18, 2026
@github-actions
github-actions Bot deleted the copilot/fix-failed-activation-step branch April 2, 2026 13:05
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.

Failed activation step in staged mode

3 participants