Skip to content

Support .lock.yaml files as compiled workflow output#22030

Closed
Copilot wants to merge 4 commits intomainfrom
copilot/support-lock-yaml-files
Closed

Support .lock.yaml files as compiled workflow output#22030
Copilot wants to merge 4 commits intomainfrom
copilot/support-lock-yaml-files

Conversation

Copy link
Contributor

Copilot AI commented Mar 20, 2026

If a workflow has been renamed from workflow.lock.yml to workflow.lock.yaml, gh aw compile was ignoring the existing .lock.yaml and generating a new .lock.yml alongside it instead of updating it.

Changes

  • stringutil/identifiers: New MarkdownToLockFileOnDisk() checks the filesystem and returns the .lock.yaml path if it already exists (falls back to .lock.yml). New StripLockExtension() strips either suffix. Updated NormalizeWorkflowName, LockFileToMarkdown, and MarkdownToLockFile to treat .lock.yaml as a recognized lock extension.

  • Compile path (compiler.go, compiler_string_api.go, stop_after.go, compiler_jobs.go, compile_validation.go): Switched from MarkdownToLockFile to MarkdownToLockFileOnDisk so recompilation writes to whichever lock extension already exists on disk.

  • run_workflow_validation.go: getLockFilePath now uses MarkdownToLockFileOnDisk so gh aw run resolves the correct lock file.

  • dispatch_workflow_validation.go: findWorkflowFile checks for .lock.yaml with priority over .lock.yml; findWorkflowFileResult gains a lockExtension field (.lock.yaml or .lock.yml) populated at discovery time.

  • safe_outputs_call_workflow.go, safe_outputs_dispatch.go, safe_outputs_tools_filtering.go: Use fileResult.lockExtension instead of the hardcoded ".lock.yml" string when building workflow paths/extensions stored in WorkflowFiles.

  • lock_validation.go, resolve.go, error messages: Use StripLockExtension and check for .lock.yaml before falling back to .lock.yml for error message reconstruction and workflow name resolution.

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 GO111MODULE ache/go/1.25.0/x--show-toplevel git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE ache/go/1.25.0/x--show-toplevel git (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 git /usr/bin/bash infocmp -1 xterm-color bash /usr/bin/git 64/bin/go git /usr/bin/git git (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 git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/git 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 6766320/b413/_pkGOINSECURE GO111MODULE 64/bin/go GOINSECURE b/gh-aw/pkg/loggenv GOMODCACHE go env sdFl/I7quLUnZ5FkGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE 6766320/b413/impGOPROXY (http block)
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git t0 .cfg (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 .github/workflows/test.md go /usr/bin/git -json GO111MODULE 64/bin/go git rev-�� --show-toplevel go /opt/hostedtoolcache/node/24.14.0/x64/bin/node -json GO111MODULE 64/bin/go /opt/hostedtoolcache/node/24.14.0/x64/bin/node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel 0/x64/bin/node /usr/bin/git git -C /tmp/gh-aw-test-runs/20260320-211111-33752/test-233586686 status /usr/bin/git .github/workflowgit git /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel git /usr/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 2161102/b439/styles.test GOPROXY 2161102/b439/importcfg.link GOSUMDB GOWORK 64/bin/go MljaSOmuUyrEN/vdyZeJyQFZjFQyf51sKN/wnlU6jEthdVA4kC1eb4J/v2SfVy0MljaSOmuUyrEN rev-�� ons-test3642873282 erignore clusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle -json 90 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha bility_SameInputSameOutput1415356328/001/stability-test.md git ache/node/24.14.0/x64/bin/node --show-toplevel go -d git t-17�� k/gh-aw/gh-aw/.github/workflows/artifacts-summary.md git /usr/bin/git --show-toplevel go x86_64/node git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha --show-current git /usr/bin/git --show-toplevel git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/git git (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 -json GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel go /usr/bin/git -json GO111MODULE x_amd64/link git rev-�� --show-toplevel x_amd64/link /usr/bin/git y-test.md GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel go /usr/bin/git 0905-28841/test-git GO111MODULE /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE 0/x64/bin/node 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 --get remote.origin.url /usr/bin/git che/go-build/a1/git **/*.cjs 64/bin/go git chec�� -b test-branch /usr/bin/git /tmp/go-build343git -trimpath 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --get remote.origin.url /usr/bin/git che/go-build/34/git **/*.cjs 64/bin/go git chec�� -b feature-branch /usr/bin/git /tmp/go-build343git -trimpath 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --show-toplevel x_amd64/vet /usr/bin/git -json GO111MODULE ache/go/1.25.0/x--show-toplevel git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE 64/pkg/tool/linu--show-toplevel 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 -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE sh (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE sh -c "prettier" --cheGOSUMDB GOPROXY 64/bin/go 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 IsiN/-5Z7JdU1nRtGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE 6766320/b375/impGOPROXY -c k/gh-aw/gh-aw/pkGOSUMDB GOPROXY 64/bin/go GOSUMDB GOWORK ache/go/1.25.0/x--show-toplevel /opt/hostedtoolcache/go/1.25.0/xGO111MODULE (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 ts.result remote.origin.url /usr/bin/git k/gh-aw/gh-aw/pkgit **/*.cjs 64/bin/go git conf�� user.email test@example.com /usr/bin/git /tmp/go-build343git -trimpath 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha /home/REDACTED/work/gh-aw/gh-aw/.github/workflows/agent-performance-analyzer.md (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha --show-toplevel /usr/bin/git /usr/bin/git -v git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel gh /usr/bin/git 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 k/gh-aw/gh-aw/pkgit k/gh-aw/gh-aw/pkrev-parse 64/bin/go git init�� ../../../.prettixterm-color /opt/hostedtoolcache/go/1.25.0/xGO111MODULE /usr/bin/git /tmp/go-build343git -trimpath 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha /home/REDACTED/work/gh-aw/gh-aw/.github/workflows/agent-performance-analyzer.md -tests /usr/bin/git --show-toplevel bash /usr/bin/git git -C /tmp/shared-actions-test65102225 rev-parse /usr/bin/git --show-toplevel /opt/hostedtoolcrev-parse /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --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 race GO111MODULE sions/sess_* GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/cgo GOINSECURE GOMOD GOMODCACHE /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linu5 (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha --show-toplevel git ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet --show-toplevel 64/pkg/tool/linurev-parse 9909/001/go/1.25--show-toplevel ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet rev-�� --show-toplevel git ache/node/24.14.0/x64/bin/node --show-toplevel go /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/cut --show-toplevel git /usr/bin/git cut (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 ithub/workflows/archie.md GO111MODULE 2161102/b270/vet.cfg GOINSECURE GOMOD GOMODCACHE bash --no�� --noprofile GOPROXY 0/x64/bin/node GOSUMDB GOWORK 64/bin/go 0/x64/bin/node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq .object.sha --show-toplevel node /usr/bin/git /home/REDACTED/worgit git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git -m Initial commit /usr/bin/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 2161102/b433/_pkg_.a GO111MODULE 2161102/b433=> GOINSECURE GOMOD GOMODCACHE bash --no�� ithub-script/git/ref/tags/v8 GOPROXY /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet GOSUMDB GOWORK 64/bin/go /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel 64/pkg/tool/linurev-parse /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel go /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq .object.sha --show-toplevel git /usr/bin/git ache/go/1.25.0/xgit git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git test.txt git /usr/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 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 test@example.com /usr/bin/git --show-toplevel go /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel go /usr/bin/git git (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 GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 git /usr/bin/git --git-dir go /usr/bin/git git rev-�� --show-toplevel git 64/pkg/tool/linux_amd64/vet --show-toplevel go /usr/bin/git 64/pkg/tool/linux_amd64/vet (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 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 git /usr/bin/git --show-toplevel /tmp/go-build146rev-parse /usr/bin/git git rev-�� --show-toplevel git 64/pkg/tool/linux_amd64/vet GOMODCACHE go /usr/bin/git 64/pkg/tool/linux_amd64/vet (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 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 Test User /usr/bin/git --show-toplevel go /usr/bin/git git rev-�� --show-toplevel git 64/pkg/tool/linux_amd64/vet --show-toplevel go /usr/bin/git 64/pkg/tool/linux_amd64/vet (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 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 git /usr/bin/git --show-toplevel go /opt/hostedtoolcache/node/24.14.--show-toplevel git rev-�� --show-toplevel /opt/hostedtoolcache/node/24.14.0/x64/bin/node ser.test inputs.version go /usr/bin/git ser.test (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 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 Initial commit /usr/bin/git --git-dir go /usr/bin/git git rev-�� archie.md git outil.test --show-toplevel go /usr/bin/git outil.test (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 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 --auto /usr/bin/git --detach I1_m0Vn/uTsMpJMIremote /usr/bin/git git rev-�� --show-toplevel git ceutil.test --show-toplevel go /usr/bin/git ceutil.test (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path 6766320/b430/_pkGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env pw-2/xm6QuBf2U9PGOSUMDB GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE 6766320/b430/imp-buildtags (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 node /opt�� prettier --check 64/bin/go --ignore-path .prettierignore 64/bin/go go (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 GOMOD GOMODCACHE go env plorer.md GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (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 -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env y_only_defaults_repo1114643163/001 GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha --show-toplevel 2161102/b429/importcfg /usr/bin/git k/gh-aw/gh-aw/pkgit k/gh-aw/gh-aw/pkrev-parse ipts.test git rev-�� --show-toplevel ipts.test /usr/bin/git s/^session\.gc_mgit (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel git 0/x64/bin/node git rev-�� --show-toplevel 0/x64/bin/node /usr/bin/git --show-toplevel resolved$ /usr/bin/git 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 npx prettier --cGOSUMDB GOPROXY 64/bin/go GOSUMDB GOWORK run-script/lib/n [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr--repo sh -c "prettier" --check 'scripts/**/*GOINSECURE sh 64/bin/go tierignore -tests 64/bin/go go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq .object.sha --show-toplevel bash /usr/bin/git --noprofile GOPROXY /opt/hostedtoolc-test.paniconexit0 git rev-�� ithub-script/git-test.short=true /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linu^remote\..*\.gh-resolved$ /usr/bin/git -bool l /opt/hostedtoolc/tmp/TestGuardPolicyMinIntegrityOnlyrepos_only_without_min-integrity3611360751/001 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 npx prettier --cGOSUMDB GOPROXY 64/bin/go GOSUMDB GOWORK 64/bin/go sh -c "prettier" --che-s node 64/bin/go tierignore --write 64/bin/go go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha prettier --check 64/bin/go **/*.ts **/*.json --ignore-path node /hom�� --check scripts/**/*.js 64/bin/go .prettierignore --write 64/bin/go go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha "prettier" --cheGOSUMDB GOPROXY 64/bin/go GOSUMDB GOWORK 64/bin/go /bin/sh -c GOPATH=$(go env GOPATH); \ if coGOINSECURE sh 64/bin/go -d -tests 64/bin/go go (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 prettier --check 64/bin/go **/*.ts **/*.json --ignore-path node /hom�� --check scripts/**/*.js 64/bin/go .prettierignore --write 64/bin/go go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq .object.sha --show-toplevel bash /usr/bin/git runs/20260320-21git stmain.go /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linu^remote\..*\.gh-resolved$ /usr/bin/git -bool -buildtags /opt/hostedtoolc/tmp/TestGuardPolicyMinIntegrityOnlyCompiledOutput301981195/001 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 -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha heckout/git/ref/-errorsas /opt/hostedtoolc-ifaceassert /usr/bin/git GOPATH l /usr/bin/find git rev-�� --show-toplevel find /usr/bin/git -ignore_readdir_git -lname /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel git ache/go/1.25.0/x--show-toplevel git rev-�� --show-toplevel ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet /usr/bin/git --show-toplevel git /usr/bin/git 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 GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion --get remote.origin.urrev-parse /usr/bin/gh 64/pkg/tool/linux_amd64/vet rev-�� 999 gh 0/x64/bin/node download 3 /usr/bin/git 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 64/bin/go GOINSECURE GOMOD GOMODCACHE go env oqfk/JFlcFl-UM0BGOSUMDB GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE 6766320/b420/importcfg (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE iptables (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo /usr/bin/git 2161102/b400/_pkgit GO111MODULE 2161102/b400=> git rev-�� --show-toplevel go /usr/bin/git uEfr/ixBcI3zqo3Qgit GO111MODULE /usr/bin/git git (http block)
  • https://api.github.com/repos/owner/repo/contents/file.md
    • Triggering command: /tmp/go-build1462161102/b400/cli.test /tmp/go-build1462161102/b400/cli.test -test.testlogfile=/tmp/go-build1462161102/b400/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE sh (http block)
    • Triggering command: /tmp/go-build1744397394/b001/cli.test /tmp/go-build1744397394/b001/cli.test -test.testlogfile=/tmp/go-build1744397394/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.run=^Test -test.short=true ache/go/1.25.0/x64/pkg/tool/linu^remote\..*\.gh-resolved$ /usr/bin/git -json GO111MODULE 2161102/b422/mat--show-toplevel git rev-�� --show-toplevel 2161102/b422/mathutil.test /usr/bin/git t0 GO111MODULE (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 6766320/b372/_pkGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env 9GeR/4RX8jTSLxSzGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE 6766320/b372/imp-buildtags (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name --show-toplevel eutil.test /usr/bin/git 2161102/b406/congit GO111MODULE 2161102/b406/imp--show-toplevel git rev-�� --show-toplevel z3NRabCwIzd8S/-xsTZoZHR5F6Ak6rUi-tests /usr/bin/git ry=1 GO111MODULE 2161102/b406/_pk--show-toplevel git (http block)

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


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI linked an issue Mar 20, 2026 that may be closed by this pull request
@github-actions
Copy link
Contributor

Hey @Copilot 👋 — great start on the .lock.yaml support for the compiler! The plan is well-structured and correctly covers all the affected modules. Here are a few things to keep in mind as implementation proceeds:

  • Tests are not yet writtenAdd/update tests for new behavior is on the checklist but will be required before this can merge. The right place is pkg/stringutil/identifiers_test.go (for the new MarkdownToLockFileOnDisk function, following the existing test patterns there) and pkg/workflow/compiled_lock_files_test.go for integration coverage.
  • compiler.go has hardcoded .lock.yml in invalidFile paths — three separate lines (~422, ~435, ~461) use strings.TrimSuffix(lockFile, ".lock.yml") when constructing the .invalid.yml path. These need to handle both extensions.
  • Run make agent-finish before marking ready for review.

If you'd like a hand, you can assign this prompt to your coding agent:

Implement the .lock.yaml support plan for the gh-aw compiler as described in PR #22030.

Key tasks:
1. In pkg/stringutil/identifiers.go:
   - Add MarkdownToLockFileOnDisk(mdPath string) string — filesystem-aware variant that checks whether a .lock.yaml sibling exists on disk and returns that path instead of defaulting to .lock.yml.
   - Update NormalizeWorkflowName to strip both .lock.yml and .lock.yaml extensions.
   - Update LockFileToMarkdown to handle both .lock.yml and .lock.yaml inputs.

2. In pkg/workflow/compiler.go:
   - Replace MarkdownToLockFile with MarkdownToLockFileOnDisk where the filesystem is available.
   - Fix the three invalidFile path constructions (lines ~422, ~435, ~461) — replace strings.TrimSuffix(lockFile, ".lock.yml") with a helper that strips either extension.

3. Apply the same MarkdownToLockFileOnDisk replacement in:
   - pkg/workflow/compiler_string_api.go
   - pkg/workflow/stop_after.go
   - pkg/workflow/compiler_jobs.go
   - pkg/cli/compile_validation.go
   - safe_outputs_call_workflow.go, safe_outputs_dispatch.go, safe_outputs_tools_filtering.go

4. In pkg/workflow/dispatch_workflow_validation.go and pkg/cli/run_workflow_validation.go:
   - Update findWorkflowFile / getLockFilePath to probe for .lock.yaml before falling back to .lock.yml.

5. In pkg/workflow/lock_validation.go:
   - Update any error messages that hardcode .lock.yml to use the actual extension.

6. Add tests in pkg/stringutil/identifiers_test.go covering:
   - MarkdownToLockFileOnDisk when no lock file exists (returns .lock.yml).
   - MarkdownToLockFileOnDisk when a .lock.yaml sibling exists (returns .lock.yaml).
   - NormalizeWorkflowName with .lock.yaml input.
   - LockFileToMarkdown with .lock.yaml input.

7. Run `make agent-finish` to validate build, tests, lint, and recompile.

Generated by Contribution Check ·

When a workflow.lock.yaml file already exists on disk, gh aw compile
will update that file instead of creating a new workflow.lock.yml.

Changes:
- Add MarkdownToLockFileOnDisk() - prefers existing .lock.yaml over .lock.yml
- Add StripLockExtension() - strips .lock.yml or .lock.yaml
- Update NormalizeWorkflowName/LockFileToMarkdown to handle .lock.yaml
- Update compiler, compile_validation, run_workflow_validation to use
  MarkdownToLockFileOnDisk
- Update findWorkflowFile to check for .lock.yaml (with lockExtension field)
- Update safe_outputs_*.go to use actual lock extension from fileResult
- Update lock_validation.go, resolve.go to handle .lock.yaml
- Add tests for new functionality

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/e2670aee-1a3e-43f3-91cf-66897c9db4d7
Copilot AI changed the title [WIP] Fix gh aw compile to update existing workflow.lock.yaml Support .lock.yaml files as compiled workflow output Mar 20, 2026
Copilot AI requested a review from pelikhan March 20, 2026 21:15
Copilot AI requested a review from pelikhan March 20, 2026 21:56
@pelikhan
Copy link
Contributor

@copilot move ".lock.yml" and ".lock.yaml" to constants in go and reuse in the codebase.

Add constants.LockExtensionYML (".lock.yml") and constants.LockExtensionYAML
(".lock.yaml") to pkg/constants/constants.go, then replace all inline
string literals in non-test Go source files with those constants.

Files updated:
- pkg/constants/constants.go: add LockExtensionYML and LockExtensionYAML
- pkg/stringutil/identifiers.go: import constants, use LockExtension*
- pkg/workflow/dispatch_workflow_validation.go: import constants, use LockExtension*
- pkg/workflow/safe_outputs_tools_filtering.go: import constants, use LockExtensionYML
- pkg/workflow/safe_outputs_call_workflow.go: import constants, use LockExtensionYML
- pkg/workflow/safe_outputs_dispatch.go: import constants, use LockExtensionYML
- pkg/workflow/resolve.go: use LockExtension* (constants already imported)
- pkg/workflow/call_workflow_validation.go: import constants, use LockExtension* in error message
- pkg/workflow/compiler_safe_output_jobs.go: import constants, use LockExtensionYML
- pkg/parser/import_bfs.go: import constants, use LockExtensionYML
- pkg/parser/yaml_import.go: import constants, use LockExtensionYML
- pkg/cli/run_workflow_validation.go: use LockExtensionYML (constants already imported)
- pkg/cli/trial_command.go: use LockExtensionYML (constants already imported)
- pkg/cli/add_interactive_orchestrator.go: use LockExtensionYML (constants already imported)
- pkg/cli/update_workflows.go: import constants, use LockExtensionYML
- pkg/cli/dependency_graph.go: import constants, use LockExtensionYML
- pkg/cli/add_interactive_workflow.go: use LockExtensionYML (constants already imported)
- pkg/cli/enable.go: use LockExtensionYML (constants already imported)
- pkg/cli/run_workflow_execution.go: use LockExtensionYML (constants already imported)

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

Copilot AI commented Mar 20, 2026

@copilot move ".lock.yml" and ".lock.yaml" to constants in go and reuse in the codebase.

Added LockExtensionYML = ".lock.yml" and LockExtensionYAML = ".lock.yaml" constants to pkg/constants/constants.go and replaced all hardcoded string literals across 18 non-test Go files to use them (1e316fa).

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 gh pr create --title feat: add LockExtensionYML/YAML constants and replace inline string literals --body ## Summary

Add LockExtensionYML (&#34;.lock.yml&#34;) and LockExtensionYAML (&#34;.lock.yaml&#34;) constants to pkg/constants/constants.go, then replace all inline string literals in non-test Go source files with those constants.

Changes

  • **pkg/constant x_amd64/vet pull.rebase (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 on .cfg git rev-�� --show-toplevel ache/go/1.25.0/x-buildtags /usr/bin/git 4f51ec20:pkg/cligit 8956200/b104/vetrev-parse ndor/bin/git 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 run format:pkg-json 3760401/b302/vet.cfg tierignore (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 5882929f91cd48c35515669d429bf6354f51ec20:pkg/cli-errorsas (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 js/**/*.json&#39; --ignore-path ../../../.prettierignore on n-dir/git /../../.prettier/opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet erignore 4f51ec20 ache/go/1.25.0/x-buildtags -c 4f51ec20:pkg/cli-errorsas (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha -bool -buildtags /usr/bin/git -errorsas -ifaceassert -nilfunc git rev-�� --show-toplevel -tests /usr/bin/git h ../../../.pretgit .cfg modules/@npmcli/initial.txt git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel sh /usr/bin/git alse (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 npx prettier --write &#39;**/*.cjs&#39; &#39;**/*.ts&#39; &#39;**/*.json&#39; --ignore-p-errorsas x_amd64/vet /home/REDACTED/.local/bin/sh ecution.go user.name x_amd64/vet sh -c &#34;prettier&#34; --write &#39;scripts/**/*.js&#39; --ignore-path .prettierignore --log-level=error x_amd64/vet 3760401/b267/vet.cfg tierignore (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha se 3760401/b280/vet.cfg /usr/bin/sh lidation.go pull.rebase x_amd64/vet sh -c &#34;prettier&#34; --write &#39;scripts/**/*.js&#39; --ignore-path .prettierignore --log-level=error x_amd64/vet /home/REDACTED/node_modules/.bin/node tierignore (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --show-toplevel node /usr/bin/git 4f51ec20:pkg/worgit scripts/**/*.js n-dir/git git rev-�� --show-toplevel node /usr/bin/git athSetup_GorootOgit ../../../**/*.jsrev-parse x_amd64/vet 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 se 3760401/b252/vet.cfg ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet ecution.go user.name run-script/lib/n--show-toplevel ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -c &#34;prettier&#34; --write &#39;scripts/**/*.js&#39; --ignore-path .prettierignore --log-level=e!../../../pkg/wogit x_amd64/vet /usr/local/bin/sh ers.go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha se 3760401/b279/vet.cfg /usr/local/sbin/sh lidation.go pull.rebase x_amd64/vet sh -c &#34;prettier&#34; --write &#39;scripts/**/*.js&#39; --ignore-path .prettierignore --log-level=error x_amd64/vet /home/REDACTED/work/gh-aw/gh-aw/node_modules/.bin/node tierignore (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha npx prettier --write &#39;**/*.cjs&#39; &#39;**/*.ts&#39; &#39;**/*.json&#39; --ignore-p-errorsas x_amd64/vet /home/REDACTED/.npm/_npx/b388654678d519d9/node_modules/.bin/node lidation.go pull.rebase x_amd64/vet node /hom�� --write scripts/**/*.js 3760401/b276/vet.cfg .prettierignore --log-level=errorev-parse de_modules/.bin/--show-toplevel node (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 se 3760401/b277/vet.cfg /usr/local/.ghcup/bin/sh ecution.go pull.rebase x_amd64/vet sh -c &#34;prettier&#34; --write &#39;scripts/**/*.js&#39; --ignore-path .prettierignore --log-level=error x_amd64/vet /home/REDACTED/work/gh-aw/gh-aw/actions/setup/node_modules/.bin/node tierignore (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 npx prettier --write &#39;**/*.cjs&#39; &#39;**/*.ts&#39; &#39;**/*.json&#39; --ignore-p-errorsas x_amd64/vet /home/REDACTED/.cargo/bin/sh ecution.go user.name x_amd64/vet sh -c &#34;prettier&#34; --write &#39;scripts/**/*.js&#39; --ignore-path .prettierignore --log-level=error x_amd64/vet 3760401/b245/vet.cfg tierignore (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 .js&#39; --ignore-path .prettierignore --log-level=error -tests ules/.bin/node (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 5515669d429bf6354f51ec20:pkg/workflow/safe_outputs_dispatch.go (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 5515669d429bf6354f51ec20:pkg/workflow/safe_outputs_dispatch.go (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 h ../../../.pret.prettierignore .cfg ache/node/24.14.0/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin/sh (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 h ../../../.pret.prettierignore .cfg ache/uv/0.10.12/x86_64/sh (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 review every condition that checks if a file

@pelikhan pelikhan closed this Mar 20, 2026
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.

Support .lock.yaml files

2 participants