Skip to content

feat: add fast stale-lock-file CI gate for workflow markdown edits - #48563

Closed
pelikhan with Copilot wants to merge 2 commits into
mainfrom
copilot/hippo-enforce-make-recompile
Closed

feat: add fast stale-lock-file CI gate for workflow markdown edits#48563
pelikhan with Copilot wants to merge 2 commits into
mainfrom
copilot/hippo-enforce-make-recompile

Conversation

Copilot AI commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Stale .lock.yml files after editing .github/workflows/*.md are the highest-confidence recurring CI failure. The existing check-workflow-drift job catches this but only after building the binary (~10 min). This adds a binary-free fast gate that fails in ~30 seconds.

Changes

ci.yml — new check-stale-lock-files job

  • Runs standalone with no binary dependency (pure git + shell)
  • Uses fetch-depth: 0 and passes github.event.before as GITHUB_BEFORE_SHA to diff exactly what changed in the push
  • Falls back gracefully (exit 0) on schedule/dispatch runs with no push base

Makefile — extend check-stale-lock-files target

  • Adds a third env-var probe: GITHUB_BEFORE_SHA (checked after CHECK_STALE_LOCK_BASE_REF and GITHUB_BASE_REF), enabling the Makefile target to resolve the correct base ref for push events where GITHUB_BASE_REF is unset
  • Documents all three supported env vars in the comment
# New CI job — no binary needed, runs immediately
check-stale-lock-files:
  runs-on: ubuntu-latest
  steps:
    - uses: actions/checkout@...
      with: { fetch-depth: 0 }
    - env: { GITHUB_BEFORE_SHA: "${{ github.event.before }}" }
      run: make check-stale-lock-files

Add a fast, binary-free `check-stale-lock-files` CI job that catches stale
workflow lockfiles early, before the heavier `check-workflow-drift` job
requires a full binary build.

Changes:
- ci.yml: add standalone `check-stale-lock-files` job using fetch-depth: 0
  and GITHUB_BEFORE_SHA env var (from github.event.before) for push events
- Makefile: extend check-stale-lock-files target to also check GITHUB_BEFORE_SHA
  (checked after CHECK_STALE_LOCK_BASE_REF and GITHUB_BASE_REF), with updated
  doc comment listing all supported env vars

Closes #48154

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Enforce make recompile after workflow markdown edits feat: add fast stale-lock-file CI gate for workflow markdown edits Jul 28, 2026
Copilot AI requested a review from pelikhan July 28, 2026 08:23
@pelikhan pelikhan closed this Jul 28, 2026
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.

[hippo] [Code Quality] Enforce make recompile after workflow markdown edits

2 participants