Skip to content

build: Add gh-aw-version single source of truth + justfile wrapper - #49

Open
cgwalters wants to merge 1 commit into
mainfrom
infra/pin-gh-aw-version-justfile
Open

build: Add gh-aw-version single source of truth + justfile wrapper#49
cgwalters wants to merge 1 commit into
mainfrom
infra/pin-gh-aw-version-justfile

Conversation

@cgwalters

Copy link
Copy Markdown
Collaborator

Summary

PR #47 hit CI's check-drift job because the drafter agent's sandbox had
no gh-aw extension pre-installed. Probing with gh aw --help triggered
gh's own auto-install-latest behavior, silently pulling in an unpinned,
newer gh-aw than the version ci.yml's check-drift job is pinned to
(v0.81.6). The agent then compiled with that newer version, producing a
.lock.yml full of version-churn diffs that failed drift-checking in CI.

This introduces a single source of truth for the pinned version plus a
justfile wrapper so neither humans nor agents have to remember/guess it:

  • .github/aw/gh-aw-version — the pinned version, read by both ci.yml
    and the new justfile.
  • justfilejust setup (installs/re-pins gh-aw to match the file)
    and just compile (runs gh aw compile drafter review fix --approve).
  • ci.yml now reads the pin from the file instead of a hardcoded literal.
  • README.md, drafter.md, and fix.md now point at
    just setup && just compile instead of raw, version-unaware commands.
    drafter.md/fix.md specifically: since these agents may themselves
    edit workflow .md files, they're now told to recompile via just
    before opening/pushing their change.

review.md needs no change — it never edits workflow files or compiles.

Validation

  • just --list and just setup verified idempotent (no-ops when already
    at the pinned version, only reinstalls when it isn't).
  • just compile (gh aw compile drafter review fix --approve) run
    against the edited drafter.md/fix.md produces the expected
    .lock.yml diff (metadata hash only) and then a second run is clean —
    confirmed via git status.

Assisted-by: AI
I am knowledgeable in this problem domain (drove the design, reviewed the
generated diff and commit message in full) and reviewed it carefully.

Compiling a .md workflow source with a gh-aw CLI version other than the
one ci.yml's check-drift job is pinned to can silently produce a
different .lock.yml (compiler behavior, embedded action SHAs, etc. all
vary by version), which then either falls out of sync with the .md
source or looks fine locally but diffs against what CI recompiles.
Previously the pinned version (v0.81.6) was a literal hardcoded in
ci.yml, with no way for a human or an agent (drafter.md/fix.md, which
both recompile lockfiles as part of their own workflow) to discover or
match it short of reading that file.

.github/aw/gh-aw-version is now the single place that version lives.
ci.yml reads it instead of hardcoding the pin, and a new justfile wraps
the two commands anyone touching a workflow .md file needs: `just
setup` (installs/re-pins the extension to match the file) and `just
compile` (runs the actual gh-aw compile). README.md, drafter.md, and
fix.md are updated to point at `just setup && just compile` instead of
telling readers to invoke gh-aw directly with no version guidance.

review.md is untouched: it never edits workflow .md files or compiles,
so it has no need for this instruction.

Verified `gh aw compile drafter review fix --approve` (v0.81.6, matching
the pin) against the new drafter.md/fix.md: only each file's embedded
body_hash metadata comment changes in its .lock.yml, since gh-aw
runtime-imports the prompt body rather than inlining it at compile
time — no frontmatter or generated-workflow behavior changed.

Assisted-by: AI
Signed-off-by: Colin Walters <walters@verbum.org>
@cgwalters
cgwalters force-pushed the infra/pin-gh-aw-version-justfile branch from 3bf5394 to 766a7df Compare August 5, 2026 20:05
@cgwalters
cgwalters enabled auto-merge (squash) August 6, 2026 12:25
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.

1 participant