Skip to content

ci(gh-aw): add CI guard for lock-file drift and compiler-version skew - #1619

Open
TheLarkInn wants to merge 1 commit into
mainfrom
selarkin/1390-aw-lock-drift-guard-v4
Open

ci(gh-aw): add CI guard for lock-file drift and compiler-version skew#1619
TheLarkInn wants to merge 1 commit into
mainfrom
selarkin/1390-aw-lock-drift-guard-v4

Conversation

@TheLarkInn

Copy link
Copy Markdown
Owner

Closes #1390

What

Adds an aw-lock-drift job to ci.yml so stale gh-aw lock files fail CI instead of relying on the honour system:

  1. Pinned compiler — new workflow-level GH_AW_VERSION: v0.86.2 env var is the single canonical pin (no floating to latest). The install step removes any preinstalled gh-aw copy first so the pin always wins (gh extension install fails when the extension already exists).
  2. Recompiles all workflows with the pinned version.
  3. Fails on driftgit diff --exit-code -- .github/workflows .github/aw catches locks not regenerated from their .md sources.
  4. Fails on untracked outputgit ls-files --others --exclude-standard catches the orphaned-source class of bug.
  5. Asserts version uniformity — every *.lock.yml must report exactly one compiler_version, and it must equal GH_AW_VERSION.

CLAUDE.md now names GH_AW_VERSION as the canonical pin and documents the enforcement job.

Acceptance criteria

  • CI fails on a PR that edits a workflow .md without committing the regenerated .lock.yml (drift check)
  • CI fails if gh aw compile produces untracked files (untracked-output check)
  • gh-aw version pinned and documented; CI does not float to latest
  • Verified locally on a scratch worktree: tampered lock → drift failure; planted orphan .lock.yml → untracked failure; mixed compiler_version headers → skew failure; uniform wrong version → pin-mismatch failure. A clean gh aw compile at the pinned version produces zero drift on current main.

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

Add an aw-lock-drift job to ci.yml that installs a pinned gh-aw version
(new GH_AW_VERSION env var, currently v0.86.2), runs gh aw compile, and
fails when:
- any tracked file under .github/workflows or .github/aw drifts from the
  committed state,
- the compiler emits untracked files (orphaned .md sources),
- lock files report mixed compiler_version headers or a version that
  does not match the pin.

The install step removes any preinstalled gh-aw first so the pin always
wins. CLAUDE.md now points to GH_AW_VERSION as the canonical pin and
documents the enforcement job.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings August 20, 2026 04:19

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

Adds a CI enforcement guard to ensure GitHub Agentic Workflows (gh-aw) generated lock files stay in sync with their .md sources and that all locks are compiled with a single, pinned gh-aw compiler version.

Changes:

  • Introduces a new aw-lock-drift job in CI that installs a pinned gh-aw version, recompiles workflows, and fails on drift, untracked outputs, or compiler-version skew.
  • Centralizes the gh-aw compiler pin as GH_AW_VERSION in .github/workflows/ci.yml.
  • Updates CLAUDE.md to document the canonical pin location and the CI enforcement behavior.
Show a summary per file
File Description
CLAUDE.md Documents GH_AW_VERSION as the canonical gh-aw pin and describes the new enforcement job.
.github/workflows/ci.yml Adds GH_AW_VERSION and the aw-lock-drift job to detect lock drift, untracked outputs, and compiler skew.

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: 0
  • Review effort level: Lite

@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.57%. Comparing base (6d3368d) to head (5f4b741).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1619   +/-   ##
=======================================
  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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

[gh-aw] Add CI guard for lock-file drift and compiler-version skew

2 participants