Skip to content

Preserve workflow paths and clarify reference normalization in lock-sync checks - #168

Merged
hyperpolymath merged 8 commits into
mainfrom
coderabbit/changes/31ad82f8
Sep 22, 2026
Merged

hyperpolymath merged 8 commits into
mainfrom
coderabbit/changes/31ad82f8

Conversation

@coderabbitai

@coderabbitai coderabbitai Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Preserve actual workflow paths in lock-sync diagnostics, stale-entry detection, and coverage checks instead of reconstructing paths from filenames. Clarify the normalization comment for external action and reusable-workflow references.

The two commits go beyond the docstring-only task: they also change workflow-path matching behavior.

Validation was not run.

View coding task

hyperpolymath and others added 7 commits September 22, 2026 18:49
GitHub refuses a run at startup, creating zero jobs, when a workflow
carries a `uses:` ref that the lockfile does not record under that
workflow's own path. It matches by LITERAL STRING; `gh actions-lock`
matches by resolved commit, so a lock entry naming a tag that
dereferences to the pinned SHA passes the tool and still kills the run.

Regenerate the lock, make it transitively closed, and add a lock-sync
gate carrying no `uses:` of its own so it cannot be disabled by the
desync it detects. No workflow YAML is modified.

Refs: hyperpolymath/standards#968

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X3hgXxWm6umMgZkjYyHnnm
A workflow absent from actions.lock can be rejected at startup (startup_failure,
jobs=0) even when it carries zero real 'uses:' refs and so has nothing to pin.
The gate is deliberately zero-'uses:', which is exactly why it had no entry.

Measured on two repos in this batch: adding this single line flipped the gate
from 7 consecutive startup_failure runs to success on hyperpolymath/verisimdb
(two successes since, nothing else changed) and from 2 of 2 startup_failure to
success on hyperpolymath/blocky-writer.

Enforcement is not uniform across repos — 13 of the 14 repos in this batch start
the byte-identical gate today with the same gap. A repo that passes now is not
evidence its lock is complete, only that the behaviour has not reached it. This
closes the gap before it bites.

Zero-'uses:' workflows take the empty list, matching the entries actions.lock
already carries for other zero-'uses:' workflows such as labels.yml.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X3hgXxWm6umMgZkjYyHnnm
The gate could not defend the fix this PR ships. Clauses 1-3 ask "is every
`uses:` locked under its own workflow path?" GitHub asks a DIFFERENT question:
"is every workflow FILE represented in the lock?" A workflow with no `uses:`
satisfies clauses 1-3 vacuously and GitHub still refuses to start it - which is
exactly how lock-sync-gate.yml failed here 7 times running while the checker
reported the lock in sync. Thirteen other repositories passed the gate with the
same gap present, so a green gate was not evidence of a complete lock.

Clause 4 diffs the set of files under .github/workflows/ against the set of
lockfile keys, fails on any file with no key, names it, and quotes the
empty-list form to add. Remediation step 4 warns that re-running
`gh actions-lock` may not fix it, because omitting the file is the tool's own
defect.

Mutation-tested both ways: deleting the lock-sync-gate key fails the gate, and
deleting the unrelated labels.yml key fails it too; the unmutated tree passes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X3hgXxWm6umMgZkjYyHnnm
…ifier validity bit

The ref is NOT required: GitHub does not enforce job-level reusable `uses:`
at startup, and the standards verifier explicitly accepts it
(`workflow_references_reusable_dependency`). But `gh actions-lock` v0.1.6 still
reports it as `stale`, which flips the tool's `valid` bit to false. That moves
the tree off the `valid == true` early return and into the finding loop, where
the standards SHA pinned here (8f2ee508) has no advisory-category filter -- so
PRE-EXISTING `sha-as-ref` advisories are counted as blocking.

Measured on bofj-kitt: `governance / Actions lockfile verify` was success on
main and failure here, with the same two advisories present in both trees.
Removing the ref (and its now-orphaned `dependencies:` record) restores
`valid = true` and the early return.

Verified offline against the verifier fetched at the PINNED standards SHA:
exit 0, matching main. No workflow YAML is touched.

Also corrects the lock-sync checker's own documentation: clause 1 is enforced
at STEP level only, so the header and success message no longer claim job-level
reusable refs are locked (raised in review; the checker's behaviour is
unchanged and still kills a mutant).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X3hgXxWm6umMgZkjYyHnnm
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor Author

Important

Review skipped

This PR was authored by the user configured for CodeRabbit reviews. CodeRabbit does not review PRs authored by this user. It's recommended to use a dedicated user account to post CodeRabbit review feedback.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Essentials

Run ID: 45f8bb17-ca4c-4b3f-8b54-20e745328f8a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

Base automatically changed from fix/actions-lock-desync to main September 22, 2026 19:54
Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com>
@hyperpolymath
hyperpolymath merged commit a985ba1 into main Sep 22, 2026
23 checks passed
@hyperpolymath
hyperpolymath deleted the coderabbit/changes/31ad82f8 branch September 22, 2026 21:14
@sonarqubecloud

Copy link
Copy Markdown

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