ci(gh-aw): add CI guard for lock-file drift and compiler-version skew - #1585
Open
TheLarkInn wants to merge 1 commit into
Open
ci(gh-aw): add CI guard for lock-file drift and compiler-version skew#1585TheLarkInn wants to merge 1 commit into
TheLarkInn wants to merge 1 commit into
Conversation
Adds an aw-lock-drift job to ci.yml that installs the pinned gh-aw version (new GH_AW_VERSION env var, the canonical pin), runs gh aw compile, and fails the build when: - any .github/workflows/*.lock.yml or .github/aw file drifts from its .md source (git diff --exit-code) - gh aw compile emits untracked files (orphaned-source class of bug) - lock files report mixed compiler_version values, or one that differs from the pinned GH_AW_VERSION CLAUDE.md now points at GH_AW_VERSION as the canonical pin location and documents the CI enforcement. Closes #1390 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a CI enforcement mechanism to ensure agentic workflow lock files remain reproducible and consistent across the repository, closing the “honour-system” gap described in #1390.
Changes:
- Pin
gh-awvia a top-levelGH_AW_VERSIONinci.ymland document it as the canonical source of truth. - Add an
aw-lock-driftCI job that recompiles workflows and fails on lock drift, untracked generated files, or compiler-version skew. - Update
CLAUDE.mdto describe the pin location and the new CI enforcement.
Show a summary per file
| File | Description |
|---|---|
CLAUDE.md |
Updates documentation to point to ci.yml as the canonical gh-aw version pin and describes the new enforcement job. |
.github/workflows/ci.yml |
Adds GH_AW_VERSION pin and introduces aw-lock-drift job to detect drift/untracked output/version skew after gh aw compile. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
Comment on lines
+123
to
+135
| aw-lock-drift: | ||
| name: Agentic workflow lock drift | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install pinned gh-aw extension | ||
| run: | | ||
| gh extension install github/gh-aw --pin "$GH_AW_VERSION" | ||
| gh aw version | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1585 +/- ##
=======================================
Coverage 97.57% 97.57%
=======================================
Files 127 127
Lines 39102 39102
Branches 974 974
=======================================
Hits 38154 38154
Misses 853 853
Partials 95 95 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
4 tasks
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.
Summary
Adds an
aw-lock-driftjob toci.ymlthat closes the honour-system gap described in #1390: CI now verifies that every.github/workflows/*.lock.ymlis in sync with its.mdsource and that all locks were compiled with the same, pinned gh-aw version.The job:
GH_AW_VERSION: v0.86.2env var inci.ymlis the single canonical pin (referenced from CLAUDE.md), so CI does not float tolatestgh aw compilegit diff --exit-codeshows any change under.github/workflows/.github/aw(lock drift, includingactions-lock.json)gh aw compileemits untracked files (catches the orphaned-source class of bug; porcelain output filtered to??entries so modified tracked files can never be misreported)compiler_versionand that it equals the pinnedGH_AW_VERSIONCLAUDE.mdnow namesGH_AW_VERSIONas the canonical pin location and documents the CI enforcement.Acceptance criteria from #1390
.mdwithout committing the regenerated.lock.ymlgh aw compileproduces untracked fileslatestcore.autocrlf=falseclone (matching CI runners):gh aw compile→ check passes, exit 0 (committed locks are byte-identical to a fresh compile under v0.86.2, confirmed withgit diff --ignore-cr-at-eol).lock.ymlcontent →::error::Lock files are out of date..., exit 1.github/workflows→::error::'gh aw compile' produced untracked files..., exit 1v0.85.4→ mixed-version error listing both versions, exit 1GH_AW_VERSIONbumped past the locks → pin-mismatch error, exit 1The
aw-lock-driftjob passing on this PR's own run demonstrates the clean-tree case on a real runner.Notes
envvar rather than an action ref because GitHub Actions does not evaluate expressions inuses:;gh extension install github/gh-aw --pin "$GH_AW_VERSION"keeps one obvious place to bump.??-filtered untracked check, the uniform-compiler_version+ pin-equality assertions, and agh aw versionecho in the install step for easier CI debugging.Closes #1390
Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com