Skip to content

fix: surface frontmatter hash computation failure instead of silently continuing - #29578

Merged
pelikhan merged 3 commits into
mainfrom
copilot/fix-frontmatter-hash-computation
May 1, 2026
Merged

pelikhan merged 3 commits into
mainfrom
copilot/fix-frontmatter-hash-computation

Conversation

Copilot AI commented May 1, 2026 •

Copy link
Copy Markdown
Contributor

A failed frontmatter hash computation was silently swallowed — logged at warning level and execution continued without a hash. Since the hash drives stable heredoc delimiter generation, this produced non-deterministic lock files across repeated compilations of the same workflow.

Changes

  • compiler_yaml.go — replace log-and-continue with a hard return error:

    // Before: silent
    compilerYamlLog.Printf("Warning: failed to compute frontmatter hash: %v", err)
    // Continue without hash - non-fatal error
    
    // After: surfaces to caller
    return "", nil, nil, fmt.Errorf(
        "failed to compute frontmatter hash (workflow will have non-deterministic delimiters): %w", err)
  • compiler_yaml_error_wrapping_test.go — add TestGenerateYAML_FrontmatterHashFailure: calls generateYAML with RawMarkdown unset and a non-existent markdownPath, triggering the disk-read fallback and verifying a non-nil error is returned.

  • compiler_yaml_logo_test.go / compiler_yaml_helpers_test.go — fix two existing tests (TestASCIILogoAlignment, TestGenerateYAMLRefactored) that relied on the old silent-continue behaviour by setting RawMarkdown to a non-empty value, switching them to the fast-path hash computation that doesn't require a real file on disk.

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 repo view --json owner,name --jq .owner.login + "/" + .name ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile ortc�� 1225416/b154/_pkg_.a om/goccy/go-yaml@v1.19.2/internal/format/format.go ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE ntio/asm/internarev-parse GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (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 GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm ortc�� 1675115240/001 om/segmentio/asm@v1.1.3/cpu/x86/x86.go .cfg GOINSECURE 1225416/b011/ GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linuconfig (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 GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/link env 5783/001/stability-test.md GO111MODULE ortcfg.link GOINSECURE 1225416/b006/ GOMODCACHE Q9JjIZREDlYiHWP_71/KDaUrle63TPPPS1tZJmA/SqW9rykM-trimpath (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 -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (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, .object.type] | @tsv /tmp/go-build1059076006/b469/workflow.test -importcfg /usr/bin/git -s -w -buildmode=exe git rev-�� --show-toplevel -extld=gcc /usr/bin/git t3714182419/.gitnode GO111MODULE .cfg git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq [.object.sha, .object.type] | @tsv /usr/bin/git git /usr/bin/git ignore-path ../.git git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel /usr/bin/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, .object.type] | @tsv /tmp/TestHashConsistency_WithImports1899137750/001/main.md x_amd64/compile /usr/bin/git led-with-env-temgit GO111MODULE x_amd64/compile git -C /tmp/shared-actions-test375415367 remote /usr/bin/git -json @v6.0.2/kind/kinrev-parse x_amd64/compile git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq [.object.sha, .object.type] | @tsv --show-toplevel git k/gh-aw/gh-aw/actions/node_modules/.bin/node --show-toplevel /tmp/go-build105rev-parse /usr/bin/git git k/gh�� --show-toplevel git k/gh-aw/gh-aw/actions/setup/node_modules/.bin/sh --show-toplevel /opt/hostedtoolcrev-parse erignore bash (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, .object.type] | @tsv 4015-34443/test-1611314084/.github/workflows stmain.go ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE g/x/text/transforepo GOMODCACHE ache/go/1.25.8/xowner/repo -c 928254548 _isA/iz-VlEV3Z-CBIoY6_isA 1/x64/bin/node -n1 --format=format:rev-parse --end-of-options--show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linutest@example.com (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq [.object.sha, .object.type] | @tsv --show-toplevel ache/go/1.25.8/x64/pkg/tool/linu-1 /usr/bin/git 4015-34443/test-git stmain.go ache/go/1.25.8/x--show-toplevel git rev-�� --show-toplevel ache/go/1.25.8/x64/pkg/tool/linu^remote\..*\.gh-resolved$ /usr/bin/git 4015-34443/test-git bdZx/dTcSRunIDvprev-parse 1/x64/bin/node git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq [.object.sha, .object.type] | @tsv --show-toplevel git /usr/bin/git /tmp/TestGuardPogit l /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git /tmp/gh-aw-test-git config /usr/bin/git 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, .object.type] | @tsv /tmp/go-build2671225416/b149/_pkg_.a pkg/mod/github.com/modelcontextprotocol/go-sdk@v1.5.0/auth/auth.go /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/compile -p golang.org/x/sysrev-parse -lang=go1.25 /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linustatus -o /tmp/go-build2671225416/b131/_pkg_.a -trimpath ache/node/24.14.1/x64/bin/node -p github.com/modelrev-parse -lang=go1.25 git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv -bool -buildtags "warnings":[]}] -errorsas -ifaceassert -nilfunc 9076006/b459/tty.test e=/t�� t0 -tests (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv xterm-color (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, .object.type] | @tsv --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/compile /usr/bin/git k/gh-aw/gh-aw -trimpath (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq [.object.sha, .object.type] | @tsv --show-toplevel infocmp /usr/bin/git xterm-color git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel git es/.bin/sh git (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v9
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv go1.25.8 -c=4 -nolocalimports -importcfg /tmp/go-build2671225416/b246/importcfg -pack /home/REDACTED/go/pkg/mod/golang.org/x/text@v0.36.0/message/catalog/catalog.go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv tions-lock.json -p 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 api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE cBLbw7hWVPBc env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (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, .object.type] | @tsv --show-toplevel 64/pkg/tool/linux_amd64/compile /usr/lib/git-core/git-remote-https g_.a n.go 64/pkg/tool/linu--show-toplevel /usr/lib/git-core/git-remote-https http�� REDACTED 64/pkg/tool/linuremote.origin.url /usr/bin/git y.md GO111MODULE x_amd64/compile git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --write scripts/**/*.js /snap/bin/sh .prettierignore --log-level=errorev-parse /usr/bin/git sh -c "prettier" --write '../../../**/*.json' '!../../../pkg/workflow/js/**/*.json' ---errorsas git /usr/bin/git --show-toplevel git /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, .object.type] | @tsv /tmp/TestHashConsistency_GoAndJavaScript4155177812/001/test-complex-frontmatter-with-tools.md s/5/artifacts /usr/bin/infocmp -json GO111MODULE x_amd64/compile infocmp -1 xterm-color x_amd64/compile r,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,disp--show-toplevel -json GO111MODULE x_amd64/asm git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --show-toplevel 64/pkg/tool/linux_amd64/compile /usr/bin/git itbranch_with_hygit itbranch_with_hyrev-parse x_amd64/link git arch�� --remote=REDACTED v1.0.0 /usr/bin/git ortcfg Kt0zQSK0W At,event,headBra--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv */*.json' '!../../../pkg/workflow/js/**/*.json' --ignore-path git 64/pkg/tool/linux_amd64/vet --show-toplevel 9076006/b459/ttyrev-parse /usr/bin/git 64/pkg/tool/linux_amd64/vet rev-�� --show-toplevel l-output-1777653608439-d9hx8z.txt k/gh-aw/gh-aw/node_modules/.bin/sh nore git /usr/bin/git git (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, .object.type] | @tsv '/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitcustom_branch675536263/001' '/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitcustom_branch675536263/001' /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/compile -p net -lang=go1.25 /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linurev-parse -o licyBlockedUsersExpressionCompiledOutput36343455@{u} -trimpath 9076006/b447/stringutil.test l github.com/githurev-parse -lang=go1.25 9076006/b447/stringutil.test (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv runs/20260501-164015-34443/test-863278462 -importcfg ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile -s -w -buildmode=exe ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile main�� 9076006/b465/_pkg_.a --auto 9076006/b465=> --detach b/gh-aw/pkg/typerev-parse 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv --get l ache/node/24.14.1/x64/bin/node 3202848/001' 3202848/001' 64/bin/go ache/node/24.14.1/x64/bin/node 1655�� /repos/actions/github-script/git/ref/tags/v9 s/4/artifacts /opt/hostedtoolcache/node/24.14.1/x64/bin/node -json GO111MODULE x_amd64/asm node (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, .object.type] | @tsv /tmp/TestGuardPolicyMinIntegrityOnlyrepos_only_without_min-integrity3593155938/001 rev-parse /usr/bin/git -json GO111MODULE 64/bin/go git remo�� mpleWorkflow3532203815/001 go /usr/bin/git -json GO111MODULE x_amd64/asm git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv .js' --ignore-path .prettierignore --log-level=error git bin/node --show-toplevel x_amd64/link /usr/bin/git git tion�� --show-toplevel l-output-1777653608439-d9hx8z.txt son ignore AZ/a_wYL7yEvV0uZrev-parse 64/bin/node git (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v0.1.2
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.1.2 --jq [.object.sha, .object.type] | @tsv --show-toplevel 64/pkg/tool/linu--jq /usr/bin/git mLsRemoteWithReagit mLsRemoteWithRearev-parse 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linurev-parse /usr/bin/git mpiledOutput7946git deRMpwyMD ache/go/1.25.8/x--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.1.2 --jq [.object.sha, .object.type] | @tsv --write **/*.cjs /home/REDACTED/work/gh-aw/gh-aw/node_modules/.bin/sh **/*.json --ignore-path ../../../.pretti--show-toplevel sh -c "prettier" --write '../../../**/*.json' '!../../../pkg/workflow/js/**/*.json' ---errorsas git /usr/bin/git rror git /usr/bin/git git (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, .object.type] | @tsv --show-toplevel go /opt/hostedtoolcache/node/24.14.1/x64/bin/node -json GO111MODULE 64/bin/go node /tmp�� ansitiveImports4191875978/001 go /usr/bin/git -json GO111MODULE x_amd64/asm git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq [.object.sha, .object.type] | @tsv --show-toplevel git /usr/bin/git --show-toplevel ache/go/1.25.8/xrev-parse /usr/bin/git git tion�� --show-toplevel git son ignore git 64/bin/node 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, .object.type] | @tsv k/gh-aw/gh-aw/.github/workflows/architecture-guardian.md remote 9076006/b465/vet.cfg -json GO111MODULE 64/bin/go git remo�� GOMODCACHE go /usr/bin/git -json GO111MODULE x_amd64/compile git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq [.object.sha, .object.type] | @tsv --show-toplevel git 86_64/node --show-toplevel git /usr/bin/git git tion�� --show-toplevel git son ignore git /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --limit 100 --created >=2026-04-24 GOMOD GOMODCACHE go env ty-test.md GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linuTest commit (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --limit 100 --created >=2026-04-01 GOMOD GOMODCACHE 64/pkg/tool/linutest@example.com env g_.a GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linuorigin (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --limit 100 --created >=2026-01-31 GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/asm env -json _56Gjvce9 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linutest@example.com (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/1/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/1/artifacts --jq .artifacts[].name GO111MODULE 64/pkg/tool/linux_amd64/link GOINSECURE /bidi GOMODCACHE 64/pkg/tool/linux_amd64/link ortc�� stants.test JmzP4TwGo ortcfg.link GOINSECURE GOMOD GOMODCACHE jakc5AduBEj99Mo17V/VSx1WW929Qe7torigin (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 3GMM57Ps3 ache/go/1.25.8/x64/pkg/tool/linu-test.short=true GOINSECURE gset GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-trimpath env 593802661 GO111MODULE ache/go/1.25.8/x64/pkg/tool/linu-lang=go1.25 GOINSECURE 1225416/b012/ GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-buildtags (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12345/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12345/artifacts --jq .artifacts[].name GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env 12/001/test-frontmatter-with-env-template-expressions.md qrk06zUvD ptables GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 GO111MODULE ntdrain.test GOINSECURE a20 GOMODCACHE ntdrain.test 0590�� 3435737113 GFI5vTWRl ptables GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12346/artifacts --jq .artifacts[].name GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json RG6vPflge es GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE nal/poly1305 GOMODCACHE 64/pkg/tool/linux_amd64/compile env g_.a RR0X2oXnN iptables GOINSECURE ole GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/2/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/2/artifacts --jq .artifacts[].name GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE ack abis 64/pkg/tool/linux_amd64/compile env g_.a Hgqea9f-D x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 k1Ubnk-ff ache/go/1.25.8/x64/pkg/tool/linu-test.short=true GOINSECURE til GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile env ijOXly7jX GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE rand GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/3/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/3/artifacts --jq .artifacts[].name 8kq6Gg-gh x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env ortcfg Y9sJvruy0 ache/go/1.25.8/x64/pkg/tool/linu--limit GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linuremote.origin.url (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 34i--fWCy ache/go/1.25.8/x64/pkg/tool/linu-lang=go1.25 GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-goversion env ortcfg kTMme1tRE ache/go/1.25.8/x64/pkg/tool/linu-importcfg GOINSECURE 1225416/b021/ GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linuconfig (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/4/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/4/artifacts --jq .artifacts[].name 06SIChxms 64/pkg/tool/linux_amd64/link GOINSECURE /norm GOMODCACHE 64/pkg/tool/linu^remote\..*\.gh-resolved$ env 12/001/test-frontmatter-with-nested-objects.md aTWjRYknE k GOINSECURE GOMOD GOMODCACHE 6lOae4WsPt2nvzZ6origin (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 sNGC5r73k 64/pkg/tool/linux_amd64/vet GOINSECURE pproxy GOMODCACHE 64/pkg/tool/linutest@example.com env 593802661/.github/workflows O_2Lfc9jA ache/go/1.25.8/x64/pkg/tool/linu-nilfunc GOINSECURE 1225416/b015/ GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-tests (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/5/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/5/artifacts --jq .artifacts[].name JtV1iahb4 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linu--json env ortcfg Ffa_H-Eee ache/go/1.25.8/x--created GOINSECURE eader GOMODCACHE ache/go/1.25.8/xTest User (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 KjIdi_zAe 64/pkg/tool/linux_amd64/compile GOINSECURE pguts GOMODCACHE 64/pkg/tool/linuTest User env 593802661/.github/workflows N5EVshPW9 k GOINSECURE (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE x_amd64/link GOINSECURE GOMOD GOMODCACHE x_amd64/link (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 GOMOD GOMODCACHE x_amd64/compile env Gitmain_branch413202848/001' Gitmain_branch413202848/001' x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (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 .o 64/src/internal/add 64/pkg/tool/linuorigin env lidations passed" JWpi-bmPh ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/xTest User (http block)
  • https://api.github.com/repos/github/gh-aw/contents/.github/workflows/shared/reporting.md
    • Triggering command: /tmp/go-build1059076006/b404/cli.test /tmp/go-build1059076006/b404/cli.test -test.testlogfile=/tmp/go-build1059076006/b404/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true -importcfg /tmp/go-build2671225416/b230/importcfg -pack /home/REDACTED/go/pkg/mod/github.com/modelcontextprotocol/go-sdk@v1.5.0/internal/mcpgodebug/mcpgodebug.go env -json GO111MODULE 64/bin/go ock.json pkg/wor/opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v0.47.4
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.47.4 --jq [.object.sha, .object.type] | @tsv --show-toplevel ache/go/1.25.8/xremote.origin.url /usr/bin/git se 9076006/b375/vetrev-parse /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linutest@example.com /usr/bin/git 1225416/b172/impdu -trimpath /opt/hostedtoolc/tmp/gh-aw/aw-feature-branch.patch git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.47.4 --jq [.object.sha, .object.type] | @tsv --show-toplevel git /usr/bin/git w/js/**/*.json' git git sv git rev-�� --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/git 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, .object.type] | @tsv ortcfg GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE 1225416/b087/ GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linuTest User env 1225416/b124/_pkg_.a GO111MODULE 1225416/b124=> GOINSECURE /go-yaml/token ache/go/1.25.8/xREDACTED go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq [.object.sha, .object.type] | @tsv --show-toplevel gh de list --json /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --cached --name-only /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, .object.type] | @tsv led-with-env-template-expressions-in-body.md GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE rRo2mzy/Er_eZaAbrev-parse env -json /common.go x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (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, .object.type] | @tsv -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env lGitcustom_branc-errorsas lGitcustom_branc-ifaceassert x_amd64/compile GOINSECURE GOMOD ic/asm.s x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile phen�� -json GO111MODULE x_amd64/link GOINSECURE GOMOD GOMODCACHE x_amd64/link (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq [.object.sha, .object.type] | @tsv -json .go x_amd64/asm GOINSECURE GOMOD GOMODCACHE x_amd64/asm env lGitbranch_with_hyphen2857150119/001' lGitbranch_with_hyphen2857150119/001' 64/bin/go GOINSECURE GOMOD GOMODCACHE 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, .object.type] | @tsv iant-459699006/.github/workflows GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json 1.5.0/auth/auth.go x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (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, .object.type] | @tsv 1225416/b096/_pkg_.a om/goccy/go-yaml@v1.19.2/ast/ast.go ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm env DefaultBranchFromLsRemoteWithRealGitbranch_with_hyphen2857150119/001' DefaultBranchFromLsRemoteWithRealGitbranch_with_hyphen2857150119/001' 64/pkg/tool/linux_amd64/link GOINSECURE 1225416/b133/ GOMODCACHE 64/pkg/tool/linux_amd64/link (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq [.object.sha, .object.type] | @tsv --show-toplevel /usr/bin/git /usr/bin/find -v 64/pkg/tool/linu/opt/hostedtoolcache/node/24.14.1/x64/bin/npx /usr/bin/git find /tmp�� -maxdepth 4 /usr/bin/git d -name bin 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 ache/go/1.25.8/x64/pkg/tool/linu-trimpath estl�� /ref/tags/v9 om/segmentio/asm@v1.1.3/cpu/arm/main sv ata/action_pins.git GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu--jq (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 -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh workflow list --repo owner/repo --json name,path,state es (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 -c=4 -nolocalimports -importcfg /tmp/go-build1059076006/b434/importcfg -pack /home/REDACTED/work/gh-aw/gh-aw/pkg/repoutil/repoutil.go /home/REDACTED/work/gh-aw/gh-aw/pkg/repoutil/repoutil_test.go env -json GO111MODULE x_amd64/cgo GOINSECURE GOMOD GOMODCACHE x_amd64/cgo (http block)
  • https://api.github.com/repos/test/repo
    • Triggering command: /usr/bin/gh gh api /repos/test/repo --jq .default_branch 4015-34443/test-source-field-variant-205938636/.github/workflows DK7hiKCNC ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE lite GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile env efaultBranchFromLsRemoteWithRealGitmaster_branch3641834502/001' efaultBranchFromLsRemoteWithRealGitmaster_branch3641834502/001' ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x^remote\..*\.gh-resolved$ (http block)

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

Copilot AI changed the title [WIP] Fix frontmatter hash computation failure in compiler fix: surface frontmatter hash computation failure instead of silently continuing May 1, 2026
Copilot AI requested a review from gh-aw-bot May 1, 2026 16:44
@pelikhan
pelikhan marked this pull request as ready for review May 1, 2026 17:05
Copilot AI review requested due to automatic review settings May 1, 2026 17:05

Copilot AI 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.

Pull request overview

This PR makes frontmatter hash computation failures fatal during YAML generation to prevent non-deterministic heredoc delimiter selection and resulting lockfile drift across repeated compilations.

Changes:

  • Update generateYAML to return an error when frontmatter hash computation fails (instead of logging a warning and continuing).
  • Add a regression test that verifies the error is surfaced when hash computation can’t read the markdown file.
  • Adjust existing tests to provide RawMarkdown so hash computation uses the fast-path and doesn’t require a real file on disk.
Show a summary per file
File Description
pkg/workflow/compiler_yaml.go Converts frontmatter hash failures from warn-and-continue into a hard error return.
pkg/workflow/compiler_yaml_error_wrapping_test.go Adds coverage to assert hash computation failures are surfaced as errors.
pkg/workflow/compiler_yaml_logo_test.go Updates test setup to ensure hash computation doesn’t depend on disk reads.
pkg/workflow/compiler_yaml_helpers_test.go Updates test setup to use fast-path hash computation by setting RawMarkdown.

Copilot's findings

Tip

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

  • Files reviewed: 4/4 changed files
  • Comments generated: 2

Comment thread pkg/workflow/compiler_yaml.go Outdated
} else {
frontmatterHash = hash
compilerYamlLog.Printf("Computed frontmatter hash: %s", hash)
return "", nil, nil, fmt.Errorf("failed to compute frontmatter hash (workflow will have non-deterministic delimiters): %w", err)

Copilot AI May 1, 2026

Copy link

Choose a reason for hiding this comment

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

The returned error message says the workflow "will have non-deterministic delimiters", but this code now aborts generation immediately. Consider updating the message to reflect the new behavior (e.g., that generation failed because a stable frontmatter hash couldn’t be computed), and optionally include the markdownPath for easier debugging.

Suggested change
return "", nil, nil, fmt.Errorf("failed to compute frontmatter hash (workflow will have non-deterministic delimiters): %w", err)
if markdownPath != "" {
return "", nil, nil, fmt.Errorf("failed to generate workflow YAML: could not compute stable frontmatter hash for %q: %w", markdownPath, err)
}
return "", nil, nil, fmt.Errorf("failed to generate workflow YAML: could not compute stable frontmatter hash: %w", err)

Copilot uses AI. Check for mistakes.
Comment on lines +155 to +156

_, _, _, err := compiler.generateYAML(data, "/nonexistent/path/to/workflow.md")

Copilot AI May 1, 2026

Copy link

Choose a reason for hiding this comment

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

This test uses a hard-coded absolute path ("/nonexistent/path/to/workflow.md") to trigger a read failure. To make the test more robust/portable and avoid any chance of colliding with a real path, consider generating a guaranteed-missing path under t.TempDir() instead.

Suggested change
_, _, _, err := compiler.generateYAML(data, "/nonexistent/path/to/workflow.md")
tmpDir := t.TempDir()
missingPath := filepath.Join(tmpDir, "workflow.md")
_, _, _, err := compiler.generateYAML(data, missingPath)

Copilot uses AI. Check for mistakes.
@github-actions github-actions Bot mentioned this pull request May 1, 2026
@github-actions

github-actions Bot commented May 1, 2026

Copy link
Copy Markdown
Contributor

🧪 Test Quality Sentinel Report

Test Quality Score: 90/100

✅ Excellent test quality

Metric Value
New/modified tests analyzed 1
✅ Design tests (behavioral contracts) 1 (100%)
⚠️ Implementation tests (low value) 0 (0%)
Tests with error/edge cases 1 (100%)
Duplicate test clusters 0
Test inflation detected ⚠️ Yes — compiler_yaml_error_wrapping_test.go (+19 lines) vs compiler_yaml.go (+3 lines) = 6.3:1 ratio
🚨 Coding-guideline violations None

Test Classification Details

Test File Classification Issues Detected
TestGenerateYAML_FrontmatterHashFailure pkg/workflow/compiler_yaml_error_wrapping_test.go ✅ Design None — well-constructed error-path test

The two other changed test files (compiler_yaml_helpers_test.go +1 line, compiler_yaml_logo_test.go +4 lines) only add RawMarkdown field values to existing test data structs to fix the tests after the production change. No new test functions were added in those files.


Test Analysis

✅ TestGenerateYAML_FrontmatterHashFailure

Classification: Design test — behavioral contract
Design invariant enforced: When generateYAML cannot compute the frontmatter hash (due to an empty RawMarkdown and a missing file path), it must return a hard error rather than silently continuing. This directly validates the behavioral fix described in the PR title.
Error/edge case coverage: ✅ Both require.Error and assert.Contains are used, checking not only that an error is returned but that it carries the expected context message "failed to compute frontmatter hash". Assertion messages are present on all calls.
What would break if deleted? The original silent-continue bug could be reintroduced without detection. This test is the only regression guard for the failure-surfacing behavior.
No mock libraries, correct build tag (//go:build !integration). ✅


Note on Test Inflation

The inflation ratio (6.3:1 test lines vs production lines) is technically above the 2:1 threshold and triggers a 10-point deduction. However, this is expected and appropriate here: the production fix was a one-line behavioural change (returning an error instead of silently continuing), while the test correctly requires setup code, the failing-path invocation, and two assertions to fully verify the new contract. No action required.


Language Support

Tests analyzed:

  • 🐹 Go (*_test.go): 1 test — unit (//go:build !integration)
  • 🟨 JavaScript (*.test.cjs, *.test.js): 0 tests

Verdict

✅ Check passed. 0% of new tests are implementation tests (threshold: 30%). No coding-guideline violations detected.


📖 Understanding Test Classifications

Design Tests (High Value) verify what the system does:

  • Assert on observable outputs, return values, or state changes
  • Cover error paths and boundary conditions
  • Would catch a behavioral regression if deleted
  • Remain valid even after internal refactoring

Implementation Tests (Low Value) verify how the system does it:

  • Assert on internal function calls (mocking internals)
  • Only test the happy path with typical inputs
  • Break during legitimate refactoring even when behavior is correct
  • Give false assurance: they pass even when the system is wrong

Goal: Shift toward tests that describe the system's behavioral contract — the promises it makes to its users and collaborators.

References: §25224034440

🧪 Test quality analysis by Test Quality Sentinel · ● 606.2K · ◷

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Test Quality Sentinel: 90/100. Excellent test quality — 0% of new tests are implementation tests (threshold: 30%). The new test TestGenerateYAML_FrontmatterHashFailure enforces the behavioral contract: hash computation failures must surface as hard errors, not be silently swallowed.

@pelikhan

pelikhan commented May 1, 2026

Copy link
Copy Markdown
Collaborator

@copilot review all comments

Copilot AI commented May 1, 2026

Copy link
Copy Markdown
Contributor Author

@copilot review all comments

Both suggestions applied in 4123ebc:

  1. Error message updated to "failed to generate workflow YAML: could not compute stable frontmatter hash for %q: ..." — more accurately describes the abort and includes markdownPath for easier debugging.
  2. Hard-coded /nonexistent/path/to/workflow.md replaced with filepath.Join(t.TempDir(), "workflow.md") — guaranteed missing and collision-proof.

Copilot AI requested a review from pelikhan May 1, 2026 18:27
@pelikhan
pelikhan merged commit 20b714b into main May 1, 2026
@pelikhan
pelikhan deleted the copilot/fix-frontmatter-hash-computation branch May 1, 2026 19:26
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.

fix: surface frontmatter hash computation failure in compiler instead of silently continuing

4 participants