-
-
Notifications
You must be signed in to change notification settings - Fork 0
fix(ci): resync actions.lock and add a lock-sync recurrence gate #66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1dbdcb3
fix(ci): resync actions.lock and add a lock-sync recurrence gate
hyperpolymath a4e7e2f
chore: empty commit to take a second gate startup observation
hyperpolymath 9e59005
fix(ci): give lock-sync-gate.yml an actions.lock entry
hyperpolymath 0082bc7
check-lock-sync: add clause 4, lockfile COVERAGE
hyperpolymath 0842f94
docs(lock-sync): state the step-level scope the checker actually enfo…
hyperpolymath db4639e
Update scripts/check-lock-sync.sh
hyperpolymath 450e64d
Merge branch 'main' into fix/actions-lock-desync
hyperpolymath File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| # SPDX-License-Identifier: MPL-2.0 | ||
| name: Lock Sync Gate | ||
|
|
||
| # Fails any pull request whose .github/workflows/actions.lock has drifted from | ||
| # the workflow YAML. That drift is not cosmetic: GitHub refuses such a run at | ||
| # startup, creating ZERO jobs, and reports only "This run likely failed because | ||
| # of a workflow file issue." A single grouped Dependabot bump can take out most | ||
| # of a repository's CI that way, because Dependabot rewrites `uses:` refs in the | ||
| # YAML and cannot touch the lockfile. Measured across 200 repositories on | ||
| # 2026-09-22: 39 had silently dead CI from exactly this cause. | ||
| # See hyperpolymath/standards#968. | ||
| # | ||
| # This workflow deliberately carries NO `uses:` of its own. It checks out by | ||
| # calling git in a `run:` step instead of using actions/checkout, so it has no | ||
| # lockfile entry to go stale and is structurally immune to the very failure it | ||
| # detects. Do not add a `uses:` to this file. | ||
| # | ||
| # There is also no `paths:` filter, on purpose: a filtered workflow never | ||
| # reports on pull requests that miss the filter, which deadlocks any branch | ||
| # ruleset that requires this check. | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: [main] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: lock-sync-gate-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| lock-sync: | ||
| name: actions.lock is in sync with the workflow YAML | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 5 | ||
| steps: | ||
| - name: Check out without actions/checkout | ||
| env: | ||
| REPO: ${{ github.repository }} | ||
| SHA: ${{ github.event.pull_request.head.sha || github.sha }} | ||
| TOKEN: ${{ github.token }} | ||
| run: | | ||
| set -euo pipefail | ||
| # Authenticate the fetch. An anonymous clone works only for public | ||
| # repositories; this gate must also run on private ones. The header | ||
| # form is used rather than a token in the remote URL so the | ||
| # credential is never written into .git/config. | ||
| AUTH="AUTHORIZATION: basic $(printf 'x-access-token:%s' "${TOKEN}" | base64 -w0)" | ||
| git init -q . | ||
| git remote add origin "https://github.com/${REPO}.git" | ||
| git -c http.extraheader="${AUTH}" fetch -q --depth 1 origin "${SHA}" | ||
| git checkout -q FETCH_HEAD | ||
| echo "checked out ${SHA}" | ||
|
|
||
| - name: Verify lockfile synchronisation | ||
| run: | | ||
| set -euo pipefail | ||
| test -x scripts/check-lock-sync.sh \ | ||
| || { echo "::error::scripts/check-lock-sync.sh missing or not executable"; exit 1; } | ||
| ./scripts/check-lock-sync.sh | ||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
🔎 Supported by static analysis
🏁 Script executed:
Repository: hyperpolymath/blocky-writer
Length of output: 5323
Run the validator from the protected base ref.
On
pull_request, the workflow checks outgithub.event.pull_request.head.shaand then runsscripts/check-lock-sync.shfrom that checkout. A same-repository pull request can replace that executable with a no-op, so thelock-syncjob can report success whileactions.lockremains desynchronised. The pull request can also modify the workflow definition itself.Use a trusted base-ref workflow that fetches pull-request files into a separate directory and runs the validator from the base ref against those files. Do not execute scripts from the pull-request checkout. Keep the gate workflow outside pull-request control.
🤖 Prompt for AI Agents