ci: migrate no-mistakes gate to shared action - #117
Merged
Conversation
The gate's enforcement logic lived as a self-contained inline run: block that had to be hand-copied between sibling repositories, which is exactly the drift this replaces. The workflow is now a thin caller of kunchenguid/no-mistakes/.github/actions/require-no-mistakes, pinned to an immutable commit rather than @main (main is editable by the very pull request the gate judges). Drop synchronize from the trigger types: the verdict is a pure function of pull_request.body, and a push moves the head SHA without carrying a new body to judge, so a synchronize could pin a FAILURE check run to a head whose body the same pipeline run was about to fix. This repository's ruleset is advisory with no required status check, so dropping it cannot wedge a merge. test/no-mistakes-gate.test.ts extracted and executed the inline run: block, so it goes with the block; the equivalent tests live upstream beside the shared action.
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.
Intent
Migrate this repository's no-mistakes gate to the shared
require-no-mistakescomposite action, replicating the exact pattern already merged in rough-cut-axi PR #4 (which is the proven template for this migration).Specific requirements:
run:step with a thin caller step usingkunchenguid/no-mistakes/.github/actions/require-no-mistakes@32d396ac0f29135daf7fcb9964aba9d5f4e796d6(post-v1.57.1, untagged; the action was added in no-mistakes #819). Keep EXACTLY as-is: the job namePR must be raised via no-mistakes, the job-levelif:author exemptions,concurrency,permissions, and this repo'spaths-ignorerelease-please exclusion. The enforcement logic (signature check, attestation parse, head-binding) now lives in the shared action - deliberately do NOT keep a local copy. The pin is an immutable commit SHA and never @main, because main is editable by the very PR the gate judges; bumping the pin is a separate deliberate PR.synchronize. This was verified: this repo's ruleset is advisory with NO required status check, so dropping synchronize cannot wedge a merge on 'Expected - waiting for status'. The rationale is that the verdict is a pure function of pull_request.body, so a push carries no new body to judge but does move the head SHA, and a synchronize could pin a FAILURE check run to a head whose body the same pipeline run was about to fix.run:block at module init and executed it; with the inline block gone it would throw on import. rough-cut-axi chore(main): release gh-axi 0.1.6 #4 deleted its equivalent tests outright rather than replacing them with a workflow-shape test, and the equivalent enforcement tests now live upstream beside the shared action - so deletion with no local replacement is the intended handling here, not an oversight or a coverage regression.last-winsverdict semantics are INTENDED. Relaxing the stricter local inline jq (which required every duplicate record of a step to be completed, and failed closed on skip-shaped sibling keys) to the shared action's behavior is CORRECT, not a regression. Do not try to preserve the extra strictness or re-add a local enforcement copy.Deliverable is one PR raised through no-mistakes (this repo's own gate requires the no-mistakes signature plus attestation, so a direct PR would fail it). Do not merge - the captain merges the public repos.
What Changed
synchronizetrigger, remove obsolete inline-script tests, and update contributor guidance to point enforcement changes upstream.Risk Assessment
synchronize.Testing
Targeted tests passed, workflow semantics match the migration contract, and the pinned shared verifier accepted compliant and intended last-wins attestations while rejecting a stale head binding.
Evidence: End-to-end shared gate transcript
Source: End-to-end shared gate transcript
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
AGENTS.md:95- The claim that a stale head-bound attestation "goes red" is no longer generally true after removing thesynchronizetrigger. A compliant PR at head A can be pushed directly to head B without rewriting its body; no configured event runs this workflow, so the shared action cannot reject the stale attestation. Qualify this statement to apply only when a body-bearing workflow event runs.✅ **Test** - passed
✅ No issues found.
pnpm exec vitest run test/release-ci-exclusions.test.tsParsed the current and base workflow YAML withyamlto verify trigger semantics, preserved repository-owned settings, and the single immutable shared-action callerFetched the action and verifier at commit32d396ac0f29135daf7fcb9964aba9d5f4e796d6and executed valid, duplicate-step last-wins, and stale-head pull request events✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.