Repository navigation
fix(pr-convention-policy): detect a composite called through a $/ local reference - #1004
Conversation
…al reference ci-workflows' gate now calls its own check-contract composite as `uses: $/.github/actions/pr-require-checks/check-contract`, GitHub's self-repository syntax. The local-reference pattern matched only `./`, so the pins audit found no artifact for ci-workflows and failed on every push to main. Accept `$/` as well as `./`, keeping the anchor on a live `uses:` entry. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-security-review reviewed No security findings in this pull request. Scope reviewed: What changed: the Checks:
manifest: not hit. |
|
claude-review reviewed No findings. I read the full diff (2 files) and the PR context, and checked the surrounding code in
Verifier dropped 0 of 0 candidates. |
No related issue: the pins audit has failed on every push to main since 2026-11-12
Summary
The "Maintenance Audit PR Convention Pins" workflow fails on every push to main with
drift: caller ci-workflows: no pr-contract composite step and no pr-issue-linkage caller(for example run 43551903176).
ci-workflows' gate calls its own composite through GitHub's self-repository syntax,
uses: $/.github/actions/pr-require-checks/check-contract(
pr-require-checks.yml, step "Check the pull-request contract").That switch from
./to$/landed on 2026-11-08 inci-workflows#1027, so the failures
probably began with the first audit run after it, before the 2026-11-12 example.
detectArtifactPinfound ci-workflows' local composite only throughCOMPOSITE_LOCAL_PATTERN,which accepted a
./prefix and nothing else. The scan therefore found no artifact and reportedkind: "none".GitHub documents
$/as "the self repository reference": it resolves to the same repository atthe running commit and takes no
@{ref}suffix(workflow syntax,
jobs.<job_id>.steps[*].uses;changelog, 2026-07-30).
The scan reads ci-workflows at
main, the commit its ownmainruns, so the existingsha: "main", local: trueresolution applies unchanged.Fix
components/pr-convention-policy/lockstep-drift.mjs:COMPOSITE_LOCAL_PATTERNaccepts[.$]/where it accepted only\./. It still requires a liveuses:entry with no#earlieron the line. Two comments now name both forms.
components/pr-convention-policy/lockstep-drift.test.mjs: a$/reference is detected as thelocal composite at
main, and a commented-out$/line still detects nothing.Nothing else in the component assumes
./:runPinScanreads a local artifact from theconsumer's own tree whatever the prefix. The README and threat model do not describe the prefix.
Verification
node --test components/pr-convention-policy/lockstep-drift.test.mjs: 95 of 95 pass, exit 0.origin/mainpassed the real workflow files toresolveConsumerArtifact. It resolved{"kind":"composite","sha":"main","directory":".github/actions/pr-require-checks/check-contract","local":true}.checkFleetthen reported no drift for ci-workflows against that tree'srun.shandaction.yml. Only one live composite or linkage call exists in ci-workflows' workflows(
pr-require-checks.yml:763), so no legacypr-contractcall can win the scan.LOCKSTEP_GITHUB_TOKENorGITHUB_TOKENto read private callers.Without one it exits 1 with
fetch-error: the pin scan reads private gate callers and needs LOCKSTEP_GITHUB_TOKEN or GITHUB_TOKEN; neither is set. The fleet-wide result therefore comesfrom the workflow's run on main after merge.
Related
pr-require-checks.ymlto$/references.🤖 Generated with Claude Code