Harden validate-yaml release-build lockfile detection in CGO workflow#38112
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix CGO workflow failure on main branch
Harden Jun 9, 2026
validate-yaml release-build lockfile detection in CGO workflow
pelikhan
approved these changes
Jun 9, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hardens the validate-yaml guard in the CGO workflow so committed *.lock.yml files are rejected when they contain either supported release-build signature (versioned header marker or compiler_version in gh-aw-metadata), improving detection and triage output.
Changes:
- Expand
.lock.ymlrelease-build detection in.github/workflows/cgo.ymlto match both header and metadata release markers, and print the matched marker lines. - Regenerate
.github/workflows/daily-safeoutputs-git-simulator.lock.yml, removing release markers (notablycompiler_version/ versioned header) and updating the compiled workflow content.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/cgo.yml |
Updates the validate-yaml lockfile scan to detect and report both header-based and metadata-based release-build markers. |
.github/workflows/daily-safeoutputs-git-simulator.lock.yml |
Regenerates a compiled workflow lockfile to a dev-compiled form (no release markers) alongside a large set of generated workflow updates. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 1
Comment on lines
+1
to
4
| # gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"3c36c6ee7382018cd9c6f0dbe3b6c652c4db0da12899fc87a1586c148e9a76d6","body_hash":"63a8dc174c0c6c76a516ac3f4e2109d461f847da65c70ef77adc4f0ab0f2186b","strict":true,"agent_id":"claude","engine_versions":{"claude":"2.1.168"}} | ||
| # gh-aw-manifest: {"version":1,"secrets":["ANTHROPIC_API_KEY","GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"df4cb1c069e1874edd31b4311f1884172cec0e10","version":"v6.0.3"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.68"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.68"},{"image":"ghcr.io/github/gh-aw-firewall/cli-proxy:0.25.68"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.68"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.25","digest":"sha256:c10331ad17668ef89f38f5e356678788a40b0cd5fef96e8f92e1d9c1de47cbaa","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.3.25@sha256:c10331ad17668ef89f38f5e356678788a40b0cd5fef96e8f92e1d9c1de47cbaa"},{"image":"ghcr.io/github/github-mcp-server:v1.1.2","digest":"sha256:30197479d8036c7811892bc07e06f9a05c9ef3cdd79bc59f256d50647f95788c","pinned_image":"ghcr.io/github/github-mcp-server:v1.1.2@sha256:30197479d8036c7811892bc07e06f9a05c9ef3cdd79bc59f256d50647f95788c"},{"image":"node:lts-alpine","digest":"sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14","pinned_image":"node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14"}]} | ||
| # ___ _ _ | ||
| # / _ \ | | (_) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CGOrun #11194 failed invalidate-yamlbecause a release-compiled workflow lockfile reachedmain. The existing guard only matched one release marker pattern and missed other valid release signatures.Root cause addressed
.github/workflows/cgo.ymlto detect release builds via either:generated by gh-aw (vX.Y.Z)"compiler_version"ingh-aw-metadataValidation logic update
*.lock.ymlfailsvalidate-yaml.Operator-facing output