ci: require no-mistakes pipeline attestation in the gate - #160
Merged
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changed
Mirrors the attestation gate that landed on
gh-aximain (kunchenguid/gh-axi#111) into this repo's.github/workflows/no-mistakes-required.yml.The gate step's inline
run:script is now byte-for-byte identical to gh-axi's (verified by parsing both workflows and comparingjobs.check.steps[0].run: 6583 chars, identical). It now:<!-- no-mistakes-pipeline-attestation:v1 {...} -->comment, and fails withno-mistakes >= 1.46.0 is required (PR 670)when the signature is present but the attestation is missing;steps[]and requiresreview,test, anddocumentto all bestatus == "completed"(every record, if a step appears twice);skip*,quota*,*unavailable) on a required step, so a skip can never ride along on acompletedstatus;This repo's own triggers and exemptions are untouched.
on:(types/branches/paths-ignoreincluding thepackages/axi-sdk-js/**release-please paths),concurrency,permissions, the author exemptionif:, and the job namePR must be raised via no-mistakesare all exactly as before. Only the step name and the script body changed.Test
New
test/no-mistakes-gate.test.mjs(node:test, matching this repo's rootnode --testconvention) parses the workflow YAML, extracts that exact inline block, writes it to a temp file, and executes it withbashagainst fixture PR bodies - so it exercises what CI runs, not a copy.Wired up as
pnpm run test:workflowsand run in CI by the newno-mistakes-gate-testworkflow (path-filtered to the gate, its test, and lockfile/manifest). The test throws on CI ifbash/jqare unavailable, so it can never silently skip there.pnpm run test:workflows- 17/17 passpackages/axi-sdk-js/test/release-ci-exclusions.test.tsasserts the exact inventory of workflows that carry apull_requesttrigger, so the new workflow is registered there. Its path filter selects nothing in the release-output set (rootpackage.jsonis notpackages/axi-sdk-js/package.json), so a release-please PR still creates no run for it.Notes
The advisory
PR must be raised via no-mistakescheck will fail on this PR: it is a direct PR with no pipeline signature. That is expected and non-blocking for internal CI tooling. The real checks (gate test, lint/format, docs, build/test, guard) must be green.