ci: check gh-aw workflow locks#90
Merged
Merged
Conversation
878033c to
0dd9d54
Compare
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.
ci: check gh-aw workflow locks
TL;DR
Adds a focused CI check that recompiles agentic workflow sources and fails if
.github/workflowschanges afterward. Also adds a short rootAGENTS.mdreminder so agents know to rungh aw compilewhen editing workflow markdown.Problem
.github/workflows/*.mdwithout the matching generated.lock.yml.Approach
.github/workflows/gh-aw-lock-check.ymlAGENTS.mdgh aw compileand include regenerated.lock.ymlfiles with workflow source changes.Implementation
The CI job checks out the repository, installs
github/gh-aw-actions/setup-cliat v0.74.4, runsgh aw compile --no-check-update, then fails ifgit status --porcelain -- .github/workflowsreports regenerated files. The rootAGENTS.mdnote points agents at the same command and CI check.flowchart LR A["Workflow source or lock changes"] --> B["CI runs gh aw compile"] B --> C{"Working tree changed?"} C -->|"No"| D["Pass"] C -->|"Yes"| E["Fail with stale-lock error"]Trade-offs
AGENTS.mdshort and gh-aw-specific instead of reintroducing the generated instruction bundle..github/workflowsafter compile to catch modified and untracked generated files.Validation
/private/tmp/gh-aw-v0.74.4 compile --no-check-updategit diff --checkgit diff --cached --checkruby -e "require 'yaml'; YAML.load_file('.github/workflows/gh-aw-lock-check.yml'); puts 'yaml ok'"How to test
.github/workflows/crane.mdwithout committing the regenerated lock.gh-aw lock check / Verify gh-aw locksfails and asks forgh aw compile.